FreeType 2.5.1 released

i upgraded with custombuild but when i try and rebuild php i get:

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: freetype.h not found.

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

i've got 2 identical servers and one installed correctly and the other gives me this, any ideas anyone?
 
FreeType 2.5.1 is now released, and the new version is already available in custombuild.

Read more at http://freetype.org and in the changelog at http://sourceforge.net/projects/freetype/files/freetype2/2.5.1/

Today I tried to install stable DirectAdmin on fresh debian7 system.
The installation stopped on php compilation with this error:
configure: error: freetype.h not found.

After some digging I found this.
Quoted from freetype's changeLog:
IMPORTANT CHANGES
- The header file layout has been changed. After installation,
all files are now located in `<prefix>/include/freetype2'.

Does anybody test updated packages before pushing it to DirectAdmin production systems?
 
Hello,

I've downgraded the versions.txt to 2.5.0. Our tests are not able to reproduce it yet, as our test boxes still have the older 2.5.0 freetype.h file (php updates are likely finding that)... so will need to check someone's box.

It's likely related to this change:
http://sourceforge.net/projects/freetype/files/freetype2/2.5.1/
- The header file layout has been changed. After installation, all files are now located in `<prefix>/include/freetype2'.

so we just need to sort out which configure settings are needed to match the old setup.

I'm still investigating the issue, and will report back here when we have more info.

John
 
Thanks John.
On my CentOS 5.10-32bit box I ran:
Code:
./build clean
./build update
./build versions | grep available --> shows 'FreeType 2.5.1 to 2.5.0 update is available.'
./build update_versions
./build php n
Now phpinfo() shows: FreeType Version 2.5.1
I don't really get it, but the up/downgrade upgraded :D
 
The 2.5.1 version update worked on all of our test boxes as well, but a flurry of failed install emails and update errors came in from clients, so some are affected, some are not.
I believe as long as the freetype.h exists somewhere from some package (including freeypt-devel), the install works, using the latest custombuild freetype libraries... even if it's not the freetype.h from that version (this might cause issues, not sure).
Still have not been able to duplicate it, so will find someone's box to test on shortly.

John
 
The 2.5.1 version update worked on all of our test boxes as well, but a flurry of failed install emails and update errors came in from clients, so some are affected, some are not.
I believe as long as the freetype.h exists somewhere from some package (including freeypt-devel), the install works, using the latest custombuild freetype libraries... even if it's not the freetype.h from that version (this might cause issues, not sure).
Still have not been able to duplicate it, so will find someone's box to test on shortly.

John

I've had exactly the same error. I took me 3hrs to get the server back on.
 
Found the issue. All php versions don't support the new change to what FreeType is doing.

Old freetype.h, 2.5.0- :
/usr/local/include/freetype2/freetype/freetype.h

New freetype.h, 2.5.1+ :
/usr/local/include/freetype2/freetype.h

This is the code in all php configure scripts
Code:
    for i in $PHP_FREETYPE_DIR /usr/local /usr; do
      if test -f "$i/include/freetype2/freetype/freetype.h"; then
            FREETYPE2_DIR=$i
            FREETYPE2_INC_DIR=$i/include/freetype2
            break
      fi
    done

    if test -z "$FREETYPE2_DIR"; then
      as_fn_error $? "freetype.h not found." "$LINENO" 5
    fi
Where the prefix is /usr/local and it's checking for the old path.

What they need is something like:
Code:
    for i in $PHP_FREETYPE_DIR /usr/local /usr; do
      if test -f "$i/include/freetype2/freetype/freetype.h"; then
            FREETYPE2_DIR=$i
            FREETYPE2_INC_DIR=$i/include/freetype2
            break
      fi
      [COLOR=#0000ff]if test -f "$i/include/freetype2/freetype.h"; then
[/COLOR]            [COLOR=#0000ff]FREETYPE2_DIR=$i[/COLOR]
            [COLOR=#0000ff]FREETYPE2_INC_DIR=$i/include/freetype2[/COLOR]
            [COLOR=#0000ff]break[/COLOR]
      [COLOR=#0000ff]fi[/COLOR]
    done

    if test -z "$FREETYPE2_DIR"; then
      as_fn_error $? "freetype.h not found." "$LINENO" 5
    fi

ANYway.. that's above my pay-grade to actually fix.

Our workaround is to simply create a link if it's missing.
This is the new CB code to address the configure looking in the wrong place:
Code:
        if [ -e /usr/local/include/freetype2/freetype.h ] && [ ! -e /usr/local/include/freetype2/freetype/freetype.h ]; then
            echo "Linking freetype/freetype.h to freetype.h";
            mkdir -p /usr/local/include/freetype2/freetype
            ln -s ../freetype.h /usr/local/include/freetype2/freetype/freetype.h
        fi
It's in all CB versions now.


Before I change FreeType from 2.5.0 to 2.5.1 again, I'd like a few people to try it out (works on the box I got to test on).
Note that the new build script will take up to 24 hours to rsync to the other mirrors, so if you're testing it, grab it from files1.directadmin.com.
Note the wget url is to CB 2.0. If you're running 1.2, swap 2.0 with 1.2 in the link.
Code:
cd /usr/local/directadmin/custombuild
wget -O build http://files1.directadmin.com/services/custombuild/2.0/custombuild/build
perl -pi -e 's/^freetype:2.5.0:.*/freetype:2.5.1:/' versions.txt
./build freetype
ls -la /usr/local/include/freetype2/freetype/freetype.h
Ensure the ls -la command shows a file or a link. Note an old file should be ok because the issue is with the php configure script itself... not the gcc or linker commands.. they shoud be finding the correct freetype.h because the above $FREETYPE_INC_DIR is set to the proper freetype2 folder, and the new freetype.h will be the first one found.

Once confirmed a /usr/local/include/freetype2/freetype/freetype.h file exists, try building php:
Code:
./build php n
and report back here if it works or if it doesn't work.
If it doesn't, please first confirm that you're using the newer build script by looking at the end of the "doFreeType()" function, to ensure you see my mentioned code (includes a URL back to this thread too)

John
 
Running cb 1.2, php 5.4.22 (suPHP)... Cent 5.10

Original install went fine, no issues

Just did a mysql upgrade this AM with a PHP rebuild as well and had ZERO issues compliling
 
Same here. No issues after first upgrade to Freetype 2.5.1. Running CentOS 6.4, custom build 2.0 with all the latest updates, and Apache 2.4.1.
 
@John, Why do I need to run this line?:
Code:
wget -O build http://files1.directadmin.com/services/custombuild/2.0/custombuild/build

Can't I just do?:
Code:
cd /usr/local/directadmin/custombuild
./build update
perl -pi -e 's/^freetype:2.5.0:.*/freetype:2.5.1:/' versions.txt
./build freetype

I am already running latest custombuild 2.0 2.0.0-RC6. Also I already have files1 set in options.conf. Please confirm that I only need to run the above, and I will upgrade my servers.
 
The wget was for anyone who was going to be testing it before it made it to the other mirrors.
As it's still less than 24 hours after the change, it's possible my changes on files1 have not yet made it to all files mirrors.
Thus... the test using "./build update" may not be accurate, depending on which "downloadserver" you're using.

@scrupul0us
Unless the perl regex is run, the 2.5.0 version would have been installed, meaning the test of 2.5.1 didn't actually happen.

John
 
Thank you for clarification. I am already using files1 in options.conf. I have now upgraded one CentOS 6.4 64bit server, it is running PHP 5.4.22. There was no problems at all, and no errors after ./build php n

Code:
[root@server custombuild]# ls -la /usr/local/include/freetype2/freetype/freetype.h
lrwxrwxrwx 1 root root 13 Nov 29 20:46 /usr/local/include/freetype2/freetype/freetype.h -> ../freetype.h
[root@server custombuild]#

Also a phpinfo page shows: "FreeType Version 2.5.1" - I will now upgrade the rest of my servers. Thank you! :)
 
I was already on 2.5.0 and upgraded to 2.5.1... Now ./build versions tells me theres an "update" which would really be a downgrade:

Code:
Latest version of FreeType: 2.5.0
Installed version of FreeType: 2.5.1

FreeType 2.5.1 to 2.5.0 update is available.

But you're right (damn it)

php -i | grep -i freetype | grep -i version
FreeType Version => 2.5.0

=)
 
Even stranger, I decided to ./build freetype and now i get:

Code:
Latest version of FreeType: 2.5.0
Installed version of FreeType: 2.5.0

and then rebuild PHP:

php -i | grep -i freetype | grep -i version
FreeType Version => 2.5.1

It's a festivus miracle
 
You need to recompile php after you upgraded FreeType, also it is normal that custombuild shows a version for downgrade is available, it is only until DirectAdmin add the new version official in versions.txt

So, you need to run: ./build php n

On my servers it is looking good after upgrade:

Code:
[root@server ~]# php -i | grep -i freetype | grep -i version
FreeType Version => 2.5.1
[root@server ~]#
 
Back
Top