Ticket #121 (closed defect: fixed)
FYI: Build of rrdtool v1.2.13 on AIX 5.3 with xlc v8 ( Fix for jmpbuf problem !? )
| Reported by: | human | Owned by: | oetiker |
|---|---|---|---|
| Priority: | trivial | Milestone: | |
| Component: | misc | Version: | 1.2.13 |
| Keywords: | Cc: |
Description
Notes for rrdtool v1.2.13 build on AIX 5.3 ML6 with xlc v8
Please be aware that i am not a programmer! so the patch might break some thing.
During the make process i have got the error:
..... "jmpbuf" is not a member of "struct png_struct_def"
I took a look at /opt/freeware/include/png.h and found that ifdef statement
$ /usr/bin/grep -p jmpbuf /opt/freeware/include/png.h
struct png_struct_def
{
#ifdef PNG_SETJMP_SUPPORTED
jmp_buf PNG_jmpbuf; /* used in png_error */
#endif
After patching the pngsize.c ( replacing jmp_buf with PNG_jumbuf )
$ cat rrdtool-1.2.13-AIX-jmpbuf.patch
*** rrdtool-1.2.13/src/pngsize.c.orig Tue Nov 13 17:45:24 2007
--- rrdtool-1.2.13/src/pngsize.c Tue Nov 13 17:42:00 2007
***************
*** 29,35 ****
#undef jmpbuf
#endif
! if (setjmp(png_read_ptr->jmpbuf)){
png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL);
return 0;
}
--- 29,35 ----
#undef jmpbuf
#endif
! if (setjmp(png_read_ptr->PNG_jmpbuf)){
png_destroy_read_struct(&png_read_ptr, &info_ptr, (png_infopp)NULL);
return 0;
}
the make process succeeded without problems. Note: This patch works also for rrdtool v1.2.24
Build environment:
Version of installed RPM Packages
$ lslpp -L | egrep "libpng|libtool|libart|zlib|freetype2"
freetype2 2.1.7-5 C R A free and portable TrueType
freetype2-devel 2.1.7-5 C R FreeType development headers
libart_lgpl 2.3.17-4 C R Library of graphics routines
libart_lgpl-devel 2.3.17-4 C R Libraries and headers for
libart_lgpl. (/bin/rpm)
libpng 1.2.1-6 C R A library of functions for
libpng-devel 1.2.1-6 C R Development tools for programs
libtool 1.5.8-1 C R The GNU libtool, which
zlib 1.2.3-3 C R The zlib compression and
zlib-devel 1.2.3-3 C R Header files and libraries for
zlib. (/bin/rpm)
Build script:
#!/bin/bash
export PATH=/usr/local/bin:/opt/freeware/bin:/usr/vacpp/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11
export APP=rrdtool-1.2.13
export OS=AIX
touch $APP.$OS.now
mkdir $OS 2>/dev/null
cd $OS && rm -rf ./$APP
tar -xvf ../${APP}.tar
cd $APP
# Start patch
patch -p1 < ../../rrdtool-1.2.13-AIX-jmpbuf.patch
# Start build
export CONFIG_SHELL=/opt/freeware/bin/bash
export CONFIGURE_ENV_ARGS=/opt/freeware/bin/bash
export CC=cc_r
export CXX=xlC_r
./configure \
--prefix=/opt/freeware \
--enable-perl-site-install \
--disable-ruby \
--disable-tcl \
--disable-python \
--enable-pthread
gmake
gmake site-perl-install
gmake install



thanks. I integrated this in r1409.