Re: [PHP-GTK-DEV] Shared Extensions
by Steph other posts by this author
Jun 19 2007 8:13PM messages near this date
Re: [PHP-GTK-DEV] Shared Extensions
|
Re[2]: [PHP-GTK-DEV] Shared Extensions
Hi Bob,
Yeah 'Windows already does this' because the build system forces it. I think
it does the same in the PHP build system though, it's not automatically
linked. (I _think_ - it's been well over a year since I looked into this.)
It's probably better to go with fixing doze than *nix, assuming I'm right
about it not being related under doze. Then (assuming it works and that
wasn't why I did what I did in the first place) we need to change all the
main source files apart from php_gtk.c, which is actually the only correct
one.
If it doesn't work, there's another option that doesn't touch on either
build system. But I think it'd be cleaner to fix doze.
- Steph
> LOL.
> The way I was told, it used to work fine in Linux until someone went and
> fixed it for Windows, so I went and told the group of kids behind the
> drugstore who are anti-microsoft-without-a-cause the whole story without
> thinking twice.
>
> <winky face emoticon>
>
> I have crafted a fix which, "works on my box" without touching the main
> source at all, just the m4 file so Windows would not be affected.
> However Anant had some concerns about it that were over my head since it
> works without problems here, I will let him express those. It is
> attached to this thing :p
>
> I have only actually tested it on GtkExtra, GtkSourceView, and LibSexy.
> However as I already told Anant we also need to modify it so that the
> extensions are not "extra.so", "sourceview.so" and "libsexy.so" as they
> need some sort of prefix. I believe windows already does this.
>
> - bob.
>
> Steph Fox wrote:
> > Hi Anant,
> >
> > What took you guys so long anyway? ;)
> >
> > COMPILE_DL_* is the PHP version of events, and PHP-GTK is a PHP
> > extension. So of course, when writing my first and only extension, I
> > copied the #define format I saw in php_gtk.c. After all, "It works on my
> > box..."
> >
> > Please don't commit any fixes without testing on both platforms first,
> > in case that's been inadvertently used to distinguish between platforms
> > somewhere deep in the source. But it's just a case of testing for
> > extname=="php-gtk" in the EXTENSION() definition, where it says:
> >
> > cflags = "/D COMPILE_DL_" + EXT + "2 /D " + EXT + "_EXPORTS=1" + cflags;
> >
> > and adapting accordingly.
> >
> > - Steph
> >
> >
> >> Hi All,
> >>
> >> Bob (Majdak Jr.) has figured out why shared extensions haven't been
> >> working on *nix all this while, and I've traced the issue to this
> >> commit:
> >>
> >> http://cvs.php.net/viewvc.cgi/php-gtk/ext/libglade/php_libglade.c?r1=1.7&r2=1.8
> >>
> >>
> >> That commit changes #ifdef PHP_GTK_COMPILE_DL_LIBGLADE to #ifdef
> >> COMPILE_DL_LIBGLADE2. Apparently the windows build system defines
> >> COMPILE_DL_<extension>2, but the *nix system is still defining
> >> PHP_GTK_COMPILE_DL_<extension> whenever a shared extension is to be
> >> built.
> >>
> >> This has carried on into all the other extensions too, with the result
> >> being that none of them build as a shared .so on *nix.
> >>
> >> Can we agree on a single #define please? :)
> >>
> >> Cheers,
> >> --
> >> Anant
> >>
> >> --
> >> PHP-GTK Development Mailing List (http://gtk.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >
>
--------------------------------------------------------------------------------
> --
> PHP-GTK Development Mailing List (http://gtk.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thread:
Anant Narayanan
Steph Fox
Steph
Tom Rogers
Bob Majdak Jr
|