[Slackbuilds-users] Fix to SLiM

Max Miorim miorimmax at gmail.com
Mon May 31 16:25:51 UTC 2010


Hi,

The SlackBuild script for SLiM (a graphical login manager) goes
through the compilation and package creation process just fine, but
theres a problem with the resulting binary: it links against both
libpng12 and libpng14 (Slackware 13.1 comes with both versions in the
same package) and just dies, throwing the following at
/var/log/slim.log:

libpng warning: Application was compiled with png.h from libpng-1.4.2
libpng warning: Application  is  running with png.c from libpng-1.2.43
libpng error: Incompatible libpng version in application and library

At first, I modified its Makefile to use libpng12 only, it worked but
I guess it'd break compatibility with previous Slackware versions...
So, I tried with libpng14 (using -I/usr/include/libpng and -lpng -
without any version suffix, libpng14 is the /default/ in 13.1) and
it's working as intended again:

diff --git a/slim-1.3.1-use_only_one_version_of_libpng.patch
b/slim-1.3.1-use_only_one_version_of_libpng.patch
new file mode 100644
index 0000000..511d68e
--- /dev/null
+++ b/slim-1.3.1-use_only_one_version_of_libpng.patch
@@ -0,0 +1,16 @@
+diff --git a/Makefile b/Makefile
+index f7d3d2d..7fea3db 100644
+--- a/Makefile
++++ b/Makefile
+@@ -5,9 +5,9 @@
+ #######################################################
+ CXX=/usr/bin/g++
+ CC=/usr/bin/gcc
+-CFLAGS=-Wall -I. -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include
++CFLAGS=-Wall -I. -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/usr/include/libpng -I/usr/include
+ CXXFLAGS=$(CFLAGS)
+-LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz
-lm -lcrypt -lXmu -lpng -ljpeg
++LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lz -lm
-lcrypt -lXmu -lpng -ljpeg
+ CUSTOM=-DHAVE_SHADOW
+ ifdef USE_PAM
+ LDFLAGS+= -lpam
diff --git a/slim.SlackBuild b/slim.SlackBuild
index 4b33bb4..6f58821 100644
--- a/slim.SlackBuild
+++ b/slim.SlackBuild
@@ -72,6 +72,9 @@ patch -p0 < $CWD/slim.conf.patch
 # Include stdio.h for -current (but harmless on 13.0)
 patch -p1 < $CWD/slim-1.3.1-include_stdio_h.patch

+# Use the current version of libpng instead of linking against both
libpng12 and libpng14
+patch -p1 < $CWD/slim-1.3.1-use_only_one_version_of_libpng.patch
+
 make \
  CFLAGS+="$SLKCFLAGS" \
  USE_PAM=${USE_PAM}



Regards,

Max


More information about the SlackBuilds-users mailing list