[Xorp-users] Problem with scons build in xorp 1.7-WIP

J.T. Conklin jtc at acorntoolworks.com
Wed Oct 14 07:05:15 PDT 2009


naresh raga <naresh_raga at yahoo.co.in> writes:
> After long time I am again working on this.As you said i have
> crosscompiled openssl 0.9.8,it has generated libcrypto.a and
> libssl.a in lib folder.Also it has openssl header files in include
> folder.  I have copied them in /opt/local/    folder,the path in
> which xorp is searching for libraries and include files.But even
> then it is resulting in errors as below:
>
> /opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/bin/arm-linux-g++ -o obj/i686-pc-linux-gnu/libxipc/call_xrl -Wl,-rpath=/home/student/Desktop/xorp1.7/install/lib obj/i686-pc-linux-gnu/libxipc/call_xrl.o -L/usr/sfw/lib -L/opt/local/lib -L/usr/local/lib -Lobj/i686-pc-linux-gnu/libxipc -Llibxipc -Lobj/i686-pc-linux-gnu/libcomm -Llibcomm -Lobj/i686-pc-linux-gnu/libxorp -Llibxorp -lrt -lresolv -lcrypto -ldl -lfinder -lxipc -lcomm -lxorp
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x34): In function `hmac_md5':
> libxipc/hmac_md5.c:63: undefined reference to `MD5_Init'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x48):libxipc/hmac_md5.c:64: undefined reference to `MD5_Update'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x5c):libxipc/hmac_md5.c:65: undefined reference to `MD5_Final'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x158):libxipc/hmac_md5.c:96: undefined reference to `MD5_Init'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x170):libxipc/hmac_md5.c:97: undefined reference to `MD5_Update'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x184):libxipc/hmac_md5.c:98: undefined reference to `MD5_Update'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x194):libxipc/hmac_md5.c:99: undefined reference to `MD5_Final'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x1a0):libxipc/hmac_md5.c:103: undefined reference to `MD5_Init'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x1b8):libxipc/hmac_md5.c:104: undefined reference to `MD5_Update'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x1cc):libxipc/hmac_md5.c:105: undefined reference to `MD5_Update'
> obj/i686-pc-linux-gnu/libxipc/libxipc.a(hmac_md5.o)(.text+0x1dc):libxipc/hmac_md5.c:106: undefined reference to `MD5_Final'
> collect2: ld returned 1 exit status
> scons: *** [obj/i686-pc-linux-gnu/libxipc/call_xrl] Error 1
> scons: building terminated because of errors.

Hi Naresh,

I suspect the problem is the location of the -lcrypto in the link
line.  The GNU linker is a single pass linker, so when it process
static library archives, it only adds objects if there is a 
pending unresolved reference.

In this case, -lxipc (libxipc.a) has the unresolved reference, but 
it is after -lcrypto.

Can you manually run the above command line, moving -lcrypto last?
If this completes your build, I'll see what needs to be done to
reorder the libraries.

Don't give up hope, you're real close...

    --jtc

-- 
J.T. Conklin



More information about the Xorp-users mailing list