Page 1 of 2 12 LastLast
Results 1 to 20 of 30

Thread: Error building php-5.3.28

  1. #1
    Join Date
    Feb 2008
    Posts
    139

    Error building php-5.3.28

    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?

  2. #2
    Join Date
    Jul 2006
    Location
    isreal
    Posts
    473
    try:
    ./build clean
    ./build update
    ./build update_versions
    if you need more help, see me a pm

  3. #3
    Join Date
    Feb 2008
    Posts
    139
    Hi Ben29,

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

    About your solution; same problem, no luck.

  4. #4
    Join Date
    Jul 2006
    Location
    isreal
    Posts
    473
    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

  5. #5
    Join Date
    Feb 2008
    Posts
    139
    Quote Originally Posted by ben29 View Post
    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?

  6. #6
    Join Date
    Feb 2008
    Posts
    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

  7. #7
    Join Date
    Jan 2014
    Posts
    21
    Quote Originally Posted by bdj View Post
    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

  8. #8
    Join Date
    Jan 2014
    Posts
    21
    P.S. I also did the:

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

  9. #9
    Join Date
    Apr 2009
    Posts
    2,421
    @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

  10. #10
    Join Date
    Jan 2014
    Posts
    21
    Quote Originally Posted by ditto View Post
    @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

  11. #11
    Join Date
    Apr 2009
    Posts
    2,421
    Sorry it did not help. I don't run FreeBSD, so can't help more. But it might be related to the changes in FreeType 2.5.1.x http://forum.directadmin.com/showthread.php?t=47795

    If you recently upgraded FreeType, maybe you can temporary solve it by downgrading FreeType ...

  12. #12
    Join Date
    Apr 2009
    Posts
    2,421
    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.

  13. #13
    Join Date
    Jan 2014
    Posts
    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.

  14. #14
    Join Date
    Jan 2014
    Posts
    21
    Quote Originally Posted by ditto View Post
    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

  15. #15
    Join Date
    Apr 2009
    Posts
    2,421
    Quote Originally Posted by RinCA View Post
    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.

  16. #16
    Join Date
    Jan 2014
    Posts
    21
    Quote Originally Posted by ditto View Post
    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

  17. #17
    Join Date
    Apr 2009
    Posts
    2,421
    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 by ditto; 01-08-2014 at 04:52 PM.

  18. #18
    @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

  19. #19
    Join Date
    Jan 2014
    Posts
    21
    Quote Originally Posted by DirectAdmin Support View Post
    @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.

  20. #20
    Join Date
    Mar 2006
    Posts
    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

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •