Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 490200 - =media-libs/giflib-4.2.3 had an incompatible change without SONAME change
Summary: =media-libs/giflib-4.2.3 had an incompatible change without SONAME change
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Graphics Project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 512540
  Show dependency tree
 
Reported: 2013-11-02 22:16 UTC by Martin von Gagern
Modified: 2016-11-28 16:08 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2013-11-02 22:16:57 UTC
Emerging sci-geosciences/qlandkartegt-1.7.5 fails for me:

/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/libgdal.so: undefined reference to `PrintGifError'

“ldd -r /usr/lib/libgdal.so” confirms that undefined symbol.

This seems related to bug #486372: the function was apparently renamed to GifErrorString. In this case, the source code of gdal apparently can handle both versions of giflib, so simply recompiling gdal does solve the immediate problem.

My concern here is the fact that the library changes ABI in a way that is not backwards compatible. It does so without a SONAME change, so preserved-rebuild won't help. Couldn't (and shouldn't) we modify this library to maintain that compatibility? E.g. by defining PrintGifError as a (possibly weak) alias for GifErrorString? That way, existing BINARY code would continue to work, and we could address the change in name at the source level one package at a time.

Should I report the lack of binary compatibility upstream?
Comment 1 Martin von Gagern 2013-11-02 22:33:36 UTC
(In reply to Martin von Gagern from comment #0)
> E.g. by defining PrintGifError as a (possibly weak) alias for GifErrorString?

Aparently not an option: GifErrorString doesn't seem to print its result. Bug #486372 comment #1 misled me to believe otherwise.

This leaves reimplementing that method, or doing a SONAME bump. The latter sounds like a thing best done upstream, but it might be too late for that.
Why do library developers have so little concern for binary compatibility?!?
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-11-06 15:39:29 UTC
Can you please attach the complete build log and comment with the output of `emerge --info`? Thank you in advance.
Comment 3 Martin von Gagern 2013-11-06 22:16:30 UTC
(In reply to Tom Wijsman (TomWij) from comment #2)
> Can you please attach the complete build log and comment with the output of
> `emerge --info`? Thank you in advance.

Build log of sci-geosciences/qlandkartegt-1.7.5 where the error occurred during build, or of sci-libs/gdal-1.10.0-r1 which was the library broken due to an unresolved symbol, or of media-libs/giflib-4.2.3 which broke binary compatibility and thus is the actual cause of this?

I know you want build logs to identify where the actual problem lies, but in this case I doubt you'll learn anything more except that an already installed libgdal will not work due to that unresolved symbol. That problem is easy to diagnose, and the source of the unresolved symbol is known: an incompatible change in giflib without SONAME change.

Steps to reproduce should be:
1. emerge -1 '<media-libs/giflib-4.2'      # provides symbol
2. USE=gif emerge -1 sci-libs/gdal         # links against symbol
3. emerge -1 =media-libs/giflib-4.2.3      # no longer has symbol
4. ldd -r /usr/lib/libgdal.so              # problem already detectable
5. emerge -1 sci-geosciences/qlandkartegt  # breaks as described

So even without a build breaking, I could still report a broken configuration at step 4. For this reason I'm not attaching any build log: the qlandkartegt build was just the messenger, the breakage occurred before that. I don't see how any of this is specific to my system, but if you insist on emerge --info:

Portage 2.2.7 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.17, 3.11.4-gentoo x86_64)
=================================================================
System uname: Linux-3.11.4-gentoo-x86_64-AMD_Phenom-tm-_II_X4_945_Processor-with-gentoo-2.2
KiB Mem:    15672840 total,   1343664 free
KiB Swap:    6836220 total,   6836076 free
Timestamp of tree: Wed, 06 Nov 2013 05:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.2
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 3.1.9 [disabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.2.0::java
dev-lang/python:          2.6.8-r3, 2.7.5-r4, 3.2.5-r3, 3.3.2-r2
dev-util/ccache:          3.1.9-r3
dev-util/cmake:           2.8.12
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.12.4
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6, 1.14
sys-devel/binutils:       2.23.2
sys-devel/gcc:            3.4.6-r2, 4.1.2, 4.5.4, 4.6.4, 4.7.3-r1, 4.8.1-r1
sys-devel/gcc-config:     1.8
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.11 (virtual/os-headers)
sys-libs/glibc:           2.17
Repositories: sunrise-enabled ldc bump gentoo java generated sage-on-gentoo bugfix mvg-java-experimental mvgLocal
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE skype-eula skype-4.0.0.7-copyright googleearth AdobeFlash-10.3 AdobeFlash-11.x PUEL"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -ggdb -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.1/conf /usr/share/themes/oxygen-gtk/gtk-2.0 /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=amdfam10 -O2 -ggdb -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://mirror.opteamax.de/gentoo/ http://ftp-stud.hs-esslingen.de/pub/Mirrors/gentoo/ http://mirror.netcologne.de/gentoo/"
LANG="de_DE.utf8"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/sunrise-enabled /usr/portage/local/layman/ldc /usr/portage/local/bump /usr/portage /usr/portage/local/layman/java /usr/portage/local/generated /usr/portage/local/layman/sage-on-gentoo /usr/portage/local/bugfix /usr/portage/local/mvg-java /usr/portage/local/mvg"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 apache2 audacious audiofile avahi bash-completion bcmath berkdb branding bzip2 c++ cairo cdda cdparanoia cdr chroot cli consolekit cracklib crypt css cups curl cxx dba dbus declarative dhcp doc dri dts dv dvd dvdr emacs emboss encode escreen exif fam fastcgi ffmpeg fftw firefox flac flatfile fortran ftp gcc-libffi gd gdbm gif gimp gnutls gphoto2 gpm graphviz gs gstreamer gtk gtk3 hal hbci html iconv icu idn imagemagick ipv6 iso14755 ithreads jabber jack java jpeg jpeg2k kde kerberos kipi kpathsea kvm ladspa latex lcms ldap leim libnotify lirc lm_sensors logrotate lzma lzo mad maildir mhash midi mikmod mime mjpeg mmx mng modules mozxmlterm mp3 mp4 mpeg mpeg2 mplayer mudflap multilib mysql ncurses network nls nptl nsplugin numpy objc odbc ofx ogg openexr opengl openmp pam pango pcre pdf perl phonon php plasma plotutils png policykit povray ppds procmail python qt3support qt4 quicktime rdesktop readline real recode sasl scanner sdl session sip sipim smime sndfile snmp sockets socks5 sox speex spell sqlite sse sse2 ssl startup-notification subversion svg tcl tcpd theora threads thunderbird tiff timidity tokenizer transcode translator truetype type1 udev udisks unicode upower usb userlocales v4l v4l2 vhosts vorbis vpx win32codecs wmf wxwidgets x264 xanim xattr xcb xcomposite xine xinerama xinetd xml xmp xprint xscreensaver xulrunner xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="bt87x emu10k1x hda-intel usb-audio via82xx via82xx-modem" APACHE2_MODULES="actions alias asis auth_basic auth_digest authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter filter headers include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_connect proxy_ftp proxy_http rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DRACUT_MODULES="lvm" ELIBC="glibc" FRITZCAPI_CARDS="fcpci" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev joystick keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en de en_US en_GB" LIRC_DEVICES="devinput" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_6 python2_7 python3_2 python3_3" RUBY_TARGETS="ruby19 ruby20 jruby" USERLAND="GNU" VIDEO_CARDS="nouveau nv radeon fbdev v4l vesa vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
USE_PYTHON="2.6 2.7 3.2 3.3"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Please note that this bug report here is NOT about the qlandkartegt build failing for me. It is about a library which breaks backwards compatibility. It is intended as a means to discuss how to treat that incompatibility before the package goes stable. I've happily solved my own problems, and this whole bug report is only written as a service to the community.
Comment 4 Martin von Gagern 2013-11-06 22:38:52 UTC
Relevant lines in the NEWS file:

Version 4.2.0
=============

Now maintained by ESR again after handoff by Toshio Kuratomi.

Retirements
-----------
* QuantizeBuffer(), GifQprintf(), PrintGifError(), GIF_ERROR() 
  and GIF_MESSAGE() have been removed from the core library.  
  They were used only by the utilities. QuantizeBuffer() has been
  inlined where it was used and the latter three are now part of the
  utility support library.

Except that various other libraries were apparently using that code, including gdal and imlib. The relevant commit for this removal was
http://sourceforge.net/p/giflib/code/ci/6b9854d23cfc7607cd4f9cc5798305866a6e8b7a/

So one option would be partially undoing that commit, and moving PrintGifError from lib/qprintf.c back to lib/gif_err.c. As long as you keep it out of the headers, new source code wouldn't use it, but it would be in the library to ensure binary compatibility there.

Another solution would be ewarning people to run revdep-rebuild, even on recent portage versions, since things might have been broken without revdep-rebuild realizing it.
Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2013-11-11 14:34:40 UTC
the issue is kind of moot, we should be working towards getting giflib-5 unmasked which will make 4.2.3 redudant
Comment 6 SpanKY gentoo-dev 2013-11-19 21:48:48 UTC
(In reply to Samuli Suominen from comment #5)

true, but giflib-5 API/ABI breakage is not insignificant and will require changes in probably most packages :/
Comment 7 Pacho Ramos gentoo-dev 2016-11-28 16:08:20 UTC
We are working on giflib-5 -> bug 451324