Closed alexw-im closed 2 months ago
Hi,
This is a pain because netpbm is not packaged the same way on different systems/distributions.
If pkg-config exists, the Astrometry.net Makefile will use it to find netpbm. (In util/makefile.netpbm:)
NETPBM_INC ?= $(shell pkg-config --exists netpbm && pkg-config --cflags netpbm || echo)
NETPBM_LIB ?= $(shell pkg-config --exists netpbm && pkg-config --libs netpbm || echo "-L. -lnetpbm")
If pkg-config does not know about netpbm on your computer, you can instead set the NETPBM_INC and NETPBM_LIB environment variables, eg
export NETPBM_INC="-I/usr/include"
export NETPBM_LIB="-lnetpbm"
The other thing that can be different is, the astrometry.net code looks for the file netpbm/pam.h
relative to the included directory -- so if the file /usr/include/netpbm/pam.h
exists, it should work fine, while if you only have the file /usr/include/pam.h
, then that lack of the netpbm
directory causes a problem (and that's what the symlink trick can fix).
Very enlightening, thank you!
So all my systems do have pkg-config (it's in that install script). Interestingly, I notice that on an older installation with a fully-working copy of astrometry 0.93, pkg-config --exists netpbm
returns nothing and
$ pkg-config --cflags netpbm
Package netpbm was not found in the pkg-config search path.
Perhaps you should add the directory containing `netpbm.pc'
to the PKG_CONFIG_PATH environment variable
No package 'netpbm' found
I noticed you mention those environment variables in a different context but I don't quite understand how they're supposed to work, so it's possible I wasn't attempting that fix the right way: I kind of blindly jammed them into my .bashrc, but compiling 0.94, I still had the same problem above.
I guess the question is, what's different between 0.93 and 0.94 that make
0.93 finds netpbm on my system (despite pkg-config failing to locate it AND not having the symlink fix in place) where 0.94 fails?
This change https://github.com/dstndstn/astrometry.net/commit/d4760e2d25aa90b2817a02610b8daf10235b3cfb
On Thu, Aug 24, 2023 at 7:14 PM alexw-im @.***> wrote:
Very enlightening, thank you!
So all my systems do have pkg-config (it's in that install script). Interestingly, I notice that on an older installation with a fully-working copy of astrometry 0.93, pkg-config --exists netpbm returns nothing and
$ pkg-config --cflags netpbm Package netpbm was not found in the pkg-config search path. Perhaps you should add the directory containing `netpbm.pc' to the PKG_CONFIG_PATH environment variable No package 'netpbm' found
I noticed you mention those environment variables in a different context but I don't quite understand how they're supposed to work, so it's possible I wasn't attempting that fix the right way: I kind of blindly jammed them into my .bashrc, but compiling 0.94, I still had the same problem above.
I guess the question is, what's different between 0.93 and 0.94 that make 0.93 finds netpbm on my system (despite pkg-config failing to locate it AND not having the symlink fix in place) where 0.94 fails?
— Reply to this email directly, view it on GitHub https://github.com/dstndstn/astrometry.net/issues/276#issuecomment-1692530489, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIEH7OCJFI4RJISNPYAPATXW7N35ANCNFSM6AAAAAA35VETQA . You are receiving this because you commented.Message ID: @.***>
Ahh well that seems pretty clear! So I guess the idea is that this breaks install on i.e. a raspberry pi but improves likelihood of success on other systems?
Yes
Related to #272 but not quite the same since I'm not using docker. I just recently realized that when I switched to 0.94 running on a raspberry pi, there seem to be path issues with netpbm during compilation.
solve-field
completes but the only output plot written is *-objs.jpg, and it's empty.I manually created the symlink mentioned above on my pi before installing 0.94 and that seems to have fixed the issues below, that is
ln -s /usr/include /usr/local/include/netpbm
beforemake; make extra; sudo make install
Since there's no dockerfile for a bare metal install, I'm not sure where to fix this mine for future bare-metal users, but perhaps there's a good solution? A new check in the makefile or something?
For direct comparison, here's output from 0.93 with no errors and everything working per my expectations:
Here's the output with exactly the same environment, but using the 0.94 release package from github:
Here's the script I'm using to install astrometry generally:
Going from the (failed) 0.94 installation to the (good) 0.93 installation, all I did was
sudo mv /usr/local/astrometry /usr/local/astrometry-0.94
and then remove astrometry.net-0.94.tar.gz, download the 0.93 release from http://astrometry.net/downloads/, and untar/make/make extra/sudo make install (and re-copy index files of course).