Closed kbarbary closed 9 years ago
The travis build is failing. Looks like the shared library is not being created in the build. I tried to reproduce this locally by removing the built library and running Pkg.build("FITSIO")
. But, this is picking up my system-installed libcfitsio instead of building from the source in the deps directory.
Is there a way to force the build without uninstalling my system libcfitsio?
Would it be advisable to always build from source in FITSIO.jl to ensure that everyone has the same libcfitsio?
Strange, seems like the shared lib should exist: https://travis-ci.org/JuliaAstro/FITSIO.jl/jobs/40326257#L422
(that last link should have highlighted line 422, but i guess that doesn't work)
I tried running the travis script in an ubuntu1404 vm, and it worked. Don't understand why this is failing.
I was able to reproduce this, or something like it, once I uninstalled my system libcfitsio. After doing Pkg.build("FITSIO")
, this is the contents of the generated deps/deps.jl
file:
macro checked_lib(libname, path)
(dlopen_e(path) == C_NULL) && error("Unable to load \n\n$libname ($path)\n\n
Please re-run Pkg.build(package), and restart Julia.")
quote const $(esc(libname)) = $path end
end
@checked_lib libcfitsio "./libcfitsio.so"
Then using FITSIO
fails with the message
julia> using FITSIO
ERROR: Unable to load
libcfitsio (./libcfitsio.so)
I don't fully understand what BinDeps is doing when it generates the deps.jl
file, but it looks like it has the path to the shared library wrong. The Travis error is slightly different (libcfitsio.so
instead of ./libcfitsio.so
).
I'm on Ubuntu 14.04.
I should also note that I'm on Julia 0.3.2 and BinDeps 0.3.6.
What's in FITSIO/deps/usr/lib
?
That looks good:
$ pwd
/home/kyle/.julia/v0.3/FITSIO/deps/usr/lib
$ ls
libcfitsio.a libcfitsio.so libcfitsio.so.2 libcfitsio.so.2.3.36 pkgconfig
I'm also on julia 0.3.2 and BinDeps 0.3.6.
What's
Stupid github buttons.
My guess is that BinDeps is getting confused because of FITSIO/deps/src/cfitsio/libcfitsio.so
. Have you modified LD_LIBRARY_PATH
?
That would be it... I had .
in LD_LIBRARY_PATH
for some other development! Sorry for the noise. Pkg.build("FITSIO")
works for me locally with both clang and gcc.
The shared lib is definitely there in the travis build: https://travis-ci.org/JuliaAstro/FITSIO.jl/jobs/40511657 (see L453)
But the deps.jl
file has it wrong (see L457).
Stab in the dark
--- a/deps/build.jl
+++ b/deps/build.jl
@@ -7,6 +7,7 @@ url = "ftp://heasarc.gsfc.nasa.gov/software/fitsio/c/cfitsio$version.tar.gz"
libcfitsio = library_dependency("libcfitsio")
provides(Sources, URI(url), libcfitsio, unpacked_dir="cfitsio")
depsdir = BinDeps.depsdir(libcfitsio)
+pwddir = pwd()
srcdir = joinpath(depsdir, "src", "cfitsio")
prefix = joinpath(depsdir, "usr")
@unix_only libfilename = "libcfitsio.so"
@@ -21,6 +22,7 @@ provides(BuildProcess,
`./configure --prefix=$prefix`
`make shared install`
end)
+ ChangeDirectory(pwddir)
end
end),
libcfitsio)
Hmmm... should we ask some BinDeps experts? Or just give up and install libcfitsio via apt-get on Travis?
Let's just use the apt package.
Note that I just corrected an error in a badge URL directly on master.
I just enabled travis and coveralls on the respective websites.
This adds the .travis.yml file and badges to the README.