Operating System - HP-UX
1837028 Members
2092 Online
110111 Solutions
New Discussion

Abort executing Ansi-C compiled program

 
SOLVED
Go to solution
Fabrizio Maggioni_2
Super Advisor

Abort executing Ansi-C compiled program

Hi all,

I am working on HPUX IA server with 11.23 OS.
I got this error executing ansi-c (Version 6.15) compiled program:

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

I have already installed all the required patch for ansi-c version 6.15:

PHSS_36343
PHSS_36342
PHSS_36345
PHSS_36344
PHSS_36347

Thanks,
Fabrizio
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: Abort executing Ansi-C compiled program

After installing the patches, did you recompile all the object files (including those in libraries) to make sure that -mt was used (or not used) the same everywhere?
If it ain't broke, I can fix that.
Fabrizio Maggioni_2
Super Advisor

Re: Abort executing Ansi-C compiled program

Yes.
Dennis Handly
Acclaimed Contributor
Solution

Re: Abort executing Ansi-C compiled program

You're confused. You are running a aC++ application. (One of your shlibs is aC++.)

As Clay said, when you link with libpthread, you must compile ALL aC++ sources with -mt. This includes third party sources and shlibs, etc.

>Fabrizio: Yes.

You must have forgot some lib?

Can you use gdb to get a stack trace to see what shlibs you are using:
$ gdb executable core
(gdb) bt
(gdb) q

You can use footprints(1) to scan your objects, binaries, shlibs to see if they were compiled with -mt.
Fabrizio Maggioni_2
Super Advisor

Re: Abort executing Ansi-C compiled program

Hi,

I use footprints to scan the binary file, and i found out "-mt" set to false.I can't find this value into other object (like libraries etc )
Could be the problem?Can i set it to true?

Only a note, i am not an expert developer ;), i am trying to debug and solve the problem on behalf of develop team.Otherwise they will solve it next week..

Thanks a lot,
Fabrizio
Dennis Handly
Acclaimed Contributor

Re: Abort executing Ansi-C compiled program

>I use footprints to scan the binary file, and i found out "-mt" set to false.

If the binary only has C source, it probably doesn't matter.

>I can't find this value into other object (like libraries etc) Could be the problem? Can i set it to true?

If the libs were compiled with a much older aC++ compiler, the -mt flag wasn't saved.
Yes, it could be a problem.
The only way to set it to "true" is recompile the source in those libs.