What's the best way to deal with bad exec files after loading an Intel-based Time Machine backup into an M1 chip computer? - apple-m1

I've loaded a copy of my Intel-based mac into an M1 chip mac through Time Machine. However, I've been constantly running into bad CPU type files and needing to reinstall some apps that are built for Apple silicon. (I also feel like my laptop's battery has noticeably decreased since loading that Time Machine backup.) I didn't download Rosetta because I feel like that would make runtimes slower, and all the apps I need should have a native version published (please correct me if I'm wrong).
It's hard to get working versions of coding-related things though, like homebrew that won't install unless I specify a certain path. At this point, would I be better off just by starting fresh and download those programs as needed? As a programming newbie, I'm not sure which is better - trying to delete the non-working Intel programs (which I have yet to figure out since most uninstall programs are also Intel-based), or wiping my computer and download the Apple silicon ones right from the start.
Thanks for any tips in advance!
I've tried to delete and reinstall apps, which worked. Wasn't that successful with programs like Git since the uninstall program is in Intel.

Downliad and install all the programs you need for the M1 chip.
Then restore your data from the backup.
Trying to run intel based programs on an M1 is just costing you time.

Related

Checking an R-devel-linux error for my CRAN package using my MacBookPro

I have a CRAN package that has inputenc errors when creating vignette PDF outputs in a strict Latin1 locale. The check results have errors for flavor
r-devel-linux-x86_64-debian-clang, which uses LANG=en_US.iso885915. I believe I may have fixed the problem (it was a warning on my Mac). However, I feel I should check the problem on Linux as well before submitting bug fixes to CRAN. It was suggested to me that to check that my package fixes the error on LANG=en_US.iso885915, that I should run the following command on Linux:
LANG=en_US.iso88591 R CMD check
I do not have access to Linux and will not for the reasonably foreseeable future. I am trying to figure out how to run this command on my macOS Catalina (version 10.15.3). With little experience running Linux on Mac, I have been doing searches online, with an example forum here. There are some negatives discussed there, including the lack of necessity of running Linux on Mac (usually), installation of Linux restraints on latest MacBooks, and virtual machines not truly representing what Linux can do.
I decided it may be helpful for me to ask here on SO. I do not have too much storage left on my Mac and I would likely delete any Linux installations quickly since I will likely not need them outside of this one issue. I also do not have much experience installing virtual machines and Linux. I also hope to avoid any other risks I may not even be aware of to my computer.
What is the best way (convenient, low risk, quick, low storage requirements) you may know for someone in my position to check this recommended command (LANG=en_US.iso88591 R CMD check) with access to simply my MacBook Pro (Retina, 13-inch, Early 2015)? Thank you for sharing suggestions!

Running R from CD-ROM

Can R be run from a CD-ROM drive? The computer is a stand-alone (no network or Internet connection) and I can't install anything on it, nor can I use a flash drive.
Thanks.
What do you mean by "can't install"?
You don't need to install R, you can just run it from a folder copied from somewhere else. If you have hard disk storage on the PC then you can copy C:\Program Files\R from one machine onto a CD-ROM, then take the CD-ROM to the cripplebox, copy it to wherever you store your files and run it from there. Worst case scenario is you have to change the R_HOME environment variable. Works for Linux and Windows (you didnt say what OS you are on).
...unless your sysadmins have disabled executable permissions for your hard disk storage. Which is a real BOFH thing to do.
...but if they've done that I'd also suspect they've disabled executables from CD-ROM too.
...and if you don't have any writable hard disk storage, how the heck are you going to do any analysis?
...the real fix may be to kick the sysadmins until you tell them you can't do your job without R installed on the machine.
You may have trouble with packages, but otherwise, the instructions for installing R on a USB key should be pertinent.

deploying a Qt application

In a nutshell, the question is: I just finished my first application using Qt Creator on a computer running under Linux Ubuntu, now how do I make this available for everyone. Now follows the more detailed version ;)
I must apologize for asking this, I am aware that this question has probably been asked many times and that there is official documentation that I can read. I am just completely new to programming and I am very confused by everything I've read so far. If you are kind enough to help, please assume I know absolutely nothing :)
Here we go: I've just finished designing my first application (a scientific program) with Qt creator on my laptop which runs under Linux Ubuntu. It works fine and I'm very proud of it ;)
Here's what my project consists of: 40 header files, 42 source files, 1 pro file, 1 qrc file, 1 html file and 7 png files. In the code, I use #include for a bunch of fairly standard Qt classes (QWidget, QTextBrowser and so forth, maybe like 40 of those).
Now I'd like to make it available to other people. For Linux and Mac users, I've figured a way to do that: I can compress the folder containing my project, tell them to install Qt on their computer, then download and extract the files on their hard disk, open a terminal in the folder and run
qmake myProject.pro
qmake
make
That seems to work fine (by the way, does it matter that this is not precisely what Qt creator does? The qmake step there is qmake-qt4 myProject.pro -r -spec linux-g++ and the make step is make -w). Now, I assume there is a solution where I don't ask them to download and install something like 200Mo of Qt material. As for Microsoft Windows users, I don't have a clue.
I would be very grateful if you could explain to me in a very concrete way what I need to do. Needless to say, I'll go for the best and easiest solution, I don't need to understand everything about deployment. Many thanks in advance!
Edit: In case that's useful : I've been using Qt Creator 2.5.0 based on Qt 4.8.1 (64 bit), I'm working on a laptop with Ubuntu 12.04 64bits
For Linux and Mac users, I would compile the software for them in 32 and 64bit formats - no-one likes compiling unknown software from source. Obviously keep the source code option for those on more unusual architectures/OSs (and provide a shell script for them that mimics the commands Qt Creator calls!). As Qt runtimes are available from package managers on just about every distro (and come pre-installed on most anyway, KDE requires them for example), by not asking them to compile from source your users will have a much smaller download (if any) and won't require them to download software from a website potentially unknown to them. Of course the best way would be to try to get your software added as a package into the major distros' repositories, but that may take some time to organise.
Compile your software for Windows users for both 32 and 64bit formats. It's generally frowned upon to ask users to download runtime libraries they potentially don't know, and put them into their system32 folder... So most applications bundle all the libraries they need with their application. Qt-based applications are no different, and so put the runtimes into the folder where the executable is. Also it is much more professional to create a proper installer, there are a few free installer applications for Windows, a web search will give you the most popular (I think I saw a thread on SO about it as well).
As you can see the platforms aren't too dissimilar, the main point I would make is: Do not force people to compile from source! The vast majority of people on Earth do not even know what compiling is, so provide for the major arrchitectures/OSs yourself.

CSS cross browser compatibility on Ubuntu

I'm currently working in web development and my default desktop is Ubuntu and I'm kind of happy with the setup and applications I got going. But I need to test web pages for cross browser compatibility while still being on Ubuntu.
I have gone through hell trying to get IE7 or IE8 (with wine) to run on ubuntu and when they finally worked they were very buggy and the graphics/scrolling was insanely slow.
Of course there is the option of virtual box but again, too much GBytes just to run a small application!
So to all the CSS gurus out there, how can I continue with my beloved Ubuntu and still deliver a good quality (tested) page.
Thank you.
Edit:
Update for freshness:
I now use the paid service from browserstack.com to provide the multitude of different browser testing environments via flash tunnelling. I'm a paid user, but there is an initial free trial period. browserstack has freed me of the need to run the windows os on my machines in any form, virtual image or otherwise. Since it also allows tunnelling, I can host the site on my local machine but still test in browserstack browsers. I consider the monthly fee money very well spent.
End Edit
Various options I have tried, including "the final solution": free downloadable windows testing OSes from microsoft
I've tried a number of the options below, but virtualbox may be your best bet for full & complete testing, especially because in a professional capacity you often have to test ie8, ie7 -and- ie6. Which gets tricky with only a single os installed. So in order of simplest and most shallowly testing to most complex and most fully testing:
browserlab.adobe.com
A newer, interesting online solution is: browserlab.adobe.com. It's actually very specific and fast compared to browsershots. It only gives you screenshots, but it's a great first step. So I do recommend that for purely visual (and thus relatively shallow) testing.
Browsershots.org
And while browsershots.org is also something that you should use for an overview experience of what users might see, you really can't get by without the real browsers for javascript and behavior testing (instead of just display & rendering testing that browsershots provides). The delay before you can see the images is also killer.
Dual booting into windows
Another that I've tried is dual booting, I work 99% of my time in ubuntu, and I have windows installed & available to dual boot into. Not a fast way to test, but if you don't have any other way to access ie, it should work for at least the latest version.
Remote desktop-ing over to a running windows box
Before I mention the "covers-all-the-bases" option, another useful possibility is to set up a windows machine and boot it up and connect to it via remote desktop so that you can work from one machine and test from both.
The final solution, using virtualbox
Finally, the mother of all solutions, using virtualbox:
Luckily (I know you said you didn't like the virtualbox solution, and I know it's an annoying setup process, but...) Microsoft provides available-for-a-year-or-more virtualmachine distros with different versions of ie pre-installed, available without the need for a license for a year or so before you'd have to update the virtualmachine, #
http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en
Installing a virtualmachine from microsoft's freely available browser testing images
Because this guide to setup on ubuntu is no longer available in full anywhere else, just in case you or someone else actually need it I feel compelled to include the actual details of the install process that were suggested to me on the ubuntu forums and worked when I went through them. I apologize for their length. Courtesy of the now anonymous original poster on the ubuntu forums:
Free Access to Microsoft Browser Compatibility Virtual OSes, Install Steps for Ubuntu
http://ubuntuforums.org/showthread.php?t=1097080 (Ed: I can't find this thread online any more)
HOWTO: run IE6, IE7, IE8 on Linux in
VirtualBox You need: virtualbox, qemu,
wine
Code: apt-get install virtualbox qemu
wine
Download the free(!) Microsoft
Internet Explorer Application
Compatibility Check VPC Images here:
http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en
(Note: you don't have to download the
full pack, you can cherry pick
specific combinations of XP/Vista and
IE6-8)
Extract the VPC image(s) with wine
(double-click). (Note: it might take a
while before the first window shows
up)
Turn the VPC image(s) into (a) VMWare
image(s) (which is/are readable by
VirtualBox): qemu-img convert -f vpc
image.vhd -O vmdk image.vmdk
Setup a new VM in VirtualBox, using
the vmdk image as an existing disk.
Boot it, you will see the Windows boot
progress bar and ... it will BSOD
shortly after.
Fixing the BSOD:
The BSOD is caused because the virtual
Windows tries to load processor
drivers for the wrong processor (it is
not running on VirtualPC proc, but on
VirtualBox proc). Or something like
that... We need to force Windows not
to attempt to load drivers for the
processor (it doesn't need any proc
drivers, because it's all virtual
anyway). Start safe mode by
(frantically) hitting F8 at Windows
boot and choosing safe mode.
Ignore all the 'New hardware' detected
warnings (we will deal with those
later). Start a command box and run
the following command to disable the
loading of processor drivers:
Code: sc config processor start=
disabled (note the space between '='
and 'disabled'!)
Restart the virtual Windows, it should
now boot all the way to the Windows
Desktop.
Now just when you think you can start
browsing the web with IE, you will
find out that the virtual Windows
needs to install the drivers for the
AMD PCnet NIC, which are located on
the Windows install disk. Fortunately
for those without a Windows install
disk, there is another way :)
Download AMD PCnet drivers here:
http://www.amd.com/us-en/ConnectivitySolutions/ProductInformation/0,,50_2330_6629_2452%5E2454%5E2486,00.html
Make an iso file containing the
drivers. I used Brasero for
simplicity. Choose to create a Data
Project, add the zip file (or the
unzipped files, saves you a step in
Windows), create the iso. No need to
burn an actual cd!
Stop the virtual Windows, edit the
settings in VirtualBox: mount your
brand new iso.
Start the virtual Windows, when it
asks to install the drivers for the
PCnet nick, point it to the (unzipped)
drivers. Et voila! You have teh
innernets! (Now you can also try to
install the other drivers it complains
for, but it's not really necessary)
The image README says the image will expire after about a year. In my experience the system gets hobbled against multi-hour use, but is still usable for the kind of short periods that you might want when booting up to test a website. At worst you might have to go through these steps again, so be sure to put them somewhere where you can find them again after a year or so.
I think setting up a virtual machine (Virtualbox or VMWare or...) with a proper Windows will be your only (local) option.
I you don't have one, buy a used Windows XP license. XP is cheap (around 20-30 euros here in Germany, for example) and all relevant versions of IE run on it. Home edition is enough. No need for Windows 7 or anything.
You could install IETester on that to get all the IE versions on one OS. IETester has flaws and is not always 100% reliable in what it renders, but for a general CSS compatibility check it should be okay.
I've never tried IE using Wine, but even trying to imagine the combination gives me goose bumps :D
If you have a copy of Windows you could install it in a virtual machine (Virtualbox is a good, free option). Or if you don't mind a lot of lag time and publicly exposing your web pages you could use a service like BrowserShots.
I have not tried this on Ubuntu or anything but windows - but this seems to be a pretty good testing system over the web.
http://spoon.net/browsers/
however, I think your best result would be to use a VM if possible.
I have to add my voice to those opting for VirtualBox.
VMs are the only way to get an accurate representation of how IE platforms behave. They also allow you to keep your main Linux install free of WINE and IE gunk, which is otherwise always troublesome and fragile. (Especially if you're trying to run multiple IEs, which is unreliable and inaccurate even under Windows).
They're not necessarily that big, if you take care to prune the unneeded features, turn off swap, compact the disc image and so on. My XPSP3 test image is just over 800MB.
I didn't want to install all this stuff as I wanted to move forward quick.
I found public AWS images with pre installed browser that you just can start and use.
http://www.hens-teeth.net/html/products/cross_browser_testing.php
If you already have an AWS account this will take you only 5 min. Make sure that you enable the RDP port on the incoming traffic in your security group.
As I use ubuntu I was looking for a way to connect from it to MS Win.
I'm connection on to them via remote desktop.
The way to go here is rdesktop, a command line utility for Windows Remote Desktop. (sudo apt-get install rdesktop)
If you feel like a GUI use tsclient. It's very close to the windows version.
From a work flow perspective I develop for Chrome in Ubuntu first, then have a look at the other browsers via browserlab.adobe.com.
After that I start my new AWS instance to debug.
The small AWS Windows instance is a $0.12 per hour (http://aws.amazon.com/ec2/#pricing). I can work for a long time on that before it's worth installing all this stuff.
CrossBrowserTesting.com works from Linux. Allows you to access Mac, Windows, and Ubuntu configurations and all the browsers loaded on them via vinagre vnc client.

AIX deployment : installp or rpm?

I am deploying a large set of perl/shell/sql code on AIX. these could be (and are) different applications with their own dev teams, source control repos, etc.
I am lazy and want to make deployments/roll-backs easier - and I am digging towards rpm packaging with all it's +/- benefits.
AIX native system of packaging is installp (with bff files).
am I on a right track with rpm? oss4aix.org uses rpm FWIW.
any input/best practices is appreciated.
thanks
"installp" is a bit of a black art. For a long time it was impossible to get the build software without spending non trivial amounts of money so very few people outside IBM (and Bull) bothered with it.
"rpm" on the other hand has been freely available for years. For scripty type stuff there should be no special considerations for AIX so the large body of experience, knowledge and example code available for Linux will be useful to you.
I dont think IBM is dropping AIX anytime soon, but, they are actively porting the standard linux tools to AIX and some of the AIX tools to Linux so the environments are converging. I think its only a matter of time before installp become "depreciated" in favour of rpm.
I never had to develop instalp packages. I am under the impression that IBM is going to buy a major Linux distribution and stop all their proprietary business sometime soon. I think for the long term moving to rpm is getting ahead of the curve.
I found one document to build rpm 5.0 and yum on AIX.
http://www.tekwire.net/joomla/building/rpm/rpm_AIX_5.2.htm
Aix 4,5,6 use the RPM v3.0 - 1998 circa, iirc RedHat 6.2. A zillion of resolved bugs and new functionality are in rpm nowdays. So use it but don't aspect that you can do with it what other do in a moderm linux rpm distro.
Or, as a good alternative to build yourself rpm 5 - which other on aix ? - try
openpkg http://www.openpkg.org/
Have a look at the polypkg tool we wrote; it's a shell script that does the hard work of making packages for you.

Resources