Python build on M2

Hi !
I am trying to build Pulse (branch: stable) in python on a Mac (M2 8GB, macOS Sequoia 15.0.1 (24A348)).

I tried to use the external libs for eigen3, absl, protobuf, and pybind11 to avoid issues related to my own install. Also, I created a python venv and added the link in CMake at “Pulse_PYTHON_HOME_DIR”.

Whatever I tried, I always get the same issue which is that the CMake files generated for each of these 4 libs are not in the correct folder:

  • They should be in {lib}/src
  • They are in {lib}/src/{lib-version}

Here is the example with eigen 3:

So, obviously, when trying to build, I get an error saying that there are no CMake file in the folders:

CMake Error: The source directory "/Volumes/LaulSanDisk/01. Src-Libs/pulse/External/absl/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make[2]: *** [External/absl/stamp/absl-configure] Error 1
make[1]: *** [cmake/external/CMakeFiles/absl.dir/all] Error 2
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[ 65%] No update step for 'Eigen3'
[ 70%] No patch step for 'Eigen3'
[ 75%] Performing configure step for 'Eigen3'
loading initial cache file /Volumes/LaulSanDisk/01. Src-Libs/pulse/External/Eigen3/tmp/Eigen3-cache-Release.cmake
CMake Error: The source directory "/Volumes/LaulSanDisk/01. Src-Libs/pulse/External/Eigen3/src" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
make[2]: *** [External/Eigen3/stamp/Eigen3-configure] Error 
make[1]: *** [cmake/external/CMakeFiles/Eigen3.dir/all] Error 2
make: *** [all] Error 2

My guess is that the problem is potentially related to the chips itself because then I tried to build with another laptop (MacBookPro 15" 2017, i7 core, Ventura 13.7.1) and worked as a charm.

Did you ever get that error ?

Thanks !

What version of CMake are you using?

Could you also try building the integration branch.

Could also be that you have a space in your build path…
I might need to add quotes somewhere in our CMake files…

:no_mouth: Bad news… :

What version of CMake are you using?

3.31.2

Could you also try building the integration branch.

Same error

Could also be that you have a space in your build path…

Same error

You are generating Makefiles and building from the command line? or maybe xcode?

I have an M2 I will fire up and see how it builds
I think it worked fine… but will double check

Mmhhhhhh :face_with_raised_eyebrow:
Then I really dont know … let me know witj yours and we’ll dig more with comparisons to find the reason.

I tried both : command line and xcode . Both gqve the same type of errors.

Just to be clear, it says there is no CMakeLists.txt file, but when you look, there actually is, where it says there isn’t… right?

Did you try to make the project again?
And it gave you the same response, that it cannot find a CMakeLists.txt where there is one?

Just to be clear, it says there is no CMakeLists.txt file, but when you look, there actually is, where it says there isn’t… right?

Not exactly in fact: for example for eigen3:

  • If I build on my M2, then the CMakeLists.txt goes to: Eigen3/src/eigen-3.4.0/CMakeLists.txt
  • If I build on my Intel Mac, then the CMakeLists.txt goes to: Eigen3/src/CMakeLists.txt

It seems like the unzipping creates a subfolder for some reasons… I am looking at it , but did not find any good answer yet.

Did you try to make the project again?

Yep, a lot ! I tried also to use the system libs for Eigen3, absl, protobuf and pybind11. But here I get an error in CMake for protobuf:

ERROR: Could not find a version that satisfies the requirement protobuf==5.5.29.1 (from versions: 2.0.0b0, 2.0.3, 2.3.0, 2.4.1, 2.5.0, 2.6.0, 2.6.1, 3.0.0a2, 3.0.0a3, 3.0.0b1, 3.0.0b1.post1, 3.0.0b1.post2, 3.0.0b2, 3.0.0b2.post1, 3.0.0b2.post2, 3.0.0b3, 3.0.0b4, 3.0.0, 3.1.0, 3.1.0.post1, 3.2.0rc1, 3.2.0rc1.post1, 3.2.0rc2, 3.2.0, 3.3.0, 3.4.0, 3.5.0.post1, 3.5.1, 3.5.2, 3.5.2.post1, 3.6.0, 3.6.1, 3.7.0rc2, 3.7.0rc3, 3.7.0, 3.7.1, 3.8.0rc1, 3.8.0, 3.9.0rc1, 3.9.0, 3.9.1, 3.9.2, 3.10.0rc1, 3.10.0, 3.11.0rc1, 3.11.0rc2, 3.11.0, 3.11.1, 3.11.2, 3.11.3, 3.12.2, 3.12.4, 3.13.0rc3, 3.13.0, 3.14.0rc1, 3.14.0rc2, 3.14.0rc3, 3.14.0, 3.15.0rc1, 3.15.0rc2, 3.15.0, 3.15.1, 3.15.2, 3.15.3, 3.15.4, 3.15.5, 3.15.6, 3.15.7, 3.15.8, 3.16.0rc1, 3.16.0rc2, 3.16.0, 3.17.0rc1, 3.17.0rc2, 3.17.0, 3.17.1, 3.17.2, 3.17.3, 3.18.0rc1, 3.18.0rc2, 3.18.1, 3.18.3, 3.19.0rc1, 3.19.0rc2, 3.19.0, 3.19.1, 3.19.2, 3.19.3, 3.19.4, 3.19.5, 3.19.6, 3.20.0rc1, 3.20.0rc2, 3.20.0, 3.20.1rc1, 3.20.1, 3.20.2, 3.20.3, 4.21.0rc1, 4.21.0rc2, 4.21.1, 4.21.2, 4.21.3, 4.21.4, 4.21.5, 4.21.6, 4.21.7, 4.21.8, 4.21.9, 4.21.10, 4.21.11, 4.21.12, 4.22.0rc2, 4.22.0rc3, 4.22.0, 4.22.1, 4.22.3, 4.22.4, 4.22.5, 4.23.0rc2, 4.23.0rc3, 4.23.0, 4.23.1, 4.23.2, 4.23.3, 4.23.4, 4.24.0rc1, 4.24.0rc2, 4.24.0rc3, 4.24.0, 4.24.1, 4.24.2, 4.24.3, 4.24.4, 4.25.0rc1, 4.25.0rc2, 4.25.0, 4.25.1, 4.25.2, 4.25.3, 4.25.4, 4.25.5, 5.26.0rc1, 5.26.0rc2, 5.26.0rc3, 5.26.0, 5.26.1, 5.27.0rc1, 5.27.0rc2, 5.27.0rc3, 5.27.0, 5.27.1, 5.27.2, 5.27.3, 5.27.4, 5.27.5, 5.28.0rc1, 5.28.0rc2, 5.28.0rc3, 5.28.0, 5.28.1, 5.28.2, 5.28.3, 5.29.0rc1, 5.29.0rc2, 5.29.0rc3, 5.29.1, 5.29.2)

It is looking for version 5.5.29, but I think there is a typo and it should be version 5.29 and not 5.5.29, but then it creates other new errors one by one, so I stopped to investigate into that direction.

I can send a video to show exactly what I do if needed. Again, the exact same process works on intel… :flushed:

OOH!
Schnap, why do projects write CMake code that changes up directories based on target platform

Ok, you have given me ideas

Of our 4 dependencies, eigen fails, does absl, protobuf or pybind11 build?

Olalaaaa, I found… :partying_face:

I imagined it could have been that when I opened this ticket, but rejected the assumption because I could not believe it: I am ultra limited in term of space on my laptop, so I decided to put all my repos on an external SSD (reason of my path: /Volumes/LaulSanDisk/) that is in ExFat. No idea exactly why it does not work (I mean: I dont see any reasons / limitations that would prevent me to do so, but it does not !

Bug Take Home: always have space of the internal drive!! :smirk:

Final update : after erasing my ext drive and formatting in APFS (like my M2)… Worked ! :partying_face: :partying_face:

To keep in mind !

You find the most amazing issues

Glad it worked out!

I am going to ping the cmake guys about this, its weird that the drive formatting changed the install paths of those libraries for some reason… that is really weird…