Bug#347400: Request for advice - Re: Bug#347401
Steve Langasek wrote: So maintainers, please take the advice given in that mail and fix your packages to a) not use the output of Magick-config --libs when linking, and b) use the Debian version of libtool (if applicable). (One alternative to using Magick-config --libs seems to be to use pkg-config -- not because ImageMagick gets its pkg-config support right, but because it happens to get it right in a way that benefits us. ;) Steve, can you give me some advice? I'm attempting to fix this librmagick-ruby bug by switching from Magick-config to pkg-config. Attached is the patch I'm planning to apply ... basically, it avoids using $CFLAGS and $LDFLAGS values computing by configure (using Magick-config) and uses output from pkg-config instead. In my case, Magick-config --libs outputs -lMagick -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread whereas pkg-config --libs ImageMagick returns just -lMagick So, does it sound like this change will do the job? -- cheers, MikeWhttp://www.dogbiscuit.org/mdub/ Index: ext/RMagick/extconf.rb.in === --- ext/RMagick/extconf.rb.in (revision 14) +++ ext/RMagick/extconf.rb.in (working copy) @@ -6,16 +6,10 @@ # Pass along Ruby's version number VERSION_NUMBER = '0x'+RUBY_VERSION.tr('.','') -$CFLAGS = -Wall -g @CFLAGS@ -$CPPFLAGS = -DRUBY_VERSION=#{VERSION_NUMBER} @CPPFLAGS@ +$CFLAGS = -Wall -g + `pkg-config --cflags ImageMagick`.chomp +$CPPFLAGS = -DRUBY_VERSION=#{VERSION_NUMBER} -if RUBY_VERSION = '1.8.0' -$DLDFLAGS = @LDFLAGS@ -else -$LDFLAGS = @LDFLAGS@ -end +$LOCAL_LIBS = `pkg-config --libs ImageMagick`.chomp -$LOCAL_LIBS = @LOCAL_LIBS@ - create_makefile(RMagick)
Bug#347400: Request for advice - Re: Bug#347401
Hi Mike, On Wed, Jan 11, 2006 at 10:18:20PM +1100, Mike Williams wrote: So maintainers, please take the advice given in that mail and fix your packages to a) not use the output of Magick-config --libs when linking, and b) use the Debian version of libtool (if applicable). (One alternative to using Magick-config --libs seems to be to use pkg-config -- not because ImageMagick gets its pkg-config support right, but because it happens to get it right in a way that benefits us. ;) Steve, can you give me some advice? I'm attempting to fix this librmagick-ruby bug by switching from Magick-config to pkg-config. Attached is the patch I'm planning to apply ... basically, it avoids using $CFLAGS and $LDFLAGS values computing by configure (using Magick-config) and uses output from pkg-config instead. In my case, Magick-config --libs outputs -lMagick -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -ldpstk -ldps -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -lpthread -lm -lpthread whereas pkg-config --libs ImageMagick returns just -lMagick So, does it sound like this change will do the job? Yep, this is exactly what you want to see when using pkg-config for shared linking on a GNU ELF platform; everything else is extraneous. Cheers, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. [EMAIL PROTECTED] http://www.debian.org/ signature.asc Description: Digital signature