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

Enable travis and coveralls #17

Merged
merged 3 commits into from
Nov 11, 2014
Merged

Enable travis and coveralls #17

merged 3 commits into from
Nov 11, 2014

Conversation

kbarbary
Copy link
Member

@kbarbary kbarbary commented Nov 7, 2014

I just enabled travis and coveralls on the respective websites.

This adds the .travis.yml file and badges to the README.

@kbarbary
Copy link
Member Author

kbarbary commented Nov 7, 2014

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?

@nolta
Copy link
Member

nolta commented Nov 8, 2014

Strange, seems like the shared lib should exist: https://travis-ci.org/JuliaAstro/FITSIO.jl/jobs/40326257#L422

@nolta
Copy link
Member

nolta commented Nov 8, 2014

(that last link should have highlighted line 422, but i guess that doesn't work)

@nolta
Copy link
Member

nolta commented Nov 8, 2014

I tried running the travis script in an ubuntu1404 vm, and it worked. Don't understand why this is failing.

@kbarbary
Copy link
Member Author

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.

@kbarbary
Copy link
Member Author

I should also note that I'm on Julia 0.3.2 and BinDeps 0.3.6.

@nolta
Copy link
Member

nolta commented Nov 10, 2014

What's in FITSIO/deps/usr/lib?

@kbarbary
Copy link
Member Author

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

@nolta
Copy link
Member

nolta commented Nov 10, 2014

I'm also on julia 0.3.2 and BinDeps 0.3.6.

@nolta nolta closed this Nov 10, 2014
@nolta
Copy link
Member

nolta commented Nov 10, 2014

What's

@nolta nolta reopened this Nov 10, 2014
@nolta
Copy link
Member

nolta commented Nov 10, 2014

Stupid github buttons.

@nolta
Copy link
Member

nolta commented Nov 10, 2014

My guess is that BinDeps is getting confused because of FITSIO/deps/src/cfitsio/libcfitsio.so. Have you modified LD_LIBRARY_PATH?

@kbarbary
Copy link
Member Author

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.

@kbarbary
Copy link
Member Author

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).

@nolta
Copy link
Member

nolta commented Nov 10, 2014

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)

@kbarbary
Copy link
Member Author

Hmmm... should we ask some BinDeps experts? Or just give up and install libcfitsio via apt-get on Travis?

@nolta
Copy link
Member

nolta commented Nov 11, 2014

Let's just use the apt package.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f37d5cb on kbarbary:add-travis into * on JuliaAstro:master*.

nolta added a commit that referenced this pull request Nov 11, 2014
Enable travis and coveralls
@nolta nolta merged commit 916b012 into JuliaAstro:master Nov 11, 2014
@kbarbary
Copy link
Member Author

Note that I just corrected an error in a badge URL directly on master.

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 this pull request may close these issues.

3 participants