LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Trying to solve multiple undefined reference to `_gfortran_*' (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-solve-multiple-undefined-reference-to-%60_gfortran_%2A-938958/)

ReverendDangles 04-09-2012 03:30 PM

Trying to solve multiple undefined reference to `_gfortran_*'
 
I'm trying to install some older software and I'm getting a large list of undefined reference to `_gfortran_*'.
Now when researching this issue it says I need the gfortran library but when I run:
Quote:

rpm -ql libgfortran-4.6.3-2.fc16.i686
/usr/lib/libgfortran.so.3
/usr/lib/libgfortran.so.3.0.0
That means I do have the gfortran library correct?
I attached the error output below.
I'm probably overlooking something simple but I would appreciate any
help. Thanks in advance.

Quote:

[root@jacob qdp]# xmake
Using makefile.xan
g77 -o qdp qdp.o\
-L/usr/local/xanadu/lnx/lib -lxanlib \
-L/usr/local/xanadu/lnx/lib -lpgplot -L/usr/lib -lX11
/usr/local/xanadu/lnx/lib/libpgplot.a(pgbox.o): In function `pgbox_':
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:122: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:123: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:124: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:125: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:126: undefined reference to `_gfortran_string_index'
/usr/local/xanadu/lnx/lib/libpgplot.a(pgbox.o):/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:127: more undefined references to `_gfortran_string_index' follow /usr/local/xanadu/lnx/lib/libpgplot.a(pgldev.o): In function `pgldev_':
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgldev.f:32: undefined reference to `_gfortran_concat_string'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgldev.f:32:
............
...etc....
............
...368....
...lines...
...worth..
.............
/usr/local/xanadu/lnx/lib/libpgplot.a(grcurs.o): In function `grcurs_':
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/grcurs.f:107: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/grcurs.f:109: undefined reference to `_gfortran_concat_string'
collect2: ld returned 1 exit status
make: *** [qdp] Error 1

MrBob22 04-09-2012 03:55 PM

fortran?
 
Are you trying to install fortran? I think I read somewhere that gfortan is what is used now in Linux (no more g77)
You might install libg2c0 using Synaptic; maybe your old programs will still run.

I dont run Fedora nor gfortran, so you might have to mouse around to get some more specific answers. Here is a Wiki on gfortran in case that is what you are looking for. http://gcc.gnu.org/wiki/GFortran

Hope this helps. MrBob22

ReverendDangles 04-10-2012 04:18 PM

I get the errors when I run xmake. For example: the first error involves pgbox.f:

Quote:

/usr/local/xanadu/lnx/lib/libpgplot.a(pgbox.o): In function `pgbox_':
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:122: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:123: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:124: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:125: undefined reference to `_gfortran_string_index'
/usr/local/heasoft-6.12/tcltk/pgplot/pgtmp/../src/pgbox.f:126: undefined reference to `_gfortran_string_index'
the part of the code is:
Code:

      CALL GRTOUP(OPT,XOPT)
      XOPTA = INDEX(OPT,'A').NE.0 .AND. RANGE(YBLC,0.0,YTRC)
      XOPTB = INDEX(OPT,'B').NE.0
      XOPTC = INDEX(OPT,'C').NE.0
      XOPTG = INDEX(OPT,'G').NE.0
      XOPTI = INDEX(OPT,'I').NE.0
      XOPTL = INDEX(OPT,'L').NE.0
      XOPTM = INDEX(OPT,'M').NE.0
      XOPTN = INDEX(OPT,'N').NE.0
      XOPTS = INDEX(OPT,'S').NE.0
      XOPTT = INDEX(OPT,'T').NE.0
      XOPTP = INDEX(OPT,'P').NE.0 .AND. (.NOT.XOPTI)
      XNFORM = 0


ReverendDangles 04-16-2012 09:52 PM

Ok I'm an idiot. Since I'm posting under "Newbie" be gentle.
These errors were a result of the fact that I did not have all
the software installed that this program was dependent on. This
is software designed by NASA's Chandra team to analyze data and
it requires HEASOFT and PGPLOT to be configured and "maked" correctly.
I had HEASOFT installed but not PGPLOT. Once I installed it the
errors went away. Thank you to all for your advice and suggestions.
This thread is SOLVED.


All times are GMT -5. The time now is 01:46 PM.