mersenneforum.org  

Go Back   mersenneforum.org > Extra Stuff > Linux

Reply
 
Thread Tools
Old 2009-09-04, 10:48   #1
linkhelpers
 

30528 Posts
Default Linkhelpers, Link error while linking a shared lib

Link error while linking a shared library in unix

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)
ld /lib/crt0.o +s getpwd.o $(LIBS) -lcl -lm -lc -lBSD -o getpwd
getpwd.o: ../getpwd.c
$(CC) $(CCOPTS) $(INCLUDEDIR) ../getpwd.c

I'm using
GCC on HPunix

Thanks in advance,
Linkhelpers
  Reply With Quote
Old 2009-09-17, 03:49   #2
geoff
 
geoff's Avatar
 
Mar 2003
New Zealand

13·89 Posts
Default

Quote:
Originally Posted by linkhelpers View Post
Link error while linking a shared library in unix

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 ?
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.
geoff is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
CUDA linking on Mac Prime95 Programming 5 2014-12-22 22:30
Msieve: problem linking with other C library srawlins Msieve 6 2010-04-02 02:05
BUG: upgrade/linking lost my reservations sylvester PrimeNet 0 2008-10-28 05:21
Missing shared libs in SLES 10 dstillwe Linux 1 2008-06-06 01:42
Linking error JHansen Linux 1 2005-03-17 14:29

All times are UTC. The time now is 00:29.

Wed Sep 30 00:29:53 UTC 2020 up 19 days, 21:40, 0 users, load averages: 1.87, 1.75, 1.60

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

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.