[MacPorts] #38088: Build process for getopt 1.1.5 produces "bad magic number (not a Mach-O file)" output?
#38088: Build process for getopt 1.1.5 produces "bad magic number (not a Mach-O file)" output? -----------------------------+-------------------------------- Reporter: Peter_Dyballa@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Keywords: | Port: getopt -----------------------------+-------------------------------- Hello! The upgrade stops here: {{{ make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_sysutils_getopt/getopt/work/getopt-1.1.5' /usr/bin/gcc-4.0 -c -DLIBCGETOPT=0 -DWITHOUT_GETTEXT=0 -DLOCALEDIR=\"/opt/local/share/locale\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"getopt\" -Dprogram_version=\"1.1.5\" -I/opt/local/include -I./gnu -Wall -W -Wshadow -Wpointer-arith -Wbad- function-cast -Wcast-qual -Wcast-align -Wmissing-declarations -Wwrite- strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -O3 -fno-strength-reduce -arch ppc getopt.c -o getopt.o In file included from getopt.c:65: ./gnu/getopt.h:106: warning: function declaration isn’t a prototype /usr/bin/gcc-4.0 -L/opt/local/lib -lintl -arch ppc -o getopt getopt.o gnu/getopt.o gnu/getopt1.o /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: gnu/getopt.o bad magic number (not a Mach-O file) /usr/libexec/gcc/powerpc-apple-darwin8/4.0.1/ld: gnu/getopt1.o bad magic number (not a Mach-O file) collect2: ld returned 1 exit status make: *** [getopt] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_sysutils_getopt/getopt/work/getopt-1.1.5' }}} On the command line I get a different report: {{{ pete 274 /\ l /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_sysutils_getopt/getopt/work/getopt-1.1.5/*.o -rw-r--r-- 1 macports admin 15044 17 Feb 01:02 /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_sysutils_getopt/getopt/work/getopt-1.1.5/getopt.o pete 275 /\ file /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_sysutils_getopt/getopt/work/getopt-1.1.5/*.o /opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_sysutils_getopt/getopt/work/getopt-1.1.5/getopt.o: Mach-O object ppc }}} -- Ticket URL: <https://trac.macports.org/ticket/38088> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38088: Build process for getopt 1.1.5 produces "bad magic number (not a Mach-O file)" output? ------------------------------+-------------------------------- Reporter: Peter_Dyballa@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: Port: getopt | ------------------------------+-------------------------------- Comment (by Peter_Dyballa@…): Forgot to mention that it happens on PPC Tiger, Mac OS X 10.4.8. -- Ticket URL: <https://trac.macports.org/ticket/38088#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38088: getopt @1.1.5: bad magic number (not a Mach-O file) ------------------------------+-------------------------------- Reporter: Peter_Dyballa@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: | Keywords: tiger Port: getopt | ------------------------------+-------------------------------- Changes (by ryandesign@…): * keywords: => tiger * cc: ryandesign@… (added) Comment: Same here on ppc G4 10.4.11. -- Ticket URL: <https://trac.macports.org/ticket/38088#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#38088: getopt @1.1.5: bad magic number (not a Mach-O file) ------------------------------+-------------------------------- Reporter: Peter_Dyballa@… | Owner: macports-tickets@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 2.1.3 Resolution: fixed | Keywords: tiger Port: getopt | ------------------------------+-------------------------------- Changes (by ryandesign@…): * status: new => closed * resolution: => fixed Comment: I note that on Mountain Lion the following message appears: {{{ ld: warning: ignoring file gnu/getopt.o, file was built for unsupported file format ( 0x7f 0x45 0x4c 0x46 0x 2 0x 1 0x 1 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): gnu/getopt.o ld: warning: ignoring file gnu/getopt1.o, file was built for unsupported file format ( 0x7f 0x45 0x4c 0x46 0x 2 0x 1 0x 1 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 0x 0 ) which is not the architecture being linked (x86_64): gnu/getopt1.o }}} Despite the warning, the build succeeds, but I suspect whatever problem ld is warning about here on Mountain Lion is the same problem causing the build to fail on Tiger. And the problem seems to be that version 1.1.5 was shipped with pre- compiled Linux ELF object files in the distfile: {{{ $ sudo port extract getopt ---> Fetching distfiles for getopt ---> Verifying checksum(s) for getopt ---> Extracting getopt $ cd $(port work getopt) $ file getopt-*/gnu/*.o getopt-1.1.5/gnu/getopt.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped getopt-1.1.5/gnu/getopt1.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped $ }}} Fixed in r103250. Revision increased to rebuild for everybody, because I'm concerned about the "ignoring file" warnings; I suspect it was not intended for those files to be ignored, so let's rebuild correctly to be sure. -- Ticket URL: <https://trac.macports.org/ticket/38088#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts