Wind_of_Change Report post Posted December 29, 2010 Just something minor: When compiling the client with PNG_SCREENSHOT defined I get deprecation warnings. These small modifications should fix them. diff -u -r1.83 misc.c --- misc.c 12 Jul 2010 20:28:25 -0000 1.83 +++ misc.c 29 Dec 2010 15:43:16 -0000 @@ -311,7 +311,7 @@ } /* Set error handling. */ - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) { /* If we get here, we had a problem reading the file */ IMG_SetError("Error writing the PNG file"); @@ -360,8 +360,8 @@ if (row_pointers != NULL) free (row_pointers); - if (info_ptr != NULL && info_ptr->palette != NULL) - free (info_ptr->palette); + if (info_ptr != NULL) + png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); png_destroy_write_struct (&png_ptr, (png_infopp)NULL); Share this post Link to post Share on other sites
bluap Report post Posted January 1, 2011 Just something minor: When compiling the client with PNG_SCREENSHOT defined I get deprecation warnings. These small modifications should fix them. diff -u -r1.83 misc.c --- misc.c 12 Jul 2010 20:28:25 -0000 1.83 +++ misc.c 29 Dec 2010 15:43:16 -0000 @@ -311,7 +311,7 @@ } /* Set error handling. */ - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) { /* If we get here, we had a problem reading the file */ IMG_SetError("Error writing the PNG file"); @@ -360,8 +360,8 @@ if (row_pointers != NULL) free (row_pointers); - if (info_ptr != NULL && info_ptr->palette != NULL) - free (info_ptr->palette); + if (info_ptr != NULL) + png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1); png_destroy_write_struct (&png_ptr, (png_infopp)NULL); This came up a while ago but I could not find out if the free was needed. I presume the call to png_free_data() resolved that issue? Share this post Link to post Share on other sites
Wind_of_Change Report post Posted January 1, 2011 I also don't think that there is actually anything to free, but according to the libpng manual png_free_data does do the job and in the case that there is nothing to free it will do nothing. But I'm no expert in this subject as well... Share this post Link to post Share on other sites
bluap Report post Posted January 10, 2011 I also don't think that there is actually anything to free, but according to the libpng manual png_free_data does do the job and in the case that there is nothing to free it will do nothing. But I'm no expert in this subject as well... OK, I've committed this change. Thanks. Share this post Link to post Share on other sites
bluap Report post Posted January 10, 2011 (edited) The previous thread was getting rather long so how about starting a new one for each new release? I've moved the last few posts from that thread here in case anyone was wondering what happened. Edited January 10, 2011 by bluap Share this post Link to post Share on other sites
Alberich Report post Posted February 11, 2011 (edited) The open storage from inventory context menu seems to be broken. Edited February 11, 2011 by Alberich Share this post Link to post Share on other sites
bluap Report post Posted February 11, 2011 (edited) The open storage from inventory context menu seems to be broken. Oops Thanks, fixed now. All similar menu options were broken a day or so ago. Edited February 11, 2011 by bluap Share this post Link to post Share on other sites
Llywar Report post Posted February 28, 2011 I also don't think that there is actually anything to free, but according to the libpng manual png_free_data does do the job and in the case that there is nothing to free it will do nothing. But I'm no expert in this subject as well... OK, I've committed this change. Thanks. Â Not sure if it makes a difference, but a Gentoo dev sent me the following alternative patch for the same problem. Half of it is identical to what is now in CVS, but the second half modifies the call to png_destroy_write_struct. Â If CVS builds as-is with libpng 1.5 I'll avoid applying a Gentoo-specific patch, but I figured I'd post this in case there is something worth looking at: Â Index: elc/misc.c =================================================================== --- elc.orig/misc.c +++ elc/misc.c @@ -311,7 +311,7 @@ int IMG_SavePNG_RW (SDL_Surface *face, S } /* Set error handling. */ - if (setjmp(png_ptr->jmpbuf)) + if (setjmp(png_jmpbuf(png_ptr))) { /* If we get here, we had a problem reading the file */ IMG_SetError("Error writing the PNG file"); @@ -360,10 +360,7 @@ done: if (row_pointers != NULL) free (row_pointers); - if (info_ptr != NULL && info_ptr->palette != NULL) - free (info_ptr->palette); - - png_destroy_write_struct (&png_ptr, (png_infopp)NULL); + png_destroy_write_struct (&png_ptr, &info_ptr); return result; } Share this post Link to post Share on other sites
Alberich Report post Posted April 25, 2011 compiling with FEATURES += FSAA enabled seems to break windows builds with console (without -mwindows option) Share this post Link to post Share on other sites
korrode Report post Posted May 17, 2011 Trying to compile with static make parameter i get: make[1]: *** No rule to make target `/usr/lib/libopenal.a', needed by `el.x86.linux.bin'. Stop. make[1]: Leaving directory `/home/korrode/el_git/elc.20110517-1-new_textures-static/elc' make: *** [static] Error 2 Share this post Link to post Share on other sites
tosh Report post Posted May 17, 2011 You need to have libopenal installed in the /usr/lib directory. On FreeBSD, these library are on the /usr/local/lib directory. You can try :  ls /usr/lib | grep libopenal ls /usr/local/lib | grep libopenal  If you find them on a other directory, or if the name is different, you will have to modify the makefile. Share this post Link to post Share on other sites
bluap Report post Posted May 17, 2011 (edited) AFAIK, the static build is only known to work out of the box on Ubuntu 8.04. If you look in Makefile.linux, you'll find details of which -dev libraries you'll need. Currently, it does not work for clean git as the FSAA feature uses new GL features not supported by Ubuntu 8.04. However, if you disable that feature it will compile. I'm not looking forward to getting the static build to work on a newer version of Linux. Edited May 17, 2011 by bluap Share this post Link to post Share on other sites
korrode Report post Posted May 17, 2011 (edited) You need to have libopenal installed in the /usr/lib directory. On FreeBSD, these library are on the /usr/local/lib directory. You can try : ls /usr/lib | grep libopenal ls /usr/local/lib | grep libopenal  If you find them on a other directory, or if the name is different, you will have to modify the makefile. The libraries are installed and in the correct location, i'll play more later. ah wait, i only have .so runtime libraries, i'll get .a's for static linking.   AFAIK, the static build is only known to work out of the box on Ubuntu 8.04. Sounds like a challenge. Edited May 17, 2011 by Korrode Share this post Link to post Share on other sites
korrode Report post Posted May 17, 2011 (edited) Ok so, after reproducing a number of ArchLinux packages to either: A. add options to also compile static libraries (as the upstream default was to not) - or - B. remove options that prevent static libraries from being compiled (added by Arch packagers)  ...I've gotten pretty damn close.  I have a binary that works fine with the following libraries included statically:  libm libxml2 libz libSDL_net libSDL_image libopenal libcal3d libpng libvorbisfile libvorbis libogg librt  ...and I could include libGLU too, but from what i've been reading and due to some other factors, it may be better not to.  The one thing that so far I can't get compiling in is the base libSDL. Well, I can get it to compile, but it segfaults immediately when attempting to execute.  I tried including libdl as well which i saw reported to work for compiling binaries with SDL statically included, but so far no good.  Anyways i'll get back to it tomorrow.  To get the static binary with everything but libSDL the following works, provided you have all the required libraries in static-linking (.a) format. _LDFLAGS=$(shell sdl-config --libs) -lGL -lGLU LIBD=/usr/lib STATICLIBS=$(LIBD)/libm.a $(LIBD)/libxml2.a $(LIBD)/libz.a $(LIBD)/libSDL_net.a $(LIBD)/libSDL.a $(LIBD)/libSDL_image.a $(LIBD)/libopenal.a $(LIBD)/libcal3d.a $(LIBD)/libpng.a $(LIBD)/libvorbisfile.a $(LIBD)/libvorbis.a $(LIBD)/libogg.a $(LIBD)/librt.a Edited May 17, 2011 by Korrode Share this post Link to post Share on other sites
Alberich Report post Posted May 19, 2011 compile error with latest git on windows: engine/logging.cpp:17:17: fatal error: ftw.h: No such file or directory compilation terminated. seems it's not available on Windows, Mac and BSD GNU Gnulib Share this post Link to post Share on other sites
Alberich Report post Posted June 9, 2011 compile error with latest git: textures.c: In function 'init_texture_cache': textures.c:2147:2: warning: passing argument 1 of 'cache_init' makes pointer from integer without a cast cache.h:120:15: note: expected 'const char *' but argument is of type 'int' textures.c:2147:2: error: too few arguments to function 'cache_init' cache.h:120:15: note: declared here if you fix that (add cache name), linking fails: /libelc.a(asc.o):asc.c:(.text+0x39): undefined reference to `memmem' MinGW and some other platforms have no memmem implementation GNU Gnulib Share this post Link to post Share on other sites
Sir_Odie Report post Posted June 9, 2011 Same problem on OSX, so please remove memmem() as it's not a standard function. Share this post Link to post Share on other sites