JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for STARDEV Archives


STARDEV Archives

STARDEV Archives


STARDEV@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

STARDEV Home

STARDEV Home

STARDEV  June 2006

STARDEV June 2006

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

How I built CVS Starlink for intel mac (fwd)

From:

Brad Cavanagh <[log in to unmask]>

Reply-To:

Starlink development <[log in to unmask]>

Date:

Fri, 16 Jun 2006 21:24:23 -1000

Content-Type:

TEXT/PLAIN

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (320 lines)

---------- 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.

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

December 2023
January 2023
December 2022
July 2022
June 2022
April 2022
March 2022
December 2021
October 2021
July 2021
April 2021
January 2021
October 2020
September 2020
August 2020
May 2020
November 2019
October 2019
July 2019
June 2019
February 2019
January 2019
December 2018
November 2018
August 2018
July 2018
May 2018
April 2018
March 2018
February 2018
December 2017
October 2017
August 2017
July 2017
May 2017
April 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
October 2015
September 2015
August 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
2004
April 2003
2003


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager