mersenneforum.org

mersenneforum.org (https://www.mersenneforum.org/index.php)
-   Linux (https://www.mersenneforum.org/forumdisplay.php?f=39)
-   -   Linkhelpers, Link error while linking a shared lib (https://www.mersenneforum.org/showthread.php?t=12385)

linkhelpers 2009-09-04 10:48

Linkhelpers, Link error while linking a shared lib
 
[B]Link error while linking a shared library in unix

[/B]Getting the following error ,

ld: /opt/syncsort39/lib/libsyncsort.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.

Is there any difference in the ld options in opt file while linking a 64 bit shared library ? Or is the problem because we are trying to link both 32 bit and 64 bit libs together ?

From make file ...


# PFWSYNCM PROGRAMS
############################################################################
## Define include constants and Libraries
############################################################################

#SYBASE12 PATHS
SYBINCLUDE = $(SYBASE)/$(SYBASE_OCS)/include
SYBLIB = $(SYBASE)/$(SYBASE_OCS)/lib
LIBINCLUDE = ../../lib
SYNCINCLUDE = $(SYNCSORT)/include
SYSINCLUDE = /usr/include/sys

#########################
# Flags #
#########################


INCLUDEDIR = -I../ -I$(SYBINCLUDE) -I$(LIBINCLUDE) -I$(SYNCINCLUDE)

SYNCLIB = $(SYNCSORT)/lib/libsyncsort.sl
CTLIBS = -L$(SYBLIB) -lct -lcs -ltcl -lcomn -lintl
PFLIB = $(LIBINCLUDE)/opt/pflib.a
LIBS = $(PFLIB) $(CTLIBS) $(SYNCLIB)

CCOPTS = -c -Aa -O

CC=cc

##########################
# Objects of Make #
##########################

getpwd : getpwd.o $(PFLIB)
[COLOR=DarkRed]ld /lib/crt0.o +s getpwd.o $(LIBS) -lcl -lm -lc -lBSD -o getpwd[/COLOR]
getpwd.o: ../getpwd.c
$(CC) $(CCOPTS) $(INCLUDEDIR) ../getpwd.c

I'm using
GCC on HPunix

Thanks in advance,
Linkhelpers

geoff 2009-09-17 03:49

[QUOTE=linkhelpers;188610][B]Link error while linking a shared library in unix

[/B]Getting the following error ,

ld: /opt/syncsort39/lib/libsyncsort.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link.

Is there any difference in the ld options in opt file while linking a 64 bit shared library ? Or is the problem because we are trying to link both 32 bit and 64 bit libs together ?
[/QUOTE]

I am pretty sure that you can't link a 64-bit library with 32-bit code, or vice versa. Maybe there is a way to build a "fat" binary that runs in both modes, but even then you would need both 32- and 64-bit versions of all code.


All times are UTC. The time now is 11:26.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.