[MacPorts] #67307: glib2 compilation issues with clang

MacPorts noreply at macports.org
Wed Apr 26 12:44:00 UTC 2023


#67307: glib2 compilation issues with clang
----------------------+--------------------
 Reporter:  rmottola  |      Owner:  (none)
     Type:  defect    |     Status:  new
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:
 Keywords:  leopard   |       Port:  glib2
----------------------+--------------------
 On Leopard 10.5 64bit

 Default compile is qith clang 3.7:

 {{{
 Undefined symbols for architecture x86_64:
   "___udivti3", referenced from:
       _g_get_monotonic_time in gmain.c.o
 ld: symbol(s) not found for architecture x86_64
 clang: error: linker command failed with exit code 1 (use -v to see
 invocation)
 [97/1192] /opt/local/bin/clang-mp-3.7 -Iglib/gtester.p -Iglib
 -I../glib-2.72.4/glib -I. -I../glib-2.72.4 -I/opt/local/include -fcolor-
 diagnostics -std=gnu99 -O2 -g -D_GNU_SOURCE -fno-strict-aliasing
 -DG_ENABLE_DEBUG -Wimplicit-fallthrough -Wunused -Wno-unused-parameter
 -Wno-pedantic -Wno-format-zero-length -Wno-variadic-macros
 -Werror=format=2 -Werror=init-self -Werror=missing-include-dirs -Werror
 =pointer-arith -Wstrict-prototypes -Wno-bad-function-cast -Wno-
 declaration-after-statement -Werror=implicit-function-declaration -Werror
 =missing-prototypes -pipe -Os -fstrict-aliasing -Wno-deprecated-
 declarations -arch x86_64 -UG_DISABLE_ASSERT -MD -MQ
 glib/gtester.p/gtester.c.o -MF glib/gtester.p/gtester.c.o.d -o
 glib/gtester.p/gtester.c.o -c ../glib-2.72.4/glib/gtester.c
 ninja: build stopped: subcommand failed.
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_glib2/glib2/work/build"
 && /opt/local/bin/ninja -j2 --verbose -v
 Exit code: 1
 }}}

 if I force clang 6.0 (and 7.0) instead:


 {{{
 /opt/local/bin/clang++-mp-6.0 -Iglib/tests/cxx.p -Iglib/tests
 -I../glib-2.72.4/glib/tests -I. -I../glib-2.72.4 -Iglib
 -I../glib-2.72.4/glib -I/opt/local/include -fcolor-diagnostics -O2 -g
 -Wimplicit-fallthrough -Wunused -Wno-unused-parameter -Wno-pedantic -Wno-
 format-zero-length -Wno-variadic-macros -Werror=format=2 -Werror=init-self
 -Werror=missing-include-dirs -Werror=pointer-arith -pipe -Os
 -stdlib=libstdc++ -arch x86_64 -MD -MQ glib/tests/cxx.p/cxx.cpp.o -MF
 glib/tests/cxx.p/cxx.cpp.o.d -o glib/tests/cxx.p/cxx.cpp.o -c
 ../glib-2.72.4/glib/tests/cxx.cpp
 In file included from ../glib-2.72.4/glib/tests/cxx.cpp:18:
 In file included from ../glib-2.72.4/glib/glib.h:32:
 In file included from ../glib-2.72.4/glib/gasyncqueue.h:32:
 In file included from ../glib-2.72.4/glib/gthread.h:32:
 In file included from ../glib-2.72.4/glib/gatomic.h:28:
 ../glib-2.72.4/glib/glib-typeof.h:39:10: fatal error: 'type_traits' file
 not found
 #include <type_traits>
          ^~~~~~~~~~~~~
 1 error generated.
 }}}

 I suppose this is a c++11 issue which is not correctly activated?

 GCC 7 compiles!

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


More information about the macports-tickets mailing list