Bug 273995 - audio/lame: fix build with lld 17
Summary: audio/lame: fix build with lld 17
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Alexander Leidinger
URL:
Keywords:
Depends on:
Blocks: 273753
  Show dependency treegraph
 
Reported: 2023-09-21 09:09 UTC by Dimitry Andric
Modified: 2023-09-22 10:23 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (netchild)


Attachments
audio/lame: fix build with lld 17 (669 bytes, patch)
2023-09-21 09:09 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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(-)