Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 133820 - media-libs/imlib-1.9.14-r3 --as-needed fix
Summary: media-libs/imlib-1.9.14-r3 --as-needed fix
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it
URL:
Whiteboard:
Keywords:
Depends on: 133819
Blocks: as-needed 133824
  Show dependency tree
 
Reported: 2006-05-19 16:17 UTC by Thomas S. Howard
Modified: 2007-02-05 22:20 UTC (History)
6 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
imlib-1.9.14 as-needed fix (imlib-1.9.14-as-needed.patch,2.08 KB, patch)
2006-05-19 16:18 UTC, Thomas S. Howard
Details | Diff
imlib-1.9.14-r3.ebuild.patch for --as-needed (imlib-1.9.14-r3.ebuild.patch,309 bytes, patch)
2006-05-19 16:19 UTC, Thomas S. Howard
Details | Diff
Revised imlib-1.9.14-r3 patch for --as-needed (imlib-1.9.14-as-needed.patch,8.20 KB, patch)
2006-05-21 03:47 UTC, Thomas S. Howard
Details | Diff
Revised imlib-1.9.14-r3.ebuild.patch for --as-needed (imlib-1.9.14-r3.ebuild.patch,721 bytes, patch)
2006-05-21 03:50 UTC, Thomas S. Howard
Details | Diff
(Re)Revised imlib-1.9.14-r3 patch for --as-needed (imlib-1.9.14-as-needed.patch,8.20 KB, patch)
2006-05-21 16:32 UTC, Thomas S. Howard
Details | Diff
(Re)Revised imlib-1.9.14-r3 patch for --as-needed (imlib-1.9.14-as-needed.patch,8.20 KB, patch)
2006-05-21 16:32 UTC, Thomas S. Howard
Details | Diff
(Re(Re))Revised imlib-1.9.14-r3 patch for --as-needed (imlib-1.9.14-as-needed.patch,8.20 KB, patch)
2006-05-25 09:55 UTC, Thomas S. Howard
Details | Diff
(Re(Re))Revised imlib-1.9.14-r3 patch for --as-needed (Re(Re(Re)))Revised imlib-1.9.14-r3 patch for --as-needed (imlib-1.9.14-as-needed.patch,8.22 KB, patch)
2006-12-31 03:29 UTC, Thomas S. Howard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas S. Howard 2006-05-19 16:17:25 UTC
I only bothered with this because the other ebuild is hard masked, but it's the one I have installed. This one was tricky. It'll quietly fail to find gtk if gtk isn't fixed, and compile fine with --as-needed. But it'll kill gnome-libs on configure, even if you disable --as-needed in make.conf. This is because it sticks --as-needed into the output of imlib-config, thus gnome-libs flips out, dies, and annoys user.

The errors here were just dumb:  Hey, let's have a libgdk_imlib.so, but not bother to link with gdk. I also altered configure so that linker flags come before any objects. It doesn't make a big difference, but it does matter. I only fixed this for linux. I just don't really care about HP-UX,IRIX,netbsd,etc. Sorry.
Comment 1 Thomas S. Howard 2006-05-19 16:18:27 UTC
Created attachment 87080 [details, diff]
imlib-1.9.14 as-needed fix
Comment 2 Thomas S. Howard 2006-05-19 16:19:31 UTC
Created attachment 87081 [details, diff]
imlib-1.9.14-r3.ebuild.patch for --as-needed
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-05-19 17:45:18 UTC
This patch is not correct. You should never touch the 'configure' file, if the code comes out of configure.in, patch that. If you have Makefile.am, don't patch Makefile.in.

Also, you have to re-run autotools when you touch their files. When you touch only Makefile.am you can just run "eautomake" (it takes care by itself to call the right tools if the automake version originally used is too old), when you touch also configure.{in,ac} you have to use eautoreconf (you might just use eautoconf, but eautoreconf is safer, albeit longer, and should always used instead of eautoconf if possible).

If the code in configure is not found in configure.in it might be that it's coming out of libtool, if that's the case you might want to use eautoreconf anyway to force libtool regeneration.
Comment 4 Thomas S. Howard 2006-05-21 03:47:22 UTC
Created attachment 87188 [details, diff]
Revised imlib-1.9.14-r3 patch for --as-needed

configure.in isn't as changed as it seems. Mostly, I cleaned up quoting and enclosed nested macros in '[' and ']'
Comment 5 Thomas S. Howard 2006-05-21 03:50:36 UTC
Created attachment 87189 [details, diff]
Revised imlib-1.9.14-r3.ebuild.patch for --as-needed

Now with 100% more "eautoreconf"...
Comment 6 Thomas S. Howard 2006-05-21 16:32:39 UTC
Created attachment 87217 [details, diff]
 (Re)Revised imlib-1.9.14-r3 patch for --as-needed

There were three chars that got unintentionally omitted from an AC_TRY_COMPILE.
They're back now.
Comment 7 Thomas S. Howard 2006-05-21 16:32:57 UTC
Created attachment 87218 [details, diff]
 (Re)Revised imlib-1.9.14-r3 patch for --as-needed

There were three chars that got unintentionally omitted from an AC_TRY_COMPILE.
They're back now.
Comment 8 Thomas S. Howard 2006-05-21 16:34:48 UTC
Ummm, I don't know why firefox posted that twice. 
Comment 9 Thomas S. Howard 2006-05-25 09:55:45 UTC
Created attachment 87497 [details, diff]
(Re(Re))Revised imlib-1.9.14-r3 patch for --as-needed

Pasted in the wrong error message for jpeglib failure.
Comment 10 François Bissey 2006-12-29 16:24:00 UTC
Hi,

I tried your patch and it didn't work for me. I suspect the libraries are linked in the wrong order when I get the error:
powerpc-unknown-linux-gnu-gcc -O2 -mcpu=7450 -mtune=7450 -pipe -maltivec -mabi=altivec -fno-strict-aliasing -Wl,--as-needed -o .libs/imlib_config imlib_config.o icons.o testimg.o -rdynamic  ../gdk_imlib/.libs/libgdk_imlib.so -L/usr/X11R6/lib -L/usr/lib /usr/lib/libgtk.so /usr/lib/libgdk.so /usr/lib/libgmodule.so /usr/lib/libglib.so /usr/lib/libXi.so /usr/lib/libXext.so /usr/lib/libtiff.so -ljbig /usr/lib/libjpeg.so -lc /usr/lib/libgif.so /usr/lib/libSM.so /usr/lib/libICE.so /usr/lib/libX11.so /usr/lib/libXau.so /usr/lib/libXdmcp.so -ldl /usr/lib/libpng12.so -lz -lm
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_sBIT'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `DGifGetExtensionNext'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_read_scanlines'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `DGifGetRecordType'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `DGifGetImageDesc'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFDefaultStripSize'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_strip_16'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_filler'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_create_read_struct'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_set_defaults'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `DGifOpenFileHandle'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFReadRGBAImage'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_read_fn'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_packing'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_get_io_ptr'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `_TIFFmalloc'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_start_decompress'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_IHDR'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `DGifGetLine'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFWriteScanline'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_write_rows'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `DGifCloseFile'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `_TIFFfree'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_get_valid'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_destroy_decompress'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_std_error'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_CreateDecompress'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFFdOpen'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_create_write_struct'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFSetField'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFScanlineSize'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `DGifGetExtension'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_write_info'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `PrintGifError'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFClose'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_expand'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFOpen'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_read_header'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_start_compress'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_write_end'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_get_IHDR'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_finish_decompress'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_stdio_src'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_CreateCompress'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_read_info'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_finish_compress'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_destroy_read_struct'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_read_image'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_create_info_struct'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_set_quality'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_stdio_dest'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `jpeg_write_scanlines'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_destroy_write_struct'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_set_shift'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `TIFFGetField'
../gdk_imlib/.libs/libgdk_imlib.so: undefined reference to `png_init_io'

I am on ppc and use binutils-2.17.
Comment 11 Thomas S. Howard 2006-12-31 03:29:29 UTC
Created attachment 105032 [details, diff]
(Re(Re))Revised imlib-1.9.14-r3 patch for --as-needed
(Re(Re(Re)))Revised imlib-1.9.14-r3 patch for --as-needed



Not a linking order problem so much as a not-linking-at-all problem.  I forgot to link the various image libraries with libgdk_imlib.so.  This patch does that.  I never noticed because I've been using imlib-1.9.15 this whole time. 

I can't believe it took this long for someone to discover that the patch didn't actually fix a damn thing.
Comment 12 Thomas S. Howard 2006-12-31 03:33:10 UTC
>(Re(Re))Revised imlib-1.9.14-r3 patch for --as-needed
>(Re(Re(Re)))Revised imlib-1.9.14-r3 patch for --as-needed

Why did Bugzilla do that? Or maybe it was firefox. Oh,well, f*** it. It's only aesthetics.
Comment 13 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-01-19 21:38:22 UTC
This is a gnome 1.4 ism, and the gnome herd doesn't want to maintain it anymore.  No gnome package currently in the tree deps on this.
Comment 14 François Bissey 2007-01-20 00:48:20 UTC
(In reply to comment #13)
> This is a gnome 1.4 ism, and the gnome herd doesn't want to maintain it
> anymore.  No gnome package currently in the tree deps on this.
> 
After running "equery d imlib" I found that kuickshow and scigraphica seem
to depend on imlib. ldd run on kuickshow show that it is indeed linked
on imlib but not imlib2. While equery also report scigraphica I haven't
found a link to imlib or imlib2 on the executable with ldd.
A bit strange of a kde app like kuickshow to depend on imlib instead of
imlib2.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2007-01-20 01:10:05 UTC
(In reply to comment #14)

May I ask how's this related to --as-needed issues?
Comment 16 François Bissey 2007-01-20 07:46:39 UTC
(In reply to comment #15)
After comment #13 I checked that I really needed imlib and it wasn't 
just cruft that I should remove. I guess I had the idea that someone would 
solve the problem by pulling imlib out on the ground that apps using it are 
gone and reacted to that.
So no it is not relevant to --as-needed sorry for the pollution.
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2007-02-05 22:20:30 UTC
My entire system is built with --as-needed and had no problems with imlib at all.