xmar / 360Transformations

68 stars 16 forks source link

Compilation issue #11

Open pavan4 opened 7 years ago

pavan4 commented 7 years ago

I tried to install the project and I have the following error -

[100%] Linking CXX executable trans
/usr/bin/ld: /usr/local/lib/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_'
//lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
MainProject/CMakeFiles/trans.dir/build.make:433: recipe for target 'MainProject/trans' failed
make[2]: *** [MainProject/trans] Error 1
CMakeFiles/Makefile2:140: recipe for target 'MainProject/CMakeFiles/trans.dir/all' failed
make[1]: *** [MainProject/CMakeFiles/trans.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

After googling for the error, I was suggested to use -lz but I couldn't figure out where to add the flags to the makefile. Can anyone point me in the right direction to fix this?

xmar commented 7 years ago

Hi pavan4 !! Sorry for the long delay. Did you manage to compile the software ? Your -lz compilation flag could probably be added to the "set(CMAKE_CXX_FLAGS ...)" cmake command in the "CMakeLists.txt" file.

Cerburrel commented 7 years ago

Hello there! I met the same error while compiling the software

[100%] Linking CXX executable trans /usr/bin/ld: /usr/local/lib/libavformat.a(http.o): undefined reference to symbol 'inflateInit2_' //lib/x86_64-linux-gnu/libz.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status MainProject/CMakeFiles/trans.dir/build.make:428: recipe for target 'MainProject/trans' failed make[2]: *** [MainProject/trans] Error 1 CMakeFiles/Makefile2:140: recipe for target 'MainProject/CMakeFiles/trans.dir/all' failed make[1]: *** [MainProject/CMakeFiles/trans.dir/all] Error 2 Makefile:83: recipe for target 'all' failed make: *** [all] Error 2 I tried to add -lz into CMakeLists.txt , which is set(CMAKE_CXX_FLAGS "-lz ${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")however this didn't solve the problem. I tried add_compile_options(-lz) too but this didn't not work too. Help appreciated if anyone has a clue about this.

ShawnshanksGui commented 6 years ago

@pavan4,@ Cerburrel,is the problem solved? I also meet this problem and I will appreciate if you have a clue about this and help me .

ddrmorais commented 6 years ago

@pavan4 , @Cerburrel, @xmar Did you find any solution? I am facing the same problem.

ddrmorais commented 6 years ago

I am using Linux Mint to install this library and I tried 2 Linux Mint versions.

Problem:

Solution

Linux Mint 19.1

When I tried sudo apt-get install ffmpeg, version installed 3.4.2-2 and everything worked.

Conclusion:

Do not use the lastest version from website.
use apt-get install ffmpeg. However if an old-dated ffmpeg version is installed is this case. You

need to change the Operational System.