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

No shared libraries in FreeBSD's tarball #11

Closed
bicycle1885 opened this issue Nov 19, 2018 · 12 comments
Closed

No shared libraries in FreeBSD's tarball #11

bicycle1885 opened this issue Nov 19, 2018 · 12 comments

Comments

@bicycle1885
Copy link
Owner

bicycle1885 commented Nov 19, 2018

@iblis17 kindly reported me that FreeBSD's tarball lacks libz.so from the latest release of ZlibBuilder (v1.0.3). I found that it is included in an old release (v1.0.2).

~/D/zlib $ tar tf v1.0.2/Zlib.v1.2.11.x86_64-unknown-freebsd11.1.tar.gz
./
./share/
./share/man/
./share/man/man3/
./share/man/man3/zlib.3
./include/
./include/zlib.h
./include/zconf.h
./logs/
./logs/Zlib.log
./lib/
./lib/libz.a
./lib/pkgconfig/
./lib/pkgconfig/zlib.pc
./lib/libz.so
./lib/libz.so.1.2.11
./lib/libz.so.1
~/D/zlib $ tar tf v1.0.3/Zlib.v1.2.11.x86_64-unknown-freebsd11.1.tar.gz
./
./share/
./share/man/
./share/man/man3/
./share/man/man3/zlib.3
./include/
./include/zlib.h
./include/zconf.h
./logs/
./logs/Zlib.log
./lib/
./lib/libz.a
./lib/pkgconfig/
./lib/pkgconfig/zlib.pc

I checked the log file (./logs/Zlib.log) included in the tarball of v1.0.3 and a sentence in it caught my eyes:

...
Checking for shared library support...
No shared library support; try without defining CC and CFLAGS
...

v1.0.3 of ZlibBuilder built the binaries using Julia 1.0.1 and BinaryBuilder.jl 0.1.2 (log on Travis CI: https://travis-ci.org/bicycle1885/ZlibBuilder/builds/447370299). I think this may possibly related to some bug of BinaryBuilder.jl. @staticfloat, do you have time to take a look a little?

@staticfloat
Copy link

Please post the config.log on FreeBSD, this will tell us why it thinks it cannot build shared libraries.

@bicycle1885
Copy link
Owner Author

I'm sorry, but I don't know where I can find the "config.log" file...

@iblislin
Copy link

I have one, will post it later.

@staticfloat
Copy link

I'm sorry, but I don't know where I can find the "config.log" file...

When you run ./configure, the autotools configure script will save a config.log file in the same directory. We want that file, but it's not copied into $prefix and so won't be saved at the end of a run.

You can get at it by running your build but then having it fail halfway through (e.g. putting a false somewhere in the build), then inspecting the build/ directory that is left behind for the file you're interested in.

@staticfloat
Copy link

So yes, it looks like configure is not passing LDFLAGS properly. I wonder if running update_configure_scripts would fix this.

@iblislin
Copy link

update_configure_scripts doesn't work. (but where is the doc about this script?)

I made this patch

diff --git a/build_tarballs.jl b/build_tarballs.jl
index 70fa38c..559a5f1 100644
--- a/build_tarballs.jl
+++ b/build_tarballs.jl
@@ -18,7 +18,7 @@ if [[ ${target} == *-w64-mingw* ]]; then
     EXTRA_CONFIGURE_FLAGS="--sharedlibdir=${prefix}/bin"
     EXTRA_MAKE_FLAGS="SHAREDLIB=libz.dll SHAREDLIBM=libz-1.dll SHAREDLIBV=libz-1.2.11.dll LDSHAREDLIBC= "
 fi
-
+update_configure_scripts
 ./configure ${EXTRA_CONFIGURE_FLAGS} --prefix=${prefix}
 make install ${EXTRA_MAKE_FLAGS} -j${nproc}
 """

@staticfloat
Copy link

(but where is the doc about this script?)

No docs, it's a utility script I wrote to try and do these kinds of things. You can see it here: https://github.com/JuliaPackaging/Yggdrasil/blob/master/Rootfs/bundled/utils/update_configure_scripts.sh

Does it do anything? Does it replace the configure script?

@iblislin
Copy link

Does it do anything? Does it replace the configure script?

It does nothing, since there aren't config.sub and config.guess in the srcdir.

@bicycle1885
Copy link
Owner Author

https://github.com/bicycle1885/ZlibBuilder/releases/tag/v1.0.4 seems to include a valid libz.so file for FreeBSD. If you have time, can you try it a little bit?

@iblislin
Copy link

iblislin commented Mar 2, 2019

It works fine on my machine. Thanks! 👍

@bicycle1885
Copy link
Owner Author

I don't know the reason, but #12 has somehow solved this problem.

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

Successfully merging a pull request may close this issue.

3 participants