1752282 Members
4484 Online
108786 Solutions
New Discussion юеВ

Compiler Error

 
K Duraisamy
Occasional Contributor

Compiler Error

Hai,

Server - HPUX itanium

Compiler used: HP aC++/C for Itanium(R)-based systems B3910B A.05.57

Please advice for following error,

aCC runtime: Use of "-mt" must be consistent during both compilation and linking. Abort(coredump)

Thanks in Advance,
N. Poorna Chandra Rao
7 REPLIES 7
Peter Godron
Honored Contributor

Re: Compiler Error

Hi,
the -mt (multi thread) option has to be specified when comoiling and linking all modules. Chnage you make files or set a global parameter.
Peter Godron
Honored Contributor

Re: Compiler Error

Hi,
the -mt (multi thread) option has to be specified when comoiling and linking all modules. Change your make files or set a global parameter.
Arunvijai_4
Honored Contributor

Re: Compiler Error

Hello,

A duplicate post

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1000263

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Arunvijai_4
Honored Contributor

Re: Compiler Error

Hello,

Export -mt to CFLAGS or CPPFLAGS. Just do,

# export CFLAGS="-mt"
# export CPPFLAGS="-mt"

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Peter Godron
Honored Contributor

Re: Compiler Error

Hi,
any update on this?!
Is the problem resolved
nayeem khan
Occasional Advisor

Re: Compiler Error

Hi

thanks

I am getting the same error..but i have compiled and linked all modules with -mt flag.

i have created a global flag $MTSAFE=-mt
Is there any way to find out which modules are not compiled or linked with -mt option

this is stack trace

#0 0x60000000c035bf50:0 in kill+0x30 () from /usr/lib/hpux32/libc.so.1
#1 0x60000000c0252e90:0 in raise+0x30 () from /usr/lib/hpux32/libc.so.1
#2 0x60000000c0316390:0 in abort+0x190 () from /usr/lib/hpux32/libc.so.1
#3 0x60000000c10863d0:0 in std::terminate()+0x50 ()
from /usr/lib/hpux32/libCsup.so.1
#4 0x60000000c10ae520:0 in __cxa_throw+0x2e0 ()
from /usr/lib/hpux32/libCsup.so.1
#5 0x60000000c27d0ab0:0 in std::locale::_C_install_facet(__rw::__rw_facet_base*
,std::locale::id const&) const+0x630 () from /usr/lib/hpux32/libstd_v2.so.1
#6 0x60000000c27cf5c0:0 in std::locale::_C_make_facet(std::locale::id const&,bo
ol,int,__rw::__rw_facet_base* (*)(int,char const*,unsigned long)) const
+0x3e0 () from /usr/lib/hpux32/libstd_v2.so.1
#7 0x62fec0:0 in std::locale::_C_use_facet (this=0x7a96f2f0,
__id=@0x7a96ecbc, __implicit=true, __cat=32, __maker=0x7a938be8)
at /opt/aCC.06.06/include_std/rw/rwlocale:670
#8 0x60000000dc5a4a60:0 in std::codecvt const& std::use_fa
cet<:codecvt> > ()
at /opt/aCC/include_std/rw/usefacet:57
#9 0x60000000dc5ad7c0:0 in std::basic_filebuf >::ov
erflow () at /opt/aCC/include_std/fstream.cc:339
#10 0x60000000dc5aeb00:0 in std::basic_filebuf >::sy
nc () at /opt/aCC/include_std/fstream.cc:572
#11 0x636f90:0 in std::basic_ostream >::flush (
---Type to continue, or q to quit---
this=0x7a96f520) at /opt/aCC.06.06/include_std/ostream:358
#12 0x57ed50:0 in std::basic_ostream >& std::endlar,std::char_traits > (__strm=@0x7a96f520)
at /opt/aCC.06.06/include_std/ostream:585
#13 0x886970:0 in std::basic_ostream >::operator<<
(this=0x7a96f520, __pf=0x7aaf6150)
at /opt/aCC.06.06/include_std/ostream:129
#14 0x1a42fc0:0 in banner (progname=0x7ffff698 "./admhps", suppress=false)
at usage.cpp:149
#15 0x1a42a40:0 in usage (argc=1, argv=0x7ffff640) at usage.cpp:117
#16 0xfcb110:0 in OldMain (argc=1, argv=0x7ffff640) at main.cpp:354
#17 0xfcab20:0 in main (argc=1, argv=0x7ffff640) at main.cpp:327

from
nayeem khan
Dennis Handly
Acclaimed Contributor

Re: Missing -mt runtime error

As Peter has mentioned, you have an object file, archive or shared lib that has not been compiled with -mt.

>Is there any way to find out which modules are not compiled or linked with -mt option

(Note the latest compiler is A.06.13, PHSS_35752.)

In newer compilers we do put the -mt option in the .notes sections. Otherwise finding something that's not there is harder. If you see calls with _HPMutexWrapper, that's compiled with -mt.

I can't see the link Arunvijai provided. ?