[R] rimage package fftw breaks when freeing memory on openSUSE 11.3
Mads Jeppe Tarp-Johansen
s02mjtj at math.ku.dk
Wed Feb 9 09:23:25 CET 2011
Upon fresh installation of R-patched and rimage on openSUSE 11.3 box,
simple fftw on renown lena image cause memory free failure.
Quick: Go to the end of this mail and read the error message from R
Thoruogh: Find detailed step-by-step how sopprt library fftw2 was
installed and how rimage was installed.
Regards Mads Jeppe
VERSIONS
========
openSUSE
--------
# cat /etc/SuSE-release
openSUSE 11.3 (x86_64)
VERSION = 11.3
# uname -a
Linux host 2.6.34.7-0.7-default #1 SMP 2010-12-13 11:13:53 +0100 x86_64 x86_64 x86_64 GNU/Linux
R
-
# R --version
R version 2.12.1 Patched (2011-02-06 r54252)
fftw2 (observe soft link at the end)
-----
visit http://software.opensuse.org/113/en ->
search for fftw2 ->
download fftw2 and fftw2-devel
install rpms
# zypper install fftw2-2.1.5-245.1.x86_64.rpm
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
fftw2
1 new package to install.
Overall download size: 285.0 KiB. After the operation, additional 895.0 KiB will be used.
Continue? [y/n/?] (y):
Retrieving package fftw2-2.1.5-245.1.x86_64 (1/1), 285.0 KiB (895.0 KiB unpacked)
Installing: fftw2-2.1.5-245.1 [done]
Additional rpm output:
warning: /var/cache/zypp/packages/_tmpRPMcache_/fftw2-2.1.5-245.1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 943d8bb8: NOKEY
# zypper install fftw2-devel-2.1.5-245.1.x86_64.rpm
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW package is going to be installed:
fftw2-devel
1 new package to install.
Overall download size: 335.0 KiB. After the operation, additional 1.2 MiB will be used.
Continue? [y/n/?] (y):
Retrieving package fftw2-devel-2.1.5-245.1.x86_64 (1/1), 335.0 KiB (1.2 MiB unpacked)
Installing: fftw2-devel-2.1.5-245.1 [done]
Additional rpm output:
warning: /var/cache/zypp/packages/_tmpRPMcache_/fftw2-devel-2.1.5-245.1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 943d8bb8: NOKEY
install-info: warning: no info dir entry in `/usr/share/info/fftw.info.gz'
# ln -s /usr/lib64/libdfftw.so.2.0.7 /usr/lib64/libfftw.so
rimage
------
# R
> install.packages("rimage")
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://mirrors.dotsrc.org/cran/src/contrib/rimage_0.5-8.1.tar.gz'
Content type 'application/x-gzip' length 72163 bytes (70 Kb)
opened URL
==================================================
downloaded 70 Kb
* installing *source* package ‘rimage’ ...
checking for g++... g++
checking for C++ compiler default output... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fftw.h usability... yes
checking fftw.h presence... yes
checking for fftw.h... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for inline... inline
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
g++ -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c equalize.cpp -o equalize.o
equalize.cpp: In function ‘Matrix& computeEqualization(Matrix&)’:
equalize.cpp:69:31: warning: comparison between signed and unsigned integer expressions
gcc -std=gnu99 -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c fftw_access_func.c -o fftw_access_func.o
g++ -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c freqfilters.cpp -o freqfilters.o
g++ -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c interface.cpp -o interface.o
gcc -std=gnu99 -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c jpegio.c -o jpegio.o
jpegio.c: In function ‘read_JPEG_file’:
jpegio.c:108:5: warning: pointer targets in assignment differ in signedness
gcc -std=gnu99 -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c laplacian.c -o laplacian.o
laplacian.c: In function ‘laplacian’:
laplacian.c:15:9: warning: unused variable ‘val’
g++ -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c matrix.cpp -o matrix.o
matrix.cpp: In member function ‘void Matrix::removeRow(int)’:
matrix.cpp:104:29: warning: comparison between signed and unsigned integer expressions
gcc -std=gnu99 -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c smooth.c -o smooth.o
gcc -std=gnu99 -I/usr/lib64/R/include -I/usr/local/include -fpic -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -c sobel.c -o sobel.o
g++ -shared -L/usr/local/lib64 -o rimage.so equalize.o fftw_access_func.o freqfilters.o interface.o jpegio.o laplacian.o matrix.o smooth.o sobel.o -ljpeg -lfftw -L/usr/lib64/R/lib -lR
installing to /usr/lib64/R/library/rimage/libs
** R
** data
** preparing package for lazy loading
** help
*** installing help indices
** building package indices ...
** testing if installed package can be loaded
* DONE (rimage)
The downloaded packages are in
‘/tmp/Rtmp9bdS7Z/downloaded_packages’
Updating HTML index of packages in '.Library'
>
RIMAGE FAILURE
==============
Retrieve sample image
> wget http://www.ee.columbia.edu/~sfchang/course/dip/images/lena.jpg
Try baisc fftw functionality in R with package rimage as plain user
> R
> library("rimage")
> im <- read.jpeg("lena.jpg")
> plot(im)
> im.fft <- fftw(im,debug=TRUE)
*** entered module fftw_access_func...
getting dimensions of nx=256, ny=256
memory allocation successful
creating a plan succeeded
finished computing the fft
freeing enslaved memory
*** glibc detected *** /usr/lib64/R/bin/exec/R: free(): invalid next size (normal): 0x00000000022b1fc0 ***
More information about the R-help
mailing list