Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang: fix versioned symbol build errors #376

Closed
wants to merge 4 commits into from

Conversation

nvinson
Copy link
Contributor

@nvinson nvinson commented Jan 7, 2024

When building alsa-lib with the following settings

CFLAGS='-O3 -pipe'
CXXFLAGS='-O3 -pipe'
LDFLAGS='-Wl,-O1 -Wl,--as-needed -fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind'

the build fails with errors similar to

ld.lld: error: version script assignment of 'ALSA_0.9.5' to symbol 'alsa_lisp' failed: symbol not defined

This PR corrects that issue and additional issues found while making corrections so alsa-lib will successfully build using clang and ld.lld.

Modern autoconf practice says AC_OUTPUT() should be called with no
arguments and generated configuration files should be specified by
calling AC_CONFIG_FILES() before AC_OUTPUT().

Update configure.ac to follow this practice.
Add guards for optional alisp symbols. This ensures that the Versions
file does not contain undefined symbols when building alisp support is
disabled.

Fixes Gentoo bugs 914511 (https://bugs.gentoo.org/914511),
    914643 (https://bugs.gentoo.org/914643),
    and 919417 (https://bugs.gentoo.org/919417).

Fixes bug alsa-project#305
Fixes alsa_lisp symbol error reported in bug alsa-project#356

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Configure script allows for the disabling of the pcm module. When
disabled, the pcm symbols will not be available. Add guards to remove
symbols from version map when not present.
Review of Versions.in does not list any symbols defined in the
libatopology library. Naming undefined symbols in a version script
causes build failures with ld.lld when using default flags.
perexg added a commit that referenced this pull request Jan 23, 2024
A slightly different solution is preferred than PR recommends (bellow).
Only symbols with snd_ prefix should be public. Create a minimal Versions
file for libatopology.

Link: #376
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg perexg closed this in 5303e9e Jan 24, 2024
perexg pushed a commit that referenced this pull request Jan 24, 2024
file does not contain undefined symbols when building alisp support is
disabled.

Fixes Gentoo bugs 914511 (https://bugs.gentoo.org/914511),
    914643 (https://bugs.gentoo.org/914643),
    and 919417 (https://bugs.gentoo.org/919417).

Fixes bug #305
Fixes alsa_lisp symbol error reported in bug #356

Closes: #376
Fixes: #305
Link: #356
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 24, 2024
disabled, the pcm symbols will not be available. Add guards to remove
symbols from version map when not present.

Closes: #376
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 24, 2024
Modern autoconf practice says AC_OUTPUT() should be called with no
arguments and generated configuration files should be specified by
calling AC_CONFIG_FILES() before AC_OUTPUT().

Update configure.ac to follow this practice.

Closes: #376
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 24, 2024
Add guards for optional alisp symbols. This ensures that the Versions
file does not contain undefined symbols when building alisp support is
disabled.

Fixes Gentoo bugs 914511 (https://bugs.gentoo.org/914511),
    914643 (https://bugs.gentoo.org/914643),
    and 919417 (https://bugs.gentoo.org/919417).

Fixes bug #305
Fixes alsa_lisp symbol error reported in bug #356

Closes: #376
Fixes: #305
Link: #356
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Jan 24, 2024
Configure script allows for the disabling of the pcm module. When
disabled, the pcm symbols will not be available. Add guards to remove
symbols from version map when not present.

Closes: #376
Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant