LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 12-29-2008, 04:13 AM   #1
stioanid
Member
 
Registered: Dec 2008
Location: Athens
Distribution: Centos Ubundu RedHat
Posts: 38

Rep: Reputation: 15
library reference problem


I am trying to exact mirror a server running Centos 4.4 that runs some Fortran scripts in order to do some calculations into a server with Centos 4.7.

My problem is that the Fortran scripts give me all kind of errors and I am totally useless when it comes to programing.
When I run one of the scripts I get the following.

./wgrib2 -vt -d 1 gfs.t12z.master.grbf12 >out_time

*** FATAL ERROR: grib message #1 not found ***

When I try to debug the script i get the following

g++ wgrib2
wgrib2(.data+0x4): In function `__data_start':
: multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/crtbegin.o(.data+0x0): first defined here
wgrib2(.init+0x0): In function `_init':
/usr/src/build/231499-i386/BUILD/glibc-2.3.2-20030313/build-i386-linux/csu/crti.S:35: multiple definition of `_init'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.init+0x0): first defined here
wgrib2(.text+0x0): In function `_start':
../sysdeps/i386/elf/start.S:47: multiple definition of `_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.text+0x0): first defined here
wgrib2(.fini+0x0): In function `_fini':
/usr/src/build/231499-i386/BUILD/glibc-2.3.2-20030313/build-i386-linux/csu/crti.S:51: multiple definition of `_fini'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.fini+0x0): first defined here
wgrib2(*ABS*+0x808ce9c): In function `__init_array_start':
jpc_qmfb.c: multiple definition of `_GLOBAL_OFFSET_TABLE_'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.got.plt+0x0): first defined here
wgrib2(.rodata+0x4): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.rodata+0x0): first defined here
wgrib2(.data+0x0): In function `__data_start':
: multiple definition of `__data_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.data+0x0): first defined here
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.dynamic+0x0): multiple definition of `_DYNAMIC'
/usr/bin/ld: warning: i386 architecture of input file `wgrib2' is incompatible with i386:x86-64 output
collect2: ld returned 1 exit status

As far as I can understand it seems like there is a problem with some of the libraries it uses?
Is there a way I can find out, against which libraries this script is compiled to?
I don't even know if this is what I am supposed to be looking for?

When i try to run some other script I get as well some error messages.

./script_correct_crain
list in: end of file
apparent state: unit 20 named fort.20
last format: list io
lately reading direct formatted external IO
./script_correct_crain: line 8: 26456 Aborted ./read_rain.e
mv: cannot stat `fort.22': No such file or directory
list in: end of file
apparent state: unit 20 named fort.20
last format: list io
lately reading direct formatted external IO
./script_correct_crain: line 13: 26460 Aborted ./read_rain.e
mv: cannot stat `fort.22': No such file or directory

When I run ./read_rain.e

list in: end of file
apparent state: unit 20 named fort.20
last format: list io
lately reading direct formatted external IO
Aborted

g++ read_rain.e
collect2: ld terminated with signal 11 [Segmentation fault]
read_rain.e(.init+0x0): In function `_init':
/build/buildd/glibc-2.3.6/build-tree/amd64-libc/csu/crti.S:25: multiple definition of `_init'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.init+0x0): first defined here
read_rain.e(.text+0x0): In function `_start':
../sysdeps/x86_64/elf/start.S:65: multiple definition of `_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.text+0x0): first defined here
read_rain.e(.fini+0x0): In function `_fini':
/build/buildd/glibc-2.3.6/build-tree/amd64-libc/csu/crti.S:37: multiple definition of `_fini'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crti.o(.fini+0x0): first defined here
read_rain.e(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.rodata+0x0): first defined here
read_rain.e(.data+0x0): In function `__data_start':
: multiple definition of `__data_start'
/usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../../lib64/crt1.o(.data+0x0): first defined here

I am helpless, subject is totally out of my area of expertise.
Any guidelines would be great.
 
Old 12-29-2008, 03:31 PM   #2
harry edwards
Member
 
Registered: Nov 2007
Location: Lincolnshire, UK
Distribution: CentOS, Fedora, and Suse
Posts: 365

Rep: Reputation: 48
From the output I can see you have several "multiple definitions" of various functions. As a guess, are you including the same header file twice? Is the grib program somthing you can post?
 
Old 12-29-2008, 04:46 PM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Please, continue discussion here. This thread reported for closure since it is a duplicate.
 
Old 12-30-2008, 02:40 AM   #4
stioanid
Member
 
Registered: Dec 2008
Location: Athens
Distribution: Centos Ubundu RedHat
Posts: 38

Original Poster
Rep: Reputation: 15
[QUOTE=colucix;3390875]Please, continue discussion here. This thread reported for closure since it is a duplicate.[/QUOTE

Thank you very much for closing this thread. Forgive for not doing it myself. I did notice at some point but I was in the middle of a mess and forgot.
 
Old 12-31-2008, 08:47 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread

Tags
fortran



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
Shared Library error : undefined reference xs2harpreet Programming 6 03-11-2009 05:55 PM
library reference problem stioanid Linux - Software 3 12-29-2008 10:10 AM
C++ library reference guide tkm Linux - Software 4 04-25-2008 03:50 PM
Linking own library: undefined reference to otosigo Programming 1 12-02-2004 08:05 AM
undefined reference to a function included in a library i made!!! keos Programming 5 02-21-2004 04:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:34 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
Open Source Consulting | Domain Registration