Welcome to iraf.net Tuesday, April 16 2024 @ 05:01 AM GMT


 Forum Index > Help Desk > Systems New Topic Post Reply
 How to recompile IRAF libraries
   
jhargis
 04/23/2014 01:42PM (Read 2375 times)  
++---
Junior

Status: offline


Registered: 02/19/2007
Posts: 28
Hello - I am trying to install Peter Stetson's standalone DAOPHOT program, which links to some of the IRAF libraries. In order to allow DAOPHOT to read in large images, I need to have rather large array sizes which appear to be over the standard limit. I am able to compile the DAOPHOT code without problems (using additional memory allocation flags), but the .o files will not link to the pre-built IRAF libraries such as libimfort.a.

I suspect that I need to recompile the relevant IRAF libraries using similar large memory allocation flags. Are there instructions somewhere for how to do this?


Here is how I am doing the compilation:

PHP Formatted Code

$ make -f Makefile.fock allstar
gfortran -c -O2 -m64 -mcmodel=large allstar.f
gfortran -c -O2 -m64 -mcmodel=large allstsubs.f
gfortran -c -O2 -m64 -mcmodel=large lnxsubs.f
gfortran -c -O2 -m64 -mcmodel=large iosubs.f
gfortran -c -O2 -m64 -mcmodel=large mathsubs.f
mathsubs.f:1931.72:

      IF ((J .GT. 97) .OR. (J .LT. 1)) PAUSE                            
                                                                        1
Warning: Deleted feature: PAUSE statement at (1)
gfortran -c -O2 -m64 -mcmodel=large bothsubs.f
gfortran -O2 -Wall -Wsurprising --defsym,mem_=0 -fbounds-check -m64 -malloc-cc -mcmodel=large -mlarge-data-threshold -o allstar allstar.o allstsubs.o \
        lnxsubs.o iosubs.o mathsubs.o bothsubs.o \
        /opt/iraf/bin.linux64/libimfort.a /opt/iraf/bin.linux64/libsys.a /opt/iraf/bin.linux64/libvops.a /opt/iraf/unix/bin.linux64/libos.a /opt/iraf/unix/bin.linux/libcompat.a -lm -L/usr/lib -L/usr/local/lib -L/lib -L/lib64 -L/opt/iraf/unix/bin.linux64 -lf2c /opt/local/lib/libcfitsio.a
/opt/iraf/bin.linux64/libimfort.a(imakwc.o): In function `imakwc_':
/net/iraf/u3/iraf/iraf.v2161/sys/imfort/imakwc.x:30: relocation truncated to fit: R_X86_64_PC32 against `.bss'

/net/iraf/u3/iraf/iraf.v2161/sys/imfort/imakwc.x:30: relocation truncated to fit: R_X86_64_32S against symbol `mem_' defined in COMMON section in /opt/iraf/bin.linux64/libimfort.a(imakwc.o)
...

 
Profile Email
 Quote
fitz
 04/25/2014 05:43PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040

I think the real error is coming from the use of the Mem common in the system, i.e. the compiler is treating the 'mem_' as an array with a base address of zero (from the --defsym,mem_=0' flag) and trying to load it in the base static segment.

We don't really have a document for how to build the system using a new compiler and since it is infinitely faster for me to do it rather than explain it here, I've done just that and put the new binaries at

ftp://iraf.noao.edu/pub/fitz/iraf2161-gfortran-linux64.tar.gz

This is just a tarball of the various 'bin.linux64' directories where all sources were compiled using GFORTRAN and the flags -O2 -m64 -mcmodel=large". You can unpack this at the iraf root to replace your existing binaries, or else just extract the libraries you need. Tasks compiled and a simple hello.f imfort task runs but I can't make any guarantee about the daophot code. Hope this helps.

 
Profile Email
 Quote
jhargis
 05/02/2014 02:20PM  
++---
Junior

Status: offline


Registered: 02/19/2007
Posts: 28
Hi - Thanks for posting these libraries. This in fact solved the problem, although I had to recompile the CFITSIO libraries (for some unknown reason). So, DAOPHOT/ALLSTAR compiled just fine, and once I test it I will post a more complete set of instructions for how I got this working. I think it would be useful for those trying to get DAOPHOT to work on larger images.

 
Profile Email
 Quote
   
Content generated in: 0.17 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login