Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 5.2 can't be installed on Debian 7 #175

Closed
GM-Alex opened this issue Jan 15, 2014 · 16 comments
Closed

PHP 5.2 can't be installed on Debian 7 #175

GM-Alex opened this issue Jan 15, 2014 · 16 comments
Labels

Comments

@GM-Alex
Copy link
Member

GM-Alex commented Jan 15, 2014

If I try to install PHP 5.2 on Debian with

phpbrew install --old php-5.2.15 +default +intl

it fails with

libtool: unrecognized option -export-dynamic'
Trylibtool --help' for more information.
make: *** [sapi/cli/php] Error 1

This is similar to issue #83 but the solution don't work. I tried the the following tutorial (after using phpbrew to download all): http://tobyf.de/2013/03/php-5-2-auf-debian-wheezy/ (sorry only German, but the commands should be understandable) which seems to work. So I tried it using phpbrew with the parameters given in the tutorial to test if it works. This looks like this

phpbrew install --old php-5.2.15 --enable-force-cgi-redirect --enable-fastcgi --with-regex=php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --with-pcre-regex --enable-shmop --enable-sockets --enable-wddx --with-libxml-dir=/usr --with-zlib --with-openssl=/usr --enable-soap --enable-zip --with-mhash=yes --with-gd --with-mysql --with-mysqli --with-pdo-mysql --with-pear --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --with-ttf --with-freetype-dir=/usr --with-libdir=/lib/x86_64-linux-gnu/

which fails with the same error. So I tried the following

./configure --enable-force-cgi-redirect --enable-fastcgi --with-regex=php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --with-pcre-regex --enable-shmop --enable-sockets --enable-wddx --with-libxml-dir=/usr --with-zlib --with-openssl=/usr --enable-soap --enable-zip --with-mhash=yes --with-gd --with-mysql --with-mysqli --with-pdo-mysql --with-pear --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --with-ttf --with-freetype-dir=/usr --with-libdir=/lib/x86_64-linux-gnu/ --prefix=/opt/phpbrew/php/php-5.2.15 --with-config-file-path=/opt/phpbrew/php/php-5.2.15/etc --with-config-file-scan-dir=/opt/phpbrew/php/php-5.2.15/var/db --with-pear=/opt/phpbrew/php/php-5.2.15/lib/php

with

make

Which should be the same but works. So it seems very strange to me...

@GM-Alex
Copy link
Member Author

GM-Alex commented Jan 22, 2014

No one any idea?

@chadrien
Copy link
Contributor

I think it's not exactly the same. @c9s will confirm but I think you should do phpbrew install --old php-5.2.15 -- --enable-force-cgi-redirect --enable-fastcgi --with-regex=php --enable-calendar --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-bcmath --with-bz2 --enable-ctype --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --with-pcre-regex --enable-shmop --enable-sockets --enable-wddx --with-libxml-dir=/usr --with-zlib --with-openssl=/usr --enable-soap --enable-zip --with-mhash=yes --with-gd --with-mysql --with-mysqli --with-pdo-mysql --with-pear --with-jpeg-dir=/usr/lib --enable-gd-native-ttf --with-ttf --with-freetype-dir=/usr --with-libdir=/lib/x86_64-linux-gnu/ (note the --, cf. https://github.com/c9s/phpbrew#extra-configure-options)

I don't have any debian VM to test it atm, could you try it?

@c9s
Copy link
Member

c9s commented Jan 22, 2014

Hi @GM-Alex,

Please see https://github.com/c9s/phpbrew/wiki/Troubleshooting#install-php5324-and-it-reports-unrecognized-option--export-dynamic , I guess it's caused by iconv or gettext extension.

you can also run php-config to see the configure options of your current local running php.

Pedro

@c9s
Copy link
Member

c9s commented Jan 22, 2014

Sorry I just saw you added +intl, then I don't know the reason, maybe search on bug.php.net or see the configure options from debian PHP package?

@pkordylewski
Copy link
Contributor

I would be really interested in any solution here, having the same problem for ages now. Can't get PHP 5.2 running on Debian 7.

@GM-Alex
Copy link
Member Author

GM-Alex commented Jan 24, 2014

The problem must in phpbrew. Because the two commands (the one via phpbrew and the stuff "by hand") should be exactly the same. phpbrew must do something different. If I reviewed the code right phpbrew runs the config command and then the make command, right?

@chadrien
Copy link
Contributor

@GM-Alex : did you tried after adding the -- as I suggested you?

On Debian 7.1, I managed to run this command, I went through the configure but then crashed during make

I'll try on a Debian 7 in virtualbox this week end

@GM-Alex
Copy link
Member Author

GM-Alex commented Jan 26, 2014

Yes I already tried it with --. I missed that above in the code snipped I posted. Maybe it's the patch which is hardcoded in the source of phpbrew?!?

@chadrien
Copy link
Contributor

Maybe, I saw that when installing 5.2, phpbrew is applying a patch for 5.4. It's possibly normal as the patch corrects things for both 5.2 and 5.4, I don't know yet.

I didn't have the time to test phpbrew on debian this week end, but I'll definitely do it tonight.

@c9s
Copy link
Member

c9s commented Jan 27, 2014

Added a patch for CXX patch at 16ba00d

On Mon, Jan 27, 2014 at 4:18 PM, Hadrien Collongues <
notifications@github.com> wrote:

Maybe, I saw that when installing 5.2, phpbrew is applying a patch for
5.4. It's possibly normal as the patch corrects things for both 5.2 and
5.4, I don't know yet.

I didn't have the time to test phpbrew on debian this week end, but I'll
definitely do it tonight.

Reply to this email directly or view it on GitHubhttps://github.com//issues/175#issuecomment-33348469
.

Best Regards,

Yo-An Lin

@GM-Alex
Copy link
Member Author

GM-Alex commented Feb 6, 2014

The pull request I send solved the problem for me.

@alwinmark
Copy link

Same Problem still here installing 5.3.X on Ubuntu with phpbrew:

phpbrew - 1.13.0
cliframework core: 1.5.12

Maybe the patch is totally screwed?

One thing maybe pointing to that issue are these lines from the log output:

===> php-5.3.28.tar.bz2 downloaded.
Found existing php-5.3.28, Skip extracting.
===> Applying patch file for freetype include path bug...
patching file configure
Hunk #1 succeeded at 38287 (offset -926 lines).
patch unexpectedly ends in middle of line
Hunk #2 succeeded at 40185 with fuzz 1 (offset -1210 lines).
===> Configuring 5.3.28...

@GM-Alex
Copy link
Member Author

GM-Alex commented Feb 18, 2014

There was no new release since the merge of my changes...

@c9s
Copy link
Member

c9s commented Feb 18, 2014

oh almost forgot.. sorry

1.13.1 just got released! please take a look.

@alwinmark
Copy link

but still the patch for php5.3.x seems to be broken (I mean that file that got downloaded during the installation, but "unexpectedly ends in middle of line")

@marcioAlmada
Copy link
Member

Same as #492 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants