We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5066 - SDL_ttf fails to compile, possible SDL2 incompatibility? (Revision fc4f9066741a)
Summary: SDL_ttf fails to compile, possible SDL2 incompatibility? (Revision fc4f9066741a)
Status: RESOLVED INVALID
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.15
Hardware: x86_64 Linux
: P2 major
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-30 00:24 UTC by Ellie
Modified: 2020-03-30 22:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ellie 2020-03-30 00:24:48 UTC
I was just trying to compile SDL_ttf in an Ubuntu LTS VM (= older SDL2 version) and got this error:

SDL_ttf.c:1104:23: error: 'SDL_SIMD_ALIGNED' undeclared (first use in this function); did you mean 'SDL_INLINE'?

Is this a fundamental incompatibility, or would it be possible to fix this? I'm not actually linking it because I am only interested in the static lib, but there still seems to be some issue with the headers.

This is the exact version I attempted to compile: https://hg.libsdl.org/SDL_ttf/rev/fc4f9066741a
Comment 1 Sylvain 2020-03-30 06:32:20 UTC
You need a more recent version of SDL2 (>= SDL 2.12) to have SDL_SIMD_ALIGNED

or just use an older version of SDL_ttf
Comment 2 Ellie 2020-03-30 13:39:56 UTC
Well I was aware that was one way to work around it but:

1. To build a linux binary that is portable, one needs to use an old system with an old GLIBC.

2. Older SDL_TTF versions are useless to me, because they are harder to build and not the version I want to use.

3. I do actually use a newer SDL2 later at link time.

What I'm saying is, while what you are saying is reasonable in a normal case, this is still annoying and it would be nice if it could be fixed. I'm basically not asking for the fun of it, but because it would be helpful if SDL_TTF actually built ok with older SDL2 headers in some cases.

Of course if the fix is too complicated then forget about it, but you seem to mainly discount it as not being something useful to fix. (Which I think it is, see above)
Comment 3 Sylvain 2020-03-30 15:10:15 UTC
if you know what you're doing you can import the define.
so how this was done:

https://hg.libsdl.org/SDL/rev/85bc5436a005
https://hg.libsdl.org/SDL/rev/b2d4dcb4ba33
Comment 4 Ellie 2020-03-30 18:12:42 UTC
Ah I see, so if linked against an older SDL2 it would be aligned wrong and crash. So working around it in the header for everyone doesn't make any sense indeed, thanks for the info :-) and sorry for the ticket spam then
Comment 5 Sam Lantinga 2020-03-30 22:29:43 UTC
You should be able to install the headers for a more recent version of SDL...?