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

CI: Adding initial workflow #4

Merged
merged 20 commits into from
Nov 20, 2024
Merged

Conversation

andy5995
Copy link
Contributor

No description provided.

meson.build Outdated
default_options: ['c_std=gnu23', 'cpp_std=gnu++23'],
version: '0.1.0-dev',
meson_version: '>= 1.1',
default_options: ['c_std=gnu2x', 'cpp_std=gnu++23'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

meson.build:1:0: ERROR: None of values ['gnu23'] are supported by the C compiler. Possible values for option "C_std" are ['none', 'c89', 'c99', 'c11', 'c17', 'c18', 'c2x', 'gnu89', 'gnu99', 'gnu11', 'gnu17', 'gnu18', 'gnu2x']

Copy link
Owner

@KaruroChori KaruroChori Nov 19, 2024

Choose a reason for hiding this comment

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

I think you are using an "outdated" compiler.
I am making explicit use of the #embed preprocessor directive which has been set standard with C23 (and as such covered by gnu23).
Any prior version is unlikely to work.
On my system, and on the flatpak I am using clang-19 for that reason.
You might be able to also use very recent zig (it is just an updated clang frontend in C/C++ mode).

If you look at project.json,

"meson-setup.clang-release": "meson setup --reconfigure build/ --buildtype=release --native-file toolchains/clang.ini"

I am using a specific native file to ensure that c23 is supported.
This is briefly discussed in: https://github.com/KaruroChori/vs-fltk/blob/master/docs/for-developers.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood. I made some changes. Please trigger the workflow when it's convenient.

@@ -1,7 +1,9 @@
project(
'vs-fltk',
['c', 'cpp', 'swift'],
default_options: ['c_std=gnu23', 'cpp_std=gnu++23'],
version: '0.1.0-dev',
meson_version: '>= 1.1',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Build type: native build
WARNING: Project does not target a minimum version but uses feature introduced in '1.1': meson.options file. Use meson_options.txt instead

@andy5995 andy5995 force-pushed the ci/add-initial branch 3 times, most recently from 6412b0c to 3efe5ab Compare November 19, 2024 08:17
@KaruroChori
Copy link
Owner

KaruroChori commented Nov 19, 2024

Failing with these relevant parts in the log

2024-11-19T11:23:26.0866261Z | CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
2024-11-19T11:23:26.0867351Z | Please set them or make sure they are set and tested correctly in the CMake files:
2024-11-19T11:23:26.0868383Z | /home/runner/work/vs-fltk/vs-fltk/subprojects/libfltk/src/OPENGL_INCLUDE_DIR
2024-11-19T11:23:26.0869671Z | used as include directory in directory /home/runner/work/vs-fltk/vs-fltk/subprojects/libfltk/src
2024-11-19T11:23:26.0870843Z | used as include directory in directory /home/runner/work/vs-fltk/vs-fltk/subprojects/libfltk/src
2024-11-19T11:23:26.0894581Z | CMake Error in src/CMakeLists.txt:
2024-11-19T11:23:26.0895341Z | Target "fltk_gl" INTERFACE_INCLUDE_DIRECTORIES property contains path:
2024-11-19T11:23:26.0896120Z 
2024-11-19T11:23:26.0896596Z | "/home/runner/work/vs-fltk/vs-fltk/subprojects/libfltk/src/OPENGL_INCLUDE_DIR-NOTFOUND"
2024-11-19T11:23:26.0897295Z 
2024-11-19T11:23:26.0897640Z | which is prefixed in the source directory.

and a second one virtually identical.
Some of the system dependencies are not satisfied while building fltk. For example in flatpak I had to manually add glu.
An apt install freeglut3-dev might solve it here as well.

@KaruroChori
Copy link
Owner

Yes, that was the issue.
I also updated the last command which only made sense when run on the machine of a developer, but not in the actual pipeline.

There are now compiling errors of code I wrote which I cannot locally replicate.
I think that has to do with the gnu library being used (include/x86_64-linux-gnu/c++/12/, include/x86_64-linux-gnu/c++/14/)

KaruroChori pushed a commit that referenced this pull request Nov 19, 2024
.github/workflows/build.yml Outdated Show resolved Hide resolved
@KaruroChori
Copy link
Owner

It looks like the gnu lib shipped in ubuntu-22.04 is fully missing some header files like <format> and possibly more.
On 24.04 instead instead there is a totally different failure of libfltk. I will have to investigate what is going on.

@KaruroChori
Copy link
Owner

KaruroChori commented Nov 19, 2024

Well it looks like the culprit is the newest verison of cmake mesonbuild/meson#13888
3.31.0 vs 3.30.3 I am using on all my machines.

@KaruroChori
Copy link
Owner

Success on ubuntu-24.04!

Only keeping 24.04 for now, since the other versions ship with an older incompatible libc++
@KaruroChori KaruroChori merged commit 51dc003 into KaruroChori:master Nov 20, 2024
@KaruroChori KaruroChori added this to the v0.1.1-alpha milestone Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants