Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation issue #11

Open
pavan4 opened this issue Nov 23, 2016 · 5 comments
Open

Compilation issue #11

pavan4 opened this issue Nov 23, 2016 · 5 comments

Comments

@pavan4
Copy link

pavan4 commented Nov 23, 2016

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
Copy link
Owner

xmar commented Dec 12, 2016

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
Copy link

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
Copy link

@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
Copy link

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

@ddrmorais
Copy link

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

Problem:

  • Linux Mint 18.2

    When I tried sudo apt-get install ffmpeg, the version 2.6 or 2.8 was installed and this version is
    not enough.
    Then I tried to download the ffmepg in the following website:
    https://www.ffmpeg.org/

    The latest version is 4. something and this version is enough to compile the library.
    However, a problem occured when I tried to install the library with this version 4.0 from the
    website.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants