You are not logged in.

#1 2013-05-07 08:20:54

z1lt0id
Member
Registered: 2012-09-20
Posts: 168

Sludge AUR package doesn't compile with libpng16 upgrade.

Sludge which is an adventure game engine in the AUR packages (https://aur.archlinux.org/packages.php?ID=49510) doesn't compile now due to the libpng package upgrade.  I get the following error messages when I compile.

make  all-recursive
make[1]: Entering directory `/tmp/yaourt-tmp-dean/aur-sludge/src/sludge-2.2'
Making all in source
make[2]: Entering directory `/tmp/yaourt-tmp-dean/aur-sludge/src/sludge-2.2/source'
Making all in Engine
make[3]: Entering directory `/tmp/yaourt-tmp-dean/aur-sludge/src/sludge-2.2/source/Engine'
  CXX    backdrop.o
  CXX    bg_effects.o
  CXX    builtin.o
  CXX    cursors.o
  CXX    debug.o
  CXX    fileset.o
  CXX    floor.o
  CXX    fonttext.o
  CXX    freeze.o
  CXX    graphics.o
  CXX    helpers.o
  CXX    language.o
  CXX    line.o
  CXX    linuxstuff.o
  CXX    loadsave.o
  CXX    main.o
  CXX    memwatch.o
  CXX    moreio.o
moreio.cpp: In function ‘char* encodeFilename(char*)’:
moreio.cpp:173:36: warning: converting ‘false’ to pointer type ‘char*’ [-Wconversion-null]
   if (! checkNew (newName)) return false;
                                    ^
moreio.cpp: In function ‘char* decodeFilename(char*)’:
moreio.cpp:212:36: warning: converting ‘false’ to pointer type ‘char*’ [-Wconversion-null]
   if (! checkNew (newName)) return false;
                                    ^
  CXX    movie.o
  CXX    newfatal.o
  CXX    objtypes.o
  CXX    people.o
people.cpp: In function ‘personaAnimation* makeNullAnim()’:
people.cpp:88:35: warning: converting ‘false’ to pointer type ‘personaAnimation*’ [-Wconversion-null]
  if (! checkNew (newAnim)) return false;
                                   ^
people.cpp: In function ‘personaAnimation* copyAnim(personaAnimation*)’:
people.cpp:101:35: warning: converting ‘false’ to pointer type ‘personaAnimation*’ [-Wconversion-null]
  if (! checkNew (newAnim)) return false;
                                   ^
people.cpp:112:44: warning: converting ‘false’ to pointer type ‘personaAnimation*’ [-Wconversion-null]
   if (! checkNew (newAnim->frames)) return false;
                                            ^
  CXX    region.o
  CXX    savedata.o
  CXX    shaders.o
  CXX    sludger.o
sludger.cpp: In function ‘FILE* openAndVerify(char*, char, char, const char*, int&)’:
sludger.cpp:141:10: warning: converting ‘false’ to pointer type ‘FILE* {aka _IO_FILE*}’ [-Wconversion-null]
   return false;
          ^
  CXX    sprbanks.o
  CXX    sprites.o
sprites.cpp: In function ‘bool loadSpriteBank(int, spriteBank&, bool)’:
sprites.cpp:287:68: error: ‘memset’ was not declared in this scope
   memset (tmp[tex_num], 0, maxheight[tex_num]*totalwidth[tex_num]*4);
                                                                    ^
make[3]: *** [sprites.o] Error 1
make[3]: Leaving directory `/tmp/yaourt-tmp-dean/aur-sludge/src/sludge-2.2/source/Engine'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-dean/aur-sludge/src/sludge-2.2/source'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-dean/aur-sludge/src/sludge-2.2'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().

Initially after libpng16 upgraded Sludge was still asking for the libpng15 package so I installed the AUR of libpng15.  Silly me thought maybe if I recompile Sludge it might point to libpng16 but now it just won't compile at all.

Any thoughts?

Offline

#2 2013-05-07 08:24:13

progandy
Member
Registered: 2012-05-17
Posts: 2,152

Re: Sludge AUR package doesn't compile with libpng16 upgrade.

Maybe there is a missing include in sprites.cpp? memset requires #include <string.h>

Edit: Add this prepare function to the PKGBUILD

function prepare() {
 sed 's/#include "shaders.h"/&\n#include <string.h>/' "$srcdir/$pkgname-$pkgver/source/Engine/sprites.cpp"
}

Last edited by progandy (2013-05-07 08:38:56)

Offline

#3 2013-05-07 08:36:11

z1lt0id
Member
Registered: 2012-09-20
Posts: 168

Re: Sludge AUR package doesn't compile with libpng16 upgrade.

That seemed to resolve my problem.  Thank you smile

Offline

Board footer

Powered by FluxBB