Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 894702 - games-strategy/endless-sky-0.9.16.1 fails tests: Files.cpp:(.text+0x2017): undefined reference to SDL_GetPrefPath
Summary: games-strategy/endless-sky-0.9.16.1 fails tests: Files.cpp:(.text+0x2017): un...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Games
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-16 07:53 UTC by Agostino Sarubbo
Modified: 2023-02-16 08:55 UTC (History)
1 user (show)

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


Attachments
build.log (build.log,109.71 KB, text/plain)
2023-02-16 07:53 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2023-02-16 07:53:43 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: games-strategy/endless-sky-0.9.16.1 fails tests.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2023-02-16 07:53:45 UTC
Created attachment 851530 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2023-02-16 07:53:46 UTC
Error(s) that match a know pattern in addition to what has been reported in the summary:


Files.cpp:(.text+0x2017): undefined reference to `SDL_GetPrefPath'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: Files.cpp:(.text+0x2024): undefined reference to `SDL_free'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: Files.cpp:(.text+0x2121): undefined reference to `SDL_GetBasePath'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: Files.cpp:(.text+0x2154): undefined reference to `SDL_free'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: Files.cpp:(.text+0x2242): undefined reference to `SDL_GetPrefPath'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: Files.cpp:(.text+0x227c): undefined reference to `SDL_free'
collect2: error: ld returned 1 exit status
Comment 3 Ionen Wolkens gentoo-dev 2023-02-16 08:30:51 UTC
Hm, interestingly it works if using -flto (which I happened to use while testing with the full odr and friends checks) but doesn't if missing.
Comment 4 Ionen Wolkens gentoo-dev 2023-02-16 08:39:39 UTC
(In reply to Ionen Wolkens from comment #3)
> Hm, interestingly it works if using -flto (which I happened to use while
> testing with the full odr and friends checks) but doesn't if missing.
...I imagine it's relying on these getting optimized out, but it won't if it doesn't see the whole thing.

There's:
        # Do not link against the actual implementations of SDL, OpenGL, etc.
        LIBS=sys_libs,

So -lSDL2 not being there is intended?
Comment 5 Larry the Git Cow gentoo-dev 2023-02-16 08:55:35 UTC
The bug has been closed via the following commit(s):

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

commit d03d4f49bef52ea4562876316d494cbcc6b2f7f3
Author:     Ionen Wolkens <ionen@gentoo.org>
AuthorDate: 2023-02-16 08:45:44 +0000
Commit:     Ionen Wolkens <ionen@gentoo.org>
CommitDate: 2023-02-16 08:54:03 +0000

    games-strategy/endless-sky: hopefully fix tests without -flto
    
    Upstream defaults to -flto, but we yank it to let users set as wanted.
    
    Simplest seem to be to just let the libraries get used.
    
    Closes: https://bugs.gentoo.org/894702
    Signed-off-by: Ionen Wolkens <ionen@gentoo.org>

 games-strategy/endless-sky/endless-sky-0.9.16.1.ebuild         |  1 +
 .../endless-sky/files/endless-sky-0.9.16.1-test-libs.patch     | 10 ++++++++++
 2 files changed, 11 insertions(+)