Skip to content

[afterimage] migrate from configure-make to CMake and merge with Windows#21649

Open
ferdymercury wants to merge 3 commits intoroot-project:masterfrom
ferdymercury:asimagecmake
Open

[afterimage] migrate from configure-make to CMake and merge with Windows#21649
ferdymercury wants to merge 3 commits intoroot-project:masterfrom
ferdymercury:asimagecmake

Conversation

@ferdymercury
Copy link
Copy Markdown
Collaborator

@ferdymercury ferdymercury commented Mar 20, 2026

Sub-part of work towards #9090

Builds locally as standalone project as well as part of my ROOT build, on my Ubu22.

@ferdymercury ferdymercury added the skip ci Skip the full builds on the actions runners label Mar 20, 2026
@ferdymercury ferdymercury changed the title [skip-ci] migrate from configure-make to CMake and merge with Windows [afterimage] migrate from configure-make to CMake and merge with Windows Mar 20, 2026
@dpiparo
Copy link
Copy Markdown
Member

dpiparo commented Mar 21, 2026

Thanks for kicking off this improvement in uncharted territory! May I ask why skip-ci? Don't we maybe want to see this in action, to discover the failures not initially foreseen?

@ferdymercury

This comment was marked as outdated.

@ferdymercury ferdymercury removed the skip ci Skip the full builds on the actions runners label Mar 22, 2026
@ferdymercury
Copy link
Copy Markdown
Collaborator Author

ferdymercury commented Mar 22, 2026

Now it builds as part of ROOT in my Ubu22 system

@ferdymercury ferdymercury requested a review from dpiparo March 22, 2026 22:57
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 23, 2026

Test Results

    22 files      22 suites   3d 7h 21m 58s ⏱️
 3 836 tests  3 835 ✅  1 💤 0 ❌
76 618 runs  76 600 ✅ 18 💤 0 ❌

Results for commit ee25b40.

♻️ This comment has been updated with latest results.

@linev
Copy link
Copy Markdown
Member

linev commented Apr 1, 2026

I close and open PR to restart CI

@linev linev closed this Apr 1, 2026
@linev linev reopened this Apr 1, 2026
@ferdymercury
Copy link
Copy Markdown
Collaborator Author

I guess Windows failure is a glitch. Alma failure seems either a missing clean build label, or a real issue.

@linev
Copy link
Copy Markdown
Member

linev commented Apr 1, 2026

failed platform uses ninja, but I did not find any error indication. So try to re-run failed job.

And as separate effort one should try to suppress tones of warnings from afterimage

@linev
Copy link
Copy Markdown
Member

linev commented Apr 1, 2026

Error on alma is:

 clang++: error: no such file or directory: 'builtins/FREETYPE-prefix/lib/libfreetype.a'

@linev
Copy link
Copy Markdown
Member

linev commented Apr 1, 2026

@ferdymercury

Try on your machine with -Dbuiltin_freetype=ON.
I got similar failure with cmake and gcc when tried to enable this option.

@linev
Copy link
Copy Markdown
Member

linev commented Apr 1, 2026

@dpiparo

You made cmake for libfreetype.a but configured path there is wrong.
Seems to be one have to add -DCMAKE_INSTALL_LIBDIR=lib to freetype cmake file.
Only then it works for me

@linev
Copy link
Copy Markdown
Member

linev commented Apr 2, 2026

@dpiparo

#21770 should resolve problem with build on alma10

@linev linev closed this Apr 2, 2026
@linev linev reopened this Apr 2, 2026
@ferdymercury
Copy link
Copy Markdown
Collaborator Author

Thanks Sergei, alma10 build works now.
Remaining failures seem unrelated

And as separate effort one should try to suppress tones of warnings from afterimage

In this PR or a separate one?

@ferdymercury ferdymercury requested a review from guitargeek April 2, 2026 11:22
Copy link
Copy Markdown
Member

@linev linev left a comment

Choose a reason for hiding this comment

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

I propose to rebase your PR on at least two separate commits - otherwise we mix here two different things.

First is about of freetype library usage. All builtin-related settings should go to builtins/freetype/CMakeLists.txt file. And one need to check if we really need extra configs for external freetype

Second commit should accumulate your changes in libAfterImage. They looks fine for me.

Probably extra commit(s) to fix major warnings. For the moment there are too many of them.

@ferdymercury
Copy link
Copy Markdown
Collaborator Author

ferdymercury commented Apr 2, 2026

Commits were squashed.

Wrt Freetype: I did several attempts until it worked, so it might well be that some of these things were not necessary, so I'll try disabling them and going step by step to see what was really necessary.

I couldn't try locally since failures were on other platforms than my local one.

@linev
Copy link
Copy Markdown
Member

linev commented Apr 2, 2026

@ferdymercury

Your PR is grate and I really like conversion to cmake.
I hope we can converge soon.

@linev
Copy link
Copy Markdown
Member

linev commented Apr 2, 2026

@ferdymercury

I rebase your PR putting first changes in freetype cmake and than your modifications.
Let see if now it works better

if(NOT FREETYPE_LIBRARY_RELEASE AND NOT FREETYPE_LIBRARY_DEBUG)
set_target_properties(Freetype::Freetype PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${FREETYPE_LIBRARIES}")
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I guess it should be instead like in https://github.com/Kitware/CMake/blob/f5fc584bffee1a0641f611523741a99898a864d9/Modules/FindFreetype.cmake#L243 with the suffix. Same above for Release

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have several other libs with similar logic - they do not have such special flags.
Therefore try first more simpler solutions

linev and others added 3 commits April 2, 2026 18:08
make it compile also as part of ROOT

suppress debug output in all platforms

alma10 has no MMX so detect it

macos detect x11 disabled

fix typo, simplify check, check for malloc that is not present on mac15

win32: fix wd flags passing

add missing dependencies

otherwise afterimage might be built before eg JPEG builtin is available

fix typo and windows quote
@linev linev self-requested a review April 2, 2026 16:23
@ferdymercury ferdymercury added skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff. and removed pr:squash on merge labels Apr 2, 2026
@ferdymercury
Copy link
Copy Markdown
Collaborator Author

Thanks for the fix Sergei! I will be on holidays so fixing the warnings will have to wait ;)

Copy link
Copy Markdown
Member

@linev linev left a comment

Choose a reason for hiding this comment

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

Now PR compiled on all platforms.
Please suppress main warnings before merge it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip code analysis Skip the code analysis CI steps for this PR, including verifying clang-formatting and running Ruff.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants