Thanks! The Termux docs did mention that dlopen was "different":

> Symbol visibility when opening shared libraries using dlopen() works
differently. On a normal linker, when an executable linking against a
shared library libA dlopen():s another shared library libB, the symbols of
libA are exposed to libB without libB needing to link against libA
explicitly. This does not work with the Android linker, which can break
plug-in systems where the main executable dlopen():s a plug-in which does
not explicitly link against some shared libraries already linked to by the
executable. See the relevant NDK issue
<https://github.com/android-ndk/ndk/issues/201> for more information.

I have no qualms about digging around in the sources. I was sort of hoping
I'd have to do that.

Anyway, removing the noted vesdigital code just caused a failure in
ffi/unsafe, specifically in the body of get-ffi-obj*. I'll start messing
around with linker flags tomorrow.


On Tue, Oct 19, 2021, 19:37 Matthew Flatt <mfl...@cs.utah.edu> wrote:

> At Tue, 19 Oct 2021 16:25:33 -0700 (PDT), Wesley Bitomski wrote:
> > ffi-lib: could not load foreign library
> >   path: [all opened]
> >   system error: unknown error
>
> The "[all opened]" here means that
>
>  (define libmz (ffi-lib #f))
>
> failed in "racket/collects/openssl/mzssl.rkt".
>
> That line, plus
>
>  (define-ffi-definer define-mzscheme libmz)
>
> are leftovers that can just be removed, and I'll get rid of them.
>
> If deleting those lines is not an option for some reason, or in case
> you run into the same problem somewhere else: I think the cause of the
> underlying error is a `dlopen` call with `NULL` as its first argument.
> Unless that's just disallowed on Android, you might be able to work
> around the problem with a linker flag like `-rdynamic`.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/CAF-8S4FN5WCiwJNueWVHijzS-JQ7ZqxwyycnUvoJJhxW65iNbg%40mail.gmail.com.

Reply via email to