Pulse Engine Compile Failed On Raspberry PI 4

Hi, I’m trying to build the PulseScenarioDriver on a Raspberry Pi 4.

It seems the build fails when linking due to multiple definitions of a bunch of symbols (see below).

My call to cmake:
cmake -DCMAKE_BUILD_TYPE:STRING=Release -DPulse_DOWNLOAD_BASELINES:BOOL=ON …/engine
My call to make:
make -j4

Can someone help me understand what the issue is?

Thanks!
-------------------------- MAKE OUTPUT --------------------------
[ 82%] Built target Pulse [ 82%] Linking CXX executable PulseScenarioDriver [ 82%] Building CXX object src/cpp/study/circuit_optimization/CMakeFiles/CircuitOptimizationEngine.dir/CircuitOptimizer.cpp.o /usr/bin/ld: …/Pulse.a(Engine.cpp.o):(.rodata+0x28): multiple definition of typeinfo name for SECircuitNode<SEScalarPressure, SEScalarVolume, PressureUnit, VolumeUnit>'; ../Pulse.a(GeneralMath.cpp.o):(.rodata+0x0): first >/usr/bin/ld: ../Pulse.a(Engine.cpp.o):(.data.rel.ro+0xc): multiple definition of typeinfo for SECircuitNode<SEScalarPressure, SEScalarVolume, PressureUnit, VolumeUnit>‘; …/Pulse.a(GeneralMath.cpp.o):(.data.rel.ro+0x0): fi>/usr/bin/ld: …/Pulse.a(Engine.cpp.o):(.rodata+0x78): multiple definition of typeinfo name for SECircuitNode<SEScalarElectricPotential, SEScalarElectricCharge, ElectricPotentialUnit, ElectricChargeUnit>'; ../Pulse.a(Genera>/usr/bin/ld: ../Pulse.a(Engine.cpp.o):(.data.rel.ro+0x18): multiple definition of typeinfo for SECircuitNode<SEScalarElectricPotential, SEScalarElectricCharge, ElectricPotentialUnit, ElectricChargeUnit>’; …/Pulse.a(Genera>
… (many lines of "multiple definition of … " omitted)
make[3]: *** [Makefile:136: all] Error 2 make[2]: *** [cmake/external/CMakeFiles/Pulse.dir/build.make:86: cmake/external/Pulse-prefix/src/Pulse-stamp/Pulse-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:215: cmake/external/CMakeFiles/Pulse.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
… (additional output omitted)
------------------------ CMAKE OUTPUT ------------------------

– Using preset install directory /home/juser/pulse/builds/install
– We are using protobuf 25.2
– Added ABSL dependency
– Using python: /usr/bin/python3
– SuperBuild - First pass
– We are using protobuf 25.2
– Added ABSL dependency
– SuperBuild - First pass - done
– SuperBuild - Pulse => Requires Eigen3, protobuf, absl, pybind11, absl,
– SuperBuild - Eigen3[OK]
– Eigen3_DIR : /home/juser/pulse/builds/External/Eigen3/install/share/eigen3/cmake
– We are using protobuf 25.2
– Added ABSL dependency
– SuperBuild - protobuf => Requires absl,
– SuperBuild - absl[OK]
– absl_DIR : /home/juser/pulse/builds/install/lib/cmake/absl
– SuperBuild - protobuf[OK]
– protobuf_DIR : /home/juser/pulse/builds/install/lib/cmake/protobuf
– utf8_range_DIR : /home/juser/pulse/builds/install/lib/cmake/utf8_range
– SuperBuild - pybind11[OK]
– pybind11_DIR : /home/juser/pulse/builds/External/pybind11/install/share/cmake/pybind11
– SuperBuild - Pulse[OK]
– Pulling the latest Pulse Baselines!
– Configuring done
– Generating done
– Build files have been written to: /home/juser/pulse/builds

Hmm
I have not done that in a while, but I don’t see why it would not work.

What Pulse branch/hash are you building?
What compiler and version are you using?

I assume this is something to do with how our templates are being processed by the compiler…

Thanks for your reply.

Pulse commit I’m building:
commit b5ef23de07cfba6878a54663e5a0bf0b48b172dc (HEAD → stable, origin/stable, origin/HEAD)

Compiler Info:
gcc (Raspbian 12.2.0-14+rpi1) 12.2.0

Cmake Info:
cmake version 3.25.1

Please let m me know if there’s any additional info you’d like or anything I should try.

Can you try attaching the full build log?

The forum doesn’t allow .txt files, and the log is too large for pastebin so I uploaded it here. Thanks!

I guess we have some C++ code in Pulse that the newer versions of arm64 GCC are now not happy about… I will have to see how I can easily reproduce this to get a fix in

Thanks for looking into this, it’s much appreciated. Do you happen to have a guess as to the last version of arm gcc that was able to successfully build your code?

I have been building fine for android arm platforms pretty well.
But its been quite a while since I built Pulse on a small compute machine like raspberry pi.

I found this issue that seems pretty similar to what you are getting.

Are you sure you are building on a 64-bit OS?

For whatever reason, the platform you are building on does not like double precision stl vectors