Closed ryanmrichard closed 1 year ago
I just took the master branch, set the toolchain you have and did a clean install, including cppyy. It built without a problem.
What is your Python version? Cppyy build problems I have observed so far are either related to Python 3.11 (not supported by cppyy, yet) or conflicting versions of cppyy dependencies installed in the system. I'd uninstall cppyy and its dependencies and let cmake to build cppyy.
I created a PR to update cppyy to 2.4.1 and for a possible fix (not tested) for this issue.
I'm using Python 3.10.7. pip list
doesn't show Cppyy as being installed and I don't have any user packages for Python 3.10.7. I admittedly do have user packages, including cppyy, for older versions of Python. I'll try deleting those.
update: tried deleting user packages from other Python versions still have the same problem.
If you are getting the same error message, AttributeError: install_layout. Did you mean: 'install_platlib'?
, you can try pip install -U setuptools
. See here. But before doing that, could you replace the FindCppyy.cmake
file with this one and try again. This will help us learn weather the configuration halts as expected, or not.
The change does indeed crash CMake when Cppyy is not found. I tried updating setuptools, but still got the same error.
I am using Ubuntu. I'll try using that workaround in a bit (I'm working on something else at the moment).
I changed line 55 of FindCppyy.cmake
to:
execute_process(COMMAND SETUPTOOLS_USE_DISTUTILS=stdlib ${Python3_EXECUTABLE} -m pip install ${_pypkg_name} ${_pip_args})
and got the same error.
Unfortunately, I cannot reproduce your problem, so it is hard to debug. I'd try reinstalling setuptools and starting with a clean virtual environment. I have used this tool in the past to remove packages including the dependencies. Before reinstalling it is also worth trying to clear pip cache. You can do it with pip cache remove *
and pip cache purge
or use --no-cache-dir
option while installing.
@keceli I sincerely appreciate your time and effort. I tried adding the --no-cache-dir
option, but still no dice. For the moment I'm developing with Python bindings disabled. Once I finish the PR I'm working on, I'll try installing Cppyy myself (I've been trying to let FindCppyy.cmake
do it for me). I've had Cppyy working on my computer before; I'll see if I can find my notes.
I think this is the same issue (not sure why the error is different) as NWChemEx-Project/NWXCMake#4, so I'm going to close this one.
Description
I forgot to pre-install Cppyy and ran into a build error when
FindCppyy.cmake
tries to install Cppyy (N.B. this issue still exists). I can't remember why we were recommending pre-installing Cppyy (maybe it was this?), nor did I see an issue tied to this error.To Reproduce
I'm using the master branch with some slight changes. First, in
FindCppyy.cmake
I've setset(cppyy_version "2.4.0")
(that's the version suggested on Slack). My toolchain is:and this is a clean build. I'm not using Python virtual environments or anything like that either.
The Error