Bug 273995

Summary: audio/lame: fix build with lld 17
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Alexander Leidinger <netchild>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (netchild)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 273753    
Attachments:
Description Flags
audio/lame: fix build with lld 17 none

Description Dimitry Andric freebsd_committer freebsd_triage 2023-09-21 09:09:39 UTC
Building audio/lame with lld 17 results in the following link error:

libtool: link: cc -shared  -fPIC -DPIC  .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,--whole-archive ../libmp3lame/vector/.libs/liblamevectorroutines.a ../mpglib/.libs/libmpgdecoder.a -Wl,--no-whole-archive  -lm  -O3 -O2 -fstack-protector-strong -fstack-protector-strong   -Wl,-soname -Wl,libmp3lame.so.0 -Wl,-version-script -Wl,.libs/libmp3lame.so.0.0.0-ver -o .libs/libmp3lame.so.0.0.0
ld: error: version script assignment of 'global' to symbol 'lame_init_old' failed: symbol not defined
cc: error: linker command failed with exit code 1 (use -v to see invocation)

The "lame_init_old" symbol is an obsolete initialization function, which is still kept in the source under a DEPRECATED_OR_OBSOLETE_CODE_REMOVED define, but it has not been enabled for years.

Add a sed command to the Makefile to remove the undefined symbol from the version script file to fix the error.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2023-09-21 09:09:59 UTC
Created attachment 245090 [details]
audio/lame: fix build with lld 17
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-09-22 10:21:21 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=97376a1dc91b250b311646e7e0d5bb223aa1014b

commit 97376a1dc91b250b311646e7e0d5bb223aa1014b
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-09-22 10:19:22 +0000
Commit:     Alexander Leidinger <netchild@FreeBSD.org>
CommitDate: 2023-09-22 10:21:05 +0000

    audio/lame: fix build with lld 17

    No revision bump, this fix is not mandatory for non-failing builds.

    PR:     273995

 audio/lame/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)