#66176 closed defect (duplicate)
lzma +universal fails to build: Undefined symbols for architecture i386: "_main", referenced from:
Reported by: | barracuda156 | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | Cc: | ||
Port: | lzma |
Description
Fails on 10.8.5:
ld: warning: ignoring file _o/LzmaAlone.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): _o/LzmaAlone.old: warning: ignoring file _o/ConsoleClose.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): _o/ConsoleClose.o ignoring file _o/Bench.o, file was built for unsupported file format ( 0xCF 0xFA 0xED 0xFE 0x07 0x00 0x00 0x01 0x03 0x00 0x00 0x00 0x01 0x00 0x00 0x00 ) which is not the architecture being linked (i386): _o/Bench.o Undefined symbols for architecture i386: "_main", referenced from: implicit entry/start for main executable ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) gnumake: *** [_o/lzma] Error 1
Similar failure on Rosetta:
ld: warning: in _o/LzmaAlone.o, file was built for unsupported file format which is not the architecture being linked (ppc) ld: warning: in _o/Bench.o, file was built for unsupported file format which is not the architecture being linked (ppc) Undefined symbols: "_main", referenced from: start in crt1.10.5.o ld: symbol(s) not found collect2: ld returned 1 exit status gnumake: *** [_o/lzma] Error 1
Attachments (2)
Change History (6)
Changed 2 years ago by barracuda156
Attachment: | 10.8.5_universal.log added |
---|
Changed 2 years ago by barracuda156
Attachment: | 10.6.8_Rosetta.log added |
---|
comment:1 Changed 2 years ago by barracuda156
comment:2 Changed 2 years ago by kencu (Ken)
for both of these issues, likely the same problem.
MacPorts sets up the proper environment and flags:
209 :debug:build CFLAGS='-Os -arch x86_64 -arch i386' 210 :debug:build CPATH='/opt/local/include' 211 :debug:build CPLUS_INCLUDE_PATH='/opt/local/include/LegacySupport' 212 :debug:build CPPFLAGS='-isystem/opt/local/include/LegacySupport -I/opt/local/include' 213 :debug:build CXX='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_lzma/lzma/work/compwrap/cxx/usr/bin/clang++' 214 :debug:build CXXFLAGS='-Os -arch x86_64 -arch i386 -stdlib=libc++'
but this build doesn't use any of them, it appears.
usr/bin/clang -O2 -c -Wall -Wextra -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -o _o/7zCrc.o ../../../../C/7zCrc.c /usr/bin/clang++ -O2 -c -Wall -Wextra -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -o _o/FileDir.o ../../../Windows/FileDir.cpp
so anything non-standard (ie where the default build from the compiler is not doing what we want) will fail.
comment:3 follow-up: 4 Changed 2 years ago by kencu (Ken)
Resolution: | → duplicate |
---|---|
Status: | assigned → closed |
and that issue is: ticket:65908, which you are already copied on.
comment:4 Changed 2 years ago by barracuda156
Note: See
TracTickets for help on using
tickets.
Then for x86_64 (non-universal) on 10.8.5 it is broken:
Macports have standard config, C++ is not manually set. Default compilers being used.