You are not logged in.

#1 2007-07-20 20:17:15

Ovide
Member
Registered: 2007-07-20
Posts: 12

how to get php with zip support with pacman?

I followed the LAMP tutorial on the wiki
It went succesfull but I need php with zip support. So I need the ./configure --with-zip option.
How can I get this trough pacman? I must do it with pacman because I can't compile php myself because it doens't work. The pacman php installation works great... but it doesn't have zip support sad

Offline

#2 2007-07-20 20:20:29

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

get the pkgbuild from abs or cvs, add --with-zip to the configure line. run makepkg. tada!

Offline

#3 2007-07-20 20:58:53

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

thank you for the first hint smile

now I got a problem with makpkg :s
I get this error: /usr/bin/makepkg: line 917: build: command not found
==> ERROR: Build Failed.  Aborting...

and when I tried the makepkg command with the original PKGBUILD file it did just fine.. so I concluded that I inserted --with-zip wrong

How and where do I insert --with-zip correctly ?

Edit:
with the original file it went wrong also (it was still running when I typed the above)
I get the error:

make: *** [ext/dom/attr.lo] Error 1
==> ERROR: Build Failed.  Aborting...

Last edited by Ovide (2007-07-20 21:00:39)

Offline

#4 2007-07-20 21:02:04

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

--enable-dbase \
    --enable-pcntl"

That's the end of the configure line in the PKGBUILD. Change it to this:

--enable-dbase \
    --with-zip \
    --enable-pcntl"

Offline

#5 2007-07-20 21:11:42

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

Thank you for the second hint smile

it accepted the change in te PKGBUILD

but now get an error after makepkg:

In file included from /var/abs/local/php-5.2.4-4/src/php-5.2.3/main/php.h:34,
                 from /var/abs/local/php-5.2.4-4/src/php-5.2.3/ext/dom/attr.c:26:
/var/abs/local/php-5.2.4-4/src/php-5.2.3/Zend/zend.h:657:29: error: suhosin_globals.h: No such file or directory
make: *** [ext/dom/attr.lo] Error 1
==> ERROR: Build Failed.  Aborting...

Do you have another great hint ?

Offline

#6 2007-07-20 21:14:04

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

use pastebin and post the entire pkgbuild please.

Offline

#7 2007-07-20 21:33:25

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

PKGBUILD

Edit:
earlier I said:

but now get an error after makepkg:

I meant during makekpg..

Last edited by Ovide (2007-07-20 21:56:37)

Offline

#8 2007-07-20 21:59:19

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

pkgbuild looks fine, are you sure it's applying the suhosin patch?

Offline

#9 2007-07-20 22:09:57

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

I don't know how to check that... the directory looks like this:

CVE-2007-2872.patch  php.ini      src
PKGBUILD             php.install  suhosin-patch-5.2.3-0.9.6.2.patch.gz
php-5.2.3.tar.bz2    pkg

I followed the wiki on ABS so far, you mentioned "abs or cvs", should I try it with cvs? (and if yes, how ?)

Last edited by Ovide (2007-07-20 22:11:13)

Offline

#10 2007-07-20 22:30:39

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

should be the same. try this:

cd src/php-5.2.3
patch -Np1 -i ../susuhosin-patch-5.2.3-0.9.6.2.patch

Tell me what the output says.
Then run 'make' again.

Offline

#11 2007-07-20 23:26:49

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

output:
http://pastebin.com/f1e2500d4

after that I ran makepkg in the /var/abs/local/php../ again (I thought you meant that by run 'make')

but I got a sortlike error :

In file included from /var/abs/local/php-5.2.4-4/src/php-5.2.3/main/php.h:34,
                 from /var/abs/local/php-5.2.4-4/src/php-5.2.3/ext/dom/attr.c:26:
/var/abs/local/php-5.2.4-4/src/php-5.2.3/Zend/zend.h:657:29: error: suhosin_globals.h: No such file or directory
In file included from /var/abs/local/php-5.2.4-4/src/php-5.2.3/ext/dom/attr.c:26:
/var/abs/local/php-5.2.4-4/src/php-5.2.3/main/php.h:463:27: error: suhosin_patch.h: No such file or directory
make: *** [ext/dom/attr.lo] Error 1
==> ERROR: Build Failed.  Aborting...

Last edited by Ovide (2007-07-20 23:28:01)

Offline

#12 2007-07-21 00:03:45

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

I'm not sure whats going on but it doesn't seem to patch properly. and when I meant 'make' i meant 'make', not makepkg. in the same dir after you do 'cd src/php-5.2.3/' apply the patch again, then just type 'make'. If there is any error again, post the last 20-30 lines you see (in pastebin).

Offline

#13 2007-07-21 01:12:08

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

after patching I did make, it ran for a few minutes and then gave me this:

http://pastebin.com/f34aa4fcc

Offline

#14 2007-07-21 03:11:18

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

yea i'm out of ideas...

Offline

#15 2007-07-21 10:06:58

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,914

Re: how to get php with zip support with pacman?

#
/var/abs/local/php-5.2.4-4/src/php-5.2.3/ext/standard/browscap.c: In function 'zif_get_browser':
#
/var/abs/local/php-5.2.4-4/src/php-5.2.3/ext/standard/browscap.c:285: internal compiler error: Aborted

This looks like the important part of the message.

Check line 285 in /var/abs/local/php-5.2.4-4/src/php-5.2.3/ext/standard/browscap.c if there's anything weird in it or in the function 'zif_get_browser'

Last edited by Lone_Wolf (2007-07-21 10:07:13)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#16 2007-07-21 12:09:47

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

Hmm, it might indeed be the important part for there is no "standard" dir..

[root@CosaServer php-5.2.3]# cd /etc/s
samba/          services        skel/           sudoers
screenrc        shadow          smbnetfs/       sudoers.pacnew
scsi_id.config  shadow-         ssh/            sysctl.conf
securetty       shadow.pacnew   ssl/            syslog-ng.conf
security/       shells          start_udev

How do I proceed ?

Last edited by Ovide (2007-07-21 12:10:29)

Offline

#17 2007-07-22 10:13:36

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,914

Re: how to get php with zip support with pacman?

You're looking in the wrong place, the problem is in the sourcecode of the package.

As you build the package in /var/abs/local/php-5.2.4-4 go there and check the src/php-5.2.3/ext/standard folder.
There should be a file browscap.c in that folder .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Online

#18 2007-07-22 23:53:40

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

http://pastebin.com/ff9469f7

Line 6 is line 285 from the browscap.c

Offline

#19 2007-07-23 00:00:12

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

make clean
MAKEFLAGS="-j1" make

try that and see. if you get the internal compiler error again, run 'make' again and see if you get the same error.

Offline

#20 2007-07-23 00:22:33

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

With the makeflags I got this when it stopped:
http://pastebin.com/f7c4510e3

And with just make I got this: (I didn't do make clean after the makeflags make... should I have done that ?)
http://pastebin.com/f5a640d30

Same type error..

Offline

#21 2007-07-23 20:11:56

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

I gave it a couple of tries again today.

I upgraded the whole system (pacman -Syu) and I ran abs again and copied the resulting php dir to /var/abs/local/phptaketwo
As first benefit from this action, it connected to the web to get de php source when I did makepkg. So I have at least the last version (although it might not be the last snipet..and maybee I already had the last version)

After trying makepkg and /src/php.../make some times I concluded that the error is quite random but it always has the form of:

make: *** [some/path/foo.lo] Error 1

(e.g. make: *** [ext/standard/array.lo] Error 1)
and after that the proces aborts.. As I said I tried that a couple of times but never getting exact the same error..
This type of error is experienced by others (I knew after googling) but nobody has an instant fix.. or even a clear fix.

Edit: I was just told that de variety in error is due to me not doing make clean between te tries..(=me being beginner tongue)

Last edited by Ovide (2007-07-23 20:29:56)

Offline

#22 2007-07-23 21:03:08

FeatherMonkey
Member
Registered: 2007-02-26
Posts: 313

Re: how to get php with zip support with pacman?

I have done this, as tardo suggested in post #4.

Though I used the one from /var/abs/devel/php and didn't move it, but I can't see why moving it should be causing problems. This is my php.info page through the php parser, as I'm likely not to use the zip bit I'm not 100% sure but it compiled fine. 878838302_b025e26a91.jpg?v=0

Offline

#23 2007-07-23 21:32:11

tardo
Member
Registered: 2006-07-15
Posts: 526

Re: how to get php with zip support with pacman?

run 'make clean' first. That way you can rebuild the previous object files and relink them. Keep running the make command with the MAKEFLAGS options until you keep getting the same error.

Offline

#24 2007-07-24 23:21:26

Ovide
Member
Registered: 2007-07-20
Posts: 12

Re: how to get php with zip support with pacman?

Amazing it worked! Thank you very much for your help smile

I will try to explain what I learned, because I see alot of threads on the internet not having a proper end were others may benefit from.

The error I mentioned in post 3 was caused by me, I deleted an " by accident in the PKGBUILD file. Oh and by the way, I should have been talking about "--enable-zip" and not "--with-zip" (changed with php5)

The error I mentioned in post 5 was due to strange behaviour of makepkg and the suoshin patch. When I did makepkg the second time the patch ran into it's previous files and makepkg asks if you want to delete them. If you say yes, they will be deleted but for some reason the patch doesn't make new files. Well that caused some confusion. But at post 11 I moved on to the next errors.

All problems after post 11 where related to an failing php make. There was a wide variety of errors which I still don't understand. It worked because I run make several times without make clean. So each error (mostly similiar to the one in post 21) was skipped in the next make I did. In the end it finaly got trough all the errors and compiled. After that the install went smooth with pacman.  I don't know or ignoring the errors from the php make is a good thing to do (any look on that?). I also did not yet tested the server good.. but it seems to work fine.

Again, thank you for your help!

Last edited by Ovide (2007-07-24 23:23:38)

Offline

Board footer

Powered by FluxBB