Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Pro*C problem migrating from solaris to linux

Pro*C problem migrating from solaris to linux

From: Ray Teale <ray_at_BLAHholly.com.au>
Date: Mon, 25 Nov 2002 16:32:35 +1100
Message-ID: <zziE9.32275$Sr6.897971@ozemail.com.au>


Hi,

Version 9i Release 2. Pro*C. Version 9.2.0.1.0

I am trying to port a Pro*C program from solaris 2.8 (Sun's C++ compiler) to Linux and Mac OSX using the g++ compiler and am coming up with some interesting link problems.

matt_at_inquisitor:/Users/matt/SMEG> g++ -L. -L/Users/matt/lib -L/lib

-L/usr/local/lib -L/usr/local/nuance/lib/ -L/Users/Oracle/9iR2/orahome/lib - L/usr/local/ssl/lib -o smeg smeg_globals.o smeg_hollyOptionData.o

smeg_hollyMessagingData.o smeg_user.o smeg_toolbox.o smeg.o smeg_parseFile.o
smeg_main.o smeg_courier.o smeg_checkHollyOption.o smeg_dispatch.o
smeg_messaging.o smeg_timeSo.o smeg_weather.o smeg_phone.o smeg_abuse.o
smeg_sobject.o smeg_loadException.o smeg_dnismapping.o

smeg_brand.o smeg_log.o smeg_roam.o -lweather -lhwsvr -lwts -lhasvr

-lmsmegprotocol -lmloader -lmproc -lmtproc -lmholly -lmhollypc -lhumgr -lmsg  -lmconfigserver -lmsock -lmtimer -lstats -lmutils -lmunix -lclntsh -ldl -lc  -lz

ld: multiple definitions of symbol _sqlca

smeg_loadException.o definition of _sqlca in section (__DATA,__data) smeg_dnismapping.o definition of _sqlca in section (__DATA,__data)

ld: multiple definitions of symbol _oraca

smeg_loadException.o definition of _oraca in section (__DATA,__data) smeg_brand.o definition of _oraca in section (__DATA,__data) smeg_brand.o definition of _sqlca in section (__DATA,__data) smeg_log.o definition of _oraca in section (__DATA,__data) smeg_log.o definition of _sqlca in section (__DATA,__data) smeg_roam.o definition of _oraca in section (__DATA,__data) smeg_roam.o definition of _sqlca in section (__DATA,__data)

/Users/matt/lib/libweather.a(libweather.o) definition of _sqlca in section

(__DATA,__data)

ld: warning table of contents of library: /Users/matt/lib/libwts.a not sorted slower link editing will result (use the ranlib(1) -s option)

/Users/matt/lib/libhasvr.a(hasvr_db.o) definition of _sqlca in section

(__DATA,__data)

ld: warning table of contents of library: /Users/matt/lib/libmloader.a not sorted slower link editing will result (use the ranlib(1) -s option)

/Users/matt/lib/libmproc.a(dbutils.o) definition of _sqlca in section

(__DATA,__data)

/Users/matt/lib/libmhollypc.a(databaseUtes.o) definition of _sqlca in
section (__DATA,__data)

ld: warning multiple definitions of symbol _gmtime_r

/Users/matt/lib/libmunix.a(unix_time.o) definition of _gmtime_r in section

(__TEXT,__text)

/usr/lib/libc.dylib(localtime.So) definition of _gmtime_r

ld: warning multiple definitions of symbol _localtime_r

/Users/matt/lib/libmunix.a(unix_time.o) definition of _localtime_r in
section (__TEXT,__text)

/usr/lib/libc.dylib(localtime.So) definition of _localtime_r

ld: warning multiple definitions of symbol _nanosleep

/Users/matt/lib/libmunix.a(unix_time.o) definition of _nanosleep in section

(__TEXT,__text)

/usr/lib/libc.dylib(nanosleep.So) definition of _nanosleep

It seems the c++ compiler on solaris places some symbols in the COMMON section and the c++ on Darwin places the same symbols in the DATA section. I tried the same code on Linux and the same symbols were placed in the BSS section. So then I tried to compile the same c++ code with g++ on solaris and it didn't work. Any ideas?



Darwin: (Doesn't link)

matt_at_inquisitor:/Users/matt/SMEG> nm smeg_log.o | grep sqlca

000011f4 D _sqlca


Linux 7.2: (Doesn't Link)

matt_at_mrhat:/home/matt/SMEG> nm smeg_log.o | grep sqlca

00000000 B sqlca


Solaris 8 (Solaris's C++ compiler): (Links and runs just fine)

matt_at_lister:/home/matt/SMEG> nm smeg_log.o | grep sqlca

00000088 C sqlca


Solaris 8 (g++ compiler) (Doesnt work)

matt_at_lister:/home/matt/SMEG> nm smeg_log.o | grep sqlca

00000000 C sqlca Received on Sun Nov 24 2002 - 23:32:35 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US