[MacPorts] #66591: rust @1.66.0: trouble building universal arm64/x86_64

MacPorts noreply at macports.org
Sat Dec 31 17:14:31 UTC 2022


#66591: rust @1.66.0: trouble building universal arm64/x86_64
---------------------+---------------------------------
  Reporter:  kencu   |      Owner:  MarcusCalhoun-Lopez
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:
Resolution:          |   Keywords:
      Port:  rust    |
---------------------+---------------------------------

Comment (by kencu):

 unfortunately same TSD error building universal rust with the new build of
 jemalloc. I'll go back to disabling it and see if I can fix that destroot
 issue for now.

 I notice two things about jemalloc; first of all, there are these warnings
 during the build, involving interestingly the TSD area in question:
 {{{
 ccache /usr/bin/clang -std=gnu11 -Werror=unknown-warning-option -Wall
 -Wextra -Wshorten-64-to-32 -Wsign-compare -Wundef -Wno-format-zero-length
 -Wpointer-arith -Wno-missing-braces -Wno-missing-field-initializers -pipe
 -g3 -Wimplicit-fallthrough -O3 -funroll-loops -pipe -Os
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk
 -arch arm64 -c -I/opt/local/include
 -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.sdk
 -D_REENTRANT -Iinclude -Iinclude -o src/bin_info.o src/bin_info.c
 In file included from src/jemalloc_cpp.cpp:10:
 In file included from
 include/jemalloc/internal/jemalloc_internal_includes.h:51:
 In file included from include/jemalloc/internal/prof_structs.h:4:
 In file included from include/jemalloc/internal/ckh.h:4:
 In file included from include/jemalloc/internal/tsd.h:310:
 include/jemalloc/internal/tsd_generic.h:91:24: warning: suggest braces
 around initialization of subobject [-Wmissing-braces]
                         tsd_t initializer = TSD_INITIALIZER;
                                             ^~~~~~~~~~~~~~~
 include/jemalloc/internal/tsd.h:150:9: note: expanded from macro
 'TSD_INITIALIZER'
                                 TSD_DATA_SLOW_INITIALIZER               \
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
 include/jemalloc/internal/tsd.h:121:24: note: expanded from macro
 'TSD_DATA_SLOW_INITIALIZER'
     /* tcache_slow */           TCACHE_SLOW_ZERO_INITIALIZER,           \
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 include/jemalloc/internal/tcache_types.h:22:39: note: expanded from macro
 'TCACHE_SLOW_ZERO_INITIALIZER'
 #define TCACHE_SLOW_ZERO_INITIALIZER {0}
                                       ^
 In file included from src/jemalloc_cpp.cpp:10:
 In file included from
 include/jemalloc/internal/jemalloc_internal_includes.h:51:
 In file included from include/jemalloc/internal/prof_structs.h:4:
 In file included from include/jemalloc/internal/ckh.h:4:
 In file included from include/jemalloc/internal/tsd.h:310:
 include/jemalloc/internal/tsd_generic.h:134:22: warning: suggest braces
 around initialization of subobject [-Wmissing-braces]
         tsd_t initializer = TSD_INITIALIZER;
                             ^~~~~~~~~~~~~~~
 include/jemalloc/internal/tsd.h:150:9: note: expanded from macro
 'TSD_INITIALIZER'
                                 TSD_DATA_SLOW_INITIALIZER               \
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~
 include/jemalloc/internal/tsd.h:121:24: note: expanded from macro
 'TSD_DATA_SLOW_INITIALIZER'
     /* tcache_slow */           TCACHE_SLOW_ZERO_INITIALIZER,           \
                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
 include/jemalloc/internal/tcache_types.h:22:39: note: expanded from macro
 'TCACHE_SLOW_ZERO_INITIALIZER'
 #define TCACHE_SLOW_ZERO_INITIALIZER {0}
                                       ^
 }}}

 so perhaps doing something to stop those warnings might be of use to
 preventing the error in rust.

 The other thing about jemalloc is that it forces itself to try to link
 against libstdc++:
 {{{
 DSO_LDFLAGS        : -shared -Wl,-install_name,$(LIBDIR)/$(@F)
 LIBS               : -lstdc++ -pthread
 RPATH_EXTRA        :
 }}}

 I am not sure if it actually does link against it.
 {{{
 % otool -L /opt/local/lib/libjemalloc.dylib
 /opt/local/lib/libjemalloc.dylib (architecture x86_64):
         /opt/local/lib/libjemalloc.2.dylib (compatibility version 0.0.0,
 current version 0.0.0)
         /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
 version 1300.36.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 1319.0.0)
 /opt/local/lib/libjemalloc.dylib (architecture arm64):
         /opt/local/lib/libjemalloc.2.dylib (compatibility version 0.0.0,
 current version 0.0.0)
         /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current
 version 1300.36.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 1319.0.0)
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/66591#comment:6>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list