Skip to content

Conversation

calvarado2004
Copy link
Contributor

Description
Adding compilation support for Fedora 41

Documentation
If this pull-request changes the installation scripts for Linux, adding support for Fedora 41, among Ubuntu.

@calvarado2004 calvarado2004 requested a review from a team as a code owner February 22, 2025 15:13
@CoolSpy3 CoolSpy3 added the test suite Start the test suite label Jul 13, 2025
Copy link
Contributor

@CoolSpy3 CoolSpy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the build still works (although, as of writing, the test suite is still running). Assuming that passes too, I'm fine to approve this with the one minor correction noted below.

It would be nice to have Fedora support (I plan to move over there at some point), but that being said, Fedora is not officially supported by Webots, and I think its unlikely that the maintainers are going to go through the work to change that. Thus, I'm not sure if its wise to add Fedora support as it's unlikely to be maintained when dependency requirements change.

A possible compromise might be to add an echo statement warning of that fact, and let Fedora become a quasi-supported OS. (We can also probably make a note of that somewhere on the wiki.) However, that still leaves a chunk of explicitly-unmaintained code in the repo.

@omichel can probably make the final call here.

UPDATE: Test suite passes! Only failing test is robot_window_html.wbt (See #6755)

omichel and others added 2 commits July 13, 2025 18:07
Co-authored-by: CoolSpy3 <55305038+CoolSpy3@users.noreply.github.com>
@omichel
Copy link
Member

omichel commented Jul 13, 2025

I agree with @CoolSpy3, we should add an echo statement warning that Fedora support is still experimental and not officially documented. Then, we could merge this PR.

@CoolSpy3
Copy link
Contributor

CoolSpy3 commented Aug 15, 2025

@calvarado2004 I'm trying to test this PR on Fedora 42. Did you manage to find a way to get around the include errors in wren? I'm currently stuck on the one in ftconfig.h, but I think there are a couple more arising from the headers detecting my x64 system as 32-bit.

I'm thinking I'm going to have to set another preprocessor directive and include /usr/include to get it working, but I wanted to check if you found a more elegant solution before I start digging around in Makefiles.

@CoolSpy3
Copy link
Contributor

CoolSpy3 commented Aug 16, 2025

Okay; I've managed to get a working Fedora build! Keynotes:

  • lsb_release doesn't work correctly on Fedora. @calvarado2004 worked around this in his changes, but I went a step further and removed the dependency completely, instead using /etc/os-release where applicable. I think those changes slot fairly nicely into the existing code. It does make the test suite setup a little more complex, but I think it's still plenty readable.
  • The include error I was running into is caused by Emscripten building in 32-bit mode for wasm, which breaks 64-bit systems because Fedora's libfreetype has an extra bit of size-checking code which tries to load different headers based on the architecture size. Thus, the Fedora install scripts now explicitly include both the 32 and 64 bit versions of libfreetype and glibc. (It's possible that this will lead to some extra 64-bit dependencies on 32-bit systems, but I don't think the added effort of working around that is worth saving a couple megabytes of storage for the one person still running a 32-bit system.)
  • libfreetype's bit-size checking code depends on bits/wordsize.h, which (from what I can tell) is a non-standard header. Thus, the only way I could make it work was by including all of /usr/include. Imo, that's a bit of an ugly/heavy-handed solution, but I haven't been able to think of anything better (suggestions welcome). To minimize the impact, I've added some code to detect the Linux distribution and gated that include to Fedora only.
  • I also added warnings to the install scripts about Fedora's unofficial status. It would be nice to add something to the end of the build process too, but I couldn't find a nice way to do post-run actions in make, and given that it's now part of the installation scripts, I don't think it's as necessary.

As of now, CI is passing, and my build passes all but two of the tests on Fedora. (I'll investigate tomorrow; it's late now.) So, pending that, I'm good to merge this! (Will approve once that's done.)

Keep in mind that I've been testing on Fedora 42. (I'll update the PR title to reflect that.) @calvarado2004 If you want to test against Fedora 41, feel free to do so and report your findings, but I will not be explicitly testing against it otherwise. Thank you for the work you put into getting this started!

BONUS NOTE: I just realized I actually broke the Ubuntu 22.04 check in the test suite, but the test still passed, so it's possible that that code is no longer needed. I'll wait till tomorrow to remove it so that we get at least 3 CI runs with it (hopefully passing). [The comment says that it's from the 22.04 BETA, so it's possible it's been fixed in the latest release.] If it passes, we can probably just remove the check.

@CoolSpy3 CoolSpy3 changed the title Adding compilation support for Fedora 41 Adding compilation support for Fedora 42 Aug 16, 2025
CoolSpy3
CoolSpy3 previously approved these changes Aug 17, 2025
Copy link
Contributor

@CoolSpy3 CoolSpy3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, here's what I found with the tests:
billboard.wbt - Fails when run in the test suite but passes in a normal Webots session or when the suite is run through xvfb. Based on the output, it looks like its failing due to a window-size bug. Given Fedora's unofficial support status and the fact that this is only a problem in the suite, I don't think it's worth fixing.
supervisor_start_stop_movie.wbt - This was failing due to a missing video codec. Fedora's repos normally don't include proprietary codecs. I updated the install script to enable RPMFusion and the full (proprietary) version of ffmpeg, and that appears to have fixed the problem.

As for the Ubuntu 22.04 test. It does appear to pass consistently (~3 consecutive times so far with no failures), so I think it's good to re-enable. However, even though it's a small change, I think it makes sense to address it in another PR, so I won't back it out here.

Regardless, I'm now happy with the state of this PR, so I'm going to approve!

Copy link
Member

@omichel omichel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you.

@CoolSpy3 CoolSpy3 merged commit 1de87cc into cyberbotics:master Aug 17, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test suite Start the test suite
Development

Successfully merging this pull request may close these issues.

3 participants