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

Can't compile on newest Ubuntu if -lz is not at the end #4

Closed
mfonville opened this issue Mar 3, 2016 · 2 comments
Closed

Can't compile on newest Ubuntu if -lz is not at the end #4

mfonville opened this issue Mar 3, 2016 · 2 comments
Assignees
Labels

Comments

@mfonville
Copy link

zlib dev headers did change their behaviour in an evil way, which forces -lz now to be at the very end of the compile command.

Otherwise it fails with

./libsparse.a(output_file.o): In function `gz_file_close':
output_file.c:(.text+0x689): undefined reference to `gzclose'
./libsparse.a(output_file.o): In function `gz_file_write':
output_file.c:(.text+0x738): undefined reference to `gzwrite'
./libsparse.a(output_file.o): In function `gz_file_pad':
output_file.c:(.text+0x7bf): undefined reference to `gztell64'
output_file.c:(.text+0x7eb): undefined reference to `gzseek64'
output_file.c:(.text+0x803): undefined reference to `gzwrite'
./libsparse.a(output_file.o): In function `gz_file_skip':
output_file.c:(.text+0x82e): undefined reference to `gzseek64'
./libsparse.a(output_file.o): In function `gz_file_open':
output_file.c:(.text+0x88c): undefined reference to `gzdopen'
collect2: error: ld returned 1 exit status
Makefile:58: recipe for target 'simg2img' failed

Most easy and ugly fix is putting -lz after $< $(LDFLAGS)

@anestisb
Copy link
Owner

anestisb commented Mar 3, 2016

Commit 7442ceb should have fixed the issue. Let me know if that worked for you.

@anestisb anestisb added the bug label Mar 3, 2016
@anestisb anestisb self-assigned this Mar 3, 2016
@mfonville
Copy link
Author

Yups, that did the trick :-D

@anestisb anestisb closed this as completed Mar 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants