Fresh install: wcslib version problem (5.16)

67 views
Skip to first unread message

Luciano Vigano'

unread,
Aug 25, 2018, 12:09:43 PM8/25/18
to astrometry
Ciao,

I had to reinstall my pc and I just finished the installation of Astrometry package but I got error about wcslib:

sauron:Desktop lucianovigano$ solve-field test_05_05_06.jpg 

dyld: Library not loaded: /usr/local/opt/wcslib/lib/libwcs.5.16.dylib

  Referenced from: /usr/local/bin/solve-field

  Reason: image not found

Abort trap: 6


I'm not able to found 5.16 version anywhere (even a package to be compiled), and brew installed the 5.19:

-r--r--r--  1 lucianovigano  admin  1375840 Aug 25 17:37 libwcs-5.19.1.a

-r--r--r--  1 lucianovigano  admin  1236808 Aug 25 17:37 libwcs.5.19.1.dylib

lrwxr-xr-x  1 lucianovigano  admin       19 Aug 25 17:37 libwcs.5.dylib -> libwcs.5.19.1.dylib

lrwxr-xr-x  1 lucianovigano  admin       15 Aug 25 17:37 libwcs.a -> libwcs-5.19.1.a

lrwxr-xr-x  1 lucianovigano  admin       14 Aug 25 17:37 libwcs.dylib -> libwcs.5.dylib

drwxrwxr-x  3 lucianovigano  admin       96 Aug 25 17:37 pkgconfig


Any suggestion about to solve the problem?

Cheers,
Luciano

Dustin Lang

unread,
Aug 25, 2018, 1:06:47 PM8/25/18
to astrometry
Hi,

How did you install the Astrometry.net code?  Compiled from source, or some other way?  I don't see how it would know about wcslib-5.16 if you do not have that version on your computer...  Are you sure you are running the right version of solve-field?

Does pkg-config work?  What do you get for:

pkg-config --cflags wcslib
pkg-config --libs wcslib
pkg-config --modversion wcslib


I would:
1. make sure pkg-config works for wcslib -- if it does not, add the directory containing wcslib.pc to your PKG_CONFIG_PATH environment variable
2. re-compile the Astrometry.net package --
    make clean
    make config     #  <--- make sure wcslib is found in the right place
    make
    make install

cheers,
--dustin


Luciano Vigano'

unread,
Aug 25, 2018, 5:36:33 PM8/25/18
to astrometry

Dear Dustin,

the installation was done via brew (according to the guide: http://astrometry.net/doc/build.html#build), and the wcslib were ok:

sauron:~ lucianovigano$ pkg-config --cflags wcslib

-I/usr/local/Cellar/wcslib/5.19.1_1/include/wcslib

sauron:~ lucianovigano$ pkg-config --libs wcslib

-L/usr/local/Cellar/wcslib/5.19.1_1/lib -lwcs -lm

sauron:~ lucianovigano$ pkg-config --modversion wcslib

5.19.1


Now I just download the last version of astrometry (0.75) and compile it and solving seems to output a couple of errors:

sauron:bin lucianovigano$ ./solve-field /Users/lucianovigano/Desktop/test_05_05.jpg --continue

Reading input file 1 of 1: "/Users/lucianovigano/Desktop/test_05_05.jpg"...

jpegtopnm: WRITING PPM FILE

Read file stdin: 4290 x 2856 pixels x 1 color(s); maxval 255

Using 8-bit output

Extracting sources...

simplexy: found 8705 sources.

cairoutils.c:715:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images

cairoutils.c:715:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images

cairoutils.c:715:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images

cairoutils.c:715:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images

libpng warning: Image width is zero in IHDR

libpng warning: Image height is zero in IHDR

libpng error: Invalid IHDR data

sh: line 1: 90590 Done                    /usr/local/Cellar/bin/plotxy -I /tmp/tmp.ppm.h18n3k -i /Users/lucianovigano/Desktop/test_05_05.axy -C red -w 2 -N 50 -x 1 -y 1 -P

     90591 Abort trap: 6           | /usr/local/Cellar/bin/plotxy -i /Users/lucianovigano/Desktop/test_05_05.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > /Users/lucianovigano/Desktop/test_05_05-objs.png

solve-field.c:326:plot_source_overlay Plotting command failed

 solve-field.c:132:run_command Command was: "/usr/local/Cellar/bin/plotxy -I /tmp/tmp.ppm.h18n3k -i /Users/lucianovigano/Desktop/test_05_05.axy -C red -w 2 -N 50 -x 1 -y 1 -P | /usr/local/Cellar/bin/plotxy -i /Users/lucianovigano/Desktop/test_05_05.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > /Users/lucianovigano/Desktop/test_05_05-objs.png"


 solve-field.c:131:run_command Command exited with exit status 134

Solving...

Reading file "/Users/lucianovigano/Desktop/test_05_05.axy"...


despite the fact that netpbm is installed:

sauron:bin lucianovigano$ pkg-config --cflags Netpbm

-I/usr/local/Cellar/netpbm/10.73.20/include

sauron:bin lucianovigano$ pkg-config --libs Netpbm

-L/usr/local/Cellar/netpbm/10.73.20/lib -lnetpbm

sauron:bin lucianovigano$ pkg-config --modversion Netpbm

10.73.20


but not detected:

# This file is generated by util/Makefile.

# Astrometry.net didn't find netpbm; not setting HAVE_NETPBM.

# See os-features-makefile.log for details.

# To re-run this test, do 'make reconfig; make makefile.os-features' (in the 'util' directory)

# Or to do it yourself, just uncomment this line:

# HAVE_NETPBM := yes



Maybe it will be worth reinstalling OS again ... do you have a setup procedure that should works (I mean list of packages and in which order) ? 

cheers,
L.


 

Dustin Lang

unread,
Aug 25, 2018, 8:50:28 PM8/25/18
to astrometry
Hi,

Netpbm has not always used pkg-config, so it is not used by default to configure it -- must be done by hand.

Try:

export NETPBM_INC="$(pkg-config --cflags Netpbm)"
export NETPBM_LIB="$(pkg-config --libs Netpbm)"
make reconfig
make


cheers,
--dustin

Luciano Vigano'

unread,
Aug 26, 2018, 4:13:31 PM8/26/18
to astrometry
Ciao,

thanks for your reply!
Here the errors I got:

Testing netpbm...

   NETPBM_INC is -I/usr/local/Cellar/netpbm/10.73.20/include

   NETPBM_LIB is -L/usr/local/Cellar/netpbm/10.73.20/lib -lnetpbm

((gcc -o os-features-test-netpbm \

    -g -Wall -ffinite-math-only  -pthread -march=native -O3 -fomit-frame-pointer -DNDEBUG -fpic -Winline -I../include -I../include/astrometry -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DAN_GIT_REVISION='"0.75"' -DAN_GIT_DATE='"Fri_Jul_13_15:48:16_2018_-0400"' -DAN_GIT_URL='"https://github.com/dstndstn/astrometry.net"' -I../util -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/glib/2.56.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.35/include/libpng16  -I/usr/local/Cellar/libpng/1.6.35/include/libpng16     -DWCSLIB_EXISTS      -I../include -I../include/astrometry -I../gsl-an -I/usr/local/Cellar/wcslib/5.19.1_1/include/wcslib    -I../include -I../include/astrometry -I../gsl-an -I/usr/local/Cellar/wcslib/5.19.1_1/include/wcslib -I. -DTEST_NETPBM -I/usr/local/Cellar/netpbm/10.73.20/include os-features-test.c  -g -Wall -ffinite-math-only  -pthread -march=native -O3 -fomit-frame-pointer -DNDEBUG -fpic -Winline -L/usr/local/Cellar/netpbm/10.73.20/lib -lnetpbm >> os-features.log && \

  ./os-features-test-netpbm >> os-features.log && \

  echo "#define HAVE_NETPBM 1") \

|| echo "#define HAVE_NETPBM 0") >> ../include/astrometry/os-features-config.h.tmp

os-features-test.c:75:10: fatal error: 'pam.h' file not found

#include <pam.h>

         ^~~~~~~

1 error generated.

--------------- End of expected error messages -----------------


mv ../include/astrometry/os-features-config.h.tmp ../include/astrometry/os-features-config.h


Config results:

------------------------------


cat ../include/astrometry/os-features-config.h

#define NEED_CANONICALIZE_FILE_NAME 1

#define NEED_DECLARE_QSORT_R 1

#define NEED_QSORT_R 0

#define NEED_SWAP_QSORT_R 0

#define HAVE_NETPBM 0


------------------------------



---- Error messages in the next few commands are not necessarily bugs ----

     (we're checking how things works on your computer)

rm -f os-features-makefile.log

Testing netpbm...

   NETPBM_INC_ORIG is -I/usr/local/Cellar/netpbm/10.73.20/include

   NETPBM_LIB_ORIG is -L/usr/local/Cellar/netpbm/10.73.20/lib -lnetpbm

( \

echo "# This file is generated by util/Makefile."; \

((gcc -o os-features-test-netpbm-make \

    -g -Wall -ffinite-math-only  -pthread -march=native -O3 -fomit-frame-pointer -DNDEBUG -fpic -Winline -I../include -I../include/astrometry -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DAN_GIT_REVISION='"0.75"' -DAN_GIT_DATE='"Fri_Jul_13_15:48:16_2018_-0400"' -DAN_GIT_URL='"https://github.com/dstndstn/astrometry.net"' -I../util -I/usr/local/Cellar/cairo/1.14.12/include/cairo -I/usr/local/Cellar/glib/2.56.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.56.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.42/include -I/usr/local/Cellar/pixman/0.34.0_1/include/pixman-1 -I/usr/local/Cellar/fontconfig/2.13.0/include -I/usr/local/opt/freetype/include/freetype2 -I/usr/local/Cellar/libpng/1.6.35/include/libpng16  -I/usr/local/Cellar/libpng/1.6.35/include/libpng16     -DWCSLIB_EXISTS      -I../include -I../include/astrometry -I../gsl-an -I/usr/local/Cellar/wcslib/5.19.1_1/include/wcslib    -I../include -I../include/astrometry -I../gsl-an -I/usr/local/Cellar/wcslib/5.19.1_1/include/wcslib -I. -DTEST_NETPBM_MAKE -I/usr/local/Cellar/netpbm/10.73.20/include os-features-test.c  -g -Wall -ffinite-math-only  -pthread -march=native -O3 -fomit-frame-pointer -DNDEBUG -fpic -Winline -L/usr/local/Cellar/netpbm/10.73.20/lib -lnetpbm >> os-features-makefile.log && \

  ./os-features-test-netpbm-make >> os-features-makefile.log && \

  echo "HAVE_NETPBM := yes") \

|| (echo "# Astrometry.net didn't find netpbm; not setting HAVE_NETPBM."; \

echo "# See os-features-makefile.log for details."; \

echo "# To re-run this test, do 'make reconfig; make makefile.os-features' (in the 'util' directory)"; \

echo "# Or to do it yourself, just uncomment this line:"; \

echo "# HAVE_NETPBM := yes")) \

; \

echo) > makefile.os-features.tmp

os-features-test.c:75:10: fatal error: 'pam.h' file not found

#include <pam.h>

         ^~~~~~~

1 error generated.

--------------- End of expected error messages -----------------


mv makefile.os-features.tmp makefile.os-features


Config results:

------------------------------


cat makefile.os-features

# This file is generated by util/Makefile.

# Astrometry.net didn't find netpbm; not setting HAVE_NETPBM.

# See os-features-makefile.log for details.

# To re-run this test, do 'make reconfig; make makefile.os-features' (in the 'util' directory)

# Or to do it yourself, just uncomment this line:

# HAVE_NETPBM := yes


------------------------------


And, by the way, is WCSlib support being compiled in?


pkg-config --exists wcslib && echo yes || echo no

yes


  WCSLIB_INC: -I/usr/local/Cellar/wcslib/5.19.1_1/include/wcslib

  WCSLIB_LIB: -L/usr/local/Cellar/wcslib/5.19.1_1/lib -lwcs -lm


------------------------------

make[1]: Nothing to be done for `config'.


obviously after install errors on PBM still persists :(

sauron:astrometry.net-0.75 lucianovigano$ solve-field --downsample 2 /Users/lucianovigano/Downloads/IMG_999.jpg --overwrite

Reading input file 1 of 1: "/Users/lucianovigano/Downloads/IMG_999.jpg"...

jpegtopnm: WRITING PPM FILE

Read file stdin: 2496 x 1664 pixels x 1 color(s); maxval 255

Using 8-bit output

Extracting sources...

Downsampling by 2...

simplexy: found 1700 sources.

cairoutils.c:715:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM imagescairoutils.c:715:cairoutils_read_ppm_stream: 

Netpbm is not available; can't read PPM images

cairoutils.c:715:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images

cairoutils.c:715:cairoutils_read_ppm_stream: Netpbm is not available; can't read PPM images

libpng warning: Image width is zero in IHDR

libpng warning: Image height is zero in IHDR

libpng error: Invalid IHDR data

sh: line 1: 15471 Done                    /Users/lucianovigano/Documents/Astrometry/bin/plotxy -I /tmp/tmp.ppm.cYXRvo -i /Users/lucianovigano/Downloads/IMG_999.axy -C red -w 2 -N 50 -x 1 -y 1 -P

     15472 Abort trap: 6           | /Users/lucianovigano/Documents/Astrometry/bin/plotxy -i /Users/lucianovigano/Downloads/IMG_999.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > /Users/lucianovigano/Downloads/IMG_999-objs.png

solve-field.c:326:plot_source_overlay Plotting command failed

 solve-field.c:132:run_command Command was: "/Users/lucianovigano/Documents/Astrometry/bin/plotxy -I /tmp/tmp.ppm.cYXRvo -i /Users/lucianovigano/Downloads/IMG_999.axy -C red -w 2 -N 50 -x 1 -y 1 -P | /Users/lucianovigano/Documents/Astrometry/bin/plotxy -i /Users/lucianovigano/Downloads/IMG_999.axy -I - -w 2 -r 3 -C red -n 50 -N 200 -x 1 -y 1 > /Users/lucianovigano/Downloads/IMG_999-objs.png"


But at the end the solving seems working fine ... 

  log-odds ratio 82.6696 (7.99776e+35), 9 match, 0 conflict, 7 distractors, 15 index.

  RA,Dec = (7.95462,58.6877), pixel scale 6.92878 arcsec/pix.

  Hit/miss:   Hit/miss: +++++-------++++(best)------------------------------------------------------------------------------------

Field 1: solved with index index-4113.fits.

Field 1 solved: writing to file /Users/lucianovigano/Downloads/IMG_999.solved to indicate this.

Field: /Users/lucianovigano/Downloads/IMG_999.jpg

Field center: (RA,Dec) = (7.953356, 58.688272) deg.

Field center: (RA H:M:S, Dec D:M:S) = (00:31:48.806, +58:41:17.780).

Field size: 4.7987 x 3.2059 degrees

Field rotation angle: up is 112.505 degrees E of N

Field parity: neg

Creating new FITS file "/Users/lucianovigano/Downloads/IMG_999.new"...


and the solving creates some files:

sauron:Downloads lucianovigano$ ls -l IMG_999*

-rw-r--r--  1 lucianovigano  staff     8640 Aug 26 22:06 IMG_999-indx.xyls

-rw-r--r--  1 lucianovigano  staff        0 Aug 26 22:06 IMG_999-objs.png

-rw-r--r--  1 lucianovigano  staff    34560 Aug 26 22:06 IMG_999.axy

-rw-r--r--  1 lucianovigano  staff    11520 Aug 26 22:06 IMG_999.corr

-rw-r--r--@ 1 lucianovigano  staff  1911507 Aug  5 23:05 IMG_999.jpg

-rw-r--r--  1 lucianovigano  staff    17280 Aug 26 22:06 IMG_999.match

-rw-r--r--  1 lucianovigano  staff  4190400 Aug 26 22:06 IMG_999.new

-rw-r--r--  1 lucianovigano  staff    34560 Aug 26 22:06 IMG_999.rdls

-rw-r--r--  1 lucianovigano  staff        1 Aug 26 22:06 IMG_999.solved

-rw-r--r--  1 lucianovigano  staff    34560 Aug 26 22:06 IMG_999.wcs


But I'm not able to find the object matched :(

cheers,
Luciano

Dustin Lang

unread,
Aug 26, 2018, 5:20:53 PM8/26/18
to astrometry
Hi,

Try setting

export NETPBM_INC=-I/usr/local/Cellar/netpbm/10.73.20/include/netpbm

instead, and then

make reconfig
make
make install

The netpbm library is used to generate plots, so isn't essential for solving.

The "IMG_999.rdls" file contains the list of reference stars in the field
The "IMG_999.corr" file contains "correspondences" (matches) between stars detection in your image ("field") and reference stars ("index").

These are both FITS binary tables that you can list using the "tablist" program.

cheers,
--dustin

Luciano Vigano'

unread,
Aug 26, 2018, 5:48:51 PM8/26/18
to astrometry
Ciao,

it works!!! :-) :-)

sauron:astrometry.net-0.75 lucianovigano$ solve-field --downsample 2 /Users/lucianovigano/Downloads/IMG_999.jpg --overwrite

Reading input file 1 of 1: "/Users/lucianovigano/Downloads/IMG_999.jpg"...

jpegtopnm: WRITING PPM FILE

Read file stdin: 2496 x 1664 pixels x 1 color(s); maxval 255

Using 8-bit output

Extracting sources...

Downsampling by 2...

simplexy: found 1700 sources.

Solving...

Reading file "/Users/lucianovigano/Downloads/IMG_999.axy"...

  log-odds ratio 71.5055 (1.13352e+31), 12 match, 0 conflict, 16 distractors, 65 index.

  RA,Dec = (7.95012,58.6874), pixel scale 6.93252 arcsec/pix.

  Hit/miss:   Hit/miss: -+++++---++----+-+--++-----+(best)---------------+---------------------------------------+----------------

Field 1: solved with index index-4111.fits.

Field 1 solved: writing to file /Users/lucianovigano/Downloads/IMG_999.solved to indicate this.

Field: /Users/lucianovigano/Downloads/IMG_999.jpg

Field center: (RA,Dec) = (7.953591, 58.684518) deg.

Field center: (RA H:M:S, Dec D:M:S) = (00:31:48.862, +58:41:04.266).

Field size: 4.80441 x 3.20474 degrees

Field rotation angle: up is 112.722 degrees E of N

Field parity: neg

Creating new FITS file "/Users/lucianovigano/Downloads/IMG_999.new"...

Creating index object overlay plot...

Creating annotation plot...

Your field contains:

  IC 10

  NGC 129


I didn't remember all those problems whit the first installation I've done some time ago!!

Moreover I try to read the .rdls and the .corr ... I was expecting to find something like the last 3 lines of the above output -__-''  😭😭😭

Anyway thank you 🙏 😊 ☺️ so much for your kind support!!

Cheers,
Luciano

Reply all
Reply to author
Forward
0 new messages