Linking Linux library to FreeBSD program.

Peter Jeremy peter at rulingia.com
Fri Nov 22 08:47:04 UTC 2019


On 2019-Nov-22 11:36:52 +0400, Gleb Popov <arrowd at freebsd.org> wrote:
>In my quest for CUDA on FreeBSD I managed to compile a simple CUDA program
>using native clang. However, it required linking to libcudart.so from Linux
>CUDA distribution.
>
>As you can guess, running this binary results in a segfault - a.out being a
>FreeBSD binary tries to load libcudart.so Linux library, which in turn
>pulls Linux libc.so.

In the distant past, there was a www/linuxpluginwrapper port that supported
this (I used it with print/pips-scx3500_3600s to print to an Epson inkjet
print using a Linux blob).  Unfortunately, www/linuxpluginwrapper didn't
support ELF symbol versioning and was "replaced" with www/nspluginwrapper,
which dropped all the required functionality.

https://lists.freebsd.org/pipermail/freebsd-ports/2008-June/048827.html
describes my last efforts to get that approach to work.  I don't know if
that's of any use to your efforts.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20191122/bb1678c2/attachment.sig>


More information about the freebsd-hackers mailing list