Skip to content

Compiling 1.0.0-qt6 results in linking errors #69

@HurricanePootis

Description

@HurricanePootis

System Information

Arch Linux
glibc 2.40+r16+gaa533d58ff
clang 18.1.8
binutils 2.43+r4+g7999dae6961

CXXFLAGS=-march=znver3 -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -flto=thin
CFLAGS=-march=znver3 -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=thin
LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs
cmake -B build -S mcpelauncher-ui-manifest \
 -DCMAKE_C_COMPILER=clang \    
  -DCMAKE_CXX_COMPILER=clang++ \    
  -DCMAKE_INSTALL_PREFIX=/usr \    
  -DCMAKE_BUILD_TYPE=None \
  -DENABLE_DEV_PATHS=OFF \
  -Wno-dev

Bug

Whenever compiling v1.0.0-qt6, the following error is printed towards the end:

[ 95%] Linking CXX executable gplayver
[ 96%] Building CXX object mcpelauncher-ui-qt/CMakeFiles/mcpelauncher-ui-qt.dir/encryption.cpp.o
[ 97%] Building CXX object mcpelauncher-ui-qt/CMakeFiles/mcpelauncher-ui-qt.dir/mcpelauncher-ui-qt_autogen/EJRQKI7XPS/qrc_translations.cpp.o
/usr/bin/ld: /usr/lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2024072212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/libabsl_log_internal_check_op.so.2407.0.0: error adding symbols: DSO missing from command line
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [google-play-api/CMakeFiles/gplaydl.dir/build.make:133: google-play-api/gplaydl] Error 1
make[1]: *** [CMakeFiles/Makefile2:483: google-play-api/CMakeFiles/gplaydl.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: /usr/lib/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2024072212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/lib/libabsl_log_internal_check_op.so.2407.0.0: error adding symbols: DSO missing from command line
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [google-play-api/CMakeFiles/gplayver.dir/build.make:133: google-play-api/gplayver] Error 1
make[1]: *** [CMakeFiles/Makefile2:509: google-play-api/CMakeFiles/gplayver.dir/all] Error 2
[ 98%] Linking CXX executable mcpelauncher-ui-qt
/usr/bin/ld: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../lib64/libprotobuf.so: undefined reference to symbol '_ZN4absl12lts_2024072212log_internal17MakeCheckOpStringIllEEPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_T0_PKc'
/usr/bin/ld: /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../lib64/libabsl_log_internal_check_op.so.2407.0.0: error adding symbols: DSO missing from command line
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [mcpelauncher-ui-qt/CMakeFiles/mcpelauncher-ui-qt.dir/build.make:792: mcpelauncher-ui-qt/mcpelauncher-ui-qt] Error 1
make[1]: *** [CMakeFiles/Makefile2:703: mcpelauncher-ui-qt/CMakeFiles/mcpelauncher-ui-qt.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

Attempted fixes

  1. Building without LTO
  2. Building without -Wp,-D_FORTIFY_SOURCE=3
  3. Building with no flags at all

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions