-
Notifications
You must be signed in to change notification settings - Fork 363
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
Still unable to compile gd for php7.2 / 7.3 in Ubuntu 20.04.1 LTS using freetype #1213
Comments
It seems the url request in #1044
Resolves to a not found Maybe that's the reason? |
I tracked another version of the patch, I created a gist to download it at |
Even if I install GD with the patch, still it's not working correctly with Freetype. That's on PHP 7.3 E.g.
However in phpinfo it shows
|
Hi! in case it helps, I have just successfully installed GD extension with Freetype support. What I figured out was that the configuration script seems to be expecting some flags to enable support for some libraries, aside from the flags that you are already using to specify the libraries' dir: I added the flags
(not sure whether the other flags make a difference, to be honest - just grabbed the base command from somewhere else) One thing that helped me figure out this (just in case it's useful for somebody in the future to figure out some different situation) was to enable the debug flag (-d): in the output I read "checking for FreeType 2... no". With this in mind, I checked phpbrew's build dir for the string "freetype": |
Hi, the issue is.with php7.2 and 7.3 but you're building php 7.4 |
You are indeed correct, my bad. |
I'm coming back up with this as I still can't install it correctly with freetype. More specifically I can't make function imageftbbox appear after compilation on php 7.2 and 7.3 no matter what options I try My latest attempt on Ubuntu 20.04
Debug result
However even though gd compiles correctly and shows that freetype support is enabled
It actually isn't installed correctly as
For the love of god how do we install it correctly on 7.2 and 7.3 ? 7.4 works perfectly fine but 7.2 and 7.3 not. |
After digging this issue, I found that the problem is about the The To resolve above issue, I use the following steps to build and compile the
After completing above steps, running the following commands to verify the
|
I try to use above solution for two times, and it's worked successfully. I'm going to close the issue. |
I've read issue #1033 however none of the suggestions there helped me install correctly with freetype. The issue persists for both php 7.2 and php 7.3 for me.
Output
root@devhub01 ~ # phpbrew --debug ext install gd -- --with-freetype-dir="/usr/include" --with-jpeg-dir=/usr; # or replace with the library path
===> Installing gd extension...
Extension path /opt/phpbrew/build/phpbrew7_3_25_fdev/ext/gd
Log stored at: /opt/phpbrew/build/phpbrew7_3_25_fdev/ext/gd/build.log
Changing directory to /opt/phpbrew/build/phpbrew7_3_25_fdev/ext/gd
===> Phpize...
Running Command:phpize > /opt/phpbrew/build/phpbrew7_3_25_fdev/ext/gd/build.log 2>&1
===> Configuring...
Appending argument: --with-php-config=/opt/phpbrew/php/phpbrew7_3_25_fdev/bin/php-config
Running Command:./configure '--with-freetype-dir=/usr/include' '--with-jpeg-dir=/usr' '--with-php-config=/opt/phpbrew/php/phpbrew7_3_25_fdev/bin/php-config'
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /opt/phpbrew/php/phpbrew7_3_25_fdev
checking for PHP includes... -I/opt/phpbrew/php/phpbrew7_3_25_fdev/include/php -I/opt/phpbrew/php/phpbrew7_3_25_fdev/include/php/main -I/opt/phpbrew/php/phpbrew7_3_25_fdev/include/php/TSRM -I/opt/phpbrew/php/phpbrew7_3_25_fdev/include/php/Zend -I/opt/phpbrew/php/phpbrew7_3_25_fdev/include/php/ext -I/opt/phpbrew/php/phpbrew7_3_25_fdev/include/php/ext/date/lib
checking for PHP extension directory... /opt/phpbrew/php/phpbrew7_3_25_fdev/lib/php/extensions/no-debug-non-zts-20180731
checking for PHP installed headers prefix... /opt/phpbrew/php/phpbrew7_3_25_fdev/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 1.3 (ok)
checking for gawk... gawk
checking for GD support... yes, shared
checking for the location of libwebp... no
checking for the location of libjpeg... /usr
checking for the location of libpng... no
checking for the location of libz... no
checking for the location of libXpm... no
checking for FreeType 2... /usr/include
checking whether to enable JIS-mapped Japanese font support in GD... no
If configure fails try --with-webp-dir=
checking for jpeg_read_header in -ljpeg... yes
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=
configure: error: freetype-config not found.
Error: Command failed: ./configure '--with-freetype-dir=/usr/include' '--with-jpeg-dir=/usr' '--with-php-config=/opt/phpbrew/php/phpbrew7_3_25_fdev/bin/php-config' returns: If configure fails try --with-xpm-dir=
Expected Result
GD compiles correctly
Command
Paste your phpbrew install command here (be sure to install with
--debug
flag, e.g.phpbrew --debug install
)phpbrew --debug ext install gd -- --with-freetype-dir="/usr/include" --with-jpeg-dir=/usr;
Build Log
root@devhub01 ~ # cat /opt/phpbrew/build/phpbrew7_3_25_fdev/ext/gd/build.log
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
Platform
OS:
Ubuntu 20.04.1 LTS
Running PHP:
PHP 7.3.25 (cli) (built: Dec 8 2020 20:59:26) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.25, Copyright (c) 1998-2018 Zend Technologies
Installing PHP:
PHP 7.3.25 (cli) (built: Dec 8 2020 20:59:26) ( NTS )
The text was updated successfully, but these errors were encountered: