Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 874750 - dev-libs/serd-0.30.16[static-libs] fails to build with "attempted static link of dynamic object"
Summary: dev-libs/serd-0.30.16[static-libs] fails to build with "attempted static link...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Professional Audio Applications Maintainers
URL: https://github.com/drobilla/serd/issu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-03 19:39 UTC by Israel G. Lugo
Modified: 2023-01-05 02:22 UTC (History)
0 users

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


Attachments
build.log, build-abi_x86_32.x86.log, build-abi_x86_64.amd64.log (build-logs.tar.gz,2.71 KB, application/gzip)
2022-10-03 19:39 UTC, Israel G. Lugo
Details
emerge --info for dev-libs/serd-0.30.16 (still fails) (emerge-info.txt,8.93 KB, text/plain)
2022-11-21 21:31 UTC, Israel G. Lugo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Israel G. Lugo 2022-10-03 19:39:06 UTC
Created attachment 818305 [details]
build.log, build-abi_x86_32.x86.log, build-abi_x86_64.amd64.log

Building =dev-libs/serd-0.30.14-r1 with USE=" abi_x86_32 abi_x86_64 amd64 elibc_glibc kernel_linux static-libs tools userland_GNU" fails with the following error:

[13/14] /usr/lib/python-exec/python3.10/meson --internal symbolextractor /var/tmp/portage/dev-libs/serd-0.30.14-r1/work/serd-0.30.14-abi_x86_32.x86 libserd-0.so.0.30.14 libserd-0.so.0.30.14 libserd-0.so.0.30.14.p/libserd-0.so.0.30.14.symbols
[14/14] x86_64-pc-linux-gnu-gcc -m32  -o serdi serdi.p/src_serdi.c.o -Wl,--as-needed -Wl,--no-undefined -O2 -march=native -mmmx -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -maes -mfpmath=sse -pipe -fno-stack-protector -Wl,-O1 -Wl,--as-needed '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/var/tmp/portage/dev-libs/serd-0.30.14-r1/work/serd-0.30.14-abi_x86_32.x86/ -Wl,--start-group libserd-0.so.0.30.14 -Wl,--end-group -static
FAILED: serdi
x86_64-pc-linux-gnu-gcc -m32  -o serdi serdi.p/src_serdi.c.o -Wl,--as-needed -Wl,--no-undefined -O2 -march=native -mmmx -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -maes -mfpmath=sse -pipe -fno-stack-protector -Wl,-O1 -Wl,--as-needed '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/var/tmp/portage/dev-libs/serd-0.30.14-r1/work/serd-0.30.14-abi_x86_32.x86/ -Wl,--start-group libserd-0.so.0.30.14 -Wl,--end-group -static
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: attempted static link of dynamic object `libserd-0.so.0.30.14'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-10-04 01:05:42 UTC
1. Please include emerge --info.
2. We may be able to just drop static-libs.
Comment 2 Israel G. Lugo 2022-11-21 21:31:56 UTC
Created attachment 835667 [details]
emerge --info for dev-libs/serd-0.30.16 (still fails)

Still fails with =dev-libs/serd-0.30.16.

Last lines of log:

[12/14] /usr/lib/python-exec/python3.10/meson --internal symbolextractor /var/tmp/portage/dev-libs/serd-0.30.16/work/serd-0.30.16-abi_x86_32.x86 libserd-0.so.0.30.16 libserd-0.so.0.30.16 libserd-0.so.0.30.16.p/libserd-0.so.0.30.16.symbols
[13/14] x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse -Iserdi.p -I. -I../serd-0.30.16 -I../serd-0.30.16/include -fdiagnostics-color=always -DNDEBUG -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -O0 -O2 -march=native -mmmx -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -maes -mfpmath=sse -pipe -fno-stack-protector -D_POSIX_C_SOURCE=200809L -MD -MQ serdi.p/src_serdi.c.o -MF serdi.p/src_serdi.c.o.d -o serdi.p/src_serdi.c.o -c ../serd-0.30.16/src/serdi.c
[14/14] x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse  -o serdi serdi.p/src_serdi.c.o -Wl,--as-needed -Wl,--no-undefined -O2 -march=native -mmmx -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -maes -mfpmath=sse -pipe -fno-stack-protector -Wl,-O1 -Wl,--as-needed '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/var/tmp/portage/dev-libs/serd-0.30.16/work/serd-0.30.16-abi_x86_32.x86/ -Wl,--start-group libserd-0.so.0.30.16 -Wl,--end-group -static
FAILED: serdi
x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse  -o serdi serdi.p/src_serdi.c.o -Wl,--as-needed -Wl,--no-undefined -O2 -march=native -mmmx -mpopcnt -msse -msse2 -msse3 -msse4.1 -msse4.2 -mssse3 -mavx -maes -mfpmath=sse -pipe -fno-stack-protector -Wl,-O1 -Wl,--as-needed '-Wl,-rpath,$ORIGIN/' -Wl,-rpath-link,/var/tmp/portage/dev-libs/serd-0.30.16/work/serd-0.30.16-abi_x86_32.x86/ -Wl,--start-group libserd-0.so.0.30.16 -Wl,--end-group -static
/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: attempted static link of dynamic object `libserd-0.so.0.30.16'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.


Attaching updated emerge --info.
Comment 3 Sebastian Pipping gentoo-dev 2023-01-04 18:51:16 UTC
Reported upstream now, see URL field.
Comment 4 Sebastian Pipping gentoo-dev 2023-01-05 02:15:46 UTC
(In reply to Sam James from comment #1)
> 2. We may be able to just drop static-libs.

It turns out [1] that as of now "-Dstatic=true -Ddefault_library=static" is
needed for a static build, not just "-Dstatic=true".

Given that…

- for proper USE=static-libs the ebuild would need to build twice,
  once for .so and once for .a and that

- no reverse dependency depends on dev-libs/serd[static-libs]

…I will dare go ahead and drop the static-libs flag now.


[1] https://github.com/drobilla/serd/issues/40#issuecomment-1371667761
Comment 5 Larry the Git Cow gentoo-dev 2023-01-05 02:22:54 UTC
The bug has been closed via the following commit(s):

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

commit cabb7ede1fdc7cfe708352a07f863099ea847bae
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2023-01-05 02:18:11 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2023-01-05 02:18:11 +0000

    dev-libs/serd: Drop broken and unused USE=static-libs
    
    Closes: https://bugs.gentoo.org/874750
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>

 dev-libs/serd/serd-0.30.16.ebuild | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)