Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 662752 - media-sound/lame-3.100-r1: ld: symbol(s) not found for architecture x86_64
Summary: media-sound/lame-3.100-r1: ld: symbol(s) not found for architecture x86_64
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-03 22:08 UTC by Camille Huot
Modified: 2019-11-10 15:15 UTC (History)
1 user (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 Camille Huot 2018-08-03 22:08:50 UTC
I had this bug when emerging lame on a Prefixed Mac OS X:
https://hydrogenaud.io/index.php/topic,114777.0.html

/gentoo/bin/bash ../libtool  --tag=CC   --mode=link x86_64-apple-darwin16-clang  -O3 -Wall -march=native -O2 -pipe -fno-common -version-info 0:0 -export-symbols /gentoo/var/tmp/portage/media-sound/lame-3.100-r1/work/lame-3.100/include/libmp3lame.sym -no-undefined -Wl,-dead_strip_dylibs -o libmp3lame.la -rpath /gentoo/usr/lib VbrTag.lo bitstream.lo encoder.lo fft.lo gain_analysis.lo id3tag.lo lame.lo newmdct.lo presets.lo psymodel.lo quantize.lo quantize_pvt.lo reservoir.lo set_get.lo tables.lo takehiro.lo util.lo vbrquantize.lo version.lo mpglib_interface.lo  ../libmp3lame/vector/liblamevectorroutines.la ../mpglib/libmpgdecoder.la -lm
libtool: link: sed 's|^|_|' < /gentoo/var/tmp/portage/media-sound/lame-3.100-r1/work/lame-3.100/include/libmp3lame.sym > .libs/libmp3lame-symbols.expsym
libtool: link: x86_64-apple-darwin16-clang -dynamiclib  -o .libs/libmp3lame.0.0.0.dylib  .libs/VbrTag.o .libs/bitstream.o .libs/encoder.o .libs/fft.o .libs/gain_analysis.o .libs/id3tag.o .libs/lame.o .libs/newmdct.o .libs/presets.o .libs/psymodel.o .libs/quantize.o .libs/quantize_pvt.o .libs/reservoir.o .libs/set_get.o .libs/tables.o .libs/takehiro.o .libs/util.o .libs/vbrquantize.o .libs/version.o .libs/mpglib_interface.o   -Wl,-force_load,../libmp3lame/vector/.libs/liblamevectorroutines.a -Wl,-force_load,../mpglib/.libs/libmpgdecoder.a  -lm  -O3 -march=native -O2 -Wl,-dead_strip_dylibs   -install_name  /gentoo/usr/lib/libmp3lame.0.dylib -compatibility_version 1 -current_version 1.0 -Wl,-single_module -Wl,-exported_symbols_list,.libs/libmp3lame-symbols.expsym
Undefined symbols for architecture x86_64:
  "_lame_init_old", referenced from:
     -exported_symbol[s_list] command line option
ld: symbol(s) not found for architecture x86_64
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)

--

I have patched the ebuild according to the above URL (remove a line in a file) and it works better.

--

chuot@NCELRND0546:/gentoo/usr/portage/media-sound/lame $ diff lame-3.100-r1.ebuild.old lame-3.100-r1.ebuild
42a43,44
> 	sed -i '/lame_init_old/d' include/libmp3lame.sym || die
>
chuot@NCELRND0546:/gentoo/usr/portage/media-sound/lame $



Thanks
Camille
Comment 1 Fabian Groffen gentoo-dev 2018-08-19 08:23:58 UTC
hmmm, interesting
Comment 2 Fabian Groffen gentoo-dev 2018-08-19 08:39:44 UTC
@sound: seems lame includes a symbol in it's .sym file that isn't there.  Are you ok with a fix like Camille did?

@Camille: use diff -u in the future, that's much easier readable.
Comment 3 Pacho Ramos gentoo-dev 2019-11-10 15:09:52 UTC
Fedora patch is a bit different
https://src.fedoraproject.org/rpms/lame/blob/master/f/libmp3lame-symbols.patch
Comment 4 Larry the Git Cow gentoo-dev 2019-11-10 15:15:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f0b584dfe8c43d05eeec0a347117b55988713a86

commit f0b584dfe8c43d05eeec0a347117b55988713a86
Author:     Pacho Ramos <pacho@gentoo.org>
AuthorDate: 2019-11-10 15:15:08 +0000
Commit:     Pacho Ramos <pacho@gentoo.org>
CommitDate: 2019-11-10 15:15:23 +0000

    media-sound/lame: Fix compilation issues and missing deps
    
    Closes: https://bugs.gentoo.org/516246
    Closes: https://bugs.gentoo.org/662752
    Package-Manager: Portage-2.3.79, Repoman-2.3.18
    Signed-off-by: Pacho Ramos <pacho@gentoo.org>

 media-sound/lame/files/lame-3.100-symbols.patch | 16 +++++
 media-sound/lame/lame-3.100-r2.ebuild           | 81 +++++++++++++++++++++++++
 2 files changed, 97 insertions(+)