NETPBM and astrometry.cfg problems

290 views
Skip to first unread message

David Wyrick

unread,
Jan 28, 2016, 5:24:02 PM1/28/16
to astrometry
Hello,

I'm to the point where I don't know what else to do. I'm trying to run Astrometry.net on cygwin and after much frustration, I'm fairly certain I have all of the packages I need to move forward. Alas, netpbm is still not working.

I've followed the build instructions, make/make py/make extra/make install to the point where I have the Astrometry.net executables. 

my util/makefile.netpbm is

NETPBM_INC = -l/usr/local/netpbm/include
NETPBM_LIB = /usr/local/netpbm/lib/libnetpbm.a

I'm not sure this is the correct syntax, but from what I was seeing on this blog I figured it was correct
and I've exported that to environment variables as well...

so I make reconfig

$ make reconfig
rm -f '../include/astrometry/'os-features-config.h makefile.os-features

and then make 

$  make makefile.os-features
Makefile:61: makefile.os-features: No such file or directory

---- 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 -l/usr/local/netpbm/include
   NETPBM_LIB_ORIG is /usr/local/netpbm/lib/libnetpbm.a
( \
 echo "# This file is generated by util/Makefile."; \
 ((gcc -o os-features-test-netpbm-make \
     -g -Wall -ffinite-math-only -fno-signaling-nans -pthread -march=native -O3 -fomit-frame-pointer -DNDEBUG -Winline -I../include -I../include/astrometry -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DAN_GIT_REVISION='"0.67"' -DAN_GIT_DATE='"Mon_Jan_25_11:20:00_2016_-0500"' -DAN_GIT_URL='"https://github.com/dstndstn/astrometry.net"' -I../util -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16  -I/usr/include/libpng16          -I../include -I../include/astrometry -I../gsl-an     -I../include -I../include/astrometry -I../gsl-an  -I. -DTEST_NETPBM_MAKE -l/usr/local/netpbm/include os-features-test.c  -g -Wall -ffinite-math-only -fno-signaling-nans -pthread -march=native -O3 -fomit-frame-pointer -DNDEBUG -Winline /usr/local/netpbm/lib/libnetpbm.a >> 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:17: fatal error: pam.h: No such file or directory
 #include <pam.h>
                 ^
compilation terminated.
--------------- 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
no

  WCSLIB_INC:
  WCSLIB_LIB:

------------------------------
make: 'makefile.os-features' is up to date.



This all started because I was getting error messages when I tried to solve-field test images.

The astrometry.cfg file has my filepath to the index files, but solve-field says it failed to open index directory. 

Help me, you're my only hope. 

Themos Tsikas

unread,
Jan 29, 2016, 6:30:30 AM1/29/16
to astrometry
Hello,

Please check that you have Netpbm installed in cygwin. Look for the file /usr/include/netpbm/pam.h 
If it doesn't exist, you must run your Cygwin setup.exe program (mine is in the Windows Downloads folder, get it from https://cygwin.com/setup-x86.exe (32bit) or https://cygwin.com/setup-x86_64.exe (64bit)
When you run the setup program and you are given a choice of packages to install you need the following 
libnetpbm-devel
libnetpbm10
netpbm

Then, in util/makefile.netpbm you put

NETPBM_INC= -I /usr/include/netpbm
NETPBM_LIB ?= -lnetpbm

Cheers,
Themos

David Wyrick

unread,
Jan 29, 2016, 9:54:36 AM1/29/16
to astro...@googlegroups.com
Themos,

Yes, the netpbm packages you listed were selected during install. After install Libnetpbm.a was simple in the C:/cygwin64/lib folder and the headers were in in C:/cygwin64/usr/include/netpbm, but I copied them over to a usr/local/netpbm/ folder.  


my util/makefile.netpbm is

NETPBM_INC = -l/usr/local/netpbm/include
NETPBM_LIB = /usr/local/netpbm/lib/libnetpbm.a

I'm statically linking the library because dynamic linking isn't working. Do these variables need to be the full path? with cygdrive/c/...

Thanks,
David

Dustin Lang

unread,
Jan 29, 2016, 1:34:27 PM1/29/16
to astrometry
NETPBM_INC is the path to the headers.  It must start with -I, not -l.  Those characters look identical in the font I have.  It must be a capital letter i, I, not lower case ell.  It's a command to gcc that says "look for Include files here".

cheers,
--dustin


David Wyrick

unread,
Feb 1, 2016, 6:44:23 PM2/1/16
to astrometry
Dustin,

It was as simple as a syntax error! :/ Thanks for pointing that out for me. I'm still fairly new to command line, cygwin especially. 

Cheers,
David
Reply all
Reply to author
Forward
0 new messages