Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The INTL extension of PHP older than 7.4 cannot be compiled on Ubuntu 19.04 #1034

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

Closed
morozov opened this issue Jul 27, 2019 · 6 comments
Closed

Comments

@morozov
Copy link
Contributor

morozov commented Jul 27, 2019

$ phpbrew --debug install 7.3.7 +neutral +intl
===> phpbrew will now build 7.3.7
---> Parsing variants from command arguments '+neutral +intl'
===> Loading and resolving variants...
Checking distribution checksum...
Checksum matched: c3608fa7114642725854119ccffe722f42fc7c31e5e4c00d5cb4cb1a0d16bf18
===> Distribution file was successfully extracted, skipping...
Source Directory: /home/morozov/.phpbrew/build/php-7.3.7
Found existing Makefile, running make clean to ensure everything will be rebuilt.
You can append --no-clean option after the install command if you don't want to rebuild.
===> Running make clean: /usr/bin/make -C '/home/morozov/.phpbrew/build/php-7.3.7' --quiet 'clean'
Running Command:/usr/bin/make -C '/home/morozov/.phpbrew/build/php-7.3.7' --quiet 'clean'
Writing variant info to /home/morozov/.phpbrew/php/php-7.3.7/phpbrew.variants
===> Checking patches...
Checking patch for replace apache php module name with custom version name
Enabled variants: [intl, xml, opcache]
Disabled variants: []
Found existing build.log, renaming it to /home/morozov/.phpbrew/build/php-7.3.7/build.log.1564222024
===> Configuring 7.3.7...


Use tail command to see what's going on:
   $ tail -F /home/morozov/.phpbrew/build/php-7.3.7/build.log


./configure '--cache-file=/home/morozov/.phpbrew/cache/config.cache' '--prefix=/home/morozov/.phpbrew/php/php-7.3.7' '--with-config-file-path=/home/morozov/.phpbrew/php/php-7.3.7/etc' '--with-config-file-scan-dir=/home/morozov/.phpbrew/php/php-7.3.7/var/db' '--enable-intl' '--with-icu-dir=/usr' '--enable-dom' '--enable-libxml' '--enable-simplexml' '--enable-xml' '--enable-xmlreader' '--enable-xmlwriter' '--with-xsl' '--with-libxml-dir=/usr' '--enable-opcache' >> /home/morozov/.phpbrew/build/php-7.3.7/build.log 2>&1
Error: Configure failed:
The last 5 lines in the log file:
checking for Firebird support... no

checking whether to enable internationalization support... yes

checking for location of ICU headers and libraries... checking for pkg-config... /usr/bin/pkg-config

not found

configure: error: Unable to detect ICU prefix or /usr/bin/icu-config failed. Please verify ICU install prefix and make sure icu-config works.

Please checkout the build log file for more details:
	 tail /home/morozov/.phpbrew/build/php-7.3.7/build.log

Should be related to the Debian Bug #898820.

The problem is fixed in PHP 7.4 (php/php-src#3701).

@morozov morozov changed the title The INTL extejsion of PHP older than 7.4 cannot be compiled on Ubuntu 19.04 The INTL extension of PHP older than 7.4 cannot be compiled on Ubuntu 19.04 Jul 27, 2019
@morozov
Copy link
Contributor Author

morozov commented Jul 29, 2019

I think the same patch should have done that too? Try β€˜phpbrew ext install intl’

Interestingly, I can install INTL as a shared extension using phpbrew ext install intl but I cannot compile PHP with it as I used to on Ubuntu 16.04.

How do you think is the patch for ext/gd/config.m4 relevant to ext/intl/config.m4?

@morozov
Copy link
Contributor Author

morozov commented Jul 29, 2019

@rjocoleman ☝

@rjocoleman
Copy link

I'm not sure sorry, I don't use this extension in my projects, I was mistaken on my comment on the other issue.

@egorsmkv
Copy link

Related link to the issue https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=920900

@jasny
Copy link
Contributor

jasny commented May 26, 2020

As a workaround, I compiled ICU and copied ico-config to /usr/bin.

See this gist for icu-config for Ubuntu 20.04 LTS.

@MagicLegend
Copy link

MagicLegend commented Jan 16, 2021

Took me a moment to understand what @jasny meant. Hereby the for-dummies:

  • Take the raw script and save it on your machine:
    • curl https://gist.githubusercontent.com/jasny/e91f4e2d386e91e6de5cf581795e9408/raw/16e2c42136eb3f214222c80d492e71942b77f174/icu-config > icu-config
    • OR
    • wget https://gist.githubusercontent.com/jasny/e91f4e2d386e91e6de5cf581795e9408/raw/16e2c42136eb3f214222c80d492e71942b77f174/icu-config
  • Make the file executable:
    • chmod +x icu-config
  • Move the file to /usr/bin
    • sudo mv icu-config /usr/bin

Now try to rerun phpbrew.

@morozov morozov closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants