pro64-support
[Top] [All Lists]

Re: "paths" problem in pro64

To: David Stephenson <dlstephe@xxxxxxx>
Subject: Re: "paths" problem in pro64
From: Peng Zhao <pengzhao@xxxxxxxxxxxxxx>
Date: Sun, 6 May 2001 14:34:47 -0600 (MDT)
Cc: sgi <pro64-support@xxxxxxxxxxx>
In-reply-to: <3AF5B363.65EE8D75@xxxxxxx>
Sender: owner-pro64-support@xxxxxxxxxxx
On Sun, 6 May 2001, David Stephenson wrote:

Thanks. There is only libinstr.a instead of libinstr.so (even in the
INSTALL script). A little confusing.

I tried both -l and -L, both fails:


ls ~/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0/libinstr*
/usr/brule12/grad/pengzhao/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0/libinstr.a

ls ~/lib
gcc-lib/  libffio.a  libfortran.a  libmsgi.a  libmv.a


 sgicc -fb_create ./test test.c -o test -linstr 
-L~/lib/gcc-lib/ia64-sgi-linux/sgicc-1.0 
-L~/lib

/usr/lib/gcc-lib/ia64-hp-linux/2.9-ia64-000216/../../../../ia64-hp-linux/bin/ld:
cannot find -linstr
collect2: ld returned 1 exit status

sgicc -fb_create ./test test.c -o test -linstr
/usr/lib/gcc-lib/ia64-hp-linux/2.9-ia64-000216/../../../../ia64-hp-linux/bin/ld:
cannot find -linstr
collect2: ld returned 1 exit status


> Peng Zhao wrote:
> 
> >         And is there any neat solution to avoid
> > "undefined reference to `__profile_pu_init'" error when using
> > special libraries? Following are the tries I made: Can somebody explain
> > me the related environment varialbes?
> > 
> > -------------------
> > 
> > NUE>sgicc -fb_create ./test test.c -o test
> > test.o:/usr/sakwatamau/brule12/grad/pengzhao/test/test.c:4: undefined
> > reference to `__profile_init' test.o: In function `main':
> > test.o(.text+0x72): undefined reference to `__profile_pu_init'
> > test.o(.text+0x92): undefined reference to `__profile_invoke_init'
> > test.o(.text+0xb2): undefined reference to `__profile_branch_init'
> > test.o(.text+0xd2): undefined reference to `__profile_call_init'
> > test.o(.text+0xf2): undefined reference to `__profile_invoke'
> > test.o(.text+0x162): undefined reference to `__profile_branch'
> > test.o(.text+0x1b2): undefined reference to `__profile_call_entry'
> > test.o(.text+0x212): undefined reference to `__profile_call_exit'
> > test.o(.text+0x252): undefined reference to `__profile_call_entry'
> > test.o(.text+0x2b2): undefined reference to `__profile_call_exit'
> > collect2: ld returned 1 exit status NUE:/usr/brule12/grad/pengzhao/test>
> > -----------------------
> > NUE>sgicc -fb_create ./test test.c -o test -linstr
> > /usr/lib/gcc-lib/ia64-hp-linux/2.9-ia64-000216/../../../../ia64-hp-linux/bin/ld:
> > cannot find -linstr collect2: ld returned 1 exit status
> > ------------------------
> 
> 
> __profile_init and the other undefined names are the names of procedures
> in the libiinstr.so library used during instrumentation.  During
> compilation with instrumentation, calls to these procedures are inserted
> into the WHIRL code of the program being compiled.  When the instrumented
> binary is run, these procedure perform the frequency counts and generate
> the file of feedback data.
> 
> The flag "-linstr" in the second example tells the linker to include the
> libinstr.so library, but the linker is unable to find it.  I suggest to
> first make sure that you have build the libinstr.so library.  Second,
> compile using the flags "-linstr -L<path>", where <path> is the location
> of the libinstr.so library.
> 
>                                                       - David
> 
> 

-- 
                Regards

                                          Peng
  Peng Zhao   pengzhao@xxxxxxxxxxxxxx   
  http://www.cs.ualberta.ca/~pengzhao   
  TEL (Lab): (780)492-3725                  Lab:  CSC251



<Prev in Thread] Current Thread [Next in Thread>