LDD: Not a FreeBSD ELF shared object

Hello,

I am currently trying to run a linux-application via linux-binary-compatibility on FreeBSD.
Linux-binary-compatibility has been set up by using the guideline and it seems to work as intended.
However, a library I want to use can't be linked, as stated by "ldd" with the errorcode:
Code:
ldd: /compat/linux/usr/lib/oracle/21/client/lib/libsqora.so.21.1: not a FreeBSD ELF shared object

The library I am addressing here is a linux-driver from Oracle. I do know Oracle does not support FreeBSD, but we are trying to get it running out of curiosity.

Is there any way to resolve this error and use the library?

Additional Information:
FreeBSD-Version: 12.2 release p9
Architecture: amd64
Oracle-Driver: 32bit
 
I'm not an expert on the linux emulation layer; obviously, you cannot mix FreeBSD compiled binaries with linux libraries. If you want to run an application that makes use of linux libraries, said app will need to be compiled as linux binary.

There are some tricks for branding binaries to tell the kernel to run them in the linux emulation layer directly, if I'm not misremembering. However, this might not be applicable for your case, I think.

I recommend setting up a linux jail and running your app in that instead; I successfully managed to run a linux binary with Oracle db drivers this way - which is what you're attempting to do, I'm guessing.

This post should give you some pointers on setting up a jail:
 
Thank you for your response.

I recommend setting up a linux jail and running your app in that instead; I successfully managed to run a linux binary with Oracle db drivers this way - which is what you're attempting to do, I'm guessing.
That's true, we are trying to connect to a oracle DB from Freebsd.
However, from my understanding, I can't access files/apps outside the jail when operating inside it.
One of our apps cannot be moved inside the jail because it runs on the outer layer (don't know how to describe it, I hope you get it), so installing the Oracle db drivers in a jail would be useless, because the driver can't access the data outside of the jail, or can it?
 
I am currently trying to run a linux-application via linux-binary-compatibility on FreeBSD.
Linux-binary-compatibility has been set up by using the guideline and it seems to work as intended.
However, a library I want to use can't be linked, as stated by "ldd" with the errorcode:
Code:
ldd: /compat/linux/usr/lib/oracle/21/client/lib/libsqora.so.21.1: not a FreeBSD ELF shared object
Linked to what exactly? Are you trying to build a Linux or FreeBSD binary?
 
Uhm, it's pretty simple, FreeBSD's ldd(1) does not work on Linux shared objects. Use the Linux version e.g. like this:
/compat/linux/bin/bash ldd /usr/lib/oracle/21/client/lib/libsqora.so.21.1.
(The Linux ldd is a shell script, therefore you have to run a Linux shell to execute it)
 
the driver can't access the data outside of the jail, or can it?
depends on what you're attempting to achieve. If you're referring to file level access - you could do a simple nullfs mount to accomplish a "shared" space between host and jail.

If you're attempting to run a FreeBSD binary with a linux library you're probably better off to use a socket to share data between a linux and FreeBSD binary. Not sure, if the first one is even technically supported/possible. Well, it might be possible with a "lot" of coding, but still probably an exercise in futility.
 
If you're attempting to run a FreeBSD binary with a linux library you're probably better off to use a socket to share data between a linux and FreeBSD binary. Not sure, if the first one is even technically supported/possible. Well, it might be possible with a "lot" of coding, but still probably an exercise in futility.
We've been doing that for years. My attempt is coded from scratch, though.
 
Back
Top