Opened 2 years ago
Closed 17 months ago
#66213 closed defect (fixed)
cmake-bootstrap @3.9.6+universal: Bad CPU type in executable
Reported by: | ryandesign (Ryan Carsten Schmidt) | Owned by: | kencu (Ken) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | snowleopard i386 | Cc: | catap (Kirill A. Korinsky) |
Port: | cmake-bootstrap, clang-11-bootstrap |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
On a Snow Leopard i386 machine I'm no longer able to upgrade many ports—those that depend on xz (for example because they use an xz-compressed distfile) because xz eventually (through clang-11-bootstrap) depends on cmake-bootstrap, which automatically builds itself with the universal variant, which fails because it uses the muniversal portgroup and the x86_64 part of the build wants to run an x86_64 executable which of course will fail on an i386 machine.
main.log:
:info:configure --------------------------------------------- :info:configure CMake 3.9.6, Copyright 2000-2017 Kitware, Inc. and Contributors :info:configure --------------------------------------------- :info:configure Error when bootstrapping CMake: :info:configure Cannot find appropriate C compiler on this system. :info:configure Please specify one using environment variable CC. :info:configure See cmake_bootstrap.log for compilers attempted. :info:configure --------------------------------------------- :info:configure Log of errors: /opt/bblocal/var/macports/build/_opt_bblocal_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake-bootstrap/cmake-bootstrap/work/cmake-3.9.6-x86_64/Bootstrap.cmk/cmake_bootstrap.log :info:configure ---------------------------------------------
cmake_bootstrap.log:
Try: /usr/bin/gcc-4.2 Line: /usr/bin/gcc-4.2 -pipe -Os -arch x86_64 cmake_bootstrap_78513_test.c -o cmake_bootstrap_78513_test ---------- file ----------------------- #ifdef __cplusplus # error "The CMAKE_C_COMPILER is set to a C++ compiler" #endif #include<stdio.h> #if defined(__CLASSIC_C__) int main(argc, argv) int argc; char* argv[]; #else int main(int argc, char* argv[]) #endif { printf("%d%c", (argv != 0), (char)0x0a); return argc-1; } ------------------------------------------ /opt/bblocal/var/macports/build/_opt_bblocal_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake-bootstrap/cmake-bootstrap/work/cmake-3.9.6-x86_64/bootstrap: line 687: ./cmake_bootstrap_78513_test: Bad CPU type in executable Test produced non-zero return code Checking whether supports -std=gnu11 Try: Line: -pipe -Os -arch x86_64 -std=gnu11 cmake_bootstrap_78513_test.c -o cmake_bootstrap_78513_test ---------- file ----------------------- #ifdef __cplusplus # error "The CMAKE_C_COMPILER is set to a C++ compiler" #endif #include<stdio.h> #if defined(__CLASSIC_C__) int main(argc, argv) int argc; char* argv[]; #else int main(int argc, char* argv[]) #endif { printf("%d%c", (argv != 0), (char)0x0a); return argc-1; } ------------------------------------------ /opt/bblocal/var/macports/build/_opt_bblocal_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_cmake-bootstrap/cmake-bootstrap/work/cmake-3.9.6-x86_64/bootstrap: line 677: : command not found Test failed to compile
Attachments (2)
Change History (9)
comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|
Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | cmake_bootstrap.log added |
---|
comment:2 follow-up: 5 Changed 2 years ago by catap (Kirill A. Korinsky)
comment:3 Changed 2 years ago by kencu (Ken)
It would be nice to get this sorted out -- there is no need for cmake/cmake-bootstrap to ever build universal, of course, as it is a build tool that needs only run as native.
It already lists:
installs_libs no
but because it has a universal variant, this will be accessed.
Perhaps if we just remove the universal variant, probably everywhere but at least on these problematic systems, that would do it.
comment:4 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Oh right, thank you for the reminder. I can just install cmake-bootstrap without the universal variant first and because of installs_libs no
that should still satisfy the dependents.
comment:5 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to catap:
Ryan, maybe you know how can I run locally (in Parallels?) macOS 10.6 with i386?
I can't advise you on Parallels. I use VMware for the Buildbot workers, and the 10.6 i386 worker uses the unsupported monitor_control.disable_longmode=true
config setting to make it emulate a 32-bit processor. This works fine now except that it kernel panics from a cold boot; the workaround is to boot into safe mode, then reboot into normal mode.
The Mac OS X End User License Agreement doesn't permit you to virtualize Mac OS X Snow Leopard or earlier (and Parallels and VMware enforce that), but you can legally virtualize Mac OS X Snow Leopard Server and Mac OS X Leopard Server. Mac OS X Tiger and Mac OS X Tiger Server don't work in virtualization on modern CPUs without a patch.
comment:6 Changed 2 years ago by kencu (Ken)
Parallels works mostly fine if you configure it to install a 32bit VM of SnowLeopard during initial VM setup. After that, nothing special needs to be done -- I've had one running for some years now. If certain ports query the processor, they will find the processor can support 64 bit, so it's not quite identical to running on an i386-only system, but close.
Leopard runs in a Parallels VM as well.
Tiger will not run in Parallels for me after much trying, but works reasonably well in VirtualBox, using these fixes <https://github.com/ranma42/TigerOnVBox>.
comment:7 Changed 17 months ago by kencu (Ken)
Owner: | set to kencu |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Ryan, maybe you know how can I run locally (in Parallels?) macOS 10.6 with i386?