Installing on Windows (cygwin)

827 views
Skip to first unread message

Joseph Colosi

unread,
Mar 3, 2014, 3:01:29 PM3/3/14
to astro...@googlegroups.com
Hello,

I hope this post is appropriate on this group, seems its the place with the knowledge base to possibly help.

I wish to install astrometry.net on my Windows imaging computer so I can access it using scripts with my astroimaging software.  I am an experienced software developer in the windows environment but have never done anything in Linux.  From my research so far it looks like I will need to install cygwin on the windows machine then build the astrometry.net package in cygwin.  Then access astrometry.net in cygwin using command line from scripts.

My questions are, how big a job for a Linux novice is it to get astrometry.net built in cygwin?  From my search it appears the biggest hurtle is making sure all the software packages required by astrometry.net are installed in cygwin, and they are configured correctly, is there a list of required packages anywhere?  Is there a step by step anywhere on how to install astrometry.net on a Linux machine, cygwin or normal Linux installation?

Any tips or suggestions are welcome and appreciated,  If I can manage to successfully install the latest astrometry.net on cygwin I would be happy to supply instructions for others interested in doing the same.

Thanks
Joe

Bryan

unread,
Mar 3, 2014, 4:10:46 PM3/3/14
to astro...@googlegroups.com
Joe:

You might give Astrotortilla a try, even if you never actually use AstroTortilla itself.

I say that because it does an easy and robust install of cygwin on a Windows machine, followed by astrometry.net.  You can then run astrometry.net within a cygwin text box.

http://sourceforge.net/projects/astrotortilla/files/

The only downside is that AstroTortilla doesn't use the latest version of astrometry.net.

Bryan

Dustin Lang

unread,
Mar 4, 2014, 9:21:55 AM3/4/14
to astro...@googlegroups.com
AstroTortilla probably installs all the cygwin packages required, so if you were brave you could then try building the newest Astrometry.net, without having to figure out the required packages.

The required packages are listed here,
http://astrometry.net/doc/build.html#prerequisites
but I don't have the exact cygwin package names...

Andrew Hood

unread,
Mar 4, 2014, 5:48:16 PM3/4/14
to astro...@googlegroups.com
gcc-core
clang (I didn't need the last time I tried)
make
libcairo-devel
libnetpbm-devel
libjpeg-devel
zlib-devel
python
python-numpy
pyfits and cfitsio you will have to build from source.

Those will drag in lots of other stuff.

--
There's no point in being grown up if you can't be childish sometimes.
-- Dr. Who

Joseph Colosi

unread,
Mar 4, 2014, 6:59:01 PM3/4/14
to Andrew Hood, astro...@googlegroups.com
"Those will drag in lots of other stuff."

That is exactly what I am worried about, opening up a cascading can of worms and dependencies.

Joe



--
You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at http://groups.google.com/group/astrometry.

Andrew Hood

unread,
Mar 4, 2014, 7:29:52 PM3/4/14
to astro...@googlegroups.com
Joseph,
Cygwin's installer will take care of all the dependencies. I've got a lot of Cygwin (x86) packages installed and they only take up 4GB.
The set of astrometry indexes I have are about 19GB
Andrew

No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4335 / Virus Database: 3705/7153 - Release Date: 03/04/14

Bryan

unread,
Mar 4, 2014, 10:59:26 PM3/4/14
to astro...@googlegroups.com
He will still need to install astrometry.net under cygwin.  Is there any easy installer for that, other than AstroTortilla?

Bryan

Andrew Hood

unread,
Mar 4, 2014, 11:20:50 PM3/4/14
to astro...@googlegroups.com
On 05/03/2014 2:59 PM, Bryan wrote:
> He will still need to install astrometry.net under cygwin. Is there
> any easy installer for that, other than AstroTortilla?
Not that I know of. astrometry.net compiles without too much effort with
Cygwin. You could just install Cygwin and follow Dustin's instructions on:

http://astrometry.net/doc/build.html#prerequisites

First you need - in this order:
all the Cygwin packages I listed earlier
CFITSIO source - http://heasarc.gsfc.nasa.gov/fitsio/fitsio.html
pyfits source -
http://www.stsci.edu/institute/software_hardware/pyfits/Download (also
has instructions on installing from Python Packaing (sic) Index)

Andrew

Dustin Lang

unread,
Mar 5, 2014, 10:19:56 AM3/5/14
to astro...@googlegroups.com
Installing it should be as easy as downloading the tarball, extracting it (tar xzf), "make" and "make install".  Not quite as easy as cygwin, but pretty standard in the unix world for outside packages.

--dstn


Andrew Hood

unread,
Mar 6, 2014, 4:11:42 AM3/6/14
to astro...@googlegroups.com
It almost works. 0.46 requires changes to ./blind/Makefile and
./sdss/Makefile because Python generates shared libs as .dll and not .so

The attached patch "fixes" it but only works for Cygwin. make needs some
rule to work out whether PYSO should be so or dll.
astrometry.net-0.46-cygwin.patch.gz

Andrew Hood

unread,
Mar 6, 2014, 4:53:10 AM3/6/14
to astro...@googlegroups.com
On 06/03/2014 8:11 PM, Andrew Hood wrote:
> The attached patch "fixes" it but only works for Cygwin. make needs
> some rule to work out whether PYSO should be so or dll. Andrew
This would work:

UNAME = $(shell uname -s)
ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
PYSO = dll
else
PYSO = so
endif

Maik Riechert

unread,
Mar 6, 2014, 5:49:17 AM3/6/14
to astro...@googlegroups.com
Andrew, have you tried my patches from https://groups.google.com/d/msg/astrometry/iPQwxx4Pfys/qUfMOUUFt7EJ ? These should handle the .so/.dll thing I think.

Andrew Hood

unread,
Mar 6, 2014, 7:24:52 AM3/6/14
to astro...@googlegroups.com
Maik,thanks for reminding me. I'd seen the thread before so I've had another look through your changes.

0.46 only appears to require the Makefiles to have a Python "so" patch to get it to compile.

gcc complains about -fPIC, but that is not fatal. Changing it to -fpic gcc 4.8.2 still complains:
  warning: -fpic ignored for target (all code is position independent) [enabled by default]
Maybe the config tests should check for this.

ioutils.c has had the duplicate FD_SET lines removed.

As the netpbm includes are installed in /usr/include/netpbm the config tests should look there too. The lib is in the default linker search path.

Andrew


On 06/03/2014 9:49 PM, Maik Riechert wrote:
Andrew, have you tried my patches from https://groups.google.com/d/msg/astrometry/iPQwxx4Pfys/qUfMOUUFt7EJ ? These should handle the .so/.dll thing I think.

Am Donnerstag, 6. März 2014 10:11:42 UTC+1 schrieb Andrew Hood:
On 06/03/2014 2:19 AM, Dustin Lang wrote:
> Installing it should be as easy as downloading the tarball, extracting
> it (tar xzf), "make" and "make install".  Not quite as easy as cygwin,
> but pretty standard in the unix world for outside packages.
It almost works. 0.46 requires changes to ./blind/Makefile and
./sdss/Makefile because Python generates shared libs as .dll and not .so

The attached patch "fixes" it but only works for Cygwin. make needs some
rule to work out whether PYSO should be so or dll.

Dustin Lang

unread,
Mar 6, 2014, 8:03:25 AM3/6/14
to astro...@googlegroups.com
Hi Andrew,

Could you please try the svn trunk version?  I just tried to incorporate your patch.

To specify the netpbm include file locations, you have to set NETPBM_INC, eg:

export NETPBM_INC="-I/usr/include/netpbm"


(Actually, looking at the libnetpbm library documentation, it looks like you're supposed to #include "netpbm/pam.h" rather than just #include "pam.h", so perhaps just making that change to all the code that uses netpbm would work.  The lack of pkg-config for netpbm is one reason I want to avoid using it.)

cheers,
--dustin

Andrew Hood

unread,
Mar 6, 2014, 8:02:10 PM3/6/14
to astro...@googlegroups.com
Dustin,

Maik's patch ( https://groups.google.com/d/msg/astrometry/iPQwxx4Pfys/qUfMOUUFt7EJ )  is on the whole better. Some of it has already been incorporated in 0.46, and there are a couple of things I missed.

As for netpbm, I think the includes should be:
#include netpbm/whatever.h
then you probably would not need to set the paths.

Compiling with -Werror would be "interesting".

Andrew
--
You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at http://groups.google.com/group/astrometry.

No virus found in this message.
Checked by AVG - www.avg.com

Version: 2014.0.4335 / Virus Database: 3705/7157 - Release Date: 03/05/14

Andrew Hood

unread,
Mar 6, 2014, 8:54:46 PM3/6/14
to astro...@googlegroups.com
Dustin,

This is a better patch against 0.46.

You might leave out the change for -fPIC - it just generates warnings and could be needed on other platforms. There should be a config test for it.

I might have a look at how much work adding -Werror would make.
Or maybe not. It looks like #include <getopt.h> is needed all over the place instead of all the "extern" definitions.


Andrew

On 07/03/2014 12:03 AM, Dustin Lang wrote:
--
You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at http://groups.google.com/group/astrometry.

No virus found in this message.
Checked by AVG - www.avg.com

Version: 2014.0.4335 / Virus Database: 3705/7157 - Release Date: 03/05/14

astrometry.net-0.46-cygwin.patch.gz

Andrew Hood

unread,
Mar 7, 2014, 5:51:45 AM3/7/14
to astro...@googlegroups.com
One more thing. In util/ioutils.c the calls to FD_ISSET(whatever, &errset) are often failing but there seems to be noting wrong with the files.

I've wrapped all references to errset in #if !(defined(__CYGWIN__)) and it seems to work properly.

Now I've got a 0.46 that works I'll look at SVN.


Andrew

On 07/03/2014 12:03 AM, Dustin Lang wrote:
--
You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at http://groups.google.com/group/astrometry.

No virus found in this message.
Checked by AVG - www.avg.com

Version: 2014.0.4335 / Virus Database: 3705/7157 - Release Date: 03/05/14

Dustin Lang

unread,
Mar 7, 2014, 9:50:13 AM3/7/14
to astro...@googlegroups.com
Hi Andrew,

In the svn trunk version I just put "-fPIC" inside a not-cygwin block, and also conditionally ignored errset in ioutils.c as you suggest.  And made the #include netpbm changes.  I'll be interested to hear if that compiles cleanly on cygwin.

cheers,
--dstn

Andrew Hood

unread,
Mar 7, 2014, 9:58:49 PM3/7/14
to astro...@googlegroups.com
Dustin, yesterday I put the changes I was using on 0.46 into a copy of SVN - which meant backing out a couple of yours.

ifeq (CYGWIN,$(findstring CYGWIN,$(UNAME)))
  SHAREDLIB_SUFFIX = dll
else
  SHAREDLIB_SUFFIX = so
endif

seems to be the wrong way. Everything except Python is perfectly happy to use .so, using Maik's

PYTHON_SO_EXT := $(shell python -c "import sysconfig; print sysconfig.get_config_var('SO')")
etc
is better.

Having recompiled SVN several times I've finally got a version that does not SEGFAULT. Let me do an "svn update" and "make clean reconfig all extra install" and if all seems OK I'll send you a diff against the current SVN.

Andrew
--
You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at http://groups.google.com/group/astrometry.

No virus found in this message.
Checked by AVG - www.avg.com

Version: 2014.0.4335 / Virus Database: 3722/7162 - Release Date: 03/06/14

Mark Foster

unread,
Mar 15, 2014, 2:51:10 PM3/15/14
to astro...@googlegroups.com
Guys,

Awesome stuff!  Any chance of getting a 0.47 tarball of this, or an account so I can svn it?

Thanks, Mark

Dustin Lang

unread,
Mar 15, 2014, 4:30:28 PM3/15/14
to astro...@googlegroups.com
The svn has public read-only access,

svn co http://astrometry.net/svn/trunk/src/astrometry

But I think Andrew doesn't have commit access (yet).

I'll cut a tarball once I get Andrew's changes incorporated.

cheers,
--dustin

Mark Foster

unread,
Mar 15, 2014, 9:01:21 PM3/15/14
to astro...@googlegroups.com
Cool, thanks!

Good to know svn co is available publicly.  The svn page says an account via ssh is needed.

R, Mark

Andrew Hood

unread,
Mar 16, 2014, 2:12:48 AM3/16/14
to astro...@googlegroups.com
I can get SVN to compile with both Cygwin and Linux using -Werror. :-)

The change to md5.c comes from the GNU source. Otherwise I have #if 0/#endif bits that caused problems.

The attached patch is against SVN rev 24610.

Andrew
--
You received this message because you are subscribed to the Google Groups "astrometry" group.
Visit this group at http://groups.google.com/group/astrometry.

No virus found in this message.
Checked by AVG - www.avg.com

Version: 2014.0.4336 / Virus Database: 3722/7198 - Release Date: 03/14/14

astrometry-svn-24610M.patch.gz

Mark Foster

unread,
Mar 16, 2014, 7:48:45 PM3/16/14
to astro...@googlegroups.com
This patch seems to work fine against the current svn 24645 on cygwin64.  I tested against ~100 live fits fine!

Be sure to keep cygwin updated, there was a version of file.exe before 5.17-2 that failed with the -k option (as used in util/filetype.py).  Works fine now.

Thanks!!

R, Mark

Dustin Lang

unread,
Apr 3, 2014, 9:52:10 AM4/3/14
to astro...@googlegroups.com
Hi Andrew,

At long last, I applied your patch and committed it to the svn trunk.  Thanks very much!

Please check it out and let me know if the svn trunk version works on cygwin.

Thanks again,
--dustin



Reply all
Reply to author
Forward
0 new messages