This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 459548 - Review Request: php-gtk - GTK PHP extension
Review Request: php-gtk - GTK PHP extension
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: Package Review (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nobody's working on this, feel free to take it
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-19 18:06 EDT by Patrice FERLET
Modified: 2010-11-01 10:46 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-11-14 13:31:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
php-gtk-2.0.0 compiled against Fedora's PHP 5.2.6 (4.92 MB, application/octet-stream)
2008-08-23 09:20 EDT, Keith Roberts
no flags Details
Screen shot of PHP5 running a php-gtk enabled script (210.54 KB, image/jpeg)
2008-08-24 13:02 EDT, Keith Roberts
no flags Details

  None (edit)
Description Patrice FERLET 2008-08-19 18:06:05 EDT
Spec URL: http://www.metal3d.org/repo/fedora/9/SPECS/php-gtk2.spec
SRPM URL: http://www.metal3d.org/repo/fedora/9/SRPMS/php-gtk-2.0.1-1.fc9.metal3d.src.rpm
Description: 
PHP-GTK is an extension for the PHP programming language that 
implements language bindings for GTK+. It provides an object-oriented 
interface to GTK+ classes and functions and greatly simplifies
writing client-side cross-platform GUI applications

RPMlint output:
[builder@localhost ~]$ rpmlint rpmbuild/RPMS/i386/php-gtk-2.0.1-1.fc9.metal3d.i386.rpm 
php-gtk.i386: W: incoherent-version-in-changelog 2.0.1-1.fc9 2.0.1-1.fc9.metal3d
1 packages and 0 specfiles checked; 0 errors, 1 warnings.

That's because I used my repotag "metal3d"

Examples are in /usr/share/ php-gtk documentation after install. It works great :)
Comment 1 Patrice FERLET 2008-08-20 18:51:00 EDT
Spec URL: http://www.metal3d.org/repo/fedora/9/SPECS/php-gtk2.spec
SRPM URL:
http://www.metal3d.org/repo/fedora/9/SRPMS/php-gtk-2.0.1-2.fc9.metal3d.src.rpm

New release, this is some ideas taken on:
http://rpms.famillecollet.com/files/php-gtk.spec for PHP 5.3

I need to be sponsored, if someone can help me...
Comment 2 Keith Roberts 2008-08-23 09:11:58 EDT
Will this work on Fedora 8 please? I have compiled php-gtk-2.0.0 on Fedora 8, but when I load it as a PHP extension it breaks my connections to localhost.
Comment 3 Keith Roberts 2008-08-23 09:20:03 EDT
Created attachment 314865 [details]
php-gtk-2.0.0 compiled against Fedora's PHP 5.2.6 

[root@karsites modules]# php -v
PHP 5.2.6 (cli) (built: May  8 2008 08:53:44)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies with Xdebug v2.0.3, Copyright (c) 2002-2007, by Derick Rethans

When I tell php.ini to load the php_gtk2.so  extension, I cannot access a file with phpinfo() function from my browser. I get 'connection to localhost is broken'. I get that with *anything* I try to load into my browser with this extension loaded. As soon as I remove the extension and restart httpd, the error goes away.
Comment 4 Keith Roberts 2008-08-24 13:00:03 EDT
My problem appears I was trying to use the same /etc/php.ini for my apache web server as well as for the CLI version of PHP. I made another php.ini file, and used that for loading and running the php_gtk2.so extension. Then used the following C/L to run a php-gtk test script:

[root@karsites demos]# php -c /etc/php-cli/php.ini -f phpgtk2-demo.php

This works OK now, as you can see by the enclosed attachment.
Comment 5 Keith Roberts 2008-08-24 13:02:43 EDT
Created attachment 314885 [details]
Screen shot of PHP5 running a php-gtk enabled script
Comment 6 Patrice FERLET 2008-09-08 12:02:43 EDT
yes, in fact you don't have to run "php" but "php-gtk". This is done to not enable gtk extension in php.ini wich can create errors with Apache.

php-gtk script (installed with package) will enable extension to run you script.

Regards
Comment 7 Itamar Reis Peixoto 2009-01-18 22:23:20 EST
please fix %patch line

should be somthing like this

%Patch0 -p1


this is your first package ?

what's your fedora account (FAS) user name ?
Comment 8 Patrice FERLET 2009-01-19 04:30:46 EST
Hi, 

I will fix and do some changes for F10. Another problem appears with xulrunner that I have to correct.

I've got a lot of work since 6 month, but I will have more time soon...

I've already done some packages for my own repository, but none has ever been registered with Fedora.

I have no FAS for now.

Regards,
Comment 9 Itamar Reis Peixoto 2009-01-19 05:58:46 EST
unfortunately I can't review your package you need to be sponsored first

please follow the guidelines.

https://fedoraproject.org/wiki/PackageMaintainers/Join

look at "Get a Fedora Account"
Comment 10 Patrice FERLET 2009-01-19 06:06:59 EST
I already ask for sponsor when I packaged Screenlets (refused because licence was not really free...) and roadsend-PHP...

I've got aloready read this page, but I don't know why my demand was not accepted again (since 1 year).

So, if someone can sponsor :) help !

Have I to create a review with a new subject ?
Comment 11 Itamar Reis Peixoto 2009-01-19 06:18:30 EST
no.

http://admin.fedoraproject.org/accounts/

what's your fedora account name in Fedora Account System (FAS) ?

when you finish to create your account please join the fedora package group in FAS.

to get sponsored please post your fas username here.
Comment 12 Patrice FERLET 2009-01-19 08:57:37 EST
Alright, I have created my account. I didn't undestood what was missing :)

Ok my FAS is "metal3d".

Thanks !
Comment 13 Renich Bon Ciric 2009-05-01 00:59:27 EDT
what has happened with this?
Comment 14 Patrice FERLET 2009-06-17 05:51:11 EDT
Since several month I'm full of work and I couldn't work on packages. I will work on my packages soon.

For now, I have to use F11 and recompile my packages.

Regards
Comment 15 Mamoru TASAKA 2009-07-11 12:36:01 EDT
Hi!

Patrice, would you still want to import this package into
Fedora? If so, please post your newest spec/srpm again and
I will try to review this ticket.
Comment 16 skaterkate103 2009-07-21 14:14:39 EDT
Patrice, have you already compiled a package for F11?
Comment 17 skaterkate103 2009-07-21 20:45:24 EDT
Patrice, have you already compiled a package for F11?
Comment 18 Remi Collet 2009-07-22 11:40:28 EDT
AFAIR it doesn't build against php 5.3 (now in rawhide) this is the main reason why i didn't do the review...

+
Comment 19 Patrice FERLET 2009-08-31 06:01:12 EDT
Excuse me, really buzy this last months (preparing my wedding, holliday...) so I'm back now !

I will recreate package tonight ! Thanks 

Regards,
Comment 20 Renich Bon Ciric 2009-08-31 14:23:12 EDT
Whoa! Well, here in México, to the guys, we say "I'm so sorry!" I hope you enjoy your vacation ;)

Oh, yeah... and... the package... yeah
Comment 21 Patrice FERLET 2009-09-02 03:58:07 EDT
Package has some compilation troubles, but I know how to correct. I think it will be readdy this week :)
Comment 22 Patrice FERLET 2009-09-04 03:47:44 EDT
Compiles on fedora 11... not rawhide. I did some modifications and I will put it on my server today.

Rawhide uses PHP 5.3 and PHP-GTK doesn't compile. I know that Remy Collet tries to compile.
Comment 23 Mamoru TASAKA 2009-09-04 03:55:20 EDT
Well, actually I don't know PHP well, however if you have a srpm
which compiles on F-11, it is highly appreciated if you upload
the srpm anyway. Maybe someone (maybe including me) can help with
get your srpm built on rawhide.
Comment 24 Remi Collet 2009-09-06 01:59:38 EDT
Yes it doesn't build against php 5.3.0, even CVS version (it's the main reason why I didn't do the review as I'm using it for more than a year)

I have also note than for EL5, you need to set the LD_LIBRARY_PATH to xulrunnner library directory (to be check again, my tests are old).

As my tests are quite old, I will do more with latest SVN where some commit seems php 5.3.0 related.
http://svn.php.net/viewvc/gtk/php-gtk/trunk/

If ok, it seems reasonnable to do a review for 2.0.1 stable for fedora 10+11 and for a SVN snapshot for rawhide (various other extension runs beta or patched version in rawhide for this)
Comment 25 Mamoru TASAKA 2009-09-06 06:11:49 EDT
Well, while I am not familiar with PHP:

I based on http://www.metal3d.org/repo/fedora/9/SRPMS/ ,
modified for rawhide and succeeded to build on rawhide:
http://koji.fedoraproject.org/koji/taskinfo?taskID=1658076
srpm is under
http://koji.fedoraproject.org/scratch/mtasaka/task_1658076/
! Note that I just tried to build on rawhide and did not
  try anything else (i.e I have not checked any packaging
  guideline issue)

Two thing:
- The reason vanilla php-gtk 2.0.1 won't build due to error messages
  like
--------------------------------------------------
ext/gtk+/gen_gtk.c: At top level:
ext/gtk+/gen_gtk.c:1531: error: duplicate 'static'
ext/gtk+/gen_gtk.c:1542: error: duplicate 'static'
ext/gtk+/gen_gtk.c:1548: error: duplicate 'static'
ext/gtk+/gen_gtk.c:1554: error: duplicate 'static'
--------------------------------------------------
  is due to a slight API change in /usr/include/php/Zend/zend_API.h:
--------------------------------------------------
 #define ZEND_BEGIN_ARG_INFO_EX(name, pass_rest_by_reference, return_reference, required_num_args)      \
-       zend_arg_info name[] = {                                                                                                        
                                        \
+       static const zend_arg_info name[] = {                                                                                           
                                                \
                { NULL, 0, NULL, 0, 0, 0, pass_rest_by_reference, return_reference, required_num_args },
------------------------------------------------------

  So simply removing "static" before using ZEND_BEGIN_ARG_INFOXXXXXXX
  in php-gtk source code will solve this.
  The following script is _very slow_ however it will work anyway:
-------------------------------------------------------
%if 0%{?fedora} >= 12
set +x
echo "Fixing source code for PHP 5.3.0 ..."
grep -rl '^ZEND_' . | while read file
do
   cp -pf $file $file.orig
   echo -n -e "\tfor $file ... "
   (
      sed -i -e 's|^static$||' $file
      line=0
      num=0
      num_a=0
      hold=0
      cat $file.orig | while read line
      do
         num=$((num + 1))
         num_a=$((num_a + 1))
         if [ $num_a -ge 10000 ] ; then num_a=0 ; echo -n "*" ; fi
         if [ $hold = 1 ] ; then
            hold=0
            if echo $line | grep -vq '^ZEND_' ; then
              num_b=$((num - 1))
              sed -i -e "${num_b}s|^.*$|static|" $file
            fi
         fi
         if echo $line | grep -q '^static$' ; then hold=1 ; fi
      done
   )
   echo -e "\tdone"
done
set -x
--------------------------------------------------------------------

- And the following patch is needed
  http://rpms.famillecollet.com/files/php-gtk-php53.patch

  (the argument of zend_set_timeout() changed)
Comment 26 Mamoru TASAKA 2009-09-09 11:30:25 EDT
So Patrice, would you modify your spec file (if there is something
which needs fixing) and upload the new spec/srpm again?
Comment 27 Mamoru TASAKA 2009-09-09 15:37:03 EDT
By the way it seems parallel make fails sometimes
http://koji.fedoraproject.org/koji/taskinfo?taskID=1665741

This build log shows that some needed header files are not
correctly created before some source codes which try to "include"
those header files. So either fixing Makefiles or removing
parallel make is needed.
Comment 28 Patrice FERLET 2009-09-15 05:27:54 EDT
I will add this on spec file. Let me some time to do this. My wedding is this week-end and I'm very very busy for 3-4 days :)
Comment 29 Mamoru TASAKA 2009-10-05 14:40:52 EDT
ping again?
Comment 30 Mamoru TASAKA 2009-10-23 10:20:31 EDT
again ping??
Comment 31 Mamoru TASAKA 2009-11-01 10:56:50 EST
Again ping?
Comment 32 Mamoru TASAKA 2009-11-07 12:35:00 EST
I will close this bug as NOTABUG if no response is received from
the reporter with ONE WEEK.
Comment 33 Mamoru TASAKA 2009-11-14 13:31:41 EST
Once closing.

If someone wants to import this package into Fedora, please open
a new review request and mark this package as a duplicate of
the new one.

Thank you!
Comment 34 Patrice FERLET 2009-11-17 05:27:27 EST
Back...

Sorry for latence... But my account had troubles... And I had problems to login.

For now, PHP-GTK 5.3 won't work... lot of bugs... lot of crashes. I am doing some patches. I know that I take my time to give you fresh news, but please, let me some time...

I packaged 3 other rpms... and time is hard to find ! ;)
Comment 35 Valent Turkovic 2010-11-01 10:46:39 EDT
If you still need php-gui you can follow instructions on how to compile it here:

http://kernelreloaded.blog385.com/index.php/archives/phoronix-test-suite-with-gui-on-fedora-just-a-step-away/

Note You need to log in before you can comment on or make changes to this bug.