Bug 2129639 - sdl12-compat: pkg-config contains invalid 'Libs.private' entry leading to compilation failures
Summary: sdl12-compat: pkg-config contains invalid 'Libs.private' entry leading to com...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sdl12-compat
Version: 36
Hardware: x86_64
OS: All
unspecified
high
Target Milestone: ---
Assignee: Neal Gompa
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-09-25 18:20 UTC by Solomon Peachy
Modified: 2022-11-10 22:28 UTC (History)
3 users (show)

Fixed In Version: sdl12-compat-1.2.60-1.fc36 sdl12-compat-1.2.60-1.fc35 sdl12-compat-1.2.60-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-04 10:45:14 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Upstream fix for this issue (2.28 KB, patch)
2022-09-27 13:03 UTC, Solomon Peachy
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Github libsdl-org sdl12-compat issues 222 0 None open building with -DSTATICBUILD=true mis-generates Libs.private in pkgconfig 2022-09-26 03:05:49 UTC

Description Solomon Peachy 2022-09-25 18:20:44 UTC
Description of problem:

sdl12_compat.pc has an invalid entry:

   Libs.private: -L${libdir} -lSDL dl

This causes compilation errors when trying to generate static builds using libsdl12_compat. 

Version-Release number of selected component (if applicable):

sdl12-compat-devel-1.2.56-1.fc36.x86_64

How reproducible:

Look at the file.  It's clearly wrong.

Expected results:

This should presumably say '-lSDL -ldl'

Additional info:

This problem does not exist in the sdl12-compat-1.2.52 RPMs!

This problem appears to be unique to Fedora, as doing a clean build of upstream sdl12-compat 1.2.56 doesn't generate this invalid Libs.private line.

Comment 1 Neal Gompa 2022-09-25 21:42:03 UTC
We're not doing anything special in sdl12-compat. The change between 1.2.52 and 1.2.56 that caused this problem is this: https://github.com/libsdl-org/sdl12-compat/commit/49e6ea8a8327a311edd5eddf3ebfd13da53b1cd5

The CMake documentation implies that "${CMAKE_DL_LIBS}" returns "-ldl", but that's clearly not what it does...

I'm not sure what to do here to fix it, though. Is this a CMake bug?

Comment 2 Solomon Peachy 2022-09-26 02:55:08 UTC
I grabbed the current github master (and the 1.2.56 release tag) and built that, and it doesn't misbehave.  That's why I reported it here vs upstream.

But it does seem that Fedora uses -DSTATICBUILD=true which causes upstream to break too, so... okay, I'll report it upstream. 

</grumble>

Comment 3 Solomon Peachy 2022-09-26 03:05:49 UTC
Reported upstream.

Comment 4 Solomon Peachy 2022-09-27 13:03:33 UTC
Created attachment 1914583 [details]
Upstream fix for this issue

Upstream has merged a fix:

https://github.com/libsdl-org/sdl12-compat/pull/224/commits

I squashed the commits into a single patch vs 1.2.56; it's attached.  It appears to solve the problem when manually building on the cmdline.

Comment 5 Fedora Update System 2022-10-30 22:48:43 UTC
FEDORA-2022-9400b16a0a has been submitted as an update to Fedora 35. https://bodhi.fedoraproject.org/updates/FEDORA-2022-9400b16a0a

Comment 6 Fedora Update System 2022-10-30 22:48:49 UTC
FEDORA-2022-e4559c8ed0 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-e4559c8ed0

Comment 7 Fedora Update System 2022-10-30 22:48:54 UTC
FEDORA-2022-4b844fbebe has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-4b844fbebe

Comment 8 Fedora Update System 2022-10-31 08:06:22 UTC
FEDORA-2022-e4559c8ed0 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-e4559c8ed0`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-e4559c8ed0

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2022-10-31 10:28:32 UTC
FEDORA-2022-4b844fbebe has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-4b844fbebe`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-4b844fbebe

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2022-10-31 10:30:18 UTC
FEDORA-2022-9400b16a0a has been pushed to the Fedora 35 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-9400b16a0a`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-9400b16a0a

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2022-11-04 10:45:14 UTC
FEDORA-2022-4b844fbebe has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 12 Fedora Update System 2022-11-07 22:00:16 UTC
FEDORA-2022-9400b16a0a has been pushed to the Fedora 35 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Fedora Update System 2022-11-10 22:28:43 UTC
FEDORA-2022-e4559c8ed0 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.