vitalif / grive2

Google Drive client with support for new Drive REST API and partial sync
http://yourcmc.ru/wiki/Grive2
GNU General Public License v2.0
1.52k stars 140 forks source link

undefinded reference to symbol 'inflateEnd' and DSO missing from command line #319

Open Medoalmasry opened 4 years ago

Medoalmasry commented 4 years ago

Error Trace

[ 91%] Building CXX object libgrive/CMakeFiles/unittest.dir/test/util/ConfigTest.cc.o

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libcurl.so: undefined reference to symbol 'inflateEnd'

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /lib64/libz.so.1: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status make[2]: [libgrive/CMakeFiles/btest.dir/build.make:144: libgrive/btest] Error 1 make[1]: [CMakeFiles/Makefile2:211: libgrive/CMakeFiles/btest.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 93%] Building CXX object libgrive/CMakeFiles/unittest.dir/test/util/DateTimeTest.cc.o [ 94%] Building CXX object libgrive/CMakeFiles/unittest.dir/test/util/FunctionTest.cc.o [ 96%] Linking CXX executable grive

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libcurl.so: undefined reference to symbol 'inflateEnd'

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /lib64/libz.so.1: error adding symbols: DSO missing from command line

collect2: error: ld returned 1 exit status make[2]: [grive/CMakeFiles/grive_executable.dir/build.make:113: grive/grive] Error 1 make[1]: [CMakeFiles/Makefile2:238: grive/CMakeFiles/grive_executable.dir/all] Error 2 [ 98%] Building CXX object libgrive/CMakeFiles/unittest.dir/test/util/SignalHandlerTest.cc.o [100%] Linking CXX executable unittest /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libcurl.so: undefined reference to symbol 'inflateEnd' /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /lib64/libz.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: [libgrive/CMakeFiles/unittest.dir/build.make:219: libgrive/unittest] Error 1 make[1]: [CMakeFiles/Makefile2:157: libgrive/CMakeFiles/unittest.dir/all] Error 2 make: *** [Makefile:147: all] Error 2

Cmake Results

-- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc - works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ - works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Warning at CMakeLists.txt:8 (message): Version to build: 0.5.2-dev

-- Found libgcrypt: -L/usr/lib64 -lgcrypt -ldl -lgpg-error -- Found CURL: /usr/lib64/libcurl.so (found version "7.66.0")
-- Looking for backtrace -- Looking for backtrace - found -- backtrace facility detected in default set of libraries -- Found Backtrace: /usr/include
-- Found Boost: /usr/include (found suitable version "1.66.0", minimum required is "1.40.0") found components: program_options filesystem unit_test_framework regex system -- Found libbfd: /usr/lib64/libbfd.a -- Found CppUnit: /usr/lib64/libcppunit.so -- Found libiberty: /usr/lib64/libiberty.a -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") -- Checking for module 'yajl' -- Found yajl, version 2.1.0 -- Building unitary tests along with the library and the binary -- Found Boost: /usr/include (found version "1.66.0") found components: program_options -- Configuring done -- Generating done -- Build files have been written to: /home/Medo/Downloads/grive2/build

Build failed on Opensuse 15.2

vitalif commented 3 years ago

Can you please recheck if this issue still persists?

nig37 commented 2 years ago

the issue still persist. Opensuse 15.4

Cmake results

-- The C compiler identification is GNU 7.5.0 -- The CXX compiler identification is GNU 7.5.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Warning at CMakeLists.txt:8 (message): Version to build: 0.5.2-dev

-- Found libgcrypt: -L/usr/lib64 -lgcrypt -lgpg-error -- Found CURL: /usr/lib64/libcurl.so (found version "7.79.1")
-- Looking for backtrace -- Looking for backtrace - found -- backtrace facility detected in default set of libraries -- Found Backtrace: /usr/include
-- Found Boost: /usr/include (found suitable version "1.66.0", minimum required is "1.40.0") found components: program_options filesystem unit_test_framework regex system -- Found libbfd: /usr/lib64/libbfd.a -- Found libiberty: /usr/lib64/libiberty.a -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2") -- Checking for module 'yajl' -- Found yajl, version 2.1.0 -- Found Boost: /usr/include (found version "1.66.0") found components: program_options -- Configuring done -- Generating done -- Build files have been written to: /home/seb/grive/grive2/build

make

[ 88%] Built target grive [ 94%] Building CXX object libgrive/CMakeFiles/btest.dir/test/btest/UnitTest.cc.o [ 94%] Building CXX object libgrive/CMakeFiles/btest.dir/test/btest/ValTest.cc.o [ 94%] Building CXX object grive/CMakeFiles/grive_executable.dir/src/main.cc.o [ 96%] Building CXX object libgrive/CMakeFiles/btest.dir/test/btest/JsonValTest.cc.o [ 98%] Linking CXX executable btest /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libcurl.so: référence au symbole non défini « inflateEnd » /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld : /lib64/libz.so.1 : erreur lors de l'ajout de symboles : DSO manquant dans la ligne de commande collect2: error: ld returned 1 exit status make[2]: [libgrive/CMakeFiles/btest.dir/build.make:142: libgrive/btest] Error 1 make[1]: [CMakeFiles/Makefile2:136: libgrive/CMakeFiles/btest.dir/all] Error 2 make[1]: Attente des tâches non terminées.... [100%] Linking CXX executable grive /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/libcurl.so: référence au symbole non défini « inflateEnd » /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld : /lib64/libz.so.1 : erreur lors de l'ajout de symboles : DSO manquant dans la ligne de commande collect2: error: ld returned 1 exit status make[2]: [grive/CMakeFiles/grive_executable.dir/build.make:109: grive/grive] Error 1 make[1]: [CMakeFiles/Makefile2:188: grive/CMakeFiles/grive_executable.dir/all] Error 2 make: [Makefile:136: all] Error 2

nig37 commented 2 years ago

SOLVED ! I used LDFLAGS="-lz" cmake .. then I could compile without error.

maybe someone could update the wiki ? I don't read russian

ckolumbus commented 1 year ago

I'm not sure wether it's the exact same problem, but since the last update grive2 doesn't compile on manjaro any more. Neither via AUR nor when downloading and compiling it manually. At least the LDFLAGS trick did not work for :-(.

You should ALWAYS check, whether you REALLY have the latest update of your rolling release distro. Even when I thought i updated, an additional dist upgrade solved my issue below. Keeping this here as a reference for others.

Error Message after mkdir build; cd build; cmake ..; make -j4 (libgrive.a compiled and linked fine) SOLVED by getting the latest updates for Manjaro

[ 98%] Linking CXX executable btest
/usr/bin/ld: /usr/lib/libbfd.a(compress.o): undefined reference to symbol 'ZSTD_compress'
/usr/bin/ld: /usr/lib/libzstd.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [libgrive/CMakeFiles/btest.dir/build.make:143: libgrive/btest] Error 1
make[1]: *** [CMakeFiles/Makefile2:162: libgrive/CMakeFiles/btest.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[100%] Linking CXX executable grive
/usr/bin/ld: /usr/lib/libbfd.a(compress.o): undefined reference to symbol 'ZSTD_compress'
/usr/bin/ld: /usr/lib/libzstd.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [grive/CMakeFiles/grive_executable.dir/build.make:110: grive/grive] Error 1
make[1]: *** [CMakeFiles/Makefile2:188: grive/CMakeFiles/grive_executable.dir/all] Error 2
make: *** [Makefile:136: all] Error 2