Open pochoi opened 6 years ago
Thanks for the bug report! I believe a lot of the deprecation warnings in FITSIO are fixed on the latest master, so running Pkg.checkout("FITSIO")
should help.
I also see the "version mismatch" warning in the Travis logs. Do you get this warning when using FITSIO in isolation? I suspect this is caused by FITSIO.jl and LibHealpix.jl installing two competing copies of libcfitsio. Can you run ldd
on libhealpixwrapper.so
? If I can figure out how to build healpix without linking to libcfitsio then this should no longer be a problem.
However I don't see the jl_uv_writecb()
error in the Travis logs. Does the error appear consistently? Do you have any sense for the conditions on when it happens?
Went into LibHealpix/deps/usr/lib
and run otool -L
(the osx's ldd
)
β ~/.julia/v0.6/LibHealpix/deps/usr/lib [v0.2.2|β]
$ otool -L libhealpixwrapper.dylib
libhealpixwrapper.dylib:
libhealpixwrapper.dylib (compatibility version 0.0.0, current version 0.0.0)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib/libchealpix.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib/libhealpix_cxx.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
All functions in LibHealpix seem to be running fine. Just the version mismatch
warning pops up when running those functions depending on that library.
I tried to reinstall LibHealpix but the error jl_uv_writecb()
does not pop up again.
julia> Pkg.rm("LibHealpix")
INFO: Removing FITSIO v0.10.0
INFO: Removing LibHealpix v0.2.2
INFO: Package database updated
Restart Julia
julia> Pkg.add("LibHealpix")
INFO: Installing FITSIO v0.10.0
INFO: Installing LibHealpix v0.2.2
INFO: Building FITSIO
INFO: Building Homebrew
INFO: Building LibHealpix
WARNING: Compat.KERNEL is deprecated.
likely near /Users/po/.julia/v0.6/LibHealpix/deps/build.jl:143
WARNING: Compat.KERNEL is deprecated.
likely near /Users/po/.julia/v0.6/LibHealpix/deps/build.jl:143
in can_use at /Users/po/.julia/v0.6/Homebrew/src/bindeps_integration.jl
WARNING: Compat.KERNEL is deprecated.
likely near /Users/po/.julia/v0.6/LibHealpix/deps/build.jl:143
in package_available at /Users/po/.julia/v0.6/Homebrew/src/bindeps_integration.jl
WARNING: version mismatch between CFITSIO header (v3.39) and linked library (v3.41).
WARNING: version mismatch between CFITSIO header (v3.39) and linked library (v3.41).
WARNING: version mismatch between CFITSIO header (v3.39) and linked library (v3.41).
WARNING: version mismatch between CFITSIO header (v3.39) and linked library (v3.41).
INFO: Package database updated
julia> using LibHealpix
julia> query_disc(512, LibHealpix.ring, 0, 0, deg2rad(10/60), inclusive=false)
WARNING: version mismatch between CFITSIO header (v3.39) and linked library (v3.41).
4-element Array{Int32,1}:
1
2
3
4
The last time I actually did rm -rf .julia/v0.6
and then reinstalled anything and then got those jl_uv_writecb()
. Not trying it again that this moment. π³
Hmm. I still don't know which library is being linked against the wrong version of cfitsio. Can you check libchealpix and libhealpix_cxx as well?
Ok after doing a little digging it looks like the version mismatch warning is coming from libhealpix_cxx
. This library is being built by homebrew, but otool -L
shows that it's at least being linked against the libcfitsio
from homebrew, as expected. I think this warning is somehow related to cfitsio
being moved out of the science tap.
The deprecation warnings are mostly due to FITSIO.jl, but I think they are fixed on the master branch and that package just needs a new tag.
But I have no idea where the jl_uv_writecb()
errors came from. Don't even know where to begin with that. If those show up again in a reproducible way, open a separate issue for that.
So on OSX Travis I get
$ grep -r CFITSIO_VERSION /Users/travis/.julia/v0.6/FITSIO/deps/usr
/Users/travis/.julia/v0.6/FITSIO/deps/usr/include/fitsio.h:#define CFITSIO_VERSION 3.37
$ grep -r CFITSIO_VERSION /Users/travis/.julia/v0.6/Homebrew/deps/usr
/Users/travis/.julia/v0.6/Homebrew/deps/usr/Cellar/cfitsio/3.410/include/fitsio.h:#define CFITSIO_VERSION 3.41
/Users/travis/.julia/v0.6/Homebrew/deps/usr/include/fitsio.h:#define CFITSIO_VERSION 3.41
/Users/travis/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/include/fitsio.h:#define CFITSIO_VERSION 3.41
/Users/travis/.julia/v0.6/Homebrew/deps/usr/var/homebrew/linked/cfitsio/include/fitsio.h:#define CFITSIO_VERSION 3.41
So FITSIO.jl is installing headers for version 3.37 and Homebrew.jl is installing headers for version 3.41. I have no idea where the headers for 3.39 are coming from. So Homebrew must be distributing binaries that were somehow built with the wrong headers. I don't understand how Homebrew works though. Is it even distributing binaries or build recipes?
In Homebrew or Homebrew.jl, Bottles are the binary packages. Usually the bottles (binaries) are downloaded and installed. For example, I have the caches of the healpix and cfitsio bottles downloaded by Homebrew.jl
β ~/Library/Caches/Homebrew.jl
22:48 $ ls | grep -e fits -e healpix
cfitsio-3.390.yosemite.bottle.tar.gz
cfitsio-3.410.yosemite.bottle.tar.gz
healpix-3.31.yosemite.bottle.tar.gz
More otool -L
β ~/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib [1.2.3|β]
$ ls
libchealpix.0.dylib libchealpix.a libchealpix.dylib libhealpix_cxx.0.dylib libhealpix_cxx.a libhealpix_cxx.dylib pkgconfig
$ otool -L libchealpix.dylib
libchealpix.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib/libchealpix.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.39)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
$ otool -L libchealpix.0.dylib
libchealpix.0.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib/libchealpix.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.39)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
$ otool -L libhealpix_cxx.dylib
libhealpix_cxx.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib/libhealpix_cxx.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.39)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
$ otool -L libhealpix_cxx.0.dylib
libhealpix_cxx.0.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib/libhealpix_cxx.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.39)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.1.0)
β ~/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib [1.2.3|β]
$ ls
libcfitsio.5.3.41.dylib libcfitsio.5.dylib libcfitsio.a libcfitsio.dylib pkgconfig
$ otool -L libcfitsio.dylib
libcfitsio.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.41)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
$ otool -L libcfitsio.5.dylib
libcfitsio.5.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.41)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
$ otool -L libcfitsio.5.3.41.dylib
libcfitsio.5.3.41.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.41)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
In the Homebrew.jl, we have cfitsio, which is installed as dependency of healpix in Homebrew.jl
β ~/.julia/v0.6/Homebrew/deps/usr/include [1.2.3|β]
23:50 $ grep -r CFITSIO_VERSION .
./fitsio.h:#define CFITSIO_VERSION 3.41
For FITSIO.jl, I didn't have the folder .julia/v0.6/FITSIO/deps/usr/include/
. I looked into the deps.jl
, it was using Homebrew's cfitsio I installed previously (not Homebrew.jl's cfitsio installed by LibHealpix.jl).
β /usr/local/include
$ grep -r CFITSIO_VERSION .
./fitsio.h:#define CFITSIO_VERSION 3.41
Then I just uninstalled the Homebrew's cfitsio, and then I reinstalled LibHealpix.jl and FITSIO.jl. Then FITSIO.jl downloaded and compiled cfitsio from source:
β ~/.julia/v0.6/FITSIO/deps/usr [v0.10.0|β]
$ grep -r CFITSIO_VERSION .
./include/fitsio.h:#define CFITSIO_VERSION 3.37
After uninstalling Homebrew's cfitsio and reinstalling LibHealpix.jl and FITSIO.jl. The version mismatch is still here
WARNING: version mismatch between CFITSIO header (v3.39) and linked library (v3.41).
Summary (Guess):
Maybe the cfitsio of FITSIO.jl is innocent, as it got v3.37
In the Homebrew.jl, by the otool -L
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.41)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.39)
Maybe it is where the version mismatch comes from?
Here the Healpix people talked about it too.
Maybe the cfitsio of FITSIO.jl is innocent, as it got v3.37
I agree.
In Homebrew or Homebrew.jl, Bottles are the binary packages. Usually the bottles (binaries) are downloaded and installed.
As far as I could tell, everything is linked correctly on your system and the Travis OSX worker. So I believe the binary package provided by Homebrew is to blame.
(note to myself: the Healpix bottles are hosted at https://bintray.com/homebrew/bottles-science/healpix/3.31#files)
Here the Healpix people talked about it too.
I wonder why they chose to strip out the version check instead of building with the right headers. They do mention that the ABI hasn't changed, so the warning is harmless (albeit annoying).
Would you mind trying brew install healpix --build-from-source
to see if the error persists without using the binaries?
In Homebrew.jl (not my system Homebrew. Homebrew.jl is isolated from the system Homebrew for obvious reason), I install healpix build from source
import Homebrew
Homebrew.rm("homebrew/science/healpix")
Homebrew.brew(`install homebrew/science/healpix --build-from-source`)
π Now the version mismatch warning in LibHealpix.jl is gone!
And also it is now 5.3.41
instead of 5.3.39
β ~/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib [1.2.3|β]
19:42 $ otool -L libchealpix.dylib
libchealpix.dylib:
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/healpix/lib/libchealpix.0.dylib (compatibility version 1.0.0, current version 1.0.0)
/Users/po/.julia/v0.6/Homebrew/deps/usr/opt/cfitsio/lib/libcfitsio.5.dylib (compatibility version 5.0.0, current version 5.3.41)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1226.10.1)
After consulting my friend Randy, I learnt that it is a dependency issue happen sometime in homebrew. I guess the warning is because the healpix bottle had been built (https://github.com/Homebrew/homebrew-science/commit/f21e92b475acc0faac890beb98bd8179a75b7c35) with old version of cfitsio in homebrew but cfitsio's bottles were just updated a few day ago (https://github.com/Homebrew/homebrew-core/commit/cad302cd40d5e2e34986cb94055546e9828c16d1). So it is just a coincidence, as you also updated LibHealpix.jl a few day ago.
Now the immediate solution is to manually build the healpix from source in Homebrew.jl
Homebrew.brew(`install homebrew/science/healpix --build-from-source`)
I can wait until the next update on healpix.rb, or I submit a pull request to get the bottles recompiled.
I guess it is not your fault. Just let you know some warnings appear since your last update.
And the warning
appears each time when
using LibHealpix
and then running functionquery_disc
.