Skip to content

Conversation

@hageboeck
Copy link
Member

When compiling ROOT in Gentoo, the following warning is issued:

 * Verifying compiled files for python3.13 *
 * QA Notice: The following unexpected files/directories were found
 * top-level in the site-packages directory: *
 *   /usr/lib/python3.13/site-packages/libcppyy.so.6.37.01
 *
 * This is most likely a bug in the build system.  More information
 * can be found in the Python Guide:
 * https://projects.gentoo.org/python/guide/qawarn.html#stray-top-level-files-in-site-packages

Similarly to #14917, this can be solved by moving it to /cppyy.

Fix #20015.

@hageboeck hageboeck self-assigned this Sep 30, 2025
@hageboeck hageboeck linked an issue Sep 30, 2025 that may be closed by this pull request
1 task
Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

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

Great, thank you very much! Good for me once the install tree works 👍

@guitargeek
Copy link
Contributor

Looking at the current test failure:

2025-09-30T14:28:11.7394805Z     Start 1: run-hsimple
2025-09-30T14:28:11.7403649Z     Start 3: python-import-root
2025-09-30T14:28:11.7410796Z     Start 4: python-create-histo
2025-09-30T14:28:11.7635281Z 1/4 Test #3: python-import-root ...............***Failed    0.02 sec
2025-09-30T14:28:11.7635773Z 2/4 Test #4: python-create-histo ..............***Failed  Required regular expression not found. Regex=[myHistoName
2025-09-30T14:28:11.7636194Z ]  0.02 sec
2025-09-30T14:28:12.7766475Z 3/4 Test #1: run-hsimple ......................   Passed    1.04 sec
2025-09-30T14:28:12.7766962Z     Start 2: read-hsimple
2025-09-30T14:28:13.0585817Z 4/4 Test #2: read-hsimple .....................   Passed    0.28 sec

Are we not running with --output-on-failue? If not, can we maybe do that? It would help to debug things going wrong in the install tree.

@github-actions
Copy link

github-actions bot commented Sep 30, 2025

Test Results

    22 files      22 suites   3d 22h 45m 57s ⏱️
 3 704 tests  3 703 ✅ 0 💤 1 ❌
79 537 runs  79 536 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 669b59b.

♻️ This comment has been updated with latest results.

@guitargeek
Copy link
Contributor

Thanks. I'll take care of the patch file later when I do the next cppyy sync

@pcanal
Copy link
Member

pcanal commented Sep 30, 2025

Are we not running with --output-on-failue? If not, can we maybe do that? It would help to debug things going wrong in the install tree.

We indirect do. The individual logs can be found in the "Test Results": eg https://github.com/root-project/root/pull/20016/checks?check_run_id=51624533514
Is that not the case for the 'install-tree' testing?

@guitargeek
Copy link
Contributor

I don't know. But we do --output-on-failure also for the build tree tests, so I'd say this change is not controversial.

Thanks, I was not aware of these individual logs! I forgot about them because I noticed that for me, Ctrl+F-ing through the full log was actually faster than clicking around in the web interface, so I started ignoring everything but the full log.

@guitargeek
Copy link
Contributor

@hageboeck, if you want to make it also work on Windows, you can use this trick for example:
https://github.com/root-project/root/pull/15310/files#diff-99c1321adf45e1356a5dccb621001c5baf3a1f69f71ed4ba1f3ad60c1f79c23fR24

@hageboeck hageboeck force-pushed the libcppyy_location branch 3 times, most recently from bf15efb to 370cd09 Compare October 1, 2025 09:58
Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

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

Thanks!

@guitargeek
Copy link
Contributor

Maybe we need the help of @bellenot for Windows after all 🙁

Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

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

Super nice to see that the install testing is preventing us from merging breaking changes! 😄

Another note: can we please also run the wheel building on this PR? It's enough to add the label from the GitHub UI

@hageboeck hageboeck added the build-python-wheels Run the workflow to build Python wheels label Oct 2, 2025
@dpiparo dpiparo closed this Oct 11, 2025
@dpiparo dpiparo reopened this Oct 11, 2025
@hageboeck hageboeck force-pushed the libcppyy_location branch 5 times, most recently from 4306aa9 to b06b6e5 Compare October 16, 2025 13:27
@ferdymercury
Copy link
Collaborator

@hageboeck hageboeck force-pushed the libcppyy_location branch 7 times, most recently from 5adf7e3 to 03d48b4 Compare October 27, 2025 13:31
@guitargeek
Copy link
Contributor

guitargeek commented Oct 27, 2025

Wow, you made it work!

Do I understand correctly that you install libcppyy.so in the subdirectory also on Windows now, but it needs to be imported as import cppyy anyway? That's unexpected 🙂

This will facilitate moving it to a new location in the next commit.
When compiling ROOT in Gentoo, the following warning was issued:
 * Verifying compiled files for python3.13
 *
 * QA Notice: The following unexpected files/directories were found
 * top-level in the site-packages directory:
 *
 *   /usr/lib/python3.13/site-packages/libcppyy.so.6.37.01
 *
 * This is most likely a bug in the build system.  More information
 * can be found in the Python Guide:
 * https://projects.gentoo.org/python/guide/qawarn.html#stray-top-level-files-in-site-packages

Similarly to root-project#14917, this can be solved by moving it to <LIBDIR>/cppyy.

Therefore:
- Move the libray
- Update the library's RUNPATHs for it to find ROOT libraries.
- Use relative import paths to simplify finding libcppyy
- Don't touch the install location in Windows for now

Fix root-project#20015.
@hageboeck
Copy link
Member Author

hageboeck commented Oct 29, 2025

Wow, you made it work!

Do I understand correctly that you install libcppyy.so in the subdirectory also on Windows now, but it needs to be imported as import cppyy anyway? That's unexpected 🙂

Actually, no. Since the library is a .pyd dll on Windows, it's currently installed in the top-level directory, so we have to import it directly. I guess the (cmake) problem is that it doesn't fall in any category of Archive/DLL/Exe, so CMake doesn't update the path. We could probably override this manually, but I didn't think this was necessary for Windows at the moment.

Maybe we could do it in the future, to have all OS consistent ...
I will give it one more try today. If I don't find it, I would propose to fix it for linux/Mac, and defer the fix for Windows to the next root version.

@hageboeck hageboeck added this to the 6.38.00 milestone Oct 29, 2025
@dpiparo dpiparo merged commit b37b578 into root-project:master Oct 29, 2025
45 of 50 checks passed
@hageboeck hageboeck deleted the libcppyy_location branch October 29, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-python-wheels Run the workflow to build Python wheels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

libcppyy shows up in top-level site-packages

6 participants