Bug 8156 - Cenbuild does not support meson
Summary: Cenbuild does not support meson
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: 4.14.0
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.18.0
Assignee: Adam Halim
URL:
Keywords: ossman_tester
Depends on: 8298
Blocks: 8379
  Show dependency treegraph
 
Reported: 2023-05-23 13:53 CEST by Frida Flodin
Modified: 2024-07-26 10:35 CEST (History)
2 users (show)

See Also:
Acceptance Criteria:
MUST: * A meson package that allows us to raise our xorg-server to the latest version must be available in Cenbuild. SHOULD: * The package is the latest stable meson version. EXTRA: * Other packages in Cenbuild that can't be upgraded due to a meson dependency should be upgraded. * xorg-server should switch to build with meson instead of autotools.


Attachments

Description Frida Flodin cendio 2023-05-23 13:53:30 CEST
We do not have meson in cenbuild and this is starting to cause problems when upgrading packages. Currently, we cannot upgrade the following due to the need of meson:

* mesa
* Glib
* libdrm

We also tried to upgrade our xserver to the latest release and found a new requirement; libxcvt, which also builds with meson. So, right now we can't upgrade our xorg-server.
Comment 1 Alexander Zeijlon cendio 2024-01-30 15:57:14 CET
Meson also requires Ninja, which in turn requires CMake >= 3.15 to build.
Comment 2 Adam Halim cendio 2024-07-17 10:06:12 CEST
(In reply to Alexander Zeijlon from comment #1)
> Meson also requires Ninja, which in turn requires CMake >= 3.15 to build.
This was fixed in bug 8298.

In our efforts to upgrade our xorg-server package, we decided to go for adding meson to Cenbuild.
Comment 6 Adam Halim cendio 2024-07-17 14:51:52 CEST
meson has now been added to Cenbuild (along with ninja). Unfortunately, we could not get a newer version of meson than 0.61.5 as newer versions require python >=3.7, and we currently are stuck with 3.6.

As with our other build tools, we should probably add macros for meson so it's easier to configure paths correctly.
Comment 7 Adam Halim cendio 2024-07-17 15:41:06 CEST
> MUST: 
>   ✅ A meson package that allows us to raise our
>     xorg-server to the latest version must be 
>     available in Cenbuild.
meson has now been added to Cenbuild, verified that it works by building libxcvt with it, which is the only thing holding our xorg-server upgrade back (hopefully).
> SHOULD:
>   ❌ The package is the latest stable meson 
>     version.
As mentioned in comment #6, we can't get any later version than 0.61.5 since it requires >= python 3.7.
> EXTRA:
>   ❌ Other packages in Cenbuild that can't be 
>     upgraded due to a meson dependency should be 
>     upgraded.
>   ❌ xorg-server should switch to build with meson
>     instead of autotools.
We probably want to add Cenbuild macros for meson/ninja before we do this. This will hopefully be done in the near future.
Comment 9 Adam Halim cendio 2024-07-19 16:12:47 CEST
(In reply to Adam Halim from comment #7)
> meson has now been added to Cenbuild, verified that it works by building
> libxcvt with it, which is the only thing holding our xorg-server upgrade
> back (hopefully).
Indeed, I was able to build an Xvnc server using the latest xorg-xserver release, with libxcvt, that was usable with ThinLinc.
Comment 13 Adam Halim cendio 2024-07-23 15:44:48 CEST
Cross-compilation is broken with meson, it seems to always compile Linux binaries.
Comment 23 Adam Halim cendio 2024-07-24 14:25:02 CEST
(In reply to Repository Bot from comment #21)
> ------------------------------------------------------------------------
> r41090 | adaha | trunk/cenbuild/build
> 
> Fix cpu strings in meson cross-file
> 
> Meson compares these strings to what's returned from the python function
> platform.machine().
> 
> Part of bug 8156.
> ------------------------------------------------------------------------
Note that the cpu string for armhf in this commit is a best effort given current circumstances. 

On unix platforms, the platform.machine() uses uname, which can give different results depending on what distribution is used, even if the same hardware is used.

It seems like we're shipping armv7 binaries, so I set the cpu to "armv7l".
Comment 24 Adam Halim cendio 2024-07-24 14:30:19 CEST
In r41089, I made a best effort attempt to add all tools to the lists, but there might be some missing. We don't really use meson for much right now, so we'll just have to wait and see.
Comment 25 Pierre Ossman cendio 2024-07-25 14:30:28 CEST
Found a few minor issues:

1. Missing Python runtime requirement for meson
2. "target" is used for the cross compilation setup, rather than "host"
3. ninja doesn't seem to be built according to ninjas instructions, as only the first step is performed
Comment 30 Adam Halim cendio 2024-07-25 16:09:53 CEST
(In reply to Pierre Ossman from comment #25)
> Found a few minor issues:
> 
> 1. Missing Python runtime requirement for meson
Fixed in r41097.
> 2. "target" is used for the cross compilation setup, rather than "host"
Fixed in r41096.
> 3. ninja doesn't seem to be built according to ninjas instructions, as only
> the first step is performed
Fixed in r41095.
Comment 32 Pierre Ossman cendio 2024-07-26 10:35:19 CEST
Looks good now. meson and ninja spec files look nice. We've seen working builds of libxcvt and pixman, so the tools seem to be working well.

> MUST: 
>   * A meson package that allows us to raise our
>     xorg-server to the latest version must be 
>     available in Cenbuild.

We are indeed running the latest version of the X server. And the other Xorg packages, so we should be good.

> SHOULD:
>   * The package is the latest stable meson 
>     version.

We are not, unfortunately, because of our old Python. We're not even past meson 1.0. :/
Still, the version is sufficient to build the packages we need right now. Hopefully, that will stay true for the near future.

> EXTRA:
>   * Other packages in Cenbuild that can't be 
>     upgraded due to a meson dependency should be 
>     upgraded.
>   * xorg-server should switch to build with meson
>     instead of autotools.

Neither of these were done now as part of this bug. pixman got switched over as part of bug 8379, though.

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