Date: Fri, 22 Nov 2019 11:36:52 +0400 From: Gleb Popov <arrowd@freebsd.org> To: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Linking Linux library to FreeBSD program. Message-ID: <CALH631m8OD95VFWV7=znTebBrLNBQYWwXnSDMaEcWZriBQEiQA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello hackers@ 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. What course of action could be taken in this situation? My plan is to generate a native wrapper library for libcudart.so in which every exported function would call Linux binary linked to real libcudart.so and route function arguments via RPC or some other mechanism. This looks awful for sure, but I don't see any other solutions.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALH631m8OD95VFWV7=znTebBrLNBQYWwXnSDMaEcWZriBQEiQA>