[prev in list] [next in list] [prev in thread] [next in thread]
List: hpux-devtools
Subject: Re: HPUX-DEVTOOLS: Problem with lpthread
From: pratima kulkarni <prats () yahoo ! com>
Date: 2003-09-26 9:32:15
[Download RAW message or body]
Hi,
I was getting the following problem because I was
using -mt only while compiling and linking binary.
I was not using -mt for the creation of .o files which
are used by final binary.
The problem got solved after doing that.
Thanks a lot all of you for helping me specially
Dennis!
Thanks!
--- pratima kulkarni <prats@yahoo.com> wrote:
> Well I think I got my mistake ...
> I have to use -mt flag whenver I am using -AA ...
> for compiling all the objects file .
> Is this right ?
>
> --- pratima kulkarni <prats@yahoo.com> wrote:
> > Hi,
> > Let me explain the problem properly ...
> >
> > I have one static library called libst.a
> > I am compiling it as follows:
> > #/bin/cc -Ae +DA1.1 +DS2.0 -g -DHP_UX +z -DHP_UX
> > -D_FILE_OFFSET_BITS=64 -DVFI18N -DDEBUG -c
> mystub.c
> > #bin/ar rc libst.a mystub.o
> >
> > --------------
> >
> > After creation of this static library I am
> creating
> > my
> > executable as follows:
> > #/opt/aCC/bin/aCC -AA -g -DHP_UX +z -DHP_UX
> > -D_FILE_OFFSET_BITS=64 -DVFI18N -c a.cpp
> >
> > #/opt/aCC/bin/aCC -AA -g -DHP_UX +z -DHP_UX
> > -D_FILE_OFFSET_BITS=64 -DVFI18N -c b.cpp
> >
> > #/opt/aCC/bin/aCC -AA -g -DHP_UX +z -DHP_UX
> > -D_FILE_OFFSET_BITS=64 -DVFI18N -c c.cpp
> >
> > #/opt/aCC/bin/aCC -g a.o b.o c.o libst.a -AA
> > -lstream -lm -ldld -lcl -o my_appl
> >
> > my_appln is final binary which at run time opens
> > some
> > other shared library.
> >
> > As suggested, I removed -lstream and -lCsup from
> > link
> > line of executable to have only one version of
> these
> > libraries .
> > When I run my_appl I still get following core
> dump:
> > (gdb) where
> > #0 0xc01f5e38 in kill+0x10 () from
> /usr/lib/libc.2
> > #1 0xc01933a8 in raise+0x24 () from
> /usr/lib/libc.2
> > #2 0xc01d3a9c in abort_C+0x16c () from
> > /usr/lib/libc.2
> > #3 0xc01d3af4 in abort+0x1c () from
> /usr/lib/libc.2
> > #4 0xc0a73970 in std::terminate+0x38 () from
> > /usr/lib/libCsup_v2.2
> > #5 0xc0a73e88 in ThrowException+0x70 () from
> > /usr/lib/libCsup_v2.2
> > #6 0xc0a743b0 in __throw__FPvT1+0x14c () from
> > /usr/lib/libCsup_v2.2
> > #7 0xc15fac84 in std::ios_base::setf+0x8c () from
> > /usr/lib/libstd_v2.2
> > #8 0xc15fa708 in std::ios_base::Init::Init+0x1f30
> > ()
> > from /usr/lib/libstd_v2.2
> > #9 0x40534 in std::__sinit_apitest_cpp+0x24 ()
> > #10 0xc0a777c4 in __mainHelper+0x40 () from
> > /usr/lib/libCsup_v2.2
> > #11 0xc0a77b6c in _main+0x1c0 () from
> > /usr/lib/libCsup_v2.2
> >
> > Any idea on this problem ?
> > Why this is happening ?
> >
> > Thanks in advance!
> >
> >
> >
> >
> > --- Dennis Handly <dhandly@cup.hp.com> wrote:
> > > >3. Now when I run the binary I get core dump as
> > > follows:
> > > #3 0x7f790af4 in abort+0x1c /usr/lib/libc.2
> > > #4 0x7f4d17d8 in terminate+0x38
> > /usr/lib/libCsup.2
> > > #5 0x7f4d1cf0 in ThrowException+0x70
> > > /usr/lib/libCsup.2
> > > #6 0x7f4d2218 in __throw__FPvT1+0x14c
> > > /usr/lib/libCsup.2
> > > #7 0x7f622c84 in std::ios_base::setf+0x8c
> > > /usr/lib/libstd_v2.2
> > > #8 0x7f622708 in
> std::ios_base::Init::Init+0x1f30
> > > /usr/lib/libstd_v2.2
> > > #9 0x40584 in std::__sinit_apitest_cpp+0x24
> > > #10 0x7f4d562c in __mainHelper+0x40
> > > /usr/lib/libCsup.2
> > >
> > > >any clue on this?
> > >
> > > Your application is illegally mixing -AA and
> -AP.
> > > You have both libCsup*.2.
> > > (Make sure you link with -AA if you compile with
> > > it.)
> > >
> > > And if you use -AA and libpthread, you must
> > > consistently compile with -mt.
> > > That's why you get this throw.
> > >
> > >
> >
>
_________________________________________________________________
> > > To leave this mailing list, send mail to
> > > majordomo@cxx.cup.hp.com
> > > with the message UNSUBSCRIBE hpux-devtools
> > >
> >
>
_________________________________________________________________
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site
> > design software
> > http://sitebuilder.yahoo.com
> >
> >
>
_________________________________________________________________
> > To leave this mailing list, send mail to
> > majordomo@cxx.cup.hp.com
> > with the message UNSUBSCRIBE hpux-devtools
> >
>
_________________________________________________________________
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
> http://sitebuilder.yahoo.com
>
>
_________________________________________________________________
> To leave this mailing list, send mail to
> majordomo@cxx.cup.hp.com
> with the message UNSUBSCRIBE hpux-devtools
>
_________________________________________________________________
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
_________________________________________________________________
To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
with the message UNSUBSCRIBE hpux-devtools
_________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic