Languages and Scripting
cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation problem on HP-UX

 
SOLVED
Go to solution
Highlighted
Occasional Advisor

Compilation problem on HP-UX

when i compile mty project on HP-UX machine it compiles successfully but at the time of linking it gives me errors shown below.
There is already shared library libACE.so can anyone tell me what is the reason of these errors and how to remove...

ld: (Warning) Unsatisfied symbol "std::__rw_std_streams" in file /home/mtalk/ACE
_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_Thread::getspecific(int, void**)" in file ./release/
mTalk_TSS.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::acquire()" in file ./release
/mTalkThrTask.o
ld: (Warning) Unsatisfied symbol "__bad_cast_exception" in file /home/mtalk/ACE_
wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "std::ctype::ctype(std::ctype_base::mask
const*, bool, unsigned long)" in file /home/mtalk/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "std::ctype::_C_classic_table" in file /h
ome/mtalk/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "_HPMutexWrapper::~_HPMutexWrapper()" in file /
home/mtalk/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "__bad_alloc_exception" in file /home/mtalk/ACE
_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_Semaphore::release(unsigned int)" in file ./release/
mTalkThrTask.o
ld: (Warning) Unsatisfied symbol "std::locale::_C_init()" in file /home/mtalk/AC
E_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_Time_Value::ACE_Time_Value(long, long)" in file ./re
lease/m27_Event.o
ld: Unsatisfied symbol "ACE_Semaphore::acquire()" in file ./release/mTalkThrTask
.o
ld: Unsatisfied symbol "ACE_Reactor::end_event_loop()" in file ./release/mTalkTh
rTask.o
ld: (Warning) Unsatisfied symbol "__bad_typeid_exception" in file /home/mtalk/AC
E_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "std::ios_base::_C_sync_with_stdio" in file /ho
me/mtalk/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "std::codecvt_byname:
:do_out(mbstate_t&, wchar_t const*, wchar_t const, wchar_t const&, char*, wchar_
t const&, wchar_t const&&) const" in file /home/mtalk/ACE_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire_read()" in file .
/release/m27_CriticalSection.o
ld: Unsatisfied symbol "ACE_SOCK_Dgram::ACE_SOCK_Dgram()" in file ./release/m27_
UDPConnection.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire_write()" in file
./release/m27_CriticalSection.o
ld: Unsatisfied symbol "mtalkproc_1_svc" in file ./release/mTalk_svc.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire()" in file ./rele
ase/m27_CriticalSection.o
ld: (Warning) Unsatisfied symbol "__bad_exception" in file /home/mtalk/ACE_wrapp
ers/ace/libACE.so
ld: Unsatisfied symbol "CreatePersistenceManager()" in file ./release/m27_bof.o
ld: Unsatisfied symbol "localtime_r(long const*, tm*)" in file ./release/mTalkUt
ilities.o
ld: Unsatisfied symbol "mTalk_Main()" in file ./release/mTalk_svc.o
ld: Unsatisfied symbol "typeinfo for biz_ppmProtocolParameter" in file ./release
/biz_cfgConfig.o
ld: (Warning) Unsatisfied symbol "std::ios_base::_C_unsafe_clear(int, int)" in f
ile /home/mtalk/ACE_wrappers/ace/libACE.so
ld: Unsatisfied symbol "FreePersistenceManager(i_m27_persistencemgr*)" in file .
/release/m27_bof.o
ld: Unsatisfied symbol "ACE_SOCK_Dgram::recv(void*, unsigned long, ACE_Addr&, in
t) const" in file ./release/m27_UDPConnection.o
ld: Unsatisfied symbol "biz_ppmProtocolParameter::Define_OMM(m27_OMM&, bool, boo
l, bool, bool)" in file ./release/biz_nppNetworkProtocolParameter.o
ld: (Warning) Unsatisfied symbol "std::ios_base::_C_fire_event(std::ios_base::ev
ent, bool)" in file /home/mtalk/ACE_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_SOCK_Dgram::send(void const*, unsigned long, ACE_Add
r const&, int) const" in file ./release/m27_UDPConnection.o
ld: Unsatisfied symbol "ACE_Reactor::event_loop_done()" in file ./release/mTalkT
hrTask.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire_write_upgrade()"
in file ./release/m27_CriticalSection.o
ld: Unsatisfied symbol "GetLogInterface()" in file ./release/m27_trace.o
ld: (Warning) Unsatisfied symbol "std::__rw_exception::_C_assign(char const*, un
signed long)" in file /home/mtalk/ACE_wrappers/ace/libACE.so
ld: Unsatisfied symbol "mtalk_prog_1_freeresult" in file ./release/mTalk_svc.o
ld: (Warning) Unsatisfied symbol "__cxa_finalize" in file /home/mtalk/ACE_wrappe
rs/ace/libACE.so
ld: (Warning) Unsatisfied symbol "_HPMutexWrapper::lock(void*)" in file /home/mt
alk/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "std::basic_string
, std::allocator >::__nullref" in file /home/mtalk/ACE_wrappers/ace/libACE
.so
ld: Unsatisfied symbol "ACE_Lock::ACE_Lock()" in file ./release/m27_CriticalSect
ion.o
ld: Unsatisfied symbol "MAX_NO_OF_PENDING_REQUEST" in file ./release/m27_MQSerie
sIPC.o
ld: Unsatisfied symbol "ACE_Thread_Mutex::acquire()" in file ./release/mTalk_TSS
.o
ld: Unsatisfied symbol "ACE_Thread::keycreate(int*, void (*)(void*), void*)" in
file ./release/mTalk_TSS.o
ld: Unsatisfied symbol "vtable for biz_ppmProtocolParameter" in file ./release/b
iz_ppmProtocolParameter.o
ld: (Warning) Unsatisfied symbol "_HPMutexWrapper::unlock(void*)" in file /home/
mtalk/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "std::locale::_C_global" in file /home/mtalk/AC
E_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_Thread::kill(int, int)" in file ./release/m27_UDPCon
nection.o
ld: Unsatisfied symbol "ACE_Errno_Guard::ACE_Errno_Guard(int&)" in file ./releas
e/mTalk_TSS.o
ld: Unsatisfied symbol "ACE_Thread::setspecific(int, void*)" in file ./release/m
Talk_TSS.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::acquire_read()" in file ./re
lease/m27_CriticalSection.o
ld: Unsatisfied symbol "GLogAppInfo()" in file ./release/m27_FileLog.o
ld: (Warning) Unsatisfied symbol "std::__rw_exception::_C_vformat(int, __va_list
__)" in file /home/mtalk/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "__cxa_atexit" in file /home/mtalk/ACE_wrappers
/ace/libACE.so
ld: Unsatisfied symbol "ACE_Thread::spawn(void* (*)(void*), void*, long, int*, i
nt*, long, void*, unsigned long, ACE_Thread_Adapter*)" in file ./release/m27_UDP
Connection.o
ld: (Warning) Unsatisfied symbol "__cxa_personality_routine" in file /home/mtalk
/ACE_wrappers/ace/libACE.so
ld: (Warning) Unsatisfied symbol "std::locale::_C_make_facet(std::locale::id con
st&, bool, int, __rw::__rw_facet_base* (*)(int, char const*, unsigned long)) con
st" in file /home/mtalk/ACE_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_Reactor::run_event_loop()" in file ./release/mTalkTh
rTask.o
ld: (Warning) Unsatisfied symbol "std::codecvt_byname:
:do_in(mbstate_t&, char const*, char const, char const&, wchar_t*, char const&,
char const&&) const" in file /home/mtalk/ACE_wrappers/ace/libACE.so
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::acquire_write()" in file ./r
elease/m27_CriticalSection.o
ld: (Warning) Unsatisfied symbol "_HPMutexWrapper::init()" in file /home/mtalk/A
CE_wrappers/ace/libACE.so
25 warnings.
36 errors.
collect2: ld returned 1 exit status
gmake: *** [release/mTalk] Error 1
14 REPLIES 14
Highlighted
Honored Contributor

Re: Compilation problem on HP-UX

Hi,

first check, if your libACE.so is compiled with gcc or with HP's aCC compiler. A mixing of different compiler families is not possible.

Moreover, the command line of the linker is really required in such postings...

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Highlighted

Re: Compilation problem on HP-UX

As Peter says, your application is illegally mixing g++ and aC++ files. You'll need to compile with one or the other. It appears ACE is compiled with aC++.

It would also be helpful if you indicated you were compiling on IPF.
Highlighted
Occasional Advisor

Re: Compilation problem on HP-UX

Thanx for replying

My ACE is compiled usnig /opt/aCC/bin/aCC and makefile is compiled using /opt/hp-gcc/bin/gcc
can it is the reason for error???
ACE code i have downloaded from internet so when i change makefile of that it gives me errors what shuld i do for that....

Thanx in advance
Highlighted

Re: Compilation problem on HP-UX

>My ACE is compiled using /opt/aCC/bin/aCC and makefile is compiled using /opt/hp-gcc/bin/gcc

As Peter and I have said, you must only use one of aC++ or g++ to compile your WHOLE application. If you have aC++ installed, change your makefile to use aCC. Otherwise you'll have to use g++ to compile ACE.
Highlighted
Occasional Advisor

Re: Compilation problem on HP-UX

Hi Dennis
First of all Thanx a lot for so quick response.
I am agree with you but i am not able to compile my ACE file using gcc it gives me errors when i change it to gcc.Here i am attaching my ACE file kindly tell me what changes shuld i make to remove those errors
gmake: *** Warning: File `/home/mtalk/ACE_wrappers/include/makeinclude/macros.GN
U' has modification time in the future (2007-01-07 01:53:34 > 2006-02-13 17:15:4
3)
gmake[1]: Entering directory `/home/mtalk/ACE_wrappers/ace'
gmake[1]: *** Warning: File `/home/mtalk/ACE_wrappers/include/makeinclude/rules.
local.GNU' has modification time in the future (2007-01-07 01:53:34 > 2006-02-13
17:15:43)

GNUmakefile: /home/mtalk/ACE_wrappers/ace/GNUmakefile.ACE MAKEFLAGS=w

/opt/hp-gcc/bin/gcc -AA -mt -g -DACE_HAS_THREADS -D_HPUX_SOURCE -DHPUX_VERS=1123
-DACE_LACKS_PRAGMA_ONCE -I/home/mtalk/ACE_wrappers -DACE_HAS_EXCEPTIONS -D__
ACE_INLINE__ -I.. -DACE_BUILD_DLL -c +Z -o .shobj/Local_Name_Space.o Local_Name
_Space.cpp
gcc: +Z: No such file or directory
cc1plus: error: unrecognized command line option "-mt"
gmake[1]: *** [.shobj/Local_Name_Space.o] Error 1
gmake[1]: Leaving directory `/home/mtalk/ACE_wrappers/ace'
gmake: *** [ACE] Error 2
galaxy(mtalk):252/home/mtalk/ACE_wrappers/ace >
Highlighted
Occasional Advisor

Re: Compilation problem on HP-UX

When i change it gives me several erros including -mt related and some more also.Please try to modify this makefile
Highlighted
Honored Contributor

Re: Compilation problem on HP-UX

Hi,

porting ACE/TAO to a different architecture is not a point-and -click task - you have to setup the features of the compiling environment very carefully. May be a suitable config_*.h in $ACE_ROOT/ace is already available - check this.

Shurely an easier task is to change the Makefile of yours to use aCC and try...
An evaluation version of aCC is available von HP.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
Highlighted
Occasional Advisor

Re: Compilation problem on HP-UX

Hi
Thanx Peter and Dennis for nearly solving my problem in a single day
Sorry for above two replies this is final what i am getting.Now when i compile ACE using g++ it makes a libACE.sl file
when i include this in my makefile using
-L$(ACE_ROOT)/ace -lACE
I havent get any warnings as i was getting earlier but now i get 41 errrors whihc are pasted below.Can anyone tell me the reason for these errors

ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::release()" in file ./release
/mTalkThrTask.o
ld: Unsatisfied symbol "ACE_Thread::getspecific(int, void**)" in file ./release/
mTalk_TSS.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::acquire()" in file ./release
/mTalkThrTask.o
ld: Unsatisfied symbol "ACE_Semaphore::release(unsigned int)" in file ./release/
mTalkThrTask.o
ld: Unsatisfied symbol "ACE_Time_Value::ACE_Time_Value(long, long)" in file ./re
lease/m27_Event.o
ld: Unsatisfied symbol "ACE_Semaphore::acquire()" in file ./release/mTalkThrTask
.o
ld: Unsatisfied symbol "ACE_Reactor::end_event_loop()" in file ./release/mTalkTh
rTask.o
ld: Unsatisfied symbol "ACE_SOCK_Dgram::~ACE_SOCK_Dgram()" in file ./release/m27
_UDPConnection.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire_read()" in file .
/release/m27_CriticalSection.o
ld: Unsatisfied symbol "ACE_SOCK_Dgram::ACE_SOCK_Dgram()" in file ./release/m27_
UDPConnection.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire_write()" in file
./release/m27_CriticalSection.o
ld: Unsatisfied symbol "mtalkproc_1_svc" in file ./release/mTalk_svc.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire()" in file ./rele
ase/m27_CriticalSection.o
ld: Unsatisfied symbol "CreatePersistenceManager()" in file ./release/m27_bof.o
ld: Unsatisfied symbol "localtime_r(long const*, tm*)" in file ./release/mTalkUt
ilities.o
ld: Unsatisfied symbol "mTalk_Main()" in file ./release/mTalk_svc.o
ld: Unsatisfied symbol "typeinfo for biz_ppmProtocolParameter" in file ./release
/biz_cfgConfig.o
ld: Unsatisfied symbol "FreePersistenceManager(i_m27_persistencemgr*)" in file .
/release/m27_bof.o
ld: Unsatisfied symbol "ACE_SOCK_Dgram::recv(void*, unsigned long, ACE_Addr&, in
t) const" in file ./release/m27_UDPConnection.o
ld: Unsatisfied symbol "biz_ppmProtocolParameter::Define_OMM(m27_OMM&, bool, boo
l, bool, bool)" in file ./release/biz_nppNetworkProtocolParameter.o
ld: Unsatisfied symbol "ACE_SOCK_Dgram::send(void const*, unsigned long, ACE_Add
r const&, int) const" in file ./release/m27_UDPConnection.o
ld: Unsatisfied symbol "ACE_Reactor::event_loop_done()" in file ./release/mTalkT
hrTask.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::tryacquire_write_upgrade()"
in file ./release/m27_CriticalSection.o
ld: Unsatisfied symbol "GetLogInterface()" in file ./release/m27_trace.o
ld: Unsatisfied symbol "mtalk_prog_1_freeresult" in file ./release/mTalk_svc.o
ld: Unsatisfied symbol "ACE_Thread_Mutex::release()" in file ./release/mTalk_TSS
.o
ld: Unsatisfied symbol "ACE_Lock::ACE_Lock()" in file ./release/m27_CriticalSect
ion.o
ld: Unsatisfied symbol "MAX_NO_OF_PENDING_REQUEST" in file ./release/m27_MQSerie
sIPC.o
ld: Unsatisfied symbol "ACE_Thread_Mutex::acquire()" in file ./release/mTalk_TSS
.o
ld: Unsatisfied symbol "ACE_Thread::keycreate(int*, void (*)(void*), void*)" in
file ./release/mTalk_TSS.o
ld: Unsatisfied symbol "vtable for biz_ppmProtocolParameter" in file ./release/b
iz_ppmProtocolParameter.o
ld: Unsatisfied symbol "ACE_Thread_Semaphore::~ACE_Thread_Semaphore()" in file .
/release/mTalkThrTask.o
ld: Unsatisfied symbol "ACE_Thread::kill(int, int)" in file ./release/m27_UDPCon
nection.o
ld: Unsatisfied symbol "ACE_Errno_Guard::ACE_Errno_Guard(int&)" in file ./releas
e/mTalk_TSS.o
ld: Unsatisfied symbol "ACE_Thread::setspecific(int, void*)" in file ./release/m
Talk_TSS.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::acquire_read()" in file ./re
lease/m27_CriticalSection.o
ld: Unsatisfied symbol "GLogAppInfo()" in file ./release/m27_FileLog.o
ld: Unsatisfied symbol "ACE_Errno_Guard::~ACE_Errno_Guard()" in file ./release/m
Talk_TSS.o
ld: Unsatisfied symbol "ACE_Thread::spawn(void* (*)(void*), void*, long, int*, i
nt*, long, void*, unsigned long, ACE_Thread_Adapter*)" in file ./release/m27_UDP
Connection.o
ld: Unsatisfied symbol "ACE_Reactor::run_event_loop()" in file ./release/mTalkTh
rTask.o
ld: Unsatisfied symbol "ACE_Recursive_Thread_Mutex::acquire_write()" in file ./r
elease/m27_CriticalSection.o
41 errors.
collect2: ld returned 1 exit status
gmake: *** [release/mTalk] Error 1
galaxy(mtalk):268/home/mtalk/src/unix/mTalk3 >
Highlighted
Honored Contributor
Solution

Re: Compilation problem on HP-UX

Hi,

you do not tell us the command line of the linker - that makes it difficult.
But for shure I can tell, that the function
ACE_Semaphore::release(unsigned int)
for example IS located in libACE.

You should read some examples in the ACE documentation about how to link against libACE - you shurely missed something (esp. libraries) to add to the linker command line in your personal Makefile.

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"