Thread View: pl.comp.lang.c
2 messages
2 total messages
Started by Borneq
Mon, 02 Oct 2017 13:10
Projekty w CMake i Buck - jak połączyć?
Author: Borneq
Date: Mon, 02 Oct 2017 13:10
Date: Mon, 02 Oct 2017 13:10
18 lines
1765 bytes
1765 bytes
Mam projekt w CMake, który już się rozrósł i ma wiele modułów jak ZMQ, MySQL, Neo4J,.. Do niego chcę mieć funkcjonalność HBase. HBase kompiluje się pod Dockerem i za pomocą Bucka. Teraz chcę mój projekt skompilować pod Dockerem Buckiem - ale jest błąd: /usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/src/hbase/hbase-native-client/otherlibs/libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie clang: error: linker command failed with exit code 1 (use -v to see invocation) Jak skompilować glibc z PIE? kompilowałem go, ale ma ustawienia standardowe. A może wszystko skompilować przez CMake? Ale wtedy jest inny błąd: dołączam bibliotekę protobuf a wypisuje że brakuje mu funkcji od protobuf. Może niezgodność abi? Jest tam coś o cxx11. A projekt kompiluję bo muszę z c++14.
Re: Projekty w CMake i Buck - jak połączyć?
Author: Borneq
Date: Mon, 02 Oct 2017 15:29
Date: Mon, 02 Oct 2017 15:29
31 lines
1860 bytes
1860 bytes
W dniu 02.10.2017 o 15:10, Borneq pisze: > Jak skompilować glibc z PIE? kompilowałem go, ale ma ustawienia > standardowe. Jedno rozwiązane: to projekt główny należy kompilować z PIE (co robię) a poza tym linkować z '-pie' co rozwiązuje, ale jeszcze inny błąd: /usr/bin/ld: /usr/src/hbase/hbase-native-client/otherlibs/libzmq.a(zmq.cpp.o): relocation R_X86_64_32 against `_ZSt7nothrow' can not be used when making a shared object; recompile with -fPIC /usr/src/hbase/hbase-native-client/otherlibs/libzmq.a: error adding symbols: Bad value clang: error: linker command failed with exit code 1 (use -v to see invocation) chyba nie trzeba kompilować ZMQ z PIC bo nie przyłączam dynamicznie, jest: I have prebuilt_cxx_library( name="zmq", lib_dir='../otherlibs' ) gdzie w otherlibs jest 1.8 MB libzmq.a. zmieniłem na : prebuilt_cxx_library( name="zmq", static_lib='otherlibs/libzmq.a' ) ale nadal to samo
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads