# HG changeset patch # User Michael Schloh von Bennewitz # Date 1349373862 -7200 # Node ID 1e46ce84435aceae011d9ce23928401f1cc97ba2 # Parent 84a9f800fa375fa0a723f2877f571df74a725249 Correct very nasty code segment linkage problem when building perl DSO. This problem leads to segfaults in libpixman called by RRDs::Simple, as diagnosed by gdb(1) indicating 'print var... cannot access memory at address' or something similar. diff -r 84a9f800fa37 -r 1e46ce84435a libpixman/libpixman.spec --- a/libpixman/libpixman.spec Thu Oct 04 20:00:55 2012 +0200 +++ b/libpixman/libpixman.spec Thu Oct 04 20:04:22 2012 +0200 @@ -32,7 +32,10 @@ Group: XWindow License: MIT-style Version: 0.26.2 -Release: 20120630 +Release: 20120800 + +# package options +%option with_pic no # list of sources Source0: http://cairographics.org/releases/pixman-%{version}.tar.gz @@ -59,7 +62,12 @@ %build CC="%{l_cc}" \ +%if "%{with_pic}" == "yes" + CFLAGS="%{l_cflags -O} -fPIC" \ + LDFLAGS="%{l_cflags -O} -fPIC" \ +%else CFLAGS="%{l_cflags -O}" \ +%endif ./configure \ --prefix=%{l_prefix} \ --disable-gtk \ diff -r 84a9f800fa37 -r 1e46ce84435a rrdtool/rrdtool.patch --- a/rrdtool/rrdtool.patch Thu Oct 04 20:00:55 2012 +0200 +++ b/rrdtool/rrdtool.patch Thu Oct 04 20:04:22 2012 +0200 @@ -116,7 +116,7 @@ - } else { - $librrd = "-L../../src/.libs/ $R -lrrd"; - } -+ my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib -lcairo -lpangocairo -lpixman-1 -lpango -lpangoft2 -lfreetype -lpng -lgobject -lgio -lgmodule -lglib -lfontconfig -lfreetype -lxml2 -lexpat -lpcre -lz -liconv -lintl"; ++ my $librrd = "-L../../src/.libs/ -lrrd -L$Config{prefix}/lib -lcairo -lpangocairo -lpixman-1 -lpango -lpangoft2 -lfreetype -lpng -lgobject -lgio -lgmodule -lglib -lfontconfig -lfreetype -lxml2 -lexpat -lpcre -lz -liconv -lintl -lffi"; WriteMakefile( 'NAME' => 'RRDs', diff -r 84a9f800fa37 -r 1e46ce84435a rrdtool/rrdtool.spec --- a/rrdtool/rrdtool.spec Thu Oct 04 20:00:55 2012 +0200 +++ b/rrdtool/rrdtool.spec Thu Oct 04 20:04:22 2012 +0200 @@ -54,11 +54,11 @@ # build information BuildPreReq: OpenPKG, openpkg >= 20100101, gcc, make, pkgconfig, perl-openpkg >= 5.8.3-20040126, perl-module, intltool PreReq: OpenPKG, openpkg >= 20100101 -BuildPreReq: png, zlib, freetype, pango, cairo, libxml -PreReq: png, zlib, freetype, pango, cairo, libxml +BuildPreReq: png, zlib, freetype, pango, cairo, libpixman, libxml, libffi +PreReq: png, zlib, freetype, pango, cairo, libpixman, libxml, libffi %if "%{with_perl}" == "yes" -BuildPreReq: perl -PreReq: perl +BuildPreReq: perl, libpixman::with_pic = yes +PreReq: perl, libpixman::with_pic = yes %endif %if "%{with_python}" == "yes" BuildPreReq: python @@ -117,8 +117,13 @@ echo "ac_cv_path_PERL=no" >config.cache CC="%{l_cc}" \ CPPFLAGS="%{l_cppflags}" \ +%if "%{with_perl}" == "yes" + CFLAGS="%{l_cflags -O} -fPIC" \ + LDLAGS="%{l_ldflags} -fPIC" \ +%else CFLAGS="%{l_cflags -O}" \ LDLAGS="%{l_ldflags}" \ +%endif LIBS="`pkg-config pangocairo --libs`" \ ./configure \ --cache-file=./config.cache \ @@ -155,7 +160,7 @@ -e 's/^\(install-data-am:\).*/\1/' \ Makefile %{l_make} %{l_mflags} install \ - DESTDIR=$RPM_BUILD_ROOT AM_MAKEFLAGS="DESTDIR=$RPM_BUILD_ROOT" + DESTDIR=$RPM_BUILD_ROOT DESTDIR="$RPM_BUILD_ROOT" # install Perl part %if "%{with_perl}" == "yes"