Summary of current change suggestions

Manuel M. T. Chakravarty chak at
Fri Feb 23 02:07:39 EST 2001

"Alastair Reid" <reid at> wrote,

> > Marcin just pointed out that you can use dlopen() in a way
> > that it finds symbols without a library name.  That should
> > do, I think.
> Note that finding a marginally easier way to do the lookup doesn't address my
> concern that this undirected search will cause maintenance and porting problems
> by worsening an already bad situation (just which library did
> Linux/solaris/freebsd/hpux/redhat6.0/redhat7.0/... choose to hide a symbol in).
> In fact, I expect that having dlopen do a search through the libraries that it
> thinks are relevant instead of Hugs performing a search through the list of
> libraries that it knows to be relevant probably makes things worse because it
> increases the gap between the programmer's mental model and what actually
> happens.
> ps dlopen is not completely portable - Hugs also uses shl_{load,findsym} (HPUX
> only?) and {LoadLibrary, GetProcAddress} (Win32).

Fair enough, but as I pointed out.  Adding a library name to
the import declaration also doesn't work in all cases.  So
we have one ad-hoc, half-backed solution against another.
In this case, I would prefer the simpler one (which
obviously is not to specify anything, as we can't properly
specify it anyway).  Unless, we find a third, actually
working solution of course.


More information about the FFI mailing list