develooper Front page | perl.inline | Postings from May 2011

Symbol lookup error - undefined symbol

Thread Next
From:
Andrew DeFaria
Date:
May 27, 2011 19:38
Subject:
Symbol lookup error - undefined symbol
Message ID:
20110528023851.13219.qmail@lists-nntp.develooper.com
I'm using Inline->bind to bind to a static lib which has a few 
dependencies so I am setting LIBS to a series of 3 -L/-l pairs. Inline 
is successfully binding to the library and I go to make the call to the 
library but I'm failing with a Symbol lookup error - undefined symbol:

bash-3.2$ /usr/local/bin/perl raid2 -load DbgSh.h
Calling bind with libs set to
-L/view/yfang_fp1.0_yfang_May24/vob/9200_packetcore/packetcore/infra/sysmgr/ipmi 
-lwiipmi
-L/view/yfang_fp1.0_yfang_May24/vob/9200_packetcore/packetcore/infra/lib/src 
-lwinfra
-L/vob/9200/software/common/debugshell -lDbgSh
Starting Build Preprocess Stage
Finished Build Preprocess Stage

Starting Build Parse Stage
Finished Build Parse Stage

Starting Build Glue 1 Stage
Finished Build Glue 1 Stage

Starting Build Glue 2 Stage
Finished Build Glue 2 Stage

Starting Build Glue 3 Stage
Finished Build Glue 3 Stage

Starting Build Compile Stage
   Starting "perl Makefile.PL" Stage
Writing Makefile for raid2_f8ac
   Finished "perl Makefile.PL" Stage

   Starting "make" Stage
make: Warning: File `Makefile' has modification time 8.5 s in the future
/usr/local/bin/perl /usr/local/lib/perl5/5.8.9/ExtUtils/xsubpp  -typemap 
/usr/local/lib/perl5/5.8.9/ExtUtils/typemap -typemap 
/vob/9200/software/common/debugshell/typemap   raid2_f8ac.xs > 
raid2_f8ac.xsc && mv raid2_f8ac.xsc raid2_f8ac.c
gcc -c  -I/vob/9200/software/common/debugshell -m32 -fno-strict-aliasing 
-pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 
-I/usr/include/gdbm -O2   -DVERSION=\"0.00\" -DXS_VERSION=\"0.00\" -fPIC 
"-I/usr/local/lib/perl5/5.8.9/i386/CORE"   raid2_f8ac.c
Running Mkbootstrap for raid2_f8ac ()
chmod 644 raid2_f8ac.bs
rm -f blib/arch/auto/raid2_f8ac/raid2_f8ac.so
gcc  -m32 -shared -O2 -L/usr/local/lib raid2_f8ac.o  -o 
blib/arch/auto/raid2_f8ac/raid2_f8ac.so \
            
-L/view/yfang_fp1.0_yfang_May24/vob/9200_packetcore/packetcore/infra/sysmgr/ipmi 
-lwiipmi    \

chmod 755 blib/arch/auto/raid2_f8ac/raid2_f8ac.so
cp raid2_f8ac.bs blib/arch/auto/raid2_f8ac/raid2_f8ac.bs
chmod 644 blib/arch/auto/raid2_f8ac/raid2_f8ac.bs
make: warning:  Clock skew detected.  Your build may be incomplete.
   Finished "make" Stage

   Starting "make install" Stage
make: Warning: File `Makefile' has modification time 7.7 s in the future
Files found in blib/arch: installing files in blib/lib into architecture 
dependent library tree
Writing 
/vob/9200/software/common/debugshell/_Inline/lib/auto/raid2_f8ac/.packlist
make: warning:  Clock skew detected.  Your build may be incomplete.
   Finished "make install" Stage

   Starting Cleaning Up Stage
   Finished Cleaning Up Stage

Finished Build Compile Stage

RAiD [DbgSh] <144> DbgShellProcessUserInput (1,1,1)
/usr/local/bin/perl: symbol lookup error: 
/vob/9200/software/common/debugshell/_Inline/lib/auto/raid2_f8ac/raid2_f8ac.so: 
undefined symbol: DbgShellProcessUserInput
bash-3.2$ pwd
/vob/9200/software/common/debugshell
bash-3.2$ nm libDbgSh.a | grep DbgShellProcessUserInput
000000000000074c T DbgShellProcessUserInput
bash-3.2$

As you can see DbgShellProcessUserInput is indeed defined in libDbgSh.a 
yet when I attempt to call it I get the symbol lookup failure.

The problem seem to have something to do with the additional libraries 
as if they are not included then I don't have a problem. But I need to 
have those other libraries. How do I fix this?

TIA.
-- 
Andrew DeFaria <http://defaria.com>
Everybody repeat after me ...We are all individuals.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About