[MacPorts] #69189: macports-libcxx does not install universal libraries on Intel

MacPorts noreply at macports.org
Thu Jan 25 19:35:36 UTC 2024


#69189: macports-libcxx does not install universal libraries on Intel
--------------------------+-----------------------------
 Reporter:  barracuda156  |      Owner:  kencu
     Type:  defect        |     Status:  assigned
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.9.0
 Keywords:  x86_64, i386  |       Port:  macports-libcxx
--------------------------+-----------------------------
 Well, the port in its present for is just unusable. I tried to build
 `gtest` as `+universal` on 10.6.8 (Xcode 4.2), it failed to link:
 {{{
 [ 16%] Building CXX object
 googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gtest/gtest/work/build/googletest
 && /opt/local/bin/clang++-mp-11  -isystem
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gtest/gtest/work/googletest-1.14.0/googletest/include
 -isystem
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gtest/gtest/work/googletest-1.14.0/googletest
 -pipe -g -DNDEBUG -isystem/opt/local/include/libcxx/v1 -nostdinc++
 -isystem/opt/local/include/LegacySupport -stdlib=libc++ -arch x86_64 -arch
 i386 -mmacosx-version-min=10.6 -Wall -Wshadow -Wconversion -Wundef
 -DGTEST_HAS_PTHREAD=1 -fexceptions -W -Wpointer-arith -Wreturn-type
 -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align
 -Winline -Wredundant-decls -Wchar-subscripts -std=c++14 -MD -MT
 googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -MF
 CMakeFiles/gtest_main.dir/src/gtest_main.cc.o.d -o
 CMakeFiles/gtest_main.dir/src/gtest_main.cc.o -c
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_gtest/gtest/work/googletest-1.14.0/googletest/src/gtest_main.cc
 clang: warning: argument unused during compilation: '-nostdinc++'
 [-Wunused-command-line-argument]
 ld: warning: ignoring file /opt/local/lib/libcxx/libc++.dylib, file was
 built for unsupported file format which is not the architecture being
 linked (i386)
 Undefined symbols for architecture i386:
   "std::nothrow", referenced from:
       std::__1::pair<testing::TestInfo**, int>
 std::__1::get_temporary_buffer<testing::TestInfo*>(int) in gtest-all.cc.o
 }}}

 Notice:
 {{{
 /opt/local/lib/libcxx/libc++.dylib, file was built for unsupported file
 format which is not the architecture being linked (i386)
 }}}

 Checking that, indeed:
 {{{
 10:~ svacchanda$ port provides /opt/local/lib/libcxx/libc++.dylib
 /opt/local/lib/libcxx/libc++.dylib is provided by: macports-libcxx
 10:~ svacchanda$ file /opt/local/lib/libcxx/libc++.dylib
 /opt/local/lib/libcxx/libc++.dylib: Mach-O 64-bit dynamically linked
 shared library x86_64
 }}}

 However, it is supposed to be universal:
 {{{
 10:~ svacchanda$ port -v installed macports-libcxx
 The following ports are currently installed:
   macports-libcxx @11.1.0_0 requested_variants='' platform='darwin 10'
 archs='x86_64' date='2023-11-08T05:22:47+0800'
   macports-libcxx @11.1.0_0+universal (active)
 requested_variants='+universal' platform='darwin 10' archs='i386 x86_64'
 date='2024-01-26T03:23:04+0800'
 }}}

 `macports.conf` has `x86_64 i386` for universal_archs, nothing exotic.

-- 
Ticket URL: <https://trac.macports.org/ticket/69189>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list