From: Mattia B. <mb...@ds...> - 2001-12-02 16:47:38
|
> Has anyone built WxPerl on FreeBSD? The problem is that Perl on FreeBSD > is built without pthreads, but wxwindows is built with pthreads. > perl5 Makefile.PL complains about library settings it inherits from > gtk-config: > > % /usr/local/bin/perl5 Makefile.PL > Checking if your kit is complete... > Looks good > Unrecognized argument in LIBS ignored: '-Wl,-E' > Unrecognized argument in LIBS ignored: '-pthread' I don't know if I can work around this ( for all platforms ), but I'll try > Wheb built this way, "make test" reports it can't find pthread_create. > > Manually sprinkling a bunch of "-pthread"s and "-lc_r" gets it to build, did you add -Wl,-E, too? > but predictably with this voodoo the extension is not very stable (a bit > of clicking around in demo/samples/controls/controls.pl and some > resizing, and foom: a Perl crash without further traceback in xdr_u_int; > obviously a threadsafe/no threadsafe mismatch). > > FreeBSD 4.4, the Perl that came with it (5.005_03), wxWindows build from > the ports collection of FreeBSD 4.4 (wxgtk-2.2.7,1). You might try to rebuild wxWindows with --disable-threads ( and maybe gtk/glib ? ); unfortunately I can't reproduce this, because I don't havd FreeBSD, and on Linux building wxWindows with threads and perl without does work just fine. Regards Mattia |
From: Bert D. <dri...@pl...> - 2001-12-02 17:37:40
|
On Sun, 2 Dec 2001, Mattia Barbon wrote: > > Unrecognized argument in LIBS ignored: '-pthread' > I don't know if I can work around this ( for all platforms ), but I'll try I'm not sure it makes sense at this stage... > > Wheb built this way, "make test" reports it can't find pthread_create. > > > > Manually sprinkling a bunch of "-pthread"s and "-lc_r" gets it to build, > did you add -Wl,-E, too? Yup. Actually, they were already in there from the standard MakeMaker magic. > > but predictably with this voodoo the extension is not very stable (a bit > > of clicking around in demo/samples/controls/controls.pl and some > > resizing, and foom: a Perl crash without further traceback in xdr_u_int; > > obviously a threadsafe/no threadsafe mismatch). > > > > FreeBSD 4.4, the Perl that came with it (5.005_03), wxWindows build from > > the ports collection of FreeBSD 4.4 (wxgtk-2.2.7,1). > You might try to rebuild wxWindows with --disable-threads ( and maybe > gtk/glib ? ); unfortunately I can't reproduce this, because I don't > havd FreeBSD, and on Linux building wxWindows with threads and perl without does work > just fine. That would work, but that would cause other apps to fail :-( Alternatively I could build seperate non-threaded libraries just for WxPerl (which, by the way, is not the only victim of the way threads are handled on FreeBSD), but in my experience it's pretty hard to make Perl play ball with that setup, unless those libs are linked in statically. I've had some successes doing that in the past, but it's not fun exercise... Cheers, -- Bert -- Bert Driehuis -- dri...@pl... -- +31-20-3116119 If the only tool you've got is an axe, every problem looks like fun! |
From: Mattia B. <mb...@ds...> - 2001-12-02 20:48:07
|
> On Sun, 2 Dec 2001, Mattia Barbon wrote: > > > > Unrecognized argument in LIBS ignored: '-pthread' > > I don't know if I can work around this ( for all platforms ), but I'll try > > I'm not sure it makes sense at this stage... Maybe not for this case, but I am sick of seeing Unknown option "-rdynamic" in LIBS: ignored everytime I build; and I don't think that Perl should strip arbitrary thinds from flags, either > > > but predictably with this voodoo the extension is not very stable (a bit > > > of clicking around in demo/samples/controls/controls.pl and some > > > resizing, and foom: a Perl crash without further traceback in xdr_u_int; > > > obviously a threadsafe/no threadsafe mismatch). > > > > > > FreeBSD 4.4, the Perl that came with it (5.005_03), wxWindows build from > > > the ports collection of FreeBSD 4.4 (wxgtk-2.2.7,1). > > You might try to rebuild wxWindows with --disable-threads ( and maybe > > gtk/glib ? ); unfortunately I can't reproduce this, because I don't > > havd FreeBSD, and on Linux building wxWindows with threads and perl without does work > > just fine. > > That would work, but that would cause other apps to fail :-( > > Alternatively I could build seperate non-threaded libraries just for > WxPerl (which, by the way, is not the only victim of the way threads are > handled on FreeBSD), but in my experience it's pretty hard to make Perl > play ball with that setup, unless those libs are linked in > statically. I've had some successes doing that in the past, but it's not > fun exercise... Does this really mean that if you have libwxgtk.so ( or whatever ) dynamically linked to a perl extension, this does not work ? and setting LD_LIBRARY_PATH ( or whatever it is on *BSD ) does not work either ? This is weird... OTOH, if you resolve this, would you mind writing some instructions to put on INSTALL.txt ? Regards Mattia |
From: Bert D. <dri...@pl...> - 2001-12-02 23:26:15
|
On Sun, 2 Dec 2001, Mattia Barbon wrote: > > Alternatively I could build seperate non-threaded libraries just for > > WxPerl (which, by the way, is not the only victim of the way threads are > > handled on FreeBSD), but in my experience it's pretty hard to make Perl > > play ball with that setup, unless those libs are linked in > > statically. I've had some successes doing that in the past, but it's not > > fun exercise... > Does this really mean that if you have > libwxgtk.so ( or whatever ) dynamically linked to a perl extension, > this does not work ? and setting LD_LIBRARY_PATH ( or whatever it is on *BSD ) does > not work either ? This is weird... LD_LIBRARY_PATH will be honored, but FreeBSD does not honor LD_RUN_PATH when building a .so (it does for the final app, but that would mean Perl itself, which is precisely what we don't need). > OTOH, if you resolve this, would you mind writing some instructions > to put on INSTALL.txt ? If I do (and that's a big if :-) I'll make sure I write up the recipy. Cheers, -- Bert -- Bert Driehuis -- dri...@pl... -- +31-20-3116119 If the only tool you've got is an axe, every problem looks like fun! |