Open jeff-regier opened 9 years ago
Duplicate of #5?
Oh, yeah. Changing convert(Ptr{Uint8}, header)
to pointer(header)
on L206 fixed it. Thanks.
OK, I'll go ahead and make the fix on master.
Did this change get tagged? I get the same the error message now from line 206, on a new installation of WCSLIB.jl.
I get a different errors when I install WCSLIB.jl from master:
julia> Pkg.clone("https://github.com/JuliaAstro/WCSLIB.jl.git")
INFO: Cloning WCSLIB from https://github.com/JuliaAstro/WCSLIB.jl.git
INFO: Computing changes...
INFO: No packages to install, update or remove
INFO: Package database updated
julia> Pkg.build("WCSLIB")
INFO: Building WCSLIB
WARNING: deprecated syntax "[a=>b, ...]" at /home/jeff/.julia/v0.4/WCSLIB/deps/build.jl:29.
Use "Dict(a=>b, ...)" instead.
julia> Pkg.test("WCSLIB")
INFO: Testing WCSLIB
ERROR: LoadError: test failed: ("WCSAXES = 2 / Number of coordinate axes CRPIX1 = 1818.0 / Pixel coordinate of reference point CRPIX2 = 969.5 / Pixel coordinate of reference point CDELT1 = -0.00825 / [deg] Coordinate increment at reference point CDELT2 = 0.00825 / [deg] Coordinate increment at reference point CUNIT1 = 'deg' / Units of coordinate increment and value CUNIT2 = 'deg' / Units of coordinate increment and value CTYPE1 = 'RA---CEA' / Right ascension, cylindrical equal area projectCTYPE2 = 'DEC--CEA' / Declination, cylindrical equal area projection CRVAL1 = 357.5 / [deg] Coordinate value at reference point CRVAL2 = 0.0 / [deg] Coordinate value at reference point PV2_1 = 1.0 / CEA projection parameter LONPOLE = 0.0 / [deg] Native longitude of celestial pole LATPOLE = 90.0 / [deg] Native latitude of celestial pole RADESYS = 'ICRS' / Equatorial coordinate system " == "WCSAXES = 2 / Number of coordinate axes CRPIX1 = 1818 / Pixel coordinate of reference point CRPIX2 = 969.5 / Pixel coordinate of reference point CDELT1 = -0.00825 / [deg] Coordinate increment at reference point CDELT2 = 0.00825 / [deg] Coordinate increment at reference point CUNIT1 = 'deg' / Units of coordinate increment and value CUNIT2 = 'deg' / Units of coordinate increment and value CTYPE1 = 'RA---CEA' / Right ascension, cylindrical equal area projectCTYPE2 = 'DEC--CEA' / Declination, cylindrical equal area projection CRVAL1 = 357.5 / [deg] Coordinate value at reference point CRVAL2 = 0 / [deg] Coordinate value at reference point PV2_1 = 1 / CEA projection parameter LONPOLE = 0 / [deg] Native longitude of celestial pole LATPOLE = 90 / [deg] Native latitude of celestial pole RESTFRQ = 0 / [Hz] Line rest frequency RESTWAV = 0 / [Hz] Line rest wavelength RADESYS = 'ICRS' / Equatorial coordinate system ")
in expression: header[641:end - 240] == header2
in error at error.jl:19
in default_handler at test.jl:27
in do_test at test.jl:50
in include at ./boot.jl:250
in include_from_node1 at loading.jl:132
in process_options at ./client.jl:308
in _start at ./client.jl:407
while loading /home/jeff/.julia/v0.4/WCSLIB/test/runtests.jl, in expression starting on line 39
====================================[ ERROR: WCSLIB ]=====================================
failed process: Process(`/home/jeff/julia_4/bin/julia --check-bounds=yes --code-coverage=none --color=yes /home/jeff/.julia/v0.4/WCSLIB/test/runtests.jl`, ProcessExited(1)) [1]
==========================================================================================
INFO: No packages to install, update or remove
ERROR: WCSLIB had test errors
in error at error.jl:19
in test at pkg/entry.jl:720
in anonymous at pkg/dir.jl:29
in cd at file.jl:20
in cd at pkg/dir.jl:29
in test at pkg.jl:69
Hmmm... I can't reproduce this myself. I wonder if we could be using different versions of the WCSLIB C library. It would be good to have a wrapper for wcslib_version()
so we can get the version being used from Julia.
I put the output from dpkg below. Looks like version 4.20-2. Is that older than your version? It's what comes with the "Trusty" release of Ubuntu.
jeff@arina ~ $ dpkg -l | grep wcslib
ii wcslib-dev 4.20-2 amd64 Header files and static library for libwcs
ii wcslib-tools 4.20-2 amd64 Command line tools utilizing wcslib
I just have the version that WCSLIB.jl downloads and compiles, which is currently 4.25.1.
I tried uninstalling my system's version of the WCSLIB C library ("wcslib-tools" and "wcslib-dev" Ubuntu packagaes), then reinstalling WCSLIB.jl from master. But I get the same error message. A function like wcslib_version()
would certainly be nice. In the meantime, is there a way to figure out what version of WCSLIB C library is getting called by WCSLIB.jl on my system?
I'm not sure how to do this.
We very well may want to stop using BinDeps here and instead just always build and load WCSLIB from source. Especially since I noticed there is now a new version of WCSLIB that starts with 5.x. I haven't checked, but if it is backwards-incompatible and we switch to it, most system-provided WCSLIBs will be out of date.
Regardless, this test failure doesn't sound catastrophic. The test is sensitive to the exact ordering of keywords in the header. But the order usually doesn't matter to most software and WCSLIB seems to have changed the ordering between versions.
I noticed that the wcslib_version()
isn't available in WCSLIB v4.25.1. It is in the docs for v5.4 though.
I get an error message when I call
wcspih
with Julia 0.4, from line 206 in WCSLIB.jl. There also some warnings (see below) leading up to the error, but they don't look directly related to the error. I'd appreciate help fixing the error. (Unfortunately I cannot revert to Julia 0.3.) Many thanks.