Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 372053 - media-video/kino fails because of underlinking
Summary: media-video/kino fails because of underlinking
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal QA with 1 vote (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords: NeedPatch
Depends on:
Blocks: underlinking
  Show dependency tree
 
Reported: 2011-06-17 13:16 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2021-01-10 16:44 UTC (History)
4 users (show)

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


Attachments
Build log (kino-1.3.4:20110617-115419.log,95.15 KB, text/plain)
2011-06-17 13:16 UTC, Diego Elio Pettenò (RETIRED)
Details
build.log (build.log,122.80 KB, text/x-log)
2013-08-29 10:56 UTC, Andrew Savchenko
Details
emerge --info (emerge.info,8.43 KB, text/plain)
2013-08-29 10:56 UTC, Andrew Savchenko
Details
kino-1.3.4-avcodec.patch (kino-1.3.4-avcodec.patch,425 bytes, patch)
2013-08-30 01:28 UTC, Andrew Savchenko
Details | Diff
kino-1.3.4.ebuild.patch (kino-1.3.4.ebuild.patch,636 bytes, patch)
2013-08-30 01:29 UTC, Andrew Savchenko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2011-06-17 13:16:57 UTC
Created attachment 277371 [details]
Build log

Hello there!

You're getting this bug because the package in Summary failed to build in my tinderbox using the gold link editor from binutils. Before closing the bug as INVALID let me explain why this is still important!

The gold link editor does not support underlinking of shared objects, which is something I have described in my blog post:

http://blog.flameeyes.eu/2010/11/26/it-s-not-all-gold-that-shines-why-underlinking-is-a-bad-thing

Even the basic link editor (ld.bfd) has an option to support this but it is a heck to enable and get passed, so linking with gold is simply quicker.

Fixing underlinking provides optimized --as-needed builds (because the "softer" version no longer need to recover libraries that are underlinked), so it is a Good Thing To Do.

Thank you very much for the attention!
Comment 1 Attila Tóth 2012-02-12 14:35:44 UTC
src/Makefile should have "AVCODEC_LIBS = -lavformat -lavcodec -lavutil"
Comment 2 Andrew Savchenko gentoo-dev 2013-08-29 10:55:42 UTC
Hello,

I got an underlinking issue with kino-1.3.4 and libav even with gnu ld:

i686-pc-linux-gnu-g++ -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -fgcse-after-reload -ftree-loop-im -fweb -frename-registers -fomit-frame-pointer -mfpmath=sse -pipe -frecord-gcc-switches -fvisibility-inlines-hidden -ffast-math -march=native -m32 -O2 -funswitch-loops -fpredictive-commoning -Wl,-O1 -Wl,--as-needed -pipe -o kino main.o support.o callbacks.o message.o preferences.o preferences_dialog.o playlist.o filehandler.o riff.o avi.o frame.o error.o ieee1394io.o framedisplayer.o oss.o jogshuttle.o mediactrl.o kino_common.o page_editor.o page_capture.o page_timeline.o page_export.o page_bttv.o export.o page_export_1394.o page_export_avi.o page_export_stills.o page_export_audio.o page_export_mjpeg.o page_export_pipe.o page_trim.o page_magick.o commands.o v4l.o displayer.o gtkenhancedscale.o kino_av_pipe.o image_create.o image_filters.o image_transitions.o audio_filters.o audio_transitions.o storyboard.o stringutils.o smiltime.o rwpipe.o -pthread -Wl,--export-dynamic  -ldv -liec61883 -lasound -lgthread-2.0 -lglade-2.0 -lxml2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfreetype -lfontconfig -lavformat -lswscale -lsamplerate -lquicktime -lz cell-renderers/libcellrenderers.a -lXv -lXext -ldl -lpthread -lrom1394 -lavc1394 -lraw1394 -lm -lSM -lICE -lX11 -pthread
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../i686-pc-linux-gnu/bin/ld: frame.o: undefined reference to symbol 'av_init_packet@@LIBAVCODEC_54'
/usr/lib/gcc/i686-pc-linux-gnu/4.7.3/../../../../i686-pc-linux-gnu/bin/ld: note: 'av_init_packet@@LIBAVCODEC_54' is defined in DSO /usr/lib/libavcodec.so.54 so try adding it to the linker command line
/usr/lib/libavcodec.so.54: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
Comment 3 Andrew Savchenko gentoo-dev 2013-08-29 10:56:05 UTC
Created attachment 357320 [details]
build.log
Comment 4 Andrew Savchenko gentoo-dev 2013-08-29 10:56:16 UTC
Created attachment 357322 [details]
emerge --info
Comment 5 Andrew Savchenko gentoo-dev 2013-08-30 01:28:42 UTC
Created attachment 357374 [details, diff]
kino-1.3.4-avcodec.patch

NeedPatch? Here you go :)
This one forces full linking.
Comment 6 Andrew Savchenko gentoo-dev 2013-08-30 01:29:56 UTC
Created attachment 357376 [details, diff]
kino-1.3.4.ebuild.patch

Update ebuild to apply avcodec patch and to run eautoreconf, because autotools's file is patched.