After setting Pulse_NATIVE_BUILD_DIR to my macos root build directory, CMake does not configure

Im trying to use the engine for a visionOS project. I built the macOS version no problem and my bin populated with protoc. As I go to make the iOS version and set my root directory to the macOSBuild and it says CMake Error at CMakeLists.txt:103 (message):
Could not find expected binding directory in provided NATIVE_BUILD_DIR,
expecting:
/Users/fahim/Desktop/PulseEngine/macBuild/Innerbuild/src/cpp/pulse

You have to build the engine twice, once as a native os build. The 2nd is the visionOS, where you reference the original native os build.

https://gitlab.kitware.com/physiology/engine#ios

If im not mistaken, I believe that is what I did. I did a native build calling it Mac build and then tried to do the iOS build and as instructed tried to set the root directory to macbuild but thats where I come across the issue again.

The directory it is specifically looking for would be

macBuild/Innerbuild/src/cpp/pulse, does that exist?

macBuild/Innerbuild/src/cpp exists, but no pulse after that

I cloned the engine. Named my native build macBuild which built fine. After I built the Xcode project my bin folder populated with everything as seen in my 2nd post. Then I proceed to make my iOS build and when setting root directory I get that same error

It looks like there was an issue building your native macBuild build

you do not have the pule folder, nor are there any executables in the bin directory…

That build failed somewhere…

Sorry, this is new to me. When I made the native build, I cloned the engine, then went to cmake, selected the engine as the source, and made the binaries build location macOS build, which generated an XCode project and populated the macOS build folder, then I built the XCode project and got stuff in my bin, include, and lib. I see in the instructions https://gitlab.kitware.com/physiology/engine#ios in step one it says “In order to generate the necessary files during the build process, you will need to build Pulse for the native MacOS platform. Simply follow the above build instructions.” I’m not sure what that refers to. There’s lots of stuff above iOS, and I’m not sure what that pertains to.

Also for the native build when I configured it in CMake I turned off JAVA and Python

Check the build log in XCode for errors

I attempted to redo the native build again and this time instead of choosing ALL_BUILD scheme I attempted to build each scheme one at a time. Everything built, protobuf, Eigen3, ZERO_CHECK, absl, except Pulse. It does not build and by extension ALL_BUILD does not build. I was not able to attach a txt file so I attached the raw text to this message below. It seems there is a missing file and Im not sure where it is because I dont see it either. Once I follow the path and get to /cpp I see no /pulse folder. Please let me know if you have insights.

Error Messages from Build Log:

Showing All Errors Only
Build target Pulse of project Pulse with configuration Debug
note: Run script build phase ‘Generate cmake/external/CMakeFiles/Pulse’ will be run during every build because the option to run the script phase “Based on dependency analysis” is unchecked. (in target ‘Pulse’ from project ‘Pulse’)
PhaseScriptExecution Generate\ cmake/external/Pulse-prefix/src/Pulse-stamp/(CONFIGURATION)(EFFECTIVE_PLATFORM_NAME)/Pulse-configure /Users/fahim/Desktop/PulseEngine/nativeBuild/build/Pulse.build/Debug/Pulse.build/Script-7094C5C657EE482C66C0FEED.sh (in target ‘Pulse’ from project ‘Pulse’)
cd /Users/fahim/Desktop/PulseEngine/engine
/bin/sh -c /Users/fahim/Desktop/PulseEngine/nativeBuild/build/Pulse.build/Debug/Pulse.build/Script-7094C5C657EE482C66C0FEED.sh
loading initial cache file /Users/fahim/Desktop/PulseEngine/nativeBuild/cmake/external/Pulse-prefix/tmp/Pulse-cache-Debug.cmake
– Using preset install directory /Users/fahim/Desktop/PulseEngine/nativeBuild/install
– The C compiler identification is AppleClang 17.0.0.17000404
– The CXX compiler identification is AppleClang 17.0.0.17000404
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Performing Test CMAKE_HAVE_LIBC_PTHREAD
– Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
– Found Threads: TRUE
CMake Warning (dev) at /Applications/CMake.app/Contents/share/cmake-4.2/Modules/FindPackageHandleStandardArgs.cmake:493 (message):
The package name passed to find_package_handle_standard_args() (Protobuf)
does not match the name of the calling package (protobuf). This can lead
to problems in calling code that expects find_package() result variables
(e.g., _FOUND) to follow a certain pattern.
Call Stack (most recent call first):
/Users/fahim/Desktop/PulseEngine/nativeBuild/install/lib/cmake/protobuf/protobuf-module.cmake:162 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
/Users/fahim/Desktop/PulseEngine/nativeBuild/install/lib/cmake/protobuf/protobuf-config.cmake:21 (include)
CMakeLists.txt:338 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
– Found Protobuf: /Users/fahim/Desktop/PulseEngine/nativeBuild/install/bin/protoc (found version “29.2.0”)
– Autogenerated code root : /Users/fahim/Desktop/PulseEngine/nativeBuild/Innerbuild/src
– protobuf_SRC is located at /Users/fahim/Desktop/PulseEngine/nativeBuild/External/protobuf/src
– Generating Schema Bindings
– Using : /Users/fahim/Desktop/PulseEngine/nativeBuild/install/bin/protoc
– SRC_ROOT: /Users/fahim/Desktop/PulseEngine/engine/src
– SCHEMA_SRC: /Users/fahim/Desktop/PulseEngine/engine/src/schema
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Actions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/AnesthesiaMachine.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/AnesthesiaMachineActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/BagValveMask.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/BagValveMaskActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/BlackBox.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Circuit.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Compartment.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Conditions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/ECMO.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/ECMOActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/ElectroCardioGram.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Engine.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Enums.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Environment.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/EnvironmentActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/EnvironmentConditions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/EquipmentActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Events.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Inhaler.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/InhalerActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/MechanicalVentilator.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/MechanicalVentilatorActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Patient.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/PatientActions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/PatientAssessments.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/PatientConditions.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/PatientNutrition.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Physiology.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Plots.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Properties.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Scenario.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Substance.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/SubstanceQuantity.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/TestReport.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Validation.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/engine/bind/Configuration.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/engine/bind/Enums.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/engine/bind/Environment.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/engine/bind/Equipment.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/engine/bind/Physiology.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/engine/bind/Scenario.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/engine/bind/State.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/study/bind/Hydrocephalus.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/study/bind/InTheMoment.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/study/bind/MultiplexVentilation.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/study/bind/PatientVariability.proto
– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/study/bind/SensitivityAnalysis.proto
– cpp bindings are here : /Users/fahim/Desktop/PulseEngine/nativeBuild/Innerbuild/src/cpp
– Touch file /Users/fahim/Desktop/PulseEngine/nativeBuild/Innerbuild/src/schema_last_built
– Configuring Pulse
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
– Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
– Performing Test COMPILER_HAS_DEPRECATED_ATTR
– Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
– Configuring PulseTests
– Configuring CircuitOptimizationEngine
– Not installing CircuitOptimizationEngine
– Configuring HydrocephalusEngine
– Not installing HydrocephalusEngine
– Configuring MultiplexVentilationEngine
– Not installing MultiplexVentilationEngine
– Configuring PatientVariabilityEngine
– Not installing PatientVariabilityEngine
– Configuring SensitivityAnalysisEngine
– Not installing SensitivityAnalysisEngine
– Configuring PulseC
– Looking for zip shas
– Found Git: /Applications/Xcode.app/Contents/Developer/usr/bin/git (found version “2.50.1 (Apple Git-155)”)
– Configuring done (7.7s)
CMake Error at cmake/utilities/AddLibrary.cmake:78 (add_library):
Cannot find source file:
/Users/fahim/Desktop/PulseEngine/nativeBuild/Innerbuild/src/cpp/pulse/cdm/bind/Actions.pb.h
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc
Call Stack (most recent call first):
src/cpp/CMakeLists.txt:10 (add_library_ex)
CMake Error at cmake/utilities/AddLibrary.cmake:78 (add_library):
No SOURCES given to target: Pulse
Call Stack (most recent call first):
src/cpp/CMakeLists.txt:10 (add_library_ex)
CMake Generate step failed. Build files cannot be regenerated correctly.
Command PhaseScriptExecution failed with a nonzero exit code
Command PhaseScriptExecution failed with a nonzero exit code
Build failed 12/11/25, 11:12 AM 117.9 seconds

So what I believe is happening is that when you see

– C++ Binding file /Users/fahim/Desktop/PulseEngine/engine/src/schema/pulse/cdm/bind/Actions.proto

The build system is trying to execute the protoc executable that it has just built… but XCode or the operating system does not like the permissions of that executable… so it prevents the protoc executable from running… and generating those missing files

The quickest way around this, is to target Makefiles when you are running CMake for your Pulse build rather than creating an XCode project. Just build it with make -jX (Where X is the amount of parallel build processes to use… I usually use -j8 on a laptop…) from the build directory.

Using XCode seems to introduce permission issues that I am not sure how to get around. I just don’t use it enough to figure out these issues. I generally just use CMake to create make files to build rather than an XCode project and go from there…

I did it all through the command line this time

cmake -G "Unix Makefiles" \
      -D Pulse_JAVA_API=OFF \
      -D Pulse_PYTHON_API=OFF \
      -D Pulse_C_AS_STATIC=ON \
      -D CMAKE_BUILD_TYPE=Release \
      -D CMAKE_INSTALL_PREFIX=./install \
      ../engine

I used that command to generate the project then typed make -j8
and received this error

  The package name passed to find_package_handle_standard_args() (Protobuf)
  does not match the name of the calling package (protobuf).  This can lead
  to problems in calling code that expects find_package() result variables
  (e.g., `_FOUND`) to follow a certain pattern.
Call Stack (most recent call first):
  /Users/fahim/Desktop/PulseEngine/nativeBuild/install/lib/cmake/protobuf/protobuf-module.cmake:162 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  /Users/fahim/Desktop/PulseEngine/nativeBuild/install/lib/cmake/protobuf/protobuf-config.cmake:21 (include)
  CMakeLists.txt:338 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Could NOT find Protobuf (missing: Protobuf_PROTOC_EXECUTABLE) (found version "29.2.0")
-- Autogenerated code root : /Users/fahim/Desktop/PulseEngine/nativeBuild/Innerbuild/src
CMake Error at src/schema/GenerateBindings.cmake:26 (message):
  Where is the protoc binder?
Call Stack (most recent call first):
  src/schema/CMakeLists.txt:1 (include)


-- Configuring incomplete, errors occurred!
make[2]: *** [cmake/external/Pulse-prefix/src/Pulse-stamp/Pulse-configure] Error 1
make[1]: *** [cmake/external/CMakeFiles/Pulse.dir/all] Error 2
make: *** [all] Error 2
fahim@Fahims-MacBook-Air nativeBuild % 

Seems like there were issues building protobuf
Would need to check the build log to see if the executable was properly built

Ok, I think everything worked. I used the CMake GUI to make the native build. Instead of setting the Compiler as Xcode the big change was making it to Unix Makefile and then building the project with make . After that I built the arm64 version for my visionOS project and it worked fine. Thank you for your help. I plan to use Objective C wrappers to talk to the engine, I just notice there is a LOT of .a files. Do you have any idea if I could compress it to one so I can run a command to turn the one .a file into. nice .framework file? The image is for a YouTube tutorial but this guy had one .a file and seemed to be able to turn it into a .framework file with this command. Thanks again! I also probably ran into some issues yesterday since GitHub was having some issues.

Great!

I would say you should not use -D Pulse_C_AS_STATIC=ON or -D CMAKE_INSTALL_PREFIX=./install for a native build

I agree, the absl project creates a LOT of library files… pretty much 1 for each source file

I am not sure about integrating libraries into xcframeworks and how to use those…

Where do you suggest the prefix should go instead of install? I will rebuild with Pulse_C_AS_STATIC as off

The Pulse build creates an install folder in the build folder and sets CMAKE_INSTALL_PREFIX to that as default, so just let it do that

sorry to bother again. I think I must of made an iOS build instead of a visionOS build. I am trying to make a visionOS app natively with no unity. This is the specific error I get Building for 'visionOS', but linking in object file (/Users/fahim/Desktop/Personal Projects/PulseBuild/PulseBuild/PulseCore/Libs/libPulsed.a[420](PulseBuildInformation.o)) built for 'iOS' My question is what should the CMake settings be so I can ensure Iam making a visionOS build. Also for reference I was trying to test my connection to the engine so I wrote an objective c wrapper to get the pulse engine version hence why its looking for PulseBuildInformation.o) in the error message.

Use the xros.toolchain.cmake file here instead of the io.toolchain.cmake file