Skip to content

update cmake file for python 3.12 on ubuntu 22 with system python being 3.10 #4

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

le-horizon
Copy link
Contributor

@le-horizon le-horizon commented Apr 10, 2025

Tested, this works on ubuntu 22 with python 3.12.
Andrew, could you test on your ubuntu 24?

Requires Hobot side change to build_rapid_env.py https://github.com/HorizonRoboticsInternal/Hobot/pull/1665

I'll try to test it on ubuntu 22 with python3.10 as well.

@le-horizon le-horizon requested a review from QuantuMope April 10, 2025 05:00
Copy link
Collaborator

@QuantuMope QuantuMope left a comment

Choose a reason for hiding this comment

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

Hey Le,

On Ubuntu 24.04, I am now getting this error

In file included from /home/asjchoi/Desktop/Code/kincpp/src/kincpp/utils.h:3,
                 from /home/asjchoi/Desktop/Code/kincpp/src/utils.cpp:1:
/home/asjchoi/Desktop/Code/kincpp/src/kincpp/global_definitions.h:3:10: fatal error: Eigen/Dense: No such file or directory
    3 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
In file included from /home/asjchoi/Desktop/Code/kincpp/src/kincpp/kinematics_solver.h:3,
                 from /home/asjchoi/Desktop/Code/kincpp/src/kinematics_solver.cpp:1:
/home/asjchoi/Desktop/Code/kincpp/src/kincpp/global_definitions.h:3:10: fatal error: Eigen/Dense: No such file or directory
    3 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.
compilation terminated.
make[2]: *** [CMakeFiles/kincpp.dir/build.make:90: CMakeFiles/kincpp.dir/src/utils.cpp.o] Error 1

Can confirm that build works on main.

CMakeLists.txt Outdated
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
find_package(pybind11 REQUIRED)
find_package(pybind11 CONFIG REQUIRED)
find_package(Python3 3.12 REQUIRED COMPONENTS Interpreter Development)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of hardcoding python 3.12 here, should we add a cmake arg so user can choose?

@le-horizon
Copy link
Contributor Author

Hey Le,

On Ubuntu 24.04, I am now getting this error

In file included from /home/asjchoi/Desktop/Code/kincpp/src/kincpp/utils.h:3,
                 from /home/asjchoi/Desktop/Code/kincpp/src/utils.cpp:1:
/home/asjchoi/Desktop/Code/kincpp/src/kincpp/global_definitions.h:3:10: fatal error: Eigen/Dense: No such file or directory
    3 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
In file included from /home/asjchoi/Desktop/Code/kincpp/src/kincpp/kinematics_solver.h:3,
                 from /home/asjchoi/Desktop/Code/kincpp/src/kinematics_solver.cpp:1:
/home/asjchoi/Desktop/Code/kincpp/src/kincpp/global_definitions.h:3:10: fatal error: Eigen/Dense: No such file or directory
    3 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.
compilation terminated.
make[2]: *** [CMakeFiles/kincpp.dir/build.make:90: CMakeFiles/kincpp.dir/src/utils.cpp.o] Error 1

Can confirm that build works on main.

Ah, not as easy as I thought.. Could you give me access to your env so I can test?

Re: hardcoding 3.12, I'm thinking probably choose based on virtualenv. But let me debug this 312 version first.

@QuantuMope
Copy link
Collaborator

QuantuMope commented Apr 10, 2025

Hey Le,
On Ubuntu 24.04, I am now getting this error

In file included from /home/asjchoi/Desktop/Code/kincpp/src/kincpp/utils.h:3,
                 from /home/asjchoi/Desktop/Code/kincpp/src/utils.cpp:1:
/home/asjchoi/Desktop/Code/kincpp/src/kincpp/global_definitions.h:3:10: fatal error: Eigen/Dense: No such file or directory
    3 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
In file included from /home/asjchoi/Desktop/Code/kincpp/src/kincpp/kinematics_solver.h:3,
                 from /home/asjchoi/Desktop/Code/kincpp/src/kinematics_solver.cpp:1:
/home/asjchoi/Desktop/Code/kincpp/src/kincpp/global_definitions.h:3:10: fatal error: Eigen/Dense: No such file or directory
    3 | #include <Eigen/Dense>
      |          ^~~~~~~~~~~~~
compilation terminated.
compilation terminated.
make[2]: *** [CMakeFiles/kincpp.dir/build.make:90: CMakeFiles/kincpp.dir/src/utils.cpp.o] Error 1

Can confirm that build works on main.

Ah, not as easy as I thought.. Could you give me access to your env so I can test?

Re: hardcoding 3.12, I'm thinking probably choose based on virtualenv. But let me debug this 312 version first.

I run Ubuntu 24.04 on my home computer. Work computer is 22.04 unfortunately.

Yeah choosing based off of virtualenv is definitely the best way!

…ng 3.10: use the pybind and python version fed in

from the input CMAKE_PREFIX_PATH
@le-horizon le-horizon force-pushed the PR/update_cmakefile_for_python312 branch from 1544b48 to f1a4363 Compare April 11, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants