NMISC external package on Snow Leopard Mac OS 10.6.1
Charles Knox wrote on Jan 05, 2010
Hi all,
I have read the previous "Snow Leopard Anyone" thread http://iraf.net/phpBB2/viewtopic.php?t=88966 and it helped greatly with building a number of the external packages (finder gmisc guiapps mscred).
When I went to build fitsutil I found that I had to edit the mkpkg file as a part of the code is built in c, not in xc. I added the -m32 flag to the cc lines and was then successful.
relink:
$update libpkg.a
$omake x_fxutil.x
$link x_fxutil.o libpkg.a -lmef -ldbc -lxtools -o xx_fitsutil.e
!cc -c $(HSI_CF) -m32 fgwrite.c fgread.c checksum.c kwdb.c
!cc -m32 fgwrite.o kwdb.o -o fgwrite.e
!cc -m32 fgread.o kwdb.o checksum.o -o fgread.e
!rm fgwrite.o fgread.o kwdb.o checksum.o
;
Now, however I am stymied as to what to do. When I try to build the nmisc package I get a lot of library errors from the system libraries that are a part of the download from iraf.noao.edu.
Just as a sample of the output from mkpkg -p nmisc
This piece from near the start of the mkpkg output
xc -Nz -m32 -p nmisc x_nmisc.o libpkg.a -lds -lncar -lgks -lllsq -lxtools -lcurfit -lgsurfit -lnlfit -liminterp -o xx_nmisc.e
ld: warning: for symbol _imdcom_ tentative definition of size 2056 from /iraf/iraf/bin.macintel/libds.a(iisopn.o) is being replaced by a real definition of size 1638 from /iraf/iraf/bin.macintel/libex.a(imdcom.o)
Undefined symbols:
"_aaddr_", referenced from:
_tspecs_ in libpkg.a(t_specfocus.o)
_rgs1db_ in libgsurfit.a(gs_f1devalr.o)
_rgs1dg_ in libgsurfit.a(gs_f1devalr.o)
_rcvevb_ in libcurfit.a(cv_fevalr.o)
_rcvevg_ in libcurfit.a(cv_fevalr.o)
_rcvev3_ in libcurfit.a(cv_fevalr.o)
"_amulkd_", referenced from:
_mwsctn_ in libex.a(mwsctran.o)
_wfgsdr_ in libex.a(wfgsurfit.o)
_wfgsdr_ in libex.a(wfgsurfit.o)
"_amulki_", referenced from:
_cvacps_ in libcurfit.a(cvacptsr.o)
And this from the end of the output
"_aaddd_", referenced from:
_mwsavm_ in libex.a(mwsaveim.o)
_mwsctn_ in libex.a(mwsctran.o)
_mwsctn_ in libex.a(mwsctran.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Warning, mkpkg line 8: module `relink' not found or returned error
move `xx_nmisc.e' to `nmiscbin$x_nmisc.e'
$move: file `xx_nmisc.e' not found
Warning, mkpkg line 34: error moving file xx_nmisc.e
Warning, mkpkg line 9: module `install' not found or returned error
Warning, mkpkg line 3: module `update@src' not found or returned error
So, do you have any ideas as to what I need to do to get this working?
Thanks
Charley Knox
Dept. of Astronomy
Case Western Reserve University
knox@case.edu
I have read the previous "Snow Leopard Anyone" thread http://iraf.net/phpBB2/viewtopic.php?t=88966 and it helped greatly with building a number of the external packages (finder gmisc guiapps mscred).
When I went to build fitsutil I found that I had to edit the mkpkg file as a part of the code is built in c, not in xc. I added the -m32 flag to the cc lines and was then successful.
relink:
$update libpkg.a
$omake x_fxutil.x
$link x_fxutil.o libpkg.a -lmef -ldbc -lxtools -o xx_fitsutil.e
!cc -c $(HSI_CF) -m32 fgwrite.c fgread.c checksum.c kwdb.c
!cc -m32 fgwrite.o kwdb.o -o fgwrite.e
!cc -m32 fgread.o kwdb.o checksum.o -o fgread.e
!rm fgwrite.o fgread.o kwdb.o checksum.o
;
Now, however I am stymied as to what to do. When I try to build the nmisc package I get a lot of library errors from the system libraries that are a part of the download from iraf.noao.edu.
Just as a sample of the output from mkpkg -p nmisc
This piece from near the start of the mkpkg output
xc -Nz -m32 -p nmisc x_nmisc.o libpkg.a -lds -lncar -lgks -lllsq -lxtools -lcurfit -lgsurfit -lnlfit -liminterp -o xx_nmisc.e
ld: warning: for symbol _imdcom_ tentative definition of size 2056 from /iraf/iraf/bin.macintel/libds.a(iisopn.o) is being replaced by a real definition of size 1638 from /iraf/iraf/bin.macintel/libex.a(imdcom.o)
Undefined symbols:
"_aaddr_", referenced from:
_tspecs_ in libpkg.a(t_specfocus.o)
_rgs1db_ in libgsurfit.a(gs_f1devalr.o)
_rgs1dg_ in libgsurfit.a(gs_f1devalr.o)
_rcvevb_ in libcurfit.a(cv_fevalr.o)
_rcvevg_ in libcurfit.a(cv_fevalr.o)
_rcvev3_ in libcurfit.a(cv_fevalr.o)
"_amulkd_", referenced from:
_mwsctn_ in libex.a(mwsctran.o)
_wfgsdr_ in libex.a(wfgsurfit.o)
_wfgsdr_ in libex.a(wfgsurfit.o)
"_amulki_", referenced from:
_cvacps_ in libcurfit.a(cvacptsr.o)
And this from the end of the output
"_aaddd_", referenced from:
_mwsavm_ in libex.a(mwsaveim.o)
_mwsctn_ in libex.a(mwsctran.o)
_mwsctn_ in libex.a(mwsctran.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
Warning, mkpkg line 8: module `relink' not found or returned error
move `xx_nmisc.e' to `nmiscbin$x_nmisc.e'
$move: file `xx_nmisc.e' not found
Warning, mkpkg line 34: error moving file xx_nmisc.e
Warning, mkpkg line 9: module `install' not found or returned error
Warning, mkpkg line 3: module `update@src' not found or returned error
So, do you have any ideas as to what I need to do to get this working?
Thanks
Charley Knox
Dept. of Astronomy
Case Western Reserve University
knox@case.edu
Mike Fitzpatrick wrote on Jan 05, 2010
The simplest solution is to just use the prebuilt binaries (which you can get from http://iraf.net/ftp/iraf/extern/nmisc-bin.macintel.tar.gz)
Basically, there is an incompatibility with building packages on 10.6 systems with iraf system libraries built on earlier systems (the system we release were built on Tiger for binary compatbility, I'm not sure if SciSoft rebuilds the binaries or not). Part of your problem however may just be that the "-m32" is a GCC flag and not an XC flag. You can either escape this on the command-line as "-/m32" or else edit the hlib$mkpkg.inc file and add "-m32" to the XFLAGS and LFLAGS for the 'macintel' architecture and it will be done automatically for anything built with mkpkg. As I said though, you may still get errors, but this is how the flag can be added.
-Mike
Basically, there is an incompatibility with building packages on 10.6 systems with iraf system libraries built on earlier systems (the system we release were built on Tiger for binary compatbility, I'm not sure if SciSoft rebuilds the binaries or not). Part of your problem however may just be that the "-m32" is a GCC flag and not an XC flag. You can either escape this on the command-line as "-/m32" or else edit the hlib$mkpkg.inc file and add "-m32" to the XFLAGS and LFLAGS for the 'macintel' architecture and it will be done automatically for anything built with mkpkg. As I said though, you may still get errors, but this is how the flag can be added.
-Mike
Charles Knox wrote on Jan 05, 2010
Mike,
Aha! So that is where the binaries for macintel live! I had been looking at iraf.noao.edu for them, and not finding them which is why I was building. Old habits die hard. Thanks for the pointer to the downloads. For the record, I had made the XFLAGS and LFLAGS changes to the mkpkg.inc file. And I had tried to rebuild the base IRAF system from scratch too, but there are problems with the system libraries. As the pre-built binaries work, I will let it go for now.
Thanks Again
Charley
Aha! So that is where the binaries for macintel live! I had been looking at iraf.noao.edu for them, and not finding them which is why I was building. Old habits die hard. Thanks for the pointer to the downloads. For the record, I had made the XFLAGS and LFLAGS changes to the mkpkg.inc file. And I had tried to rebuild the base IRAF system from scratch too, but there are problems with the system libraries. As the pre-built binaries work, I will let it go for now.
Thanks Again
Charley
Last post on Jan 05, 2010