Fri 24 Jun 2005 05:20:25 PM UTC, comment #17:
Try patch #4125
|
Fri 24 Jun 2005 01:08:03 PM UTC, comment #16:
Might another check in configure.in be the source? If you look at:
---
# testing for gd support
LIBPNG=no
AC_CHECK_LIB(png, png_create_read_struct , [LIBPNG=yes])
LIBJPEG=no
AC_CHECK_LIB(jpeg, jpeg_CreateCompress, [LIBJPEG=yes])
LIBGD_GIF=no
AC_CHECK_LIB(gd, gdImageGif,[LIBGD_GIF=yes])
LIBGD_PNG=no
AC_CHECK_LIB(gd, gdImagePng, [LIBGD_PNG=yes])
LIBGD_JPG=no
AC_CHECK_LIB(gd, gdImageJpeg, [LIBGD_JPG=yes])
---
The first check for PNG check PNG read ability it seems (png_create_read_struct), and it sets the variable LIBPNG. Is that variable actually used anywhere? And if it is, without the GD PNG libraries, PNG reading will still succeed. So it probably will try to read a file it cannot write. Hence an error...
So LIBPNG can only be true when LIBGD_PNG is true, and LIBJPEG can only be true when LIBGD_JPG is true.
|
Fri 24 Jun 2005 12:13:38 PM UTC, comment #15:
Anyone has clues what/where I should be looking for to fix this?
|
Fri 24 Jun 2005 12:11:26 PM UTC, comment #14:
I was too quick to judge. Running the .jpg version now: doesn't work.
No .jpg files are created, and also the webinterface (others? don't use them myself) looks for the wrong files, still png:
<table class=bw_stats cellpadding=0 cellspacing=0 align=center><tr><td><img src="bw_updown.png"></td></tr></table><br><table class=bw_stats cellpadding=0 cellspacing=0 align=center><tr><td><img src="bw_h_updown.png"></td></tr></table>
|
Fri 24 Jun 2005 12:09:31 AM UTC, comment #13:
That last line is more clear in a seperate post:
I have added the compile time checks to gdstubs.c, compiles perfectly now. See add_png_check.patch. Didn't have time to check the binairy yet, but I don't expect problems.
|
Fri 24 Jun 2005 12:07:33 AM UTC, comment #12:
- My config/configure.in now states:
LIBGD_GIF=no
AC_CHECK_LIB(gd, gdImageGif,[LIBGD_GIF=yes])
LIBGD_PNG=no
AC_CHECK_LIB(gd, gdImagePng, [LIBGD_PNG=yes])
LIBGD_JPG=no
AC_CHECK_LIB(gd, gdImageJpeg, [LIBGD_JPG=yes])
- I have installed libgd with no png support. I guess configure sences it correctly:
checking for png_create_read_struct in -lpng... yes
checking for jpeg_CreateCompress in -ljpeg... yes
checking for gdImageGif in -lgd... yes
checking for gdImagePng in -lgd... no
checking for gdImageJpeg in -lgd... yes
checking compile with gd... yes
- But gdstubs still want to link against the png lib (so it seems)
ocamlopt.opt -inline 10 -linkall -o mlnet unix.cmxa str.cmxa -ccopt "-L/usr/local/lib -I/usr/local/include" -cclib "-lcharset /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib" -cclib -lz -cclib -lgd -cclib -lpng -cclib -ljpeg -cclib -lfreetype -cclib -lm -ccopt -DHAVE_JPEG -ccopt -W -ccopt -Wall -ccopt -Wno-unused -ccopt "-D_THREAD_SAFE -pthread" -I build build/cdk.cmxa build/common.cmxa build/client.cmxa build/core.cmxa build/driver.cmxa src/daemon/common/commonMain.cmx
src/utils/cdk/gdstubs.o(.text+0x29c): In function `ml_image_open_png':
src/utils/cdk/gdstubs.c:151: undefined reference to `gdImageCreateFromPng'
src/utils/cdk/gdstubs.o(.text+0xa0b): In function `ml_save_png':
src/utils/cdk/gdstubs.c:341: undefined reference to `gdImagePng'
src/utils/cdk/gdstubs.o(.text+0xa9b): In function `ml_dump_png':
src/utils/cdk/gdstubs.c:371: undefined reference to `gdImagePngPtr'
Error during linking
gmake: *** [mlnet] Error 2
- By the way, gif isn't used in gdstubs only png and jpeg. If it isn't used anywhere in the code, then why check for it in configure? I have added the compile time checks to gdstubs.c, compiles perfectly now. See add_png_check.patch. Didn't have time to check the binairy yet, but I don't expect problems.
|
Thu 23 Jun 2005 11:45:23 PM UTC, comment #11:
- My config/configure.in now states:
LIBGD_GIF=no
AC_CHECK_LIB(gd, gdImageGif,[LIBGD_GIF=yes])
LIBGD_PNG=no
AC_CHECK_LIB(gd, gdImagePng, [LIBGD_PNG=yes])
LIBGD_JPG=no
AC_CHECK_LIB(gd, gdImageJpeg, [LIBGD_JPG=yes])
- I have installed libgd with no png support. I guess configure sences it correctly:
checking for png_create_read_struct in -lpng... yes
checking for jpeg_CreateCompress in -ljpeg... yes
checking for gdImageGif in -lgd... yes
checking for gdImagePng in -lgd... no
checking for gdImageJpeg in -lgd... yes
checking compile with gd... yes
- But gdstubs still want to link against the png lib (so it seems)
ocamlopt.opt -inline 10 -linkall -o mlnet unix.cmxa str.cmxa -ccopt "-L/usr/local/lib -I/usr/local/include" -cclib "-lcharset /usr/local/lib/libiconv.so -Wl,-rpath -Wl,/usr/local/lib" -cclib -lz -cclib -lgd -cclib -lpng -cclib -ljpeg -cclib -lfreetype -cclib -lm -ccopt -DHAVE_JPEG -ccopt -W -ccopt -Wall -ccopt -Wno-unused -ccopt "-D_THREAD_SAFE -pthread" -I build build/cdk.cmxa build/common.cmxa build/client.cmxa build/core.cmxa build/driver.cmxa src/daemon/common/commonMain.cmx
src/utils/cdk/gdstubs.o(.text+0x29c): In function `ml_image_open_png':
src/utils/cdk/gdstubs.c:151: undefined reference to `gdImageCreateFromPng'
src/utils/cdk/gdstubs.o(.text+0xa0b): In function `ml_save_png':
src/utils/cdk/gdstubs.c:341: undefined reference to `gdImagePng'
src/utils/cdk/gdstubs.o(.text+0xa9b): In function `ml_dump_png':
src/utils/cdk/gdstubs.c:371: undefined reference to `gdImagePngPtr'
Error during linking
gmake: *** [mlnet] Error 2
|
Thu 23 Jun 2005 04:08:14 PM UTC, comment #10:
Good one. But of course I now have a libgd with libpng. I will give it a try to revert to the old situation and give it a test.
|
Thu 23 Jun 2005 03:55:56 PM UTC, comment #9:
I committed your patch, yes of course it has to be changed.
Stupid bug though, can you now use MLDonkeys graphs with a
libgd which is compiled without libpng?
|
Thu 23 Jun 2005 03:20:19 PM UTC, comment #8:
This has nothing to do with all gd libs not being found when the LDFLAGS variable isn't used... but should this patch be applied?
--- configure.in Mon Jun 20 20:52:57 2005
+++ ../../mldonkey_old/config/configure.in Thu Jun 23 17:11:29 2005
@@ -1033,7 +1033,7 @@
AC_CHECK_LIB(gd, gdImageGif,[LIBGD_GIF=yes])
LIBGD_PNG=no
-AC_CHECK_LIB(gd, gdImagePng, [LIBGD_JPG=yes])
+AC_CHECK_LIB(gd, gdImagePng, [LIBGD_PNG=yes])
LIBGD_JPG=no
AC_CHECK_LIB(gd, gdImageJpeg, [LIBGD_JPG=yes])
Somehow that seems more natural, but I have too little experience with it to know that it is correct.
|
Thu 23 Jun 2005 09:07:58 AM UTC, comment #7:
Nevermind that last post. The problem was in gd afterall. There was no png support compiled in. I updated my ports, reinstalled gd and now it works.
The only extra line I have to add to configure to make it work is:
LDFLAGS="-L/usr/local/lib"
I guess autoconf (AC_CHECK_LIB(gd, gdImagePng, [LIBGD_JPG=yes])) isn't doing it's job properly.
|
Thu 23 Jun 2005 07:31:19 AM UTC, comment #6:
Maybe not yet. It seems the Gd libs are found when using this configure line:
./configure --enable-ocamlver=3 --with-libiconv-prefix=/usr/local/include LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include"
However, somehow PNG support is not working. The configure script says:
checking for png_create_read_struct in -lpng... yes
checking for jpeg_CreateCompress in -ljpeg... yes
checking for gdImageGif in -lgd... yes
checking for gdImagePng in -lgd... no
checking for gdImageJpeg in -lgd... yes
checking compile with gd... yes
But appearently, that png support is crucial, because linking fails:
src/utils/cdk/gdstubs.o(.text+0x29c): In function `ml_image_open_png':
src/utils/cdk/gdstubs.c:151: undefined reference to `gdImageCreateFromPng'
src/utils/cdk/gdstubs.o(.text+0xa0b): In function `ml_save_png':
src/utils/cdk/gdstubs.c:341: undefined reference to `gdImagePng'
src/utils/cdk/gdstubs.o(.text+0xa9b): In function `ml_dump_png':
src/utils/cdk/gdstubs.c:371: undefined reference to `gdImagePngPtr'
I traced it down to be a Gd error though. Relevant parts of the Gd configure:
checking for libpng12-config... /usr/local/bin/libpng12-config
checking for libpng-config... /usr/local/bin/libpng-config
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_create_read_struct in -lpng12... no
configure: WARNING: libpng is required - see http://www.libpng.org/pub/png/
- Configuration summary for gd 2.0.33:
Support for PNG library:
Support for JPEG library: yes
Support for Freetype 2.x library: yes
Support for Fontconfig library: yes
Support for Xpm library: yes
Support for pthreads: yes
Maybe it is an idea to use GIF instead of PNG anyway? At least when its found that PNG is not available.
|
Mon 20 Jun 2005 07:04:18 PM UTC, comment #5:
So I can close this bug, yes?
|
Mon 20 Jun 2005 07:03:52 PM UTC, comment #4:
I think this makes the difference, from Makefile:
CONFIGURE_ENV+= \
CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
PTHREAD_LIBS="${PTHREAD_LIBS}"
|
Mon 20 Jun 2005 05:46:36 PM UTC, comment #3:
Very interesting Spiralvoice, didn't know the port was that active.
Tried to figure out where the differences are, but I can't see. I think these are the ./configure options they use:
--disable-gd --with-libiconv-prefix=/usr/local --disable-gui --prefix=/usr/local i386-portbld-freebsd5.4 --enable-ocamlver=3
If I try a configure with these options it doesn't work. Hell, maybe I should forget the static builds and use this port.
|
Mon 20 Jun 2005 05:06:31 PM UTC, comment #2:
Try FreeBSD ports version: http://www.freebsd.org/cgi/cvsweb.cgi/ports/net/mldonkey-devel/
There are some settings to include libs in /usr/local which are
not found by default by ./configure
|
Mon 20 Jun 2005 12:59:38 PM UTC, comment #1:
> libpng-config --version
1.2.8
> libpng-config --prefix
/usr/local
|
Mon 20 Jun 2005 12:57:57 PM UTC, original submission:
I try to compile the 2.5.30.16 CVS on FreeBSD, but the GD libraries aren't found by configure. Here's the output:
checking for png_create_read_struct in -lpng... no
checking for jpeg_CreateCompress in -ljpeg... no
checking for gdImageGif in -lgd... no
checking for gdImagePng in -lgd... no
checking for gdImageJpeg in -lgd... no
checking compile with gd... you need to install libpng
no
I just installed gd with png support too.
|