Linux compatibility: is it possible to link freebsd code to a linux library?
From: Olivier Boudry (olivier_sp1_at_yahoo.com)
Date: 08/12/04
- Next message: Roger Liu: "Re: How could I cvsup across the gateway"
- Previous message: wonder: "Re: How could I cvsup across the gateway"
- Next in thread: Steve O'Hara-Smith: "Re: Linux compatibility: is it possible to link freebsd code to a linux library?"
- Reply: Steve O'Hara-Smith: "Re: Linux compatibility: is it possible to link freebsd code to a linux library?"
- Reply: Simon Barner: "Re: Linux compatibility: is it possible to link freebsd code to a linux library?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Aug 2004 00:26:34 -0700
Hello,
Linux compatibility works fine to run linux binaries, but I'm
wondering if it's possible to compile code on FreeBSD and link it to a
linux library?
I want to compile SAP-Rfc, a perl module, to perform RFC to an SAP
server. The code must be linked to librfc.a, a library I can get only
in binary format for linux (no source available).
When I try to compile it I get the following error:
> make
cp lib/SAP/Config.pm blib/lib/SAP/Config.pm
cp Rfc.pm blib/lib/SAP/Rfc.pm
cp Iface.pm blib/lib/SAP/Iface.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.8.5/ExtUtils/xsubpp
-typemap /usr/local/lib/perl5/5.8.5/ExtUtils/typemap Rfc.xs > Rfc.xsc
&& mv Rfc.xsc Rfc.c
cc -c -I/usr/sap/rfcsdk/include
-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.5/BSDPAN" -DHAS_FPSETMASK
-DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -I/usr/local/include
-O -pipe -DVERSION=\"1.32\" -DXS_VERSION=\"1.32\" -DPIC -fPIC
"-I/usr/local/lib/perl5/5.8.5/mach/CORE" -DSUMITELSE Rfc.c
Running Mkbootstrap for SAP::Rfc ()
chmod 644 Rfc.bs
rm -f blib/arch/auto/SAP/Rfc/Rfc.so
LD_RUN_PATH="/compat/linux/lib" cc -shared -L/usr/local/lib Rfc.o
-o blib/arch/auto/SAP/Rfc/Rfc.so -L/compat/linux/lib -lm -ldl
-lpthread -L/usr/sap/rfcsdk/lib -lrfc
/usr/libexec/elf/ld: cannot find -ldl
*** Error code 1
I added /compat/linux/lib to the library search path. The library is
found at configuration time, but not at link time.
So my first questions is: Is it possible to compile code on FreeBSD
and link it to a precompiled linux library.
And the second question: If yes, is there something I can do so ld
finds the needed libld and libpthread needed by librfc.a?
Best regards,
Olivier Boudry.
- Next message: Roger Liu: "Re: How could I cvsup across the gateway"
- Previous message: wonder: "Re: How could I cvsup across the gateway"
- Next in thread: Steve O'Hara-Smith: "Re: Linux compatibility: is it possible to link freebsd code to a linux library?"
- Reply: Steve O'Hara-Smith: "Re: Linux compatibility: is it possible to link freebsd code to a linux library?"
- Reply: Simon Barner: "Re: Linux compatibility: is it possible to link freebsd code to a linux library?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|