Raydium 3D Game Engine

Official forum for everything about Raydium, ManiaDrive, MeMak, ...
It is currently Sun Nov 10, 2024 7:22 pm

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat May 21, 2011 10:02 am 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
Compiling Maniadrive under 64bit Ubuntu 11.04. Relating svn r1074.

./configure doesn't pass, configure.log shows error:
Code:
Configuring PHP
...
configure: error: libpng.(a|so) not found.


I have libpng installed from Ubuntu packages (there can be bug also)

I can
Code:
libpng-config --libs --cflags
-lpng12
-I/usr/include/libpng12


and
Code:
pkg-config --libs --cflags libpng
-I/usr/include/libpng12  -L/usr/lib/x86_64-linux-gnu -lpng12


So I can be pretty sure libpng with devel is installed and recognized.

I see there are --with-png-dir, but this sounds workaround which work just on my computer (And I didn't managed to configure even with it)


Top
 Profile  
 
PostPosted: Sat May 21, 2011 1:44 pm 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
I found solution, but I do not know reason yet.

configure calls raydium/php/configure with --with-gd
Removing it and configure will pass.

But there might be good reason to have --with-gd, so I found another solution.

Code:
sudo ln -s /usr/lib/x86_64-linux-gnu/libpng.so /usr/lib/libpng.so

From: http://php.net/manual/en/image.installation.php (Where also libjpeg caused problems.)

I do not know libgd, libpng (or it's ubuntu packaging) or php enough to say who's fault this is (=where to report).

[EDIT]
"--with-png-dir" adds automatically suffix /lib. This can changed with "--with-libdir= ". e.g. "--with-libdir=lib64" or "--with-libdir=i386-linux-gnu", generally speaking:
--with-libdir=`pkg-config --libs libpng | tail -c +12 | head -c -11`

But this is not working on stock Natty (.e.g autobuilder), because then it doesn't find libjpeg, which is installed on /usr/lib.


Top
 Profile  
 
PostPosted: Mon May 23, 2011 7:23 am 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
Solution found. On new Ubuntu, php must be configured like this:
Code:
   --with-libdir=`pkg-config --libs libpng | tail -c +8 | head -c -11`--with-gd --with-jpeg-dir=/usr/ --with-png-dir=/usr/ \


I.e. Raydium's configure contains:
Code:
    cd raydium/php
    ./configure --enable-embed=static --with-zlib --enable-ftp --enable-static=zlib --with-curl --enable-zip \
    --disable-simplexml --disable-xmlreader --disable-xmlwriter $CONFIGEXTRA --enable-soap \
    --with-libdir=`pkg-config --libs libpng | tail -c +8 | head -c -11`--with-gd --with-jpeg-dir=/usr/ --with-png-dir=/usr/ \
    >>../../configure.log 2>>../../configure.log


Top
 Profile  
 
PostPosted: Mon May 30, 2011 4:43 pm 
Offline
User avatar

Joined: Sun Mar 16, 2003 2:53 am
Posts: 2593
Location: gnniiiii (Scrat)
While trying to include this in a "portable" way* for other distributions, I've found that this fix does not work on Natty if libjpeg8 is installed instead of libjpeg62.

I've not checked the details, but it seems that it fails not because of some API change, but because of a different installation path:
version 6.2: /usr/lib/i386-linux-gnu/libjpeg.so
version 8: /usr/lib/libjpeg.so

Then, with v8, since path is mixed between /usr/lib/ for libjpeg and /usr/lib/i386-linux-gnu/ for libpng, PHP is never able to find both :/

- Any idea ?
(Tested with newer PHP releases [5.3.6] without any change on this point)

- Have you tested Raydium with the 64 bits release of Natty ?

* currently : --with-libdir=`libpng-config --libdir | sed 's#^/usr/##'` --with-gd --with-png-dir --with-jpeg-dir


Top
 Profile  
 
PostPosted: Tue May 31, 2011 8:44 am 
Offline

Joined: Wed May 06, 2009 2:06 pm
Posts: 30
I'm building them on autobuilder. It is always empty installation and it installs only listed dependencies. I have listed libjpeg8. Same source package is passed to the 64bit and 32bit computers.

This is the log from 64bit builder:
https://launchpadlibrarian.net/72260756 ... ING.txt.gz

If I remember correctly I had once same type of problem with libpng on upgraded Natty (not fresh installed) and this helped then:
sudo apt-get install --reinstall libpng12-dev


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group