I have an application that relies on a few of the imagemagick libraries, libMagickCore.so, libMagick++.so and libMagickWand.so to be exact. Anyway, they seem to have a dependency on libSELinux and I'm wondering if I can recompile without this dependency? Does anyone know if that's possible? Has anyone else run into this issue?
The reason I ask is that upon closing my app (shutting down) I get a segmentation fault. From what I've found, this is the fault of the selinux library, but because the imagemagick libs depend on this I was wondering if I could simply somehow remove the dependency.
Thanks,
James
Dependency on selinux?
Re: Dependency on selinux?
ImageMagick has no dependency on libSELinux. If you compile ImageMagick from source, it may resolve the problem.
Re: Dependency on selinux?
Hmmm... I did compile from source originally.
I find that when I check dependencies on libMagickCore.so it's definitely appearing in the list.
if I do an ldd libMagickCore.so, in the list I see libselinux.so.1 => ...
I'm guessing then, that if I compile on a box without libselinux it won't have that "dependency?"
I find that when I check dependencies on libMagickCore.so it's definitely appearing in the list.
if I do an ldd libMagickCore.so, in the list I see libselinux.so.1 => ...
I'm guessing then, that if I compile on a box without libselinux it won't have that "dependency?"
Re: Dependency on selinux?
We have SELinux on our Fedora box and there is no dependency on libSELinux. Its possible that ImageMagick is linking to a library on your system that has a dependency on SELinux.
Re: Dependency on selinux?
I see the same problem here with perlmagick.
It does not depend upon the IM version. 6.6.2-4 behaves the same.
May it be the Perl version?
Magick.xs contains an UNLOAD() function. So I have put a warning after the last line if the function and it is printed just before the segfault.
Code: Select all
$ perl -MImage::Magick -le 'print Image::Magick->VERSION; warn test'
6.5.9
test at -e line 1.
Segmentation fault
May it be the Perl version?
Code: Select all
$ perl -V
Summary of my perl5 (revision 5 version 12 subversion 1) configuration:
Platform:
osname=linux, osvers=2.6.30.2-domu-v4, archname=i686-linux
uname='linux kabatinte 2.6.30.2-domu-v4 #4 smp fri jul 31 15:57:07 cest 2009 i686 gnulinux '
config_args='-ds -e -Dprefix=/opt/perl -Di_db -Di_dbm -Di_ndbm -Di_gdbm - -Duseshrplib=true -Doptimize=-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -g -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV -Dnoextensions=ODBM_File -Uuseithreads -Uusemultiplicity -UDEBUGGING'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV',
cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
ccversion='', gccversion='4.3.2', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
libc=/lib/libc-2.7.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.7'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/opt/perl/lib/5.12.1/i686-linux/CORE'
cccdlflags='-fPIC', lddlflags='-shared -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Wall -pipe -Accflags=-DPERL_USE_SAFE_PUTENV -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF
Built under linux
Compiled at Jun 9 2010 16:45:11
@INC:
/opt/perl/lib/site_perl/5.12.1/i686-linux
/opt/perl/lib/site_perl/5.12.1
/opt/perl/lib/5.12.1/i686-linux
/opt/perl/lib/5.12.1
.
Re: Dependency on selinux?
Solved it.
Its not perl and not IM. The culprit is the libselinux version shipped with debian 5.0.4. After an upgrade to "testing", that means:
all works as expected.
For the record, I think at least libselinux 2.0.82 is needed. See http://marc.info/?l=selinux&m=124577715731497&w=2
Its not perl and not IM. The culprit is the libselinux version shipped with debian 5.0.4. After an upgrade to "testing", that means:
Code: Select all
Preparing to replace libselinux1 2.0.65-5 (using .../libselinux1_2.0.94-1_i386.deb) ...
all works as expected.
For the record, I think at least libselinux 2.0.82 is needed. See http://marc.info/?l=selinux&m=124577715731497&w=2