[MacPorts] #66176: lzma +universal fails to build: Undefined symbols for architecture i386: "_main", referenced from:
MacPorts
noreply at macports.org
Mon Nov 7 00:42:30 UTC 2022
#66176: lzma +universal fails to build: Undefined symbols for architecture i386:
"_main", referenced from:
---------------------------+------------------------
Reporter: barracuda156 | Owner: ryandesign
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.8.0
Resolution: | Keywords:
Port: lzma |
---------------------------+------------------------
Comment (by kencu):
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.
--
Ticket URL: <https://trac.macports.org/ticket/66176#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list