I tried the patch and it works great, thanks Kaleb! I will use this as a workaround in the meantime.

I guess I won't be able to find why "FindPython" is not working but "FindPythonInterp" is, my knowledge in this area is too limited and it is a bit unfortunate as "FindPythonInterp" is advertised as deprecated.

On Thu, Mar 17, 2022 at 12:55 PM Kaleb Keithley <kkeithle@redhat.com> wrote:

I used this patch to build on c8s: 

https://git.centos.org/rpms/nfs-ganesha/blob/c8s-sig-storage-nfs-ganesha-4/f/SOURCES/0002-CMakeLists.txt.patch

Looks like I forgot to send it upstream.


On Thu, Mar 17, 2022 at 7:44 AM Vaillant Romain via Devel <devel@lists.nfs-ganesha.org> wrote:
Hello,

I've got a bit in trouble trying to build ganesha (4.0.2) with python admin tools on
RHEL8, the search for the python interpreter fails (it does have python3.6 available in /usr/bin).

I am not sure if it is problem in the CMakeLists.txt configuration or
an environment / cmake problem (as I am not familiar with cmake).

I had a similar issue on Centos7, but I got it solved with Python_ROOT_PATH set to /usr/bin,
this solution doesn't work at all on RHEL8 and I didn't find any other.

The only difference that I currently see is that on centos7 cmake is 3.17.5
and on rhel8 cmake is 3.20.2. And AFAIK, the FindPython.cmake changed quite
a bit in between.

If I put back the old FindPython module on RHEL8, the python package is found.

Trying to debug the search (find_program),
I found that the NAMES are always empty e.g:

    VAR: _Python_EXECUTABLE
    NAMES:
    Documentation: Path to a program.
    Framework
      Only Search Frameworks: 0
      Search Frameworks Last: 0
      Search Frameworks First: 0
    AppBundle
      Only Search AppBundle: 0
      Search AppBundle Last: 0
      Search AppBundle First: 0
    CMAKE_FIND_USE_CMAKE_PATH: 1
    CMAKE_FIND_USE_CMAKE_ENVIRONMENT_PATH: 1
    CMAKE_FIND_USE_SYSTEM_ENVIRONMENT_PATH: 1
    CMAKE_FIND_USE_CMAKE_SYSTEM_PATH: 1

I thought that it was a configuration problem on my side, but after
digging a bit it seems that the cmake_parse_arguments (PARSE_ARGV ...)
gets misinterpreted and uses PARSE_ARGV as a prefix... But it seems a bit too
big to be true.

Is this a known problem ? Does someone has any insight / pointers on this ?
_______________________________________________
Devel mailing list -- devel@lists.nfs-ganesha.org
To unsubscribe send an email to devel-leave@lists.nfs-ganesha.org


--

Kaleb