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

Unable to build on Debian Bullseye #511

Closed
theofficialgman opened this issue Aug 26, 2024 · 5 comments · May be fixed by #520
Closed

Unable to build on Debian Bullseye #511

theofficialgman opened this issue Aug 26, 2024 · 5 comments · May be fixed by #520
Assignees

Comments

@theofficialgman
Copy link

Since the latest release, marathon can no longer be built on debian bullseye

https://github.com/Botspot/pi-apps/actions/runs/10551299208/job/29228558713#step:7:3681

g++ -std=gnu++17 -DHAVE_CONFIG_H -I. -I../..  -I../../Source_Files/CSeries -I../../Source_Files/Files -I../../Source_Files/GameWorld -I../../Source_Files/Input -I../../Source_Files/Lua -I../../Source_Files/ModelView -I../../Source_Files/Network -I../../Source_Files/Network/Metaserver -I../../Source_Files/FFmpeg -I../../Source_Files/RenderMain -I../../Source_Files/RenderOther -I../../Source_Files/Sound -I../../Source_Files/TCPMess -I../../Source_Files/XML -I../../Source_Files -I/usr/include/libpng16 -Wdate-time -I/usr/include/aarch64-linux-gnu -I/usr/include/aarch64-linux-gnu -D_REENTRANT -I/usr/include/SDL2 -I/usr/include/AL -I/usr/include/opus  -D_REENTRANT -I/usr/include/SDL2 -D_REENTRANT -I/usr/include/SDL2  -D_REENTRANT -I/usr/include/SDL2 -DSDL  -g -O2 -MT ScenarioChooser.o -MD -MP -MF $depbase.Tpo -c -o ScenarioChooser.o ScenarioChooser.cpp &&\
mv -f $depbase.Tpo $depbase.Po
ScenarioChooser.cpp: In member function ‘void ScenarioChooser::optimize_image(ScenarioChooserScenario&, SDL_Window*)’:
ScenarioChooser.cpp:525:2: error: ‘SDL_SoftStretchLinear’ was not declared in this scope; did you mean ‘SDL_SoftStretch’?
  525 |  SDL_SoftStretchLinear(optimized.get(), &src_rect, scenario.image.get(), &dst_rect);
      |  ^~~~~~~~~~~~~~~~~~~~~
      |  SDL_SoftStretch
make[3]: *** [Makefile:486: ScenarioChooser.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/tmp/AlephOne-20240822/Source_Files/Misc'
make[2]: *** [Makefile:604: all-recursive] Error 1
make[2]: Leaving directory '/tmp/AlephOne-20240822/Source_Files'
make[1]: *** [Makefile:560: all-recursive] Error 1
make[1]: Leaving directory '/tmp/AlephOne-20240822'
make: *** [Makefile:454: all] Error 2

This function is only available in SDL2.16+ https://wiki.libsdl.org/SDL2/SDL_SoftStretchLinear . Please provide an alternative for older releases.

@Kangie
Copy link

Kangie commented Sep 24, 2024

On one hand, sure - This seems reasonable enough. On the other hand 2.0.16 came out in August 2021 is barely a point release past what Bullseye stabilised on - https://packages.debian.org/bullseye/libsdl2-2.0-0 (2.0.14).

If this were an official debian package, since the scenario chooser is a new feature, Debian packaging guidelines would say that it shouldn't be available on Bullseye and we're safe here.

If you're an end user just building your own Alephone I'd suggest getting your own libsdl2 and building against that.

You're a victim of Debian packaging, but you're also using oldstable; try bookworm which packages 2.26.5 and you should be fine.

Kangie added a commit to Kangie/alephone that referenced this issue Sep 24, 2024
The correct way to search for sdl2 is pkg-config,
as per libsdl-org/SDL#6140

Replace our legacy `AM_PATH_SDL2` macro with
`AX_REQUIRE_PKG` and update the minimum version
to 2.0.16 to reflect reality.

Closes: Aleph-One-Marathon#511
Signed-off-by: Matt Jolly <[email protected]>
Kangie added a commit to Kangie/alephone that referenced this issue Sep 24, 2024
The correct way to search for sdl2 is pkg-config,
as per libsdl-org/SDL#6140

Replace our legacy `AM_PATH_SDL2` macro with
`AX_REQUIRE_PKG` and update the minimum version
to 2.0.16 to reflect reality.

Drop `m4/` since this was our last macro.

SDL2 is not optional, remove the only `ifdef SDL` block
as without the macro setting that for us we fail
to compile.

Closes: Aleph-One-Marathon#511
Signed-off-by: Matt Jolly <[email protected]>
@theofficialgman
Copy link
Author

I'm well aware of debian versions and limitations of using something old. This isn't for me personally but pi-apps (see link) where we support the last two LTS releases of ubuntu/debian with all our projects where possible. This issue is simply a report because that is not possible for Aleph-One-Marathon due to the change.

@eli-schwartz
Copy link

This isn't for me personally but pi-apps (see link) where we support the last two LTS releases of ubuntu/debian with all our projects where possible.

And if it isn't possible, what do you do?

One option for what to do would be for your appstore to build an updated copy of sdl2 for use with the apps you distribute.

@theofficialgman
Copy link
Author

theofficialgman commented Sep 24, 2024

And if it isn't possible, what do you do?

We hold the version of the application back and open a bug report.

One option for what to do would be for your appstore to build an updated copy of sdl2 for use with the apps you distribute.

Updating system dependencies is out of scope and can cause regressions (or: when features are removed or changed in later dependency versions).

There isn't anything wrong with an application statically linking sdl2 into the binary (ie: have sdl2 as a submodule and build it at the time of compilation) but it's up to the upstream developer (in this case, marathon) to provide that as an option in the buildsystem.

@eli-schwartz
Copy link

Updating system dependencies is out of scope and can cause regressions (or: when features are removed or changed in later dependency versions).

There isn't anything wrong with an application statically linking sdl2 into the binary (ie: have sdl2 as a submodule and build it at the time of compilation) but it's up to the upstream developer (in this case, marathon) to provide that as an option in the buildsystem.

But that's not what I suggested. I didn't say anything about system dependencies, I suggested that you might be able to build a static copy of sdl2 as part of the build recipe for applications that need it, and inject it into the build by augmenting $PKG_CONFIG_PATH or $SDL2_CONFIG (depending on which one the project in question uses) to point to the temporary copy.

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 a pull request may close this issue.

5 participants
@treellama @eli-schwartz @Kangie @theofficialgman and others