Re: 329-gary-allow-RTLD_GLOBAL

2007-06-23 Thread Ralf Wildenhues
Hello Gary, * Gary V. Vaughan wrote on Tue, May 22, 2007 at 02:55:11PM CEST: > > RTLD_GLOBAL can be passed to dlopen, but (assuming my recollection that AIX > is one of the hosts that requires all symbols to be resolved at link time > is correct) in the test case I just patched, AIX can't build m

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Gary V. Vaughan
Howdy Bob! On 22 May 2007, at 15:32, Bob Friesenhahn wrote: On Tue, 22 May 2007, Ralf Wildenhues wrote: Except for annoyance to the end-user, I was originally thinking that we don't need to distinguish. When the developer's libltdl client code calls lt_dladvise_global, we could have it emit a

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Bob Friesenhahn
On Tue, 22 May 2007, Ralf Wildenhues wrote: Except for annoyance to the end-user, I was originally thinking that we don't need to distinguish. When the developer's libltdl client code calls lt_dladvise_global, we could have it emit a warning to stderr that says: If what you are trying to do won

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Gary V. Vaughan
On 22 May 2007, at 13:48, Ralf Wildenhues wrote: * Gary V. Vaughan wrote on Tue, May 22, 2007 at 02:24:25PM CEST: On 22 May 2007, at 13:16, Ralf Wildenhues wrote: * Gary V. Vaughan wrote on Tue, May 22, 2007 at 02:11:03PM CEST: I'm wondering how to best warn people who have their project bu

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Ralf Wildenhues
* Gary V. Vaughan wrote on Tue, May 22, 2007 at 02:24:25PM CEST: > On 22 May 2007, at 13:16, Ralf Wildenhues wrote: >> * Gary V. Vaughan wrote on Tue, May 22, 2007 at 02:11:03PM CEST: >>> >>> I'm wondering how to best warn people who have their project >>> build rely on RTLD_GLOBAL that what they a

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Gary V. Vaughan
Hallo Ralf, On 22 May 2007, at 13:16, Ralf Wildenhues wrote: * Gary V. Vaughan wrote on Tue, May 22, 2007 at 02:11:03PM CEST: I'm wondering how to best warn people who have their project build rely on RTLD_GLOBAL that what they are doing is inherently non-portable. Erm, relying on RTLD_LOCAL

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Ralf Wildenhues
* Gary V. Vaughan wrote on Tue, May 22, 2007 at 02:11:03PM CEST: > > I'm wondering how to best warn people who have their project > build rely on RTLD_GLOBAL that what they are doing is inherently > non-portable. Erm, relying on RTLD_LOCAL is non-portable. Relying on RTLD_GLOBAL is not; after all

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Gary V. Vaughan
Hallo Ralf, On 22 May 2007, at 13:03, Ralf Wildenhues wrote: Not sure what you intend here. I don't see how libtool can automatically detect non-portability to happen here. If all you're out to is add a warning to the test source code, then sure, go ahead. I'm wondering how to best warn peop

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Ralf Wildenhues
Hello Gary, * Gary V. Vaughan wrote on Tue, May 22, 2007 at 12:30:26PM CEST: > On 22 May 2007, at 10:45, Ralf Wildenhues wrote: >> >> I'd prefer, if it's not too much work, that the test be run on all >> systems, but on the tough ones not build moddepend, and exit SKIP >> even if the other modules

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Gary V. Vaughan
On 22 May 2007, at 10:45, Ralf Wildenhues wrote: Hi Gary, Hallo Ralf! * Gary V. Vaughan wrote on Tue, May 22, 2007 at 11:38:02AM CEST: Looking at this again in the fresh light of day, I realised that the entire point of the moddepend test is to check that its unresolved symbols can be s

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Ralf Wildenhues
Hi Gary, * Gary V. Vaughan wrote on Tue, May 22, 2007 at 11:38:02AM CEST: > > Looking at this again in the fresh light of day, I realised that the entire > point of the moddepend test is to check that its unresolved symbols can be > satisfied from the program that lt_dlopen()'s it when using the g

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-22 Thread Gary V. Vaughan
Morgen Ralf, On 21 May 2007, at 18:20, Gary V. Vaughan wrote: * Gary V. Vaughan wrote on Tue, May 08, 2007 at 04:42:09PM CEST: That would defeat building moddepend with unresolved symbols at link time, so that we can test that it correctly calls the matching symbols from modglobal after load

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-21 Thread Gary V. Vaughan
On 21 May 2007, at 17:15, Ralf Wildenhues wrote: Hello Gary, Apologies for the huge delay. Hallo Ralf, No problem. Life always seems to be an endless sink for my time too ;-) * Gary V. Vaughan wrote on Tue, May 08, 2007 at 04:42:09PM CEST: +for file in modresident modlocal modglobal mod

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-21 Thread Ralf Wildenhues
Hello Gary, Apologies for the huge delay. * Gary V. Vaughan wrote on Tue, May 08, 2007 at 04:42:09PM CEST: > > Thanks for the review :-) Patch now committed to CVS. Thank you. >> handle is never closed here. This is important: some failures are only >> caught at module closing time. > > in ma

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-09 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Gary V. Vaughan on 5/9/2007 2:12 AM: >> >> There is in fact a new bugglet due to this patch: >> >> gmake[3]: *** No rule to make target `tests/lt_dladvise.at', needed by >> `tests/testsuite'. Stop. > > D'oh! Thanks for the heads up. Fi

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-09 Thread Gary V. Vaughan
Hi Bob, On 9 May 2007, at 03:27, Bob Friesenhahn wrote: On Tue, 8 May 2007, Gary V. Vaughan wrote: On 6 May 2007, at 21:57, Ralf Wildenhues wrote: Hi Gary, Hallo Ralf, Thanks for the review :-) Patch now committed to CVS. There is in fact a new bugglet due to this patch: gmake[3]: *** N

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-08 Thread Bob Friesenhahn
On Tue, 8 May 2007, Gary V. Vaughan wrote: On 6 May 2007, at 21:57, Ralf Wildenhues wrote: Hi Gary, Hallo Ralf, Thanks for the review :-) Patch now committed to CVS. There is in fact a new bugglet due to this patch: gmake[3]: *** No rule to make target `tests/lt_dladvise.at', needed by

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-08 Thread Gary V. Vaughan
On 6 May 2007, at 21:57, Ralf Wildenhues wrote: Hi Gary, Hallo Ralf, Thanks for the review :-) Patch now committed to CVS. * Gary V. Vaughan wrote on Tue, May 01, 2007 at 04:33:37PM CEST: Sorry for the delay. Don't worry, and likewise. Thanks for the patch. Please ensure next time t

Re: 329-gary-allow-RTLD_GLOBAL

2007-05-06 Thread Ralf Wildenhues
Hi Gary, * Gary V. Vaughan wrote on Tue, May 01, 2007 at 04:33:37PM CEST: > Sorry for the delay. Don't worry, and likewise. Thanks for the patch. Please ensure next time that your mailer does not wrap long lines; I should apologize in advance that my mailer may do the same now. > I've added a

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-10 Thread Bob Friesenhahn
On Tue, 10 Apr 2007, Gary V. Vaughan wrote: lt_dladvise advise; if (!lt_dladvise_init(&advise)) return 1; In this way, lt_dladvise can be a pointer, an integer, or a structure. Okay, I'm happy to do it that way :-) We already decided that it will be a pointer for future ABI compatib

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-10 Thread Gary V. Vaughan
Hi Bob! On 10 Apr 2007, at 15:35, Bob Friesenhahn wrote: On Tue, 10 Apr 2007, Gary V. Vaughan wrote: int errors = 0; lt_dlhandle handle; lt_dladvise advise = lt_dladvise_init (); if (advise == 0) return 1; Not ideal. By comparing with zero there is an implicit assumption regarding

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-10 Thread Bob Friesenhahn
On Tue, 10 Apr 2007, Gary V. Vaughan wrote: int errors = 0; lt_dlhandle handle; lt_dladvise advise = lt_dladvise_init (); if (advise == 0) return 1; Not ideal. By comparing with zero there is an implicit assumption regarding the lt_dladvise type. It is usually better to avoid any u

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-10 Thread Gary V. Vaughan
On 9 Apr 2007, at 13:03, Ralf Wildenhues wrote: * Bob Friesenhahn wrote on Sun, Apr 08, 2007 at 08:09:23PM CEST: pthread_mutex_t mutex; pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_setpshared(&attr,PTHREAD_PROCESS_SHARED); pthread_mutex_init(&mutex, &attr); pthread_

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-10 Thread Gary V. Vaughan
Hallo Ralf, On 8 Apr 2007, at 18:03, Ralf Wildenhues wrote: * Gary V. Vaughan wrote on Sun, Apr 08, 2007 at 12:53:01PM CEST: On 8 Apr 2007, at 01:56, Bob Friesenhahn wrote: On Sun, 8 Apr 2007, Ralf Wildenhues wrote: Incidentally, I'm don't know whether it would be wiser to go from 2.1a to 2

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-09 Thread Bob Friesenhahn
On Mon, 9 Apr 2007, Ralf Wildenhues wrote: The pthread interfaces don't assume that the object is a pointer so they work differently than suggested. Pointers are error prone so they are best reserved for internal library interfaces if possible. Wait. If you have a pointer to a struct, then y

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-09 Thread Ralf Wildenhues
* Bob Friesenhahn wrote on Sun, Apr 08, 2007 at 08:09:23PM CEST: > On Sun, 8 Apr 2007, Ralf Wildenhues wrote: > > > >But this is how it can be extended without breaking API! Only if > >lt_dlopaque is a pointer type, of course, and also you need to free the > >object later on. > > > >And IIUC then

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-08 Thread Bob Friesenhahn
On Sun, 8 Apr 2007, Ralf Wildenhues wrote: (stupid symbol names aside): lt_dlopaque opaque = lt_dlopaque_new(); lt_dlset_symglobal (opaque); handle = lt_dlopenopaque ("libmod.la", opaque); But this is how it can be extended without breaking API! Only if lt_dlopaque is a pointer typ

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-08 Thread Ralf Wildenhues
* Gary V. Vaughan wrote on Sun, Apr 08, 2007 at 12:53:01PM CEST: > On 8 Apr 2007, at 01:56, Bob Friesenhahn wrote: > >On Sun, 8 Apr 2007, Ralf Wildenhues wrote: > >>First, many many thanks for attacking this. > > No problem. I plan to spend a day or so each week tackling all of the > showstoppers

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-08 Thread Gary V. Vaughan
Hallo Ralf, Bob, On 8 Apr 2007, at 01:56, Bob Friesenhahn wrote: On Sun, 8 Apr 2007, Ralf Wildenhues wrote: First, many many thanks for attacking this. No problem. I plan to spend a day or so each week tackling all of the showstoppers so we can put out a final alpha release. Incidentally, I

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-07 Thread Bob Friesenhahn
On Sun, 8 Apr 2007, Ralf Wildenhues wrote: First, many many thanks for attacking this. Second, please allow me a couple of days for review, I'll try to get to it soon. Next, please be aware that as important as documentation would be test exposure for the functionality. Actually, test exposur

Re: 329-gary-allow-RTLD_GLOBAL

2007-04-07 Thread Ralf Wildenhues
Hi Gary, * Gary V. Vaughan wrote on Sun, Apr 08, 2007 at 01:28:25AM CEST: > > I didn't write the documentation yet incase the interface changes > during patch review. If there are no comments over the next few > days, I'll write those docs and commit. First, many many thanks for attacking this.