Fix building the test application on non-x86 machines - #539
Open
sicherha wants to merge 1 commit into
Open
Conversation
On anything other than x86, `make -f Makefile.testing` fails due to undefined symbols: ``` /usr/bin/ld: /tmp/ccojePfa.o: in function `main': main.c:(.text.startup+0x758): undefined reference to `get_cpu_features' /usr/bin/ld: main.c:(.text.startup+0x75c): undefined reference to `g_cpu_features' /usr/bin/ld: main.c:(.text.startup+0x760): undefined reference to `g_cpu_features' /usr/bin/ld: main.c:(.text.startup+0xcfc): undefined reference to `g_cpu_features' /usr/bin/ld: main.c:(.text.startup+0xd00): undefined reference to `g_cpu_features' collect2: error: ld returned 1 exit status make: *** [Makefile.testing:50: all] Error 1 ``` The regression was introduced by commit 34d293e. Here is how the two affected symbols, `g_cpu_features` and `get_cpu_features()`, are used in the different configurations. | `IS_X86` | `BLAKE3_TESTING` | Use of symbols | | :------: | :--------------: | ------------------- | | X | | internal | | X | X | internal & external | | | | N/A | | | X | external |
Member
|
Thanks for the detailed report, particularly the responsible commit. This change looks reasonable. The bigger question to me is whether we want to add |
Collaborator
|
yes, CMake executes |
gentoo-bot
pushed a commit
to gentoo/gentoo
that referenced
this pull request
Feb 22, 2026
Apply patch to fix linking of the test executable on non-x86 based platforms. Link: BLAKE3-team/BLAKE3#539 Closes: https://bugs.gentoo.org/970424 Reported-by: Eli Schwartz <eschwartz@gentoo.org> Suggested-by: Christoph Erhardt <github@sicherha.de> Signed-off-by: Brett A C Sheffield <bacs@librecast.net> Part-of: https://codeberg.org/gentoo/gentoo/pulls/112 Merges: https://codeberg.org/gentoo/gentoo/pulls/112 Signed-off-by: Sam James <sam@gentoo.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I maintain the Fedora Linux package for the
blake3C library.On anything other than x86,
make -f Makefile.testingfails due to undefined symbols:The regression was introduced by commit
34d293e.
Here is how the two affected symbols,
g_cpu_featuresandget_cpu_features(), are used in the different configurations.IS_X86BLAKE3_TESTING