Error building php-5.3.28

bdj

Verified User
Joined
Feb 22, 2008
Messages
139
I'm upgrading php-5.3.27 to php-5.3.28 with ./build php n

The build stops with this:

Code:
/bin/sh /usr/local/directadmin/custombuild/php-5.3.28/libtool --silent --preserve-dup-deps --mode=compile gcc -I/         usr/local/lib/ -Iext/gd/ -I/usr/local/directadmin/custombuild/php-5.3.28/ext/gd/ -DPHP_ATOM_INC -I/usr/local/dire         ctadmin/custombuild/php-5.3.28/include -I/usr/local/directadmin/custombuild/php-5.3.28/main -I/usr/local/directad         min/custombuild/php-5.3.28 -I/usr/local/directadmin/custombuild/php-5.3.28/ext/date/lib -I/usr/local/directadmin/         custombuild/php-5.3.28/ext/ereg/regex -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/free         type2 -I/usr/local/lib/ -I/usr/local/include/c-client -I/usr/local/directadmin/custombuild/php-5.3.28/ext/mbstrin         g/oniguruma -I/usr/local/directadmin/custombuild/php-5.3.28/ext/mbstring/libmbfl -I/usr/local/directadmin/customb         uild/php-5.3.28/ext/mbstring/libmbfl/mbfl -I/usr/local/mysql/include -I/usr/local/directadmin/custombuild/php-5.3         .28/ext/sqlite3/libsqlite -I/usr/local/directadmin/custombuild/php-5.3.28/TSRM -I/usr/local/directadmin/custombui         ld/php-5.3.28/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden   -c /usr/local/directadmin/custombuild/php         -5.3.28/ext/gd/libgd/gd_rotate.c -o ext/gd/libgd/gd_rotate.lo

*** Error code 1

/usr/local/directadmin/custombuild/php-5.3.28/ext/fileinfo/libmagic/apprentice.c: In function 'apprentice_load':

/usr/local/directadmin/custombuild/php-5.3.28/ext/fileinfo/libmagic/apprentice.c:781: warning: passing argument 1          of '_php_stream_opendir' discards qualifiers from pointer target type

1 error

server1:admin /usr/local/directadmin/custombuild>
System is FreeBSD 8.4

Any ideas?
 

bdj

Verified User
Joined
Feb 22, 2008
Messages
139
Hi Ben29,

I would prefer replying in this thread cus people might benefit from it.

About your solution; same problem, no luck.
 

ben29

Verified User
Joined
Jul 20, 2006
Messages
475
Location
isreal
it's look like you do your own configure for php,
if you give me access to your server , i can look why its happen to you
 

bdj

Verified User
Joined
Feb 22, 2008
Messages
139
it's look like you do your own configure for php,
if you give me access to your server , i can look why its happen to you
What makes you think I use my own php configuration?
 

bdj

Verified User
Joined
Feb 22, 2008
Messages
139
By looking into it a little further, I found that this error has something to do with freetype/config/ftheader.h not being found.

Code:
In file included from /usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:82:
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
/usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:83:12: error: #include expects "FILENAME" or <FILENAME>
*** Error code 1
/usr/local/directadmin/custombuild/php-5.3.28/ext/fileinfo/libmagic/apprentice.c: In function 'apprentice_load':
/usr/local/directadmin/custombuild/php-5.3.28/ext/fileinfo/libmagic/apprentice.c:781: warning: passing argument 1 of '_php_stream_opendir' discards qualifiers from pointer target type
1 error
server1:admin /usr/local/directadmin/custombuild>
This could be correct since custombuild installs freetype in

Code:
locate ftheader.h
/usr/local/include/freetype2/config/ftheader.h
would it be enough you just symlink freetype2 to freetype or will this break other things?

Code:
ln -s /usr/local/include/freetype2 /usr/local/include/freetype
 

RinCA

Verified User
Joined
Jan 8, 2014
Messages
21
By looking into it a little further, I found that this error has something to do with freetype/config/ftheader.h not being found.

Code:
In file included from /usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:82:
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
/usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:83:12: error: #include expects "FILENAME" or <FILENAME>
*** Error code 1
/usr/local/directadmin/custombuild/php-5.3.28/ext/fileinfo/libmagic/apprentice.c: In function 'apprentice_load':
/usr/local/directadmin/custombuild/php-5.3.28/ext/fileinfo/libmagic/apprentice.c:781: warning: passing argument 1 of '_php_stream_opendir' discards qualifiers from pointer target type
1 error
server1:admin /usr/local/directadmin/custombuild>
This could be correct since custombuild installs freetype in

Code:
locate ftheader.h
/usr/local/include/freetype2/config/ftheader.h
would it be enough you just symlink freetype2 to freetype or will this break other things?

Code:
ln -s /usr/local/include/freetype2 /usr/local/include/freetype
Anyone find a solution to this!?

I got the same exact thing, now my httpd (apache) service is down.

Code:
In file included from /usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:82:
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
/usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:83:12: error: #include expects "FILENAME" or <FILENAME>
On FreeBSD 9.1
 

RinCA

Verified User
Joined
Jan 8, 2014
Messages
21
P.S. I also did the:

Code:
./build clean
./build update
./build update_versions
Mentioned earlier in the thread.
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,565
@RinCA, Please look in this path: /usr/local/include/

If there is a symlink on this file: /usr/local/include/ft2build.h and if there it exist a renamed file like ft2build.h.old, then try this:

Delete the symlink on /usr/local/include/ft2build.h and then rename ft2build.h.old to be ft2build.h

Then it is important to run ./build update before you recompile FreeType and PHP (because there was recently a update added to custombuild):

Code:
cd /usr/local/directadmin/custombuild
./build update
./build freetype
./build php n
 

RinCA

Verified User
Joined
Jan 8, 2014
Messages
21
@RinCA, Please look in this path: /usr/local/include/

If there is a symlink on this file: /usr/local/include/ft2build.h and if there it exist a renamed file like ft2build.h.old, then try this:

Delete the symlink on /usr/local/include/ft2build.h and then rename ft2build.h.old to be ft2build.h

Then it is important to run ./build update before you recompile FreeType and PHP (because there was recently a update added to custombuild):

Code:
cd /usr/local/directadmin/custombuild
./build update
./build freetype
./build php n
No symlink:

Code:
-rw-r--r--  1 root  wheel  3890 Oct 22 17:37 /usr/local/include/ft2build.h
./build update ran fine
./build freetype ran fine
./build php n errored out:

Code:
In file included from /usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:82:
/usr/local/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
/usr/local/directadmin/custombuild/php-5.3.28/ext/gd/gd.c:83:12: error: #include expects "FILENAME" or <FILENAME>
*** [ext/gd/gd.lo] Error code 1
1 error
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,565
One more thing: Make sure you do not have a folder/directory with "php" in its name in /usr/local/directadmin/custombuild/... , if you do, then delete it and recompile php again.
 

RinCA

Verified User
Joined
Jan 8, 2014
Messages
21
If possible, I'd just like to rollback my php to 5.3.27 and get my httpd services running again before my customers freak out.

Appreciate your help.
 

RinCA

Verified User
Joined
Jan 8, 2014
Messages
21
One more thing: Make sure you do not have a folder/directory with "php" in its name in /usr/local/directadmin/custombuild/... , if you do, then delete it and recompile php again.
Only directories I have in /usr/local/directadmin/custombuild are (and the subdirs listed):

/configure
ap1 ap2 dovecot proftpd pureftpd suphp
/custom
ap1 ap2 dovecot proftpd pureftpd suphp
/patches
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,565
If possible, I'd just like to rollback my php to 5.3.27 and get my httpd services running again before my customers freak out.
I think you can downgrade php by editing the file at /usr/local/directadmin/custombuild/versions.txt

Look for a line that looks like this:
Code:
php53:5.3.28:eec3fb5ccb6d8c238f973d306bebb00e
Change that line to be:
Code:
php53:5.3.27
Then it is important to not run ./build update (because that will overwrite versions.txt file again), then run ./build php n to downgrade.
 

RinCA

Verified User
Joined
Jan 8, 2014
Messages
21
I think you can downgrade php by editing the file at /usr/local/directadmin/custombuild/versions.txt

Look for a line that looks like this:
Code:
php53:5.3.28:eec3fb5ccb6d8c238f973d306bebb00e
Change that line to be:
Code:
php53:5.3.27
Then it is important to not run ./build update (because that will overwrite versions.txt file again), then run ./build php n to downgrade.
Did that, same result with compiling 5.3.27 and Freetype. Now trying Freetype 2.5.0 and PHP 5.3.28... ok, everything is back up and running with Freetype 2.5.0/PHP 5.3.28.

Thanks for replying ditto!

Now my rant:

I've been doing this since 1997 when we had our own T1's and so on, then moved to co-locations as our own bandwidth was more expensive and dialups had died. So I didn't have to worry about routers and firewalls any more... just servers.

I've done the sysadmin work from way back when up till now, and we have always run FreeBSD going all the way back to 2.0.

Recently we moved again and DirectAdmin was an option, so I thought I might be able to take a step back from being so "hands on" with DirectAdmin and something like this happens Today.

About once a month (or near any php 5.3.xx release until they dry up) I've been updating DA and all of the programs that go with it... it's been great for the last 9 months or so that we've been on it. I can't have what happened Today happen again. Now I'm going to be hesitant to even my ./build update, ./build all d... in fact, I'm not going to run it again because that would obviously upgrade Freetext to 2.5.2 again and have a problem.

Being with DA has it's benefits and drawbacks... I knew the system inside and out with Apache, PHP, MySQL, Bind, Mail, etc... now if something goes wrong it's almost like a big cluster f*** because of DA.

I've been happy for the 9 months and was happy with the easy of upgrading and the testing/etc that had gone into each custombuild and the associated upgrades.

Now I'm just stuck... running but pretty much afraid to do anything with DA.

/rant
 

ditto

Verified User
Joined
Apr 27, 2009
Messages
2,565
I am happy that your apache is running again. Please contact support at directadmin.com about this. Your error message looks very much like the error message users running php 5.2.x was getting after upgrading to the recent freetype version (I don't run php 5.2.x, but I was shown this error in a discussion with DirectAdmin support). You should not get that error when you are running anything newer then php 5.2.x, only php 5.2.x users should get that error (wich is fixed by a check in custombuild wich (if you run php 5.2.x) now add a symlink at /usr/local/include/ft2build.h and rename ft2build.h to ft2build.h.old

However maybe it is related to differences when running FreeBSD, maybe you get the same problem on php 5.3.x if you are running FreeBSD as php 5.2.x users does. Anyway, please contact DirectAdmin support and let them know you are running php 5.3.x and freebsd, and that you are getting the error you mention in previous post when running the newest freetype version and then recompile php.
 
Last edited:

DirectAdmin Support

Administrator
Staff member
Joined
Feb 27, 2003
Messages
9,005
@RinCA

Please let us know if you're still having any issues.

Removing the old file (or link):
/usr/local/include/ft2build.h

and installing 2.5.2 should work fine, as 2.5.1+ uses a different path for ft2build.h.
If you'd like us to go over your system for you, send over your root login info and we'd be happy to take a look.

John
 

RinCA

Verified User
Joined
Jan 8, 2014
Messages
21
@RinCA

Please let us know if you're still having any issues.

Removing the old file (or link):
/usr/local/include/ft2build.h

and installing 2.5.2 should work fine, as 2.5.1+ uses a different path for ft2build.h.
If you'd like us to go over your system for you, send over your root login info and we'd be happy to take a look.

John
That fixed it, Thank you to ditto and John.
 

labrocca

Verified User
Joined
Mar 12, 2006
Messages
151
Just an FYI. I'm running BSD 9.1 and having same issue with building php after updating FreeType.

So far no toying around with the ft2build.h has worked. Any additional advice on this? I'd like to update my php5. I'm at 5.4.25 and trying to go to 5.4.26.

Here is last few lines of build before it errors.

checking for FreeType 2... /usr/local/lib
checking for T1lib support... no
checking whether to enable truetype string function in GD... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
checking for jpeg_read_header in -ljpeg... yes
If configure fails try --with-vpx-dir=<DIR>
checking for png_write_image in -lpng... yes
If configure fails try --with-xpm-dir=<DIR>
configure: error: GD build test failed. Please check the config.log for details.

*** There was an error while trying to configure php. Check the configure/ap2/co nfigure.php5 file
 
Top