Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PHP-GTK Build problem...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
dreamsofxion
n00b
n00b


Joined: 29 Sep 2002
Posts: 37
Location: Memphis, TN

PostPosted: Fri Oct 18, 2002 3:26 am    Post subject: PHP-GTK Build problem... Reply with quote

I'm trying to build PHP-GTK to (a) run phpmole and (b) potentially do some "C" programming with PHP...but I can't get the bloody thing to compile, no matter what I try...
Here's what I get...
Code:

/usr/bin/php -q /home/jeff/phpmole/php-gtk-0.5.1/generator/generator.php -o ext/gtk%2b/gtk.overrides -p Gtk -r /home/jeff/phpmole/php-gtk-0.5.1/ext/gtk%2b/gdk.defs ext/gtk%2b/gtk.defs > gen_gtk.c
PHP Warning:  Unable to load dynamic library './php_gd.dll' - ./php_gd.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unable to load dynamic library './/etc/php4/lib/dbg.so' - .//etc/php4/lib/dbg.so: cannot open shared object file: No such file or directory in Unknown on line 0
Parsing file "ext/gtk+/gtk.defs".
Parsing file "/home/jeff/phpmole/php-gtk-0.5.1/ext/gtk+/gdk.defs".
Parsing file "ext/gtk+/gtk-extrafuncs.defs".
Could not write function gtk_button_box_child_requisition (parameter type int*)
Could not write function gtk_item_factory_parse_rc_scanner (parameter type GScanner*)
Could not write function gtk_item_factory_dump_items (parameter type GtkPatternSpec*)
Could not write function gtk_item_factory_dump_rc (parameter type GtkPatternSpec*)
Could not write function gtk_item_factory_print_func (parameter type gpointer)
Could not write function gtk_item_factory_popup_data_from_widget (return type gpointer)
Could not write function init_add (parameter type GtkFunction)
Could not write function preview_get_info (return type GtkPreviewInfo*)
Could not write function rc_set_default_files (parameter type gchar**)
Could not write function rc_get_default_files (return type gchar**)
Could not write function rc_add_widget_name_style (parameter type GtkRcStyle*)
Could not write function rc_add_widget_class_style (parameter type GtkRcStyle*)
Could not write function rc_add_class_style (parameter type GtkRcStyle*)
Could not write function rc_set_image_loader (parameter type GtkImageLoader)
Could not write function rc_find_pixmap_in_path (parameter type GScanner*)
Could not write function rc_parse_color (parameter type GScanner*)
Could not write function rc_parse_state (parameter type GScanner*)
Could not write function rc_parse_priority (parameter type GScanner*)
Could not write function gtk_draw_polygon (parameter type GdkPoint*)
Could not write function gtk_paint_polygon (parameter type GdkPoint*)
Could not write method GtkWidget::selection_add_targets (parameter type const-GtkTargetEntry*)
Could not write method GtkWidget::selection_clear (parameter type GdkEventSelection*)
Could not write method GtkWidget::destroyed (parameter type GtkWidget**)
Could not write method GtkWidget::modify_style (parameter type GtkRcStyle*)
Could not write method GtkWidget::path (parameter type guint*)
Could not write method GtkWidget::class_path (parameter type guint*)
Could not write method GtkPixmap::get (parameter type GdkPixmap**)
Could not write constructor gtk_image_new (parameter type GdkImage*)
Could not write method GtkImage::set (parameter type GdkImage*)
Could not write method GtkImage::get (parameter type GdkImage**)
Could not write method GtkTree::remove_items (parameter type GList*)
Could not write method GtkToolbar::append_item (parameter type GtkSignalFunc)
Could not write method GtkToolbar::prepend_item (parameter type GtkSignalFunc)
Could not write method GtkToolbar::insert_item (parameter type GtkSignalFunc)
Could not write method GtkToolbar::append_element (parameter type GtkSignalFunc)Could not write method GtkToolbar::prepend_element (parameter type GtkSignalFunc)
Could not write method GtkToolbar::insert_element (parameter type GtkSignalFunc)Could not write method GtkButtonBox::get_child_size (parameter type gint*)
Could not write method GtkButtonBox::get_child_ipadding (parameter type gint*)
Could not write method GtkCList::set_compare_func (parameter type GtkCListCompareFunc)
Could not write method GtkCTree::find_by_row_data_custom (parameter type gpointer)
Could not write method GtkCTree::find_all_by_row_data_custom (parameter type gpointer)
Could not write method GtkCTree::set_drag_compare_func (parameter type GtkCTreeCompareDragFunc)
Could not write method GtkWindow::set_geometry_hints (parameter type GdkGeometry*)
/usr/bin/php -q /home/jeff/phpmole/php-gtk-0.5.1/generator/generator.php -o ext/gtk%2b/gdk.overrides -p Gdk ext/gtk%2b/gdk.defs > gen_gdk.c
PHP Warning:  Unable to load dynamic library './php_gd.dll' - ./php_gd.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  Unable to load dynamic library './/etc/php4/lib/dbg.so' - .//etc/php4/lib/dbg.so: cannot open shared object file: No such file or directory in Unknown on line 0
Loading cache "ext/gtk+/gdk.defs.cache"
Could not write function draw_polygon (parameter type GdkPoint*)
Could not write function draw_text_wc (parameter type const-GdkWChar*)
Could not write function draw_image (parameter type GdkImage*)
Could not write function draw_points (parameter type GdkPoint*)
Could not write function draw_segments (parameter type GdkSegment*)
Could not write function draw_lines (parameter type GdkPoint*)

Flashes by really quickly at the start of the compile...and then it builds for a few minutes and I get...
Code:

gcc -I. -I/home/jeff/phpmole/php-gtk-0.5.1/ext/gtk+ -I/home/jeff/phpmole/php-gtk-0.5.1/main -I/home/jeff/phpmole/php-gtk-0.5.1 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include -I/usr/include/gnome-xml -I/usr/include/libglade-1.0 -I/home/jeff/phpmole/php-gtk-0.5.1/main -DHAVE_CONFIG_H -g -O2 -c gen_gtk.c  -fPIC -DPIC -o gen_gtk.lo
gen_gtk.c:1: parse error before '-' token
In file included from /usr/include/bits/types.h:143,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/stdio.h:45,
                 from /usr/include/php/Zend/zend.h:35,
                 from /usr/include/php/main/php.h:34,
                 from /home/jeff/phpmole/php-gtk-0.5.1/main/php_gtk.h:26,
                 from gen_gtk.c:3:
/usr/include/bits/pthreadtypes.h:48: parse error before "size_t"
/usr/include/bits/pthreadtypes.h:51: parse error before "__stacksize"
In file included from /usr/include/_G_config.h:44,
                 from /usr/include/libio.h:32,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/stdio.h:74,
                 from /usr/include/php/Zend/zend.h:35,
                 from /usr/include/php/main/php.h:34,
                 from /home/jeff/phpmole/php-gtk-0.5.1/main/php_gtk.h:26,
                 from gen_gtk.c:3:
/usr/include/gconv.h:72: parse error before "size_t"
/usr/include/gconv.h:85: parse error before "size_t"
/usr/include/gconv.h:94: parse error before "size_t"
/usr/include/gconv.h:170: parse error before "size_t"
/usr/include/gconv.h:173: parse error before '}' token
In file included from /usr/include/libio.h:32,
                 from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.2/include/stdio.h:74,
                 from /usr/include/php/Zend/zend.h:35,
                 from /usr/include/php/main/php.h:34,
                 from /home/jeff/phpmole/php-gtk-0.5.1/main/php_gtk.h:26,
                 from gen_gtk.c:3:
/usr/include/_G_config.h:47: field `__cd' has incomplete type
/usr/include/_G_config.h:50: field `__cd' has incomplete type
/usr/include/_G_config.h:52: confused by earlier errors, bailing out
make[3]: *** [gen_gtk.lo] Error 1
make[3]: Leaving directory `/home/jeff/phpmole/php-gtk-0.5.1/ext/gtk+'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/jeff/phpmole/php-gtk-0.5.1/ext/gtk+'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jeff/phpmole/php-gtk-0.5.1/ext'
make: *** [all-recursive] Error 1


...sorry for all the output, but I'm givin' you all as much info as I can, begging and pleading for help...I've tried everything I know. Although I've been using Linux for years, this is my first source-based distro...and generally when I've run into compile issues before I'd just wait a few days and find a RPM...but no longer will I resort to that...I'm learning and loving it...but...am also mildly frustrated...
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Fri Oct 18, 2002 12:27 pm    Post subject: Reply with quote

Looks like it is looking for some php extensions (as shared modules) at the begining (e.g: gd and dbg). Maybe they are required :?:

For gd you can add "gd" to your USE flags and emerge php again. As for dbg, I didn't see that option in the ebuild, so I guess you'll need to hack the ebuild to add it.

As for the couldn't wetie errors, maybe it is a permissions problem :?: I think you should file a bug about it to bugs.gentoo.org.
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
dreamsofxion
n00b
n00b


Joined: 29 Sep 2002
Posts: 37
Location: Memphis, TN

PostPosted: Fri Oct 18, 2002 1:15 pm    Post subject: Reply with quote

See...that's the thing...I know that it's wanting to find the PHP Extensions...but...
The ebuilds of PHP and mod_php both build all of the extensions into the executable itself, rather than building the .o extensions...and I can't make enough sense of the ebuild script (I know programming...not scripting, yet...) to figure out how to turn that off and have PHP build the extensions...

Personally, I find that also to be a bit of a security issue as well...as PHP builds all of the extensions it can into itself...but in my production server for the PHP code I write, I want to have fine-grained control over what extensions are loaded and what aren't...sure PHP building support for scripting in KDE is fine and dandy on my desktop...I'm not terribly concerned about security there...it's behind a server which is behind a firewall that resolves my NAT requests...so security on my desktop is not a concern, but I've thought about putting Gentoo on my server (rather than my highly modified RH 7.2) and haven't yet because of stuff like this...
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Fri Oct 18, 2002 1:40 pm    Post subject: Reply with quote

Well, modifying the ebuild is quite simple, so I don't see the problem there:

Look into src_compile function, for example the line about gd:
Code:
use gd && myconf="${myconf} --with-gd"


Just speicfy to php's configure script that you want it shared:
Code:
use gd && myconf="${myconf} --with-gd=shared"


Simple :-)
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
dreamsofxion
n00b
n00b


Joined: 29 Sep 2002
Posts: 37
Location: Memphis, TN

PostPosted: Fri Oct 18, 2002 2:09 pm    Post subject: Reply with quote

...*hangs head in shame*
Sorry...I'm still not very...learned in the ways of makefiles...I know my way around some PHP, Pascal, and Java...but as I'm a RPM-Distro convert, I've never done much compiling...so I'm having to do an entire paradigm shift...and learn a lot...

...but that looks so bloody simple that it will probably work...I have to wait until I get home from work to try...but...if it does, you will be my personal saviour...
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Fri Oct 18, 2002 3:05 pm    Post subject: Reply with quote

Ain't playing with stuff fun :?: ;-)

BTW, I'm not sure that it's necessary to have the modules as shared. Maybe the script tries to load them to make sure that required php functions are available to it. If the module is compiled into php, the functions are available already.

Would be intersting to investigate. Tell us how it goes please.

As for rpm mindset, you may find and like the power to modify and tweak packages when builiding from source :-)
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
dreamsofxion
n00b
n00b


Joined: 29 Sep 2002
Posts: 37
Location: Memphis, TN

PostPosted: Fri Oct 18, 2002 3:10 pm    Post subject: Reply with quote

Well, I know it's looking for the php_gd.dll or php_gd.o file...and hopefully the "shared" flag will compile those...as just a plain vanilla emerge of php doesn't...

...ye gods...I have 5 hours left at work and want to get home already so I can try this...I really need to set up my routing paths so I can SSH into my machine...
Back to top
View user's profile Send private message
dreamsofxion
n00b
n00b


Joined: 29 Sep 2002
Posts: 37
Location: Memphis, TN

PostPosted: Sat Oct 19, 2002 1:10 am    Post subject: Reply with quote

I still get the same bloody error...even after recompiling both PHP & mod_php to share modules...as far as I can tell, I have all the "requirements" listed for php-gtk on the phpmole page...but I can't get the damned thing to compile...
:cry:
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Tue Oct 22, 2002 12:22 am    Post subject: Reply with quote

Yes, I thought it shouldn't affect the build process. I would've investigated the "couldn't write..." errors, they seem to be the key.

Maybe you can ask php-gtk maintainer (or mailing list).

If I'll have time for it in the weekend I'll try to build it if you wish.

Anyway, for GUI programming, I recommend python instead of PHP, which seems more suitable (and more maintained) than php-gtk (IMHO).

And you have pygtk and PyQt in portage.
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
dreamsofxion
n00b
n00b


Joined: 29 Sep 2002
Posts: 37
Location: Memphis, TN

PostPosted: Tue Oct 22, 2002 1:21 pm    Post subject: Reply with quote

Well, the "Could not write function" errors are displaying errors that the compiler is having "writing" GTK windowing widget calls...it can't "write" the gtk_button_box_child_requisition function...there's a bunch of these function calls that it cannot write...which leads me to think a problem with either GTK (even tho I have both the most recent GTK 1.X and 2.X versions emerged in...) or PHP's inability to find the "php_gd.dll" and "dbg.so"...*grumble*

The reasons I'm not using PyQT:
(1) Don't have time to learn a new programming language at the moment...I'm already reletively affluent with PHP.
(2) Python is using QT. I'm a Gnome user, thus GTK is preferential.
(3) The application I would like to use to help me in writing my PHP code, phpmole, is written with PHP-GTK...

...but I've spent the past several days backing up my Windows data so I can rip it off my system, then I'm gonna try this build with a different distro or two...and if it works on one, I'm going to try and find out why it worked on that distro and not my Gentoo...
Back to top
View user's profile Send private message
mksoft
l33t
l33t


Joined: 28 May 2002
Posts: 844

PostPosted: Tue Oct 22, 2002 2:05 pm    Post subject: Reply with quote

dreamsofxion wrote:
Well, the "Could not write function" errors are displaying errors that the compiler is having "writing" GTK windowing widget calls...it can't "write" the gtk_button_box_child_requisition function...there's a bunch of these function calls that it cannot write...which leads me to think a problem with either GTK (even tho I have both the most recent GTK 1.X and 2.X versions emerged in...) or PHP's inability to find the "php_gd.dll" and "dbg.so"...*grumble*


I don't think it is module related, this needs further investigation.

Quote:

The reasons I'm not using PyQT:
(1) Don't have time to learn a new programming language at the moment...I'm already reletively affluent with PHP.


Python is better suited for gui programming than PHP, in php right now I feel like the state of GTK support is more like proof of concept.

If you've learned PHP, Python would be quite easy.

Quote:

(2) Python is using QT. I'm a Gnome user, thus GTK is preferential.



You haven't read my post carefully ;-) I also mentioned pygtk - which works with GTK (I think there's gnome support as well). You can even use glade and the resulting XML files with it.

Quote:

(3) The application I would like to use to help me in writing my PHP code, phpmole, is written with PHP-GTK...


That's another problem, but I only mentioned python as an idea.

I use vim/gvim for PHP developement, and latest Quanta is great for that.
_________________
There's someone in my head but it's not me - Pink Floyd
Back to top
View user's profile Send private message
nouse66
Apprentice
Apprentice


Joined: 09 Jan 2003
Posts: 194

PostPosted: Thu Feb 06, 2003 8:04 am    Post subject: Reply with quote

i'm trying to install p[/code]hp-gtk 0.5.2 and i'm getting this at the VERY begining of the process...
Code:

bash-2.05b$ ./buildconf
make[1]: *** No rule to make target `aclocal.m4', needed by `configure'.  Stop.
make: *** [all] Error 2


i tried running the command as root but that didnt help. i'm using php-4.3.0-r2

thanks,
aaron
Back to top
View user's profile Send private message
sergi34
n00b
n00b


Joined: 06 Nov 2002
Posts: 16
Location: Lleida

PostPosted: Thu Feb 20, 2003 11:16 pm    Post subject: Reply with quote

got the exactly same error :-(
Back to top
View user's profile Send private message
philby
n00b
n00b


Joined: 07 Mar 2003
Posts: 1

PostPosted: Fri Mar 07, 2003 11:20 am    Post subject: aclocal.m4 error Reply with quote

I had the same error.

To fix it i had to unpack the php source and copy a whole heap of files to /usr/lib/php/build (after creating the build dir). Run phpize in the php-gtk source dir it will show you what files need to be copied over.
Back to top
View user's profile Send private message
nacs
n00b
n00b


Joined: 21 Feb 2003
Posts: 41

PostPosted: Thu Mar 20, 2003 9:33 am    Post subject: Reply with quote

Could you give me a bit more detail on this please philby?

This is what I got out of your instructions:

1) tar jxvf the php-4.3.1 source
2) copy those files to /usr/lib/php/build
3) run phpize in the php-gtk source directory

But doing that gives me the same errors about not finding a number of files. Any help would be appreciated.
Back to top
View user's profile Send private message
mantis
Tux's lil' helper
Tux's lil' helper


Joined: 30 Jul 2002
Posts: 134
Location: Sydney

PostPosted: Sun May 25, 2003 12:59 pm    Post subject: Reply with quote

Has anyone found a fix to this? Its really bad, i cant compile it through CVS 0.5.1/2.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum