Re: help needed: fortran library linking issue.

From: Daniel Dewey <dd_at_email.domain.hidden>
Date: Mon, 27 Sep 2010 17:10:31 -0400
On Sep 27, 2010, at 4:10 PM, John Houck wrote:
> ...
> If heasoft was pre-compiled using an older gfortran, then that
> might be the problem.  This seems consistent with the heasoft
> release notes regarding portability of pre-compiled linux binaries:
> 
>  http://heasarc.gsfc.nasa.gov/docs/software/lheasoft/linux.html
> 
> If that's the problem, then compiling heasoft from source using
> gcc-4.4, gfortran-4.4, etc. should fix it.

Speaking of compiling XSPEC from source, 
besides the mac-specific issue in my notes below (ranlib),
I found there were some IRAF-related routines external to the
set of s/w that I downloaded, called from fpackutil.c .
See **** below.
Maybe there is some mission-specific unit that most people
also download that has these iraf items, but incase you run into
the problem... 
(Yes, John: it's a HEASARC issue, not an isis one!)

 -Dan


- - - - - 
[8]--- XSPEC-from-Source  (trying on 8/9/10, v 6.9 )

Download XSPEC etc. from source code:
   http://heasarc.gsfc.nasa.gov/lheasoft/download.html
   STEP 1:  [x] Source code
            [x] Mac Intel - Darwin 10.x (OS X 10.6.x)
	    
   STEP 2: Check
     [x] General-Use Tools
     [ ] XANADU:
          ...    [x] Xspec*


  then "Submit" initiates the download.
  
  
Untar etc it into /usr/local/src/heasoft-6.9_srcXspecEtc
   (added "_srcXspecEtc" to indicate what is in the download)

Follow instructions from-source in:
  http://heasarc.gsfc.nasa.gov/docs/software/lheasoft/install.html
     to summarize:

- cd heasoft-6.9_srcXspecEtc/BUILD_DIR/  
- Give the explicit compilers: (this can be already in/from .bash_profile too)

  See the values given in fink section.

export CFLAGS="-m32 "
export CXXFLAGS="-m32 "
export LD_FLAGS="-m32 "
export LDFLAGS="-m32 "


- Modify ranlib:

[Dan-127] chmod a+rw ../heacore/cfitsio/drvrgsiftp.c
[Dan-128] xjed ../heacore/cfitsio/drvrgsiftp.c
   Add line to the end:  int randlib_on_mac_hack = 1;

(  Previous notes on this:

In trying to install cfitsio [ * ] the "make" failed with:
  ranlib: file: libcfitsio.a(drvrgsiftp.o) has no symbols
  ranlib: file: libcfitsio.a(drvrgsiftp.o) has no symbols

" I think that this is a mac issue with ranlib.  You can try adding
something like

  int randlib_on_mac_hack = 1;

to very end of drvrgsiftp.c and then recompile." - jed  )

****
- Modify fpackutil.c to remove some external calls:
    (save modified version as:  heasoft-6.9_MODIFIED_fpackutil.c  )
chmod a+rw /usr/local/src/heasoft-6.9_srcXspecEtc/heacore/cfitsio/fpackutil.c
  Remove iraf ref.s:
xjed /usr/local/src/heasoft-6.9_srcXspecEtc/heacore/cfitsio/fpackutil.c &
  Remove lines with "iraf_file" in them. (3 places.)
  Remove calls to "_dither" routines (2 x 2 places.)
****

{ if re-compiling, then do:
    make clean
}

Note that these next two steps are executed in the background
so the prompt comes right back, but that does not mean they are done ;-)
    
- Do the configuration, creating a log file: 
    ./configure --prefix=/usr/local/src/heasoft_install > config.out 2>&1 &
    
- Build it... (goes faster without the "tail" running)
    make > build.log 2>&1 &
       tail -f build.log 

- Install it
       make install > install.log 2>&1 &



> 
> I think heasoft also suggests a workaround (see the above URL),
> but I haven't tried that approach.
> 
> Does that help?
> 
> Thanks,
> -John
> ----
> You received this message because you are
> subscribed to the isis-users list.
> To unsubscribe, send a message to
> isis-users-request_at_email.domain.hidden> with the first line of the message as:
> unsubscribe

    ----------------------------------------------------------
    Daniel Dewey                           dd_at_email.domain.hidden    MIT Kavli Institute        http://space.mit.edu/home/dd
    ----------------------------------------------------------




----
You received this message because you are
subscribed to the isis-users list.
To unsubscribe, send a message to
isis-users-request_at_email.domain.hiddenwith the first line of the message as:
unsubscribe
Received on Mon Sep 27 2010 - 17:10:41 EDT

This archive was generated by hypermail 2.2.0 : Mon Sep 27 2010 - 20:26:51 EDT