Can I build a PyInstaller binary for M1 Macs on an Intel Mac? - pyinstaller

I have recently found out that PyInstaller now works on macOS Monterey, so I tried to build a binary. When testing on my Intel machine, it did work as expected. When testing it on an M1 MacBook, however, it failed to work because of "Damaged and cannot open". I think that was because of the incompatibility of Intel apps and M1 apps.
CLang has an option to build for a different architecture, but I don't know if PyInstaller has such parameter that does the same job.
Proof: From the picture, the app is clearly stated to be an "Intel" app.
Thanks for any ideas.

There is a target architecture in the .spec file. I'm have the opposite problem... built on M1 and need to target both.... in the middle of solving the problem but it may be as simple as specifying the Architecture in the .spec file.

Related

Eiffel Studio ARM Apple Silicon M1

I am hoping to create some software with Eiffel & Eiffel Studio
I have a Mac mini with the Apple M1 Arm Processor.
Is there a port of EiffelStudio to native Mac M1?
Does Eiffel Studio support native MacOS Windowing or is it still requiring Windows?
EiffelStudio 21.11 download page does not list a native build for macOS running on M1, only on x86-64. Provided that there are builds for Linux running on ARM, there should be no obstacles to make a build for M1, though.
As to the GUI part, starting from 21.11, non-Windows installations of EiffelStudio rely on GTK 3, that utilizes Quartz API. So, it should not require X Windows.
For now, EiffelStudio for macos M1 is not yet built officially.
However you can download https://ftp.eiffel.com/pub/beta/nightly/PorterPackage_106046.tar and compile it yourself.
For usual macosx-x86-64 machine, the command from the extracted folder is
./compile_exes macosx-x86-64
You may need to get inspired by config files from PorterPackage/C/CONFIGS/ to have a dedicated config for macos on M1 .

Worldwind missing dependencies

Worldwind is giving an error about missing dependencies. The executable works on 8/10 computers (intel) all with the same software & versions (Windows 7 w/ Jre8), same graphics cards/drivers (recently new).
On the computers where Worldwind doesn't work, the error was UnsatisfiedLinkError -"gluegen-rt.dll: Can't load AMD 64-bit .dd on a IA 32-bit platform"
To fix this, I downloaded the JOGL dll files for Intel i856, removed the AMD files and the program gives me this error [1]: https://i.stack.imgur.com/mRYRU.png
Any suggestions/comments are greatly appreciated.
Turns out using the jogamp-fat.jar the computer was looking at the 32-bit version of java. Once I installed Java 64-bit version and changed the JAVA_HOME it worked. Thanks!

Deployment of statically linked Qt application backward compatibility

This is my first attempt at making a Qt Application work on different systems.
I have opted for static linking method.I have already compiled the sources of Qt 5.5 and compiled my application with the static Qt. The executable is working fine on my computer.
My operating system is Ubuntu 15.04. But when I tried to run the same executable on Ubuntu 14.04 then I ran into trouble. The key details of the error message are given below.
libstdc++.so.6 cxxabi_1.3.8 not found
I did a standard Google search and realised it was because I had a newer version of it on my machine, the machine where I had created the executable. There were so many different approaches to handle this problem. One of the solutions I saw involved shipping your own copy of libstdc++.so with the executable. But when I tried to copy the .so file to a pen drive, there was a warning saying that the file system does not support such files.
My question is , what am I doing wrong ? Also if I wanted to make the executable target Ubuntu 10.04, what would be the correct procedure handling the backward compatibility issues. I know that one method would be to install the same OS on my machine and then create the executable , is there any other way?
libstd++ is backward compatible but not forward compatible, which means you can run a program with a newer version of libstdc++ than the one you compiled it with but not vice-versa. This is what you experienced.
One way to deal with this issue is using older OS versions as the build machine. When you for example use Ubuntu 14.04 LTS, you'll get this list of compatible target systems.
The build system you're using will probably limit available compilers. On Ubuntu 14.04 you get GCC 4.8, which is good for most C++11 and packages for clang 3.6 are available, which will give you full C++14 support.
Targeting Ubuntu 10.04 will be challenging if you do not want to use a stone age compiler.
The idea of shipping libstdc++ will not help you much because you'll run into the same problem with libc.

Compiling and linking library MSVC/MingW

I'm a big fan of StackOverflow because you always have answers for problems, and now is my chance to get advance of it Ö!
I'm trying to use a library which I got in the Internet, its OZCollide. Its suppossed to be crossplatform as it says in its website "Cross-platform, works on Windows, Linux and Macintosh, in fact any platform supporting VisualStudio 6/7 or gcc"
I got all the .h and .cpp, compile them with MinGW as objects (.o) and then link them all using ar. But the problem is when I include and use the library on my project (QT & MinGW) it throws "undefined reference".
I thought the problem could be that library examples only uses Visual Studio, so the library coulnd't be compiled for MinGW, but the website tells other story.
Thanks for your time!
EDIT: Okay I have managed to compile it and use it moving to another computer and compiling makefile. The only one difference is that Computer A had Cygwing and MinGW installed (with Cygwin set up in Windows path) and Computer B only had MinGW.
So I guess the problem was Makefile calling for g++ and Cygwin g++ got called instead of MinGW g++??
If I'm right, whats the difference between Cygwin and MinGW?
if you have experience with CMake, create your own CMakeLists file and import/link this libraries against your project. In this way, you can create projects for MinGW/MSVC/Linux/etc.
Here you'll find a good start with CMake http://www.cmake.org/cmake-tutorial/

Can you install Qt-4.6.0-wince successfully?

I'm trying to install Qt-4.6.0-wince on XP and Vista. I read the instructions and follow it to install.
However, I can't install it successfully due to some fatal errors on all of the two machines. I think the problem is that qconfig.[h cpp] files are not created automatically during the configuration.
I already report about this problem, so you can see the more information here. However, it is still remained as unresolved.
Anybody here who has been installed it successfully?
#KernelJ I believe the original poster is using the correct install distro - the final product will be cross compiled from Win32 to WinCE; as is pointed out in the Qt for Windows CE Requirements.
#Brian, Unfortunately, I can't answer your original question - I have had unrelated trouble with the WinCE distribution myself and am working the issues now. However, I can provide some help: I was able to get the Qt Everywhere 4.6 to cross compile on my Win32 (XP) host for WinCE. I used the commercial version, but here is a link to the Open Source Qt Everywhere 4.6 package. As is pointed out in the nokia instructions, make sure to use the Visual Studio command prompt, get your environment variables ironed out, create a custom mkspec (if you have to), and keep a close eye during the configuration for any warnings.
Good luck.
Qt-4.6.0-wince, as is implied in the name and said explictly on the page you linked, is for Windows CE, NOT for Windows XP and Vista!!!
Nokia have released a nice software development kit for Qt which you can download here. It is very impressive and powerful!
I got things running as compilable (and running on emulator) with VS 2008, so your milage may vary:
Make sure the PATH variable points to \bin
Open a command prompt (using the Visual Studio Command Prompt)
Run the vcvars32.bat file (in C:\Program Files\Microsoft Visual Studio 9\VC\bin) folder
Cd into the qt folder
Run this: configure -no-sql-sqlite -no-qt3support -platform win32-msvc2008 –xplatform wincewm50pocket-msvc2008 -no-phonon -no-phonon-backend -no-webkit (building for WINCE 5.0, and all the '-no-...' makes it build faster, removing stuff we don’t want)
The setccepaths script provided sometimes doesn’t work. I used checksdk.exe –script temp_script.bat (It creates a script, the default is for Pocket PC SDK 5)
Run that script you just created (the temp_script.bat thing. It sets up environment variables.
Run nmake
*whew*
and good luck.

Resources