Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583584 - media-libs/gd-2.2.0: Linking of libgd fails because libtool revision number is too large for ld64
Summary: media-libs/gd-2.2.0: Linking of libgd fails because libtool revision number i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All OS X
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL: https://github.com/libgd/libgd/issues...
Whiteboard:
Keywords:
: 584420 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-20 16:08 UTC by Michael Weiser
Modified: 2016-06-24 08:16 UTC (History)
2 users (show)

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


Attachments
work around ld64 version number limitation by encoding revision by 8/4/0 bitshift (gd-2.2.0-libversion.patch,622 bytes, patch)
2016-05-20 16:13 UTC, Michael Weiser
Details | Diff
add patch to ebuild (gd-2.2.0.ebuild-libversion.patch,560 bytes, patch)
2016-05-20 16:14 UTC, Michael Weiser
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Weiser 2016-05-20 16:08:33 UTC
When linking libgd of media-libs/gd-2.2.0 on OS X it fails with:

/usr/local/gentoo/bin/bash ../libtool  --tag=CC   --mode=link clang  -Werror -march=core2 -O2 -pipe -fomit-frame-pointer -fvisibility=hidden -version-info 3:20200:0 -no-undefined -Wl,-dead_strip_dylibs -o libgd.la -rpath /usr/local/gentoo/usr/lib gd.lo gd_bmp.lo gd_color.lo gd_color_map.lo gd_color_match.lo gd_crop.lo gd_filename.lo gd_filter.lo gd_gd.lo gd_gd2.lo gd_gif_in.lo gd_gif_out.lo gd_interpolation.lo gd_io.lo gd_io_dp.lo gd_io_file.lo gd_io_ss.lo gd_jpeg.lo gd_matrix.lo gd_nnquant.lo gd_png.lo gd_rotate.lo gd_security.lo gd_ss.lo gd_tga.lo gd_tiff.lo gd_topal.lo gd_transform.lo gd_version.lo gd_wbmp.lo gd_webp.lo gd_xbm.lo gdcache.lo gdfontg.lo gdfontl.lo gdfontmb.lo gdfonts.lo gdfontt.lo gdft.lo gdfx.lo gdhelpers.lo gdkanji.lo gdtables.lo gdxpm.lo wbmp.lo -L/usr/local/gentoo/usr/lib -liconv -R/usr/local/gentoo/usr/lib -lz  -lpng16  -lfontconfig -lfreetype   -ljpeg  -ltiff
libtool: link: rm -fr  .libs/libgd.3.0.220.dylib .libs/libgd.3.dylib .libs/libgd.dylib .libs/libgd.la .libs/libgd.lai
libtool: link: clang -dynamiclib  -o .libs/libgd.3.0.20200.dylib  .libs/gd.o .libs/gd_bmp.o .libs/gd_color.o .libs/gd_color_map.o .libs/gd_color_match.o .libs/gd_crop.o .libs/gd_filename.o .libs/gd_filter.o .libs/gd_gd.o .libs/gd_gd2.o .libs/gd_gif_in.o .libs/gd_gif_out.o .libs/gd_interpolation.o .libs/gd_io.o .libs/gd_io_dp.o .libs/gd_io_file.o .libs/gd_io_ss.o .libs/gd_jpeg.o .libs/gd_matrix.o .libs/gd_nnquant.o .libs/gd_png.o .libs/gd_rotate.o .libs/gd_security.o .libs/gd_ss.o .libs/gd_tga.o .libs/gd_tiff.o .libs/gd_topal.o .libs/gd_transform.o .libs/gd_version.o .libs/gd_wbmp.o .libs/gd_webp.o .libs/gd_xbm.o .libs/gdcache.o .libs/gdfontg.o .libs/gdfontl.o .libs/gdfontmb.o .libs/gdfonts.o .libs/gdfontt.o .libs/gdft.o .libs/gdfx.o .libs/gdhelpers.o .libs/gdkanji.o .libs/gdtables.o .libs/gdxpm.o .libs/wbmp.o   -L/usr/local/gentoo/usr/lib /usr/local/gentoo/usr/lib/libiconv.dylib -lz -lpng16 -lfontconfig -lfreetype -ljpeg -ltiff  -march=core2 -O2 -Wl,-dead_strip_dylibs   -install_name  /usr/local/gentoo/usr/lib/libgd.3.dylib -compatibility_version 4 -current_version 4.20200 -Wl,-single_module
ld: malformed 64-bit a.b.c.d.e version number: 4.20200
x86_64-apple-darwin15-clang-3.8: error: linker command failed with exit code 1 (use -v to see invocation)

As https://sourceforge.net/p/assimp/discussion/817654/thread/381fa18a/#a5c6 explains, ld64 encodes library versions into a uint64 with specific numbers of bits reserved for components. Here 20200 doesn't fit into 10 bits.

Reproducible: Always
Comment 1 Michael Weiser 2016-05-20 16:13:49 UTC
Created attachment 434780 [details, diff]
work around ld64 version number limitation by encoding revision by 8/4/0 bitshift
Comment 2 Michael Weiser 2016-05-20 16:14:20 UTC
Created attachment 434782 [details, diff]
add patch to ebuild
Comment 3 Fabian Groffen gentoo-dev 2016-05-29 09:10:48 UTC
*** Bug 584420 has been marked as a duplicate of this bug. ***
Comment 4 SpanKY gentoo-dev 2016-06-24 08:10:15 UTC
bug reports really should go upstream