LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-09-2012, 04:30 PM   #1
ReverendDangles
LQ Newbie
 
Registered: Apr 2012
Location: Huntsville, AL
Distribution: Fedora 16
Posts: 14

Rep: Reputation: Disabled
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
 
Old 04-09-2012, 04:55 PM   #2
MrBob22
LQ Newbie
 
Registered: May 2011
Location: Quaint Arlington, bedroom to DC
Distribution: Mainly Ubuntu 11.10, Mint & Puppy
Posts: 9

Rep: Reputation: Disabled
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
 
Old 04-10-2012, 05:18 PM   #3
ReverendDangles
LQ Newbie
 
Registered: Apr 2012
Location: Huntsville, AL
Distribution: Fedora 16
Posts: 14

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-16-2012, 10:52 PM   #4
ReverendDangles
LQ Newbie
 
Registered: Apr 2012
Location: Huntsville, AL
Distribution: Fedora 16
Posts: 14

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple packages: emake failed (undefined reference ... dbus) tortenteufel Gentoo 2 10-11-2010 03:13 AM
Undefined reference, why? george_mercury Programming 4 05-07-2009 01:15 AM
"Multiple definition of" and "undefined reference to" in QT Creator with QJson lib echelon89 Programming 1 05-01-2009 07:48 AM
undefined reference to... dimah Programming 3 12-27-2006 10:57 AM
undefined reference? Sharky01252 Programming 3 11-07-2006 12:36 PM


All times are GMT -5. The time now is 10:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration