Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-9893

Fix static build failure on M1 Mac

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • WT11.1.0, 6.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      Building wiredtiger on m1 mac throws:

      FAILED: bench/workgen/_workgen.so
      : && /Library/Developer/CommandLineTools/usr/bin/c++  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk -dynamiclib -Wl,-headerpad_max_install_names  -o bench/workgen/_workgen.so -install_name @rpath/_workgen.so bench/workgen/CMakeFiles/workgen.dir/CMakeFiles/workgen.dir/workgenPYTHON_wrap.cxx.o  -Wl,-rpath,/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib  bench/workgen/libworkgen_cxx.a  libwiredtiger.a  /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/libpython3.9.dylib  /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libpthread.tbd  /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libdl.tbd && :
      Undefined symbols for architecture arm64:
        "___wt_process", referenced from:
            ___wt_clock in libworkgen_cxx.a(workgen_func.c.o)
           (maybe you meant: ___wt_process_id)
      ld: symbol(s) not found for architecture arm64
      clang: error: linker command failed with exit code 1 (use -v to see invocation)
      [539/540] Building CXX object test/cppsuite/CMakeFiles/run.dir/tests/run.cpp.o
      ninja: build stopped: subcommand failed.
      

      The config I use:

      cmake -DCC_OPTIMIZE_LEVEL=-O0 -DENABLE_STATIC=1 -DHAVE_DIAGNOSTIC=1 -DENABLE_STRICT=1 -DENABLE_PYTHON=1 -G Ninja ../.
      

            Assignee:
            donald.anderson@mongodb.com Donald Anderson
            Reporter:
            chenhao.qu@mongodb.com Chenhao Qu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: