hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

load-shared-object in ypsilon-compat differs from the behavior of ypsilon #251

Open hyln9 opened 10 years ago

hyln9 commented 10 years ago

The ypsilon version (on *NIX platforms) seems to always call dlopen with RTLD_LAZY and RTLD_GLOBAL enabled (see src/file.cpp line 289).

Launchpad Details: #LP360312 Tristan Ravitch - 2009-04-12 23:27:34 -0400

hyln9 commented 10 years ago

On Apr 13, 2009, at 6:27 AM, Tristan Ravitch wrote:

The ypsilon version (on *NIX platforms) seems to always call dlopen
with RTLD_LAZY and RTLD_GLOBAL enabled (see src/file.cpp line 289).

Why is this important for Ikarus? Did you have any problems using RTLD_LOCAL? (I don't see why we need the names to be global in Ikarus since we can pass the library handle where we need it.)

Launchpad Details: #LPC Abdulaziz Ghuloum - 2009-04-13 03:21:17 -0400

hyln9 commented 10 years ago

I ran into some trouble while loading readline - it seemed to require some symbols from termcap which were not available when that was loaded with RTLD_LOCAL. I did only see that problem on a Red Hat installation, so it could be some quirk in the default linker flags that they use.

The same sequence of loads did work under ypsilon, so I was confused for a while.

Launchpad Details: #LPC Tristan Ravitch - 2009-04-13 08:49:11 -0400

hyln9 commented 10 years ago

On Apr 13, 2009, at 3:49 PM, Tristan Ravitch wrote:

I ran into some trouble while loading readline - it seemed to require some symbols from termcap which were not available when that was
loaded with RTLD_LOCAL. I did only see that problem on a Red Hat
installation, so it could be some quirk in the default linker flags that they use.

That does sound like the readline library in RH is not linked properly. Loading it should not need the termcap library to be loaded globally. Can you work around this by calling dlopen yourself?

Launchpad Details: #LPC Abdulaziz Ghuloum - 2009-04-13 09:47:20 -0400

hyln9 commented 10 years ago

Yeah, calling it directly has been working, just thought someone might want to know in the future

Launchpad Details: #LPC Tristan Ravitch - 2009-04-13 10:08:48 -0400