Date: Fri, 22 Nov 2019 10:11:39 +0100 From: Gary Jennejohn <gljennjohn@gmail.com> To: Peter Jeremy <peter@rulingia.com> Cc: Gleb Popov <arrowd@freebsd.org>, freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: Linking Linux library to FreeBSD program. Message-ID: <20191122101139.2b4a0e87@ernst.home> In-Reply-To: <20191122084641.GH74610@server.rulingia.com> References: <CALH631m8OD95VFWV7=znTebBrLNBQYWwXnSDMaEcWZriBQEiQA@mail.gmail.com> <20191122084641.GH74610@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 22 Nov 2019 19:46:41 +1100 Peter Jeremy <peter@rulingia.com> wrote: > On 2019-Nov-22 11:36:52 +0400, Gleb Popov <arrowd@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191122101139.2b4a0e87>