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

Zlib errors when compiling. #34

Closed
Aex12 opened this issue Feb 4, 2018 · 3 comments
Closed

Zlib errors when compiling. #34

Aex12 opened this issue Feb 4, 2018 · 3 comments

Comments

@Aex12
Copy link

Aex12 commented Feb 4, 2018

I downloaded zlib-1.2.11 from its official website and compiled it. I referenced zlib with:

-DZLIB_LIBRARY=/usr/local/zlib/lib/ -DZLIB_INCLUDE_DIR=/usr/local/zlib/include/

but I'm getting this error:

[ 64%] Built target tdclient
[ 64%] Linking CXX executable generate_json
/usr/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status
td/generate/CMakeFiles/generate_json.dir/build.make:123: recipe for target 'td/generate/generate_json' failed
make[2]: *** [td/generate/generate_json] Error 1
CMakeFiles/Makefile2:916: recipe for target 'td/generate/CMakeFiles/generate_json.dir/all' failed
make[1]: *** [td/generate/CMakeFiles/generate_json.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

If I reference source with -DZLIB_LIBRARY=/home/aex12/srcs/zlib-1.2.11/ I get a different error on same step

[ 64%] Linking CXX static library libtdclient.a
[ 64%] Built target tdclient
make[2]: *** No rule to make target '/home/aex12/srcs/zlib-1.2.11/', needed by 'td/generate/generate_json'.  Stop.
CMakeFiles/Makefile2:916: recipe for target 'td/generate/CMakeFiles/generate_json.dir/all' failed
make[1]: *** [td/generate/CMakeFiles/generate_json.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
@levlam
Copy link
Contributor

levlam commented Feb 4, 2018

You should specify full path to the prebuilt library:
cmake -DZLIB_LIBRARY=/usr/local/zlib/lib/libz.so ..

If it will not help could you try to apply patch
zlib.txt
and recompile with it?

@levlam
Copy link
Contributor

levlam commented Feb 7, 2018

@Aex12 Have you succeeded in TDLib compilation?

@levlam
Copy link
Contributor

levlam commented Mar 19, 2018

Despite lack of feedback, the issue should be fixed in TDLib 1.2.0.

@levlam levlam closed this as completed Mar 19, 2018
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

2 participants