---------- Forwarded message ----------
Date: Sat, 17 Jun 2006 17:11:03 +1000
From: Chris Tinney <[log in to unmask]>
To: Brad Cavanagh <[log in to unmask]>
Subject: How I built CVS Starlink for intel mac
Brad,
haven't tested all the functions yet (but eg. gaia displays an NDF image)
but I have got the CVS checkout to build (haven't got oracdr installed
as part of the cvs checkout apparently, so I'll try that next).
Here are my notes on what I had to do
Chris T.
BUILD NOTES for StarlinkCVS on Intel Mac
2006 June 15
(0) setenvs
STARCONF_DEFAULT_STARLINK=/star-cvs
STARCONF_DEFAULT_PREFIX=/star-cvs
PATH=/star-cvs/bin:/star-cvs/buildsupport/bin:$PATH
FC=g95
F77=g95
... so do the following
setenv STARCONF_DEFAULT_STARLINK /star-cvs
setenv STARCONF_DEFAULT_PREFIX /star-cvs
setenv PATH
$STARCONF_DEFAULT_PREFIX/bin:$STARCONF_DEFAULT_PREFIX/buildsupport/bin:$PATH
unsetenv INSTALL
unsetenv STARLINK
setenv FC g95
setenv F77 g95
./bootstrap
make configure-deps
./configure -C --disable-shared
(1) applications/atools - make fails
make MANIFEST=false all-am
alink atools_mon.o astcopy.o astaddframe.o astclear.o astget.o astset.o
asttest.o astcmpframe.o astcmpmap.o astframe.o astgetframe.o astgetmapping.o
astunitmap.o atlhelp.o astskyframe.o astframeset.o astpermmap.o
astremoveframe.o astremapframe.o astmatrixmap.o astconvert.o astlutmap.o
astpcdmap.o astwinmap.o astshiftmap.o astfindframe.o astpermaxes.o
astpickaxes.o astsimplify.o asttrann.o astmapbox.o astinvert.o astspecframe.o
astsetrefpos.o astgetrefpos.o astformat.o asttran1.o asttran2.o astmathmap.o
astsetactunit.o astgetactunit.o astpolymap.o astswitchmap.o asttranmap.o
astdsbframe.o astfluxframe.o astsfluxframe.o astpolygon.o astellipse.o
astmapsplit.o astselectormap.o astinterval.o atl1_gtfrm.o atl1_ptobj.o
atl1_setop.o atl1_gtofl.o atl1_cpcol.o atl1_prnt2.o atl1_prnt1.o
/star-cvs/lib/libcfitsio.a `./atools_link_adam /star-cvs/lib/libcfitsio.a`
LIBTOOL=/star-cvs/bin/dtask_libtool
g95 -g -O2 -I/star-cvs/include -fno-second-underscore -c dtask_applic.f -o
dtask_applic.o
g95 -g -O2 -o atools_mon /star-cvs/lib/dtask_main.o dtask_applic.o
/star-cvs/lib/starMemInit.o ./atools_mon.o astcopy.o astaddframe.o astclear.o
astget.o astset.o asttest.o astcmpframe.o astcmpmap.o astframe.o astgetframe.o
astgetmapping.o astunitmap.o atlhelp.o astskyframe.o astframeset.o astpermmap.o
astremoveframe.o astremapframe.o astmatrixmap.o astconvert.o astlutmap.o
astpcdmap.o astwinmap.o astshiftmap.o astfindframe.o astpermaxes.o
astpickaxes.o astsimplify.o asttrann.o astmapbox.o astinvert.o astspecframe.o
astsetrefpos.o astgetrefpos.o astformat.o asttran1.o asttran2.o astmathmap.o
astsetactunit.o astgetactunit.o astpolymap.o astswitchmap.o asttranmap.o
astdsbframe.o astfluxframe.o astsfluxframe.o astpolygon.o astellipse.o
astmapsplit.o astselectormap.o astinterval.o atl1_gtfrm.o atl1_ptobj.o
atl1_setop.o atl1_gtofl.o atl1_cpcol.o atl1_prnt2.o atl1_prnt1.o
-L/star-cvs/lib /star-cvs/lib/libcfitsio.a /star-cvs/lib/libkpg_adam.a
/star-cvs/lib/libkpg.a /star-cvs/lib/libira_adam.a /star-cvs/lib/libira.a
/star-cvs/lib/libirq_adam.a /star-cvs/lib/libirq.a /star-cvs/lib/liblpg.a
/star-cvs/lib/libctg.a /star-cvs/lib/libfts_adam.a /star-cvs/lib/libfts.a
/star-cvs/lib/libaif_adam.a /star-cvs/lib/libaif.a /star-cvs/lib/libcat_adam.a
/star-cvs/lib/libcat.a -lcfitsio /star-cvs/lib/libsla.a
/star-cvs/lib/libndg_adam.a /star-cvs/lib/libndg.a /star-cvs/lib/libndf_adam.a
/star-cvs/lib/libndf.a /star-cvs/lib/libary.a /star-cvs/lib/libtrn.a
/star-cvs/lib/libprm.a /star-cvs/lib/libprm_a.a /star-cvs/lib/libmag_adam.a
/star-cvs/lib/libmag.a /star-cvs/lib/libpda.a /star-cvs/lib/libatl_adam.a
/star-cvs/lib/libgrp_adam.a /star-cvs/lib/libast.a
/star-cvs/lib/libast_wcslib.a /star-cvs/lib/libast_pal.a
/star-cvs/lib/libast_grf_2.0.a /star-cvs/lib/libast_grf_3.2.a
/star-cvs/lib/libast_pass2.a /star-cvs/lib/libast_ems.a -lm
/star-cvs/lib/libshl_adam.a /star-cvs/lib/libshl.a /star-cvs/lib/libone.a
/star-cvs/lib/libfio_adam.a /star-cvs/lib/libfio.a
/star-cvs/lib/libhdspar_adam.a /star-cvs/lib/libpar_adam.a
/star-cvs/lib/libdtask_adam.a /star-cvs/lib/libtask_adam.a
/star-cvs/lib/liberr_adam.a /star-cvs/lib/libsubpar_adam.a
/star-cvs/lib/liblex_adam.a /star-cvs/lib/libams_adam.a /star-cvs/lib/libmsp.a
/star-cvs/lib/libsock.a /star-cvs/lib/libatimer.a /star-cvs/lib/libmisc_adam.a
-lcurses /star-cvs/lib/libstring_adam.a /star-cvs/lib/libhdsf.a
/star-cvs/lib/libhds.a /star-cvs/lib/libchr.a /star-cvs/lib/libhlp.a
/star-cvs/lib/libpsx.a /star-cvs/lib/libemsf.a /star-cvs/lib/libems.a
/star-cvs/lib/libcnf.a /star-cvs/lib/libstarmem.a
ld: Undefined symbols:
_ftclos_
_ftgiou_
_ftopen_
make[1]: *** [atools_mon] Error 1
CGT: This seems to be because the order in which cfitsio appears in the link
chain is not correct. I hard-wired the Makefile and Makefile.in to
put the LDADD environment variable at the end of the link chain
atools_mon_LDADD = $(LDADD) `$(srcdir)/atools_link_adam`
=>
atools_mon_LDADD = $(LDADD) `$(srcdir)/atools_link_adam` $(LDADD)
and did
setenv LDADD /star-cvs/lib/libcfitsio.a
and then did a make by hand in the directory, which got it to build
correctly.
The correct solution would probably be to edit atools_link_adam
and insert an extra `cfitsio_link` there, rather than in the Makefile.
(2) ccdpack
..... a WHOLE lot of wranings like
,,,,,,,,,,,,,,,,,,,,,,,,
In file findoff.f:1704
: %VAL( CNF_PVAL( IPLX ) ),
1
In file findoff.f:804
CALL AST_TRAN2( MAPS( I ), 4, XP, YP, .TRUE.,
2
Warning (155): Inconsistent types (INTEGER(4)/REAL(8)) in actual argument lists
at (1) and (2)
In file tranndf.f:1582
: VAR, VARR, TRIDI, FLUX,
1
In file tranndf.f:1369
: VAR, %VAL( CNF_PVAL( IPNTR( 2 ) ) ),
2
Warning (155): Inconsistent types (REAL(4)/INTEGER(4)) in actual argument lists
at (1) and (2)
In file tranndf.f:1570
: VAR, VARR, MAP, FLUX,
1
In file tranndf.
.........
and then ....
/usr/bin/ld: table of contents for archive: /star-cvs/lib/libjpeg.a is out of
date; rerun ranlib(1) (can't load from it)
..... a WHOLE lot of wranings, and then ....
make[3]: *** [ccdwish] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all] Error 2
make: *** [/star-cvs/manifests/ccdpack] Error 1
forced ranlib of /star-cvs/lib/libjpeg.a, and it seemed to then build OK.
(3) convert
ld: warning iraf/libimfort.a archive's cputype (18, architecture ppc) does not
match cputype (7) for specified -arch flag: i686 (can't load from it)
ld: warning iraf/libsys.a archive's cputype (18, architecture ppc) does not
match cputype (7) for specified -arch flag: i686 (can't load from it)
ld: warning iraf/libvops.a archive's cputype (18, architecture ppc) does not
match cputype (7) for specified -arch flag: i686 (can't load from it)
ld: warning iraf/libos.a archive's cputype (18, architecture ppc) does not
match cputype (7) for specified -arch flag: i686 (can't load from it)
ld: Undefined symbols:
_fd
make[2]: *** [convert_mon] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [/star-cvs/manifests/convert] Error 1
lapcgt{cgt}: locate iraf/libimfort.a
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf/libimfort.a
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf/libimfort.a_apple_darwin
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf/libimfort.a_dec_osf
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf/libimfort.a_mips
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf/libimfort.a_pc_linux_gnu
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf/libimfort.a_sun
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf/libimfort.a_sun_solaris
So only iraf/libimfort.a on machine comes from starlink.
But the apple one is a powerpc one. So its making the wrong architexture
(presumably based on the vendor, not the CPU)
Editted /Users/cgt/Installed_Software/star-cvs/applications/convert/configure
so that it hunts for an i686-apple-darwin version of the
libraries,
for platform in _pc_linux_gnu _sun_solaris _dec_osf _mips _apple_darwin NONE
=>
for platform in _pc_linux_gnu _sun_solaris _dec_osf _mips i686_apple_darwin
_apple_darwin NONE
and downloaded binary macintel beta version of IRAF to get the libraries (see
http://iraf.net/article.php/20060313225040603 - a lot of pain for just a few
libraries!) then put them in
/Users/cgt/Installed_Software/star-cvs/applications/convert/iraf
as
cp /iraf/irafbin/bin.macintel/libimfort.a libimfort.ai686_apple_darwin
cp /iraf/irafbin/bin.macintel/libvops.a libvops.ai686_apple_darwin
cp /iraf/irafbin/bin.macintel/libsys.a libsys.ai686_apple_darwin
cp /iraf/iraf/unix/bin.macintel/libos.a libos.ai686_apple_darwin
(NB: essential to have no underscore betwen ".a" and "i686")
libcompat.a (which exists in the distribution ONLY as a pc_linux bit
of code), can be obtained as source from
http://www.opensource.apple.com/projects/darwin/6.0/projects.html
But I haven't put it in here as I assume if there's no ppc mac
library, its not needed.
(4) Once this is fixed the build of convert fails with the result
/star-cvs/bin/alink convert_mon.o ascii2ndf.o ast2ndf.o conhelp.o da2ndf.o
dst2ndf.o fits2ndf.o gasp2ndf.o ircam2ndf.o ndf2ascii.o ndf2da.o ndf2dst.o
ndf2fits.o ndf2gasp.o ndf2pgm.o ndf2tiff.o ndf2unf.o specx2ndf.o unf2ndf.o
ndf2iraf.o iraf2ndf.o libcoi/libcoi.la libcof/libcof.la libcon/libcon.la
libaif/libaif.la iraf/libconspp.la -ldta -lfigich `./iraf_link`
`./convert_link_adam`
LIBTOOL=/star-cvs/bin/dtask_libtool
g95 -g -O2 -I/star-cvs/include -fno-second-underscore -c dtask_applic.f -o
dtask_applic.o
g95 -g -O2 -o convert_mon /star-cvs/lib/dtask_main.o dtask_applic.o
/star-cvs/lib/starMemInit.o ./convert_mon.o ascii2ndf.o ast2ndf.o conhelp.o
da2ndf.o dst2ndf.o fits2ndf.o gasp2ndf.o ircam2ndf.o ndf2ascii.o ndf2da.o
ndf2dst.o ndf2fits.o ndf2gasp.o ndf2pgm.o ndf2tiff.o ndf2unf.o specx2ndf.o
unf2ndf.o ndf2iraf.o iraf2ndf.o -L/star-cvs/lib libcoi/.libs/libcoi.a
libcof/.libs/libcof.a libcon/.libs/libcon.a libaif/.libs/libaif.a
iraf/.libs/libconspp.a /star-cvs/lib/libdta.a /star-cvs/lib/libfigich.a
iraf/libimfort.a iraf/libsys.a iraf/libvops.a iraf/libos.a
/star-cvs/lib/libsla.a -lcfitsio /star-cvs/lib/libshl_adam.a
/star-cvs/lib/libshl.a /star-cvs/lib/libfio_adam.a /star-cvs/lib/libfio.a
/star-cvs/lib/libpda.a /star-cvs/lib/libndg_adam.a /star-cvs/lib/libndg.a
/star-cvs/lib/libgrp_adam.a /star-cvs/lib/libndf_adam.a /star-cvs/lib/libndf.a
/star-cvs/lib/libary.a /star-cvs/lib/libprm.a /star-cvs/lib/libprm_a.a
/star-cvs/lib/libast.a /star-cvs/lib/libast_wcslib.a /star-cvs/lib/libast_pal.a
/star-cvs/lib/libast_grf_2.0.a /star-cvs/lib/libast_grf_3.2.a
/star-cvs/lib/libast_pass2.a /star-cvs/lib/libast_ems.a -lm
/star-cvs/lib/libone.a /star-cvs/lib/libhdspar_adam.a
/star-cvs/lib/libpar_adam.a /star-cvs/lib/libdtask_adam.a
/star-cvs/lib/libtask_adam.a /star-cvs/lib/liberr_adam.a
/star-cvs/lib/libsubpar_adam.a /star-cvs/lib/liblex_adam.a
/star-cvs/lib/libams_adam.a /star-cvs/lib/libmsp.a /star-cvs/lib/libsock.a
/star-cvs/lib/libatimer.a /star-cvs/lib/libmisc_adam.a -lcurses
/star-cvs/lib/libstring_adam.a /star-cvs/lib/libhdsf.a /star-cvs/lib/libhds.a
/star-cvs/lib/libchr.a /star-cvs/lib/libhlp.a /star-cvs/lib/libpsx.a
/star-cvs/lib/libemsf.a /star-cvs/lib/libems.a /star-cvs/lib/libcnf.a
/star-cvs/lib/libstarmem.a
ld: Undefined symbols:
_fd
make[1]: *** [convert_mon] Error 1
make: *** [all-recursive] Error 1
fd is decared an external pointer in some of the c code in libcon
(con_close.c con_open.c con_cwrit.c con_cwri2.c).
con_gbl.c declares the variable, but for some reason it is never being
picked up as being defined.
A quick check (ar -t) on the libcon.a that's been built
lapcgt{cgt}: ar -t
/Users/cgt/Installed_Software/star-cvs/applications/convert/libcon/.libs/libcon.a
| grep gbl
con_gbl.o
lt1-con_gbl.o
So I moved the declaration of *fd from con_gbl.c to con_copen.c
con_gbl.c (comment out th declaration)
#include <stdio.h>
#include "cnf.h"
#include "f77.h"
/*FILE *fd; A pointer to the FILE structure identifying the open file */
con_copen.c (make the extern into a declaration)
#include <stdio.h>
#include "cnf.h"
#include "f77.h"
FILE *fd; /* A pointer to the FILE structure identifying the open file */
with this change convert builds
The rest built OK, though I haven't checked the error logs in detail.
|