Linking Linux library to FreeBSD program.

Gary Jennejohn gljennjohn at gmail.com
Fri Nov 22 09:11:43 UTC 2019


On Fri, 22 Nov 2019 19:46:41 +1100
Peter Jeremy <peter at rulingia.com> wrote:

> 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.
> 

Maybe running brandelf(1) on it would help: brandelf -t Linux file

-- 
Gary Jennejohn


More information about the freebsd-hackers mailing list