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

Misses -lz for client to compile #3205

Closed
smoe opened this issue Jul 2, 2019 · 8 comments
Closed

Misses -lz for client to compile #3205

smoe opened this issue Jul 2, 2019 · 8 comments

Comments

@smoe
Copy link
Contributor

smoe commented Jul 2, 2019

The error was

/miniconda2/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: boinc_client-async_file.o: undefined reference to symbol 'gzclose'
/miniconda2/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: /users/sm718/miniconda2/lib/./libz.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:706: boinc_client] Error 1
make[2]: Leaving directory '/ngs/sm718/github/boinc/client'
make[1]: *** [Makefile:635: all-recursive] Error 1
make[1]: Leaving directory '/ngs/sm718/github/boinc'
make: *** [Makefile:538: all] Error 2

Circumvented with

diff --git a/client/Makefile.am b/client/Makefile.am
index f39c45fe60..41cdbaf200 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -109,7 +109,7 @@ else
 boinc_client_SOURCES += hostinfo_unix.cpp
 endif
 endif
-boinc_client_LDADD = $(LIBBOINC) $(LIBBOINC_CRYPT) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS)
+boinc_client_LDADD = $(LIBBOINC) $(LIBBOINC_CRYPT) $(BOINC_EXTRA_LIBS) $(PTHREAD_LIBS) -lz

 boinc_clientdir = $(bindir)

Configuration was

./configure --prefix=$HOME/boinc --enable-client --disable-server --disable-manager --enable-libraries --enable-boinczip --disable-apps --with-ssl=/miniconda2/
@AenBleidd
Copy link
Member

If not using miniconda2 in favor of openssl, no additional flag required. Adding -lz flag in default configuration will add extra dependency that is not nice. If you want to fix this issue and make a pull request please find a way to add check for miniconda2 and adding the corresponding linking flag to appropriate m4 file

@smoe
Copy link
Contributor Author

smoe commented Jul 4, 2019

I fail to understand why this omitted -lz could be caused by conda. I accredited it to --enable-boinczip . I don't want to create a pull request just now and propose to leave this report open for a while to collect more opinions/observations.

@AenBleidd
Copy link
Member

As per this build log everything works fine without any additional -lz flag. So I suspect it is really because of conda library.
@smoe, could you please verify this?

@smoe
Copy link
Contributor Author

smoe commented Jul 29, 2019

Since I am the only one with weird experiences I suggest to just close this issue. What should possibly think about, though, is to provide a conda package for the client. This should then also clarify what this -lz is all about.

@tmannerm
Copy link

The -lz flag is already required (and normally used) to build a BOINC Client due to async_file.cpp and some other files referencing gzopen(), gzclose() and gzread() unconditionally. The flag comes into client build via BOINC_EXTRA_LIBS variable generated at configure.ac line 513.

One reason that could fail is if your compiler can't build a simple program using gzopen() with -lz flag. I'd look for line checking for gzopen in static library z... -lz line in your config output. Other configure output files like it's log and status can be consulted for more information as well.

@SETIguy
Copy link
Contributor

SETIguy commented Jul 30, 2019 via email

@AenBleidd
Copy link
Member

@smoe, any updated on this?

@smoe
Copy link
Contributor Author

smoe commented Sep 17, 2019

I don't have the time to reinvestigate, I must admit. You don't mind me closing the issue for now, I presume. Thank you tons for your comments which will certainly help to get a better error report by whoever runs next into this (non?)issue.

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

No branches or pull requests

4 participants