From: Vijay Jain on
Hi All,

I am trying to build purified binary of my code to detect memory leak
with my application.
However I get the following error when linking through purify in
verbose mode.

------------------------------------------------------ERROR
START----------------------------------------------------------------
Purify engine: Note: File /usr/lib/libc.so.1 (/usr/lib/libc.so.1)
already in list of dependent libs.

Purify engine: Note: Instrumenting /tmp/data635common_defs0.o -> /tmp/
data635common_defs0_pure_p9_c0_103312158_32.o

Purify engine: Error: Errors detected while instrumenting files.
Linking suppressed.
(To force continuation, use "purify -best-effort $(CC) ...".)
*** Error code 1
clearmake: Error: Build script failed for "TM_transactioncapture.pure"
------------------------------------------------ERROR END
------------------------------------------------------------------------

When I link with -best-effort option I get the following error


------------------------------------------------------ERROR
START----------------------------------------------------------------

ld: fatal: option -dn and -P are incompatible
ld: fatal: Flags processing errors

Purify engine: Error: The linker returned error code: 1

*** Error code 1
clearmake: Error: Build script failed for "TM_transactioncapture.pure"
------------------------------------------------ERROR END
------------------------------------------------------------------------


When I do the linking through ld myself changing the ld options (-dy)
I get the following error

------------------------------------------------------ERROR
START----------------------------------------------------------------

ld: fatal: file /tmp/data2806.o: open failed: No such file or
directory
ld: fatal: file /tmp/data2806common_defs0_pure_p9_c0_103312158_32.o:
open failed: No such file or directory
ld: fatal: File processing errors. No output written to
TM_transactioncapture.pure
------------------------------------------------ERROR END
------------------------------------------------------------------------


Following is the directive for these files in the ld command generated
by purify

" -e __pure_start /tmp/data2806.o /tmp/
data2806common_defs0_pure_p9_c0_103312158_32.o "


If I remove the files " /tmp/data2806.o /tmp/
data2806common_defs0_pure_p9_c0_103312158_32.o " from the link option
and with oe without "-e __pure_start "
I get loads of such error

------------------------------------------------------ERROR
START----------------------------------------------------------------

ld: fatal: relocation error: R_SPARC_DISP32: file /vobs/odyssey/tm/src/
tm/vobs/odyssey/tm/lib/libpersistence_classes_pure_p9_c0_103312158_32.a
(dbttmcashflowtask_data.o): symbol DW.ref.__gxx_personality_v0: offset
0x528fb is non-aligned

------------------------------------------------ERROR END
------------------------------------------------------------------------


Could you please help me resolve the error to get a purified build of
my application?

Thanks,
Vijay
From: Ian Collins on
Vijay Jain wrote:
> Hi All,
>
> I am trying to build purified binary of my code to detect memory leak
> with my application.

Just use dbx.

--
Ian Collins
From: Paul Floyd on
On Thu, 4 Dec 2008 21:51:02 -0800 (PST), Vijay Jain <vj.jain(a)gmail.com> wrote:
> Hi All,
>
> I am trying to build purified binary of my code to detect memory leak
> with my application.
> However I get the following error when linking through purify in
> verbose mode.

Hi

Which version of Solaris are you using? Which compiler? Can you post
the full text of the comand that you are using to link your application?

I'd recommend that you contact IBM support, or try their purify support
forums.

A bientot
Paul
--
Paul Floyd http://paulf.free.fr
From: Paul Floyd on
On Fri, 05 Dec 2008 18:53:26 +1300, Ian Collins <ian-news(a)hotmail.com> wrote:
> Vijay Jain wrote:
>> Hi All,
>>
>> I am trying to build purified binary of my code to detect memory leak
>> with my application.
>
> Just use dbx.

I haven't yet found anything that beats purify.

A bientot
Paul
--
Paul Floyd http://paulf.free.fr
From: Ian Collins on
Paul Floyd wrote:
> On Fri, 05 Dec 2008 18:53:26 +1300, Ian Collins <ian-news(a)hotmail.com> wrote:
>> Vijay Jain wrote:
>>> Hi All,
>>>
>>> I am trying to build purified binary of my code to detect memory leak
>>> with my application.
>> Just use dbx.
>
> I haven't yet found anything that beats purify.
>
I guess that depends on your budget! I doubt purify would find leaks
that dbx misses.

--
Ian Collins