Project

General

Profile

Question #5022

Problem Linking plancd.F

Added by Mike Martin 5 months ago. Updated 5 months ago.

Status:
Acknowledged
Priority:
Normal
Assignee:
-
Category:
Applications
Target version:
-
Software Version:
Test Reviewer:

Description

I am trying to fix a problem with ISIS2 plancd.F (issue 4931) and am getting an error when linking. I get the same error running ISIS2 on OpenSuse10.2_KDE3.5.5 32 bit distribution and Ubuntu 16.04.2 LTS 64 bit distribution. Does anybody have any ideas of how to fix this?

% g77 -L. -L/home/tahoemike/isis/isisr/lib -L/home/tahoemike/isis/naif/lib -L/home/tahoemike/isis/tae/lib/linux -L/home/tahoemike/isis/isisr/3rdparty/local/lib -m32 -o plancd plancd.o u_eb2asc.o eb2as_bind.o \
-lisisker -lisisspi -lisismap -lisisnaif -lisismath -lisis \
-lisistae -ltaec -ltae -lisisbind -lncurses -Xlinker -Bstatic -lg2c -Xlinker -Bdynamic -ldl -lc -lm
/usr/bin/ld: plancd: hidden symbol `__fini_array_end' in plancd is referenced by DSO
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status

History

#1 Updated by Tammy Becker 5 months ago

  • Status changed from New to Acknowledged

#2 Updated by Kris Becker 5 months ago

Hi Mike...

Not sure what the issue might be here as it builds fine on our old ISIS2 dev system. Perhaps the build is lacking -fPIC (position independent flags)?

You only show the link command, but here is the full build command and result I am seeing:

orkin[59]: make -f plancd.mak plancd
/usgs/pkgs/isis2.3.4/isisr/config/isis.conf:179: Compiling for optimization!
g77 -Wall -ftypeless-boz -fno-automatic -fno-second-underscore -fargument-alias -fPIC -Dunix -DLinux -O2 -I. -I/usgs/pkgs/isis2.3.4/isisr/inc -I/usgs/pkgs/isis2.3.4/tae/include -c plancd.F
plancd.F: In subroutine xtract_labs':
plancd.F:552: warning:
CALL U_MOVE1(MYLRL,LBUF(1),TBUF)! Transfer first record to work buffer
1
plancd.F:599: (continued):
CALL U_MOVE1(2,LBUF(1409),SH_MODE)
2
Argument #3 of
u_move1' is one type at (2) but is some other type at (1) [info -f g77 M GLOBALS]
plancd.F:255: warning:
CALL P_SET_INT_KEY(IIM, 'QUBE', 'BAND_BIN',
1
plancd.F:881: (continued):
CALL P_SET_INT_KEY(IIM, 'QUBE', GRP, 'NO_CAMERA_STATE', 1,
2
Argument #7 of p_set_int_key' is one type at (2) but is some other type at (1) [info -f g77 M GLOBALS]
gcc -Wall -ansi -fPIC -Dunix -DLinux -O2 -I. -I/usgs/pkgs/isis2.3.4/isisr/inc -I/usgs/pkgs/isis2.3.4/tae/include -I/usgs/pkgs/isis2.3.4/naif/include -c u_eb2asc.c
u_eb2asc.c: In function
u_eb2asc':
u_eb2asc.c:29: warning: unused variable `errbuf'
gcc -Wall -ansi -fPIC -Dunix -DLinux -O2 -I. -I/usgs/pkgs/isis2.3.4/isisr/inc -I/usgs/pkgs/isis2.3.4/tae/include -I/usgs/pkgs/isis2.3.4/naif/include -c eb2as_bind.c
g77 -L. -L/usgs/pkgs/isis2.3.4/isisr/lib -L/usgs/pkgs/isis2.3.4/naif/lib -L/usgs/pkgs/isis2.3.4/tae/lib/linux -o plancd plancd.o u_eb2asc.o eb2as_bind.o \
-lisisker -lisisspi -lisismap -lisisnaif -lisismath -lisis \
-lisistae -ltaec -ltae -lisisbind -lncurses -Xlinker -Bstatic -lg2c -Xlinker -Bdynamic -ldl -lc -lm
orkin[60]:

Hope this helps.

#3 Updated by Kris Becker 5 months ago

You may also try adding explicit linking to GCC library:

make -f plancd.mak EXTRALIBS=-lgcc plancd

Cheers...

Also available in: Atom PDF