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

Install fails to link (to zlib?) #184

Open
Phrogz opened this issue Oct 22, 2018 · 2 comments
Open

Install fails to link (to zlib?) #184

Phrogz opened this issue Oct 22, 2018 · 2 comments

Comments

@Phrogz
Copy link

Phrogz commented Oct 22, 2018

At the end of my build:

[ 47%] Linking CXX executable bin/uscxml-browser
lib/libuscxml.so.2.0.0: undefined reference to `inflateInit2_'
lib/libuscxml.so.2.0.0: undefined reference to `zlibVersion'
lib/libuscxml.so.2.0.0: undefined reference to `inflate'
lib/libuscxml.so.2.0.0: undefined reference to `inflateInit_'
lib/libuscxml.so.2.0.0: undefined reference to `inflateEnd'
collect2: error: ld returned 1 exit status
CMakeFiles/uscxml-browser.dir/build.make:132: recipe for target 'bin/uscxml-browser' failed
make[2]: *** [bin/uscxml-browser] Error 1
CMakeFiles/Makefile2:179: recipe for target 'CMakeFiles/uscxml-browser.dir/all' failed
make[1]: *** [CMakeFiles/uscxml-browser.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2

Is there a specific version of zlib that I need to install first?

@ventoneicapelli
Copy link

Same problem building ee0a17c on Ubuntu 18.04 with zlib v1.2.11.
Any clue?
Thanks,
pz

@alexzhornyak
Copy link
Contributor

Hi, I've got the same error on Ubuntu 20.

Solution:

if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
	target_link_libraries(uscxml-browser uscxml "-lz")
else()
	target_link_libraries(uscxml-browser uscxml)
endif()

alexzhornyak added a commit to alexzhornyak/uscxml that referenced this issue Jun 15, 2021
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

3 participants