Skip to content

Conversation

@nicogno
Copy link
Contributor

@nicogno nicogno commented May 28, 2025

I managed to install Libroadrunner on macOS with M1 chip and run the "sbml_integration" demo. I'm adding this draft PR to avoid losing the writeup.


To install Libroadrunner I followed the guide provided here.
Specifically:

$ cd ~
$ mkdir buildroadrunner
$ cd buildroadrunner
$ git clone https://github.com/sys-bio/llvm-13.x.git
$ cd llvm-13.x
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX="..\install-msvc2019" -DCMAKE_BUILD_TYPE="Release" ../llvm
$ cmake --build . --target install --config Release -j$(sysctl -n hw.ncpu)
$ cd ../..
$ git clone https://github.com/sys-bio/libroadrunner-deps.git --recurse-submodules
$ cd libroadrunner-deps
$ mkdir build
$ cd build
$ cmake -DCMAKE_INSTALL_PREFIX="../install-Release" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_OSX_ARCHITECTURES=arm64 ..
$ cmake --build . --target install --config Release -j$(sysctl -n hw.ncpu)
$ cd ../..
$ git clone https://github.com/sys-bio/roadrunner.git
$ cd roadrunner
$ mkdir build-release
$ cd build-release
$ cmake -DCMAKE_INSTALL_PREFIX="../install-Release" -DLLVM_INSTALL_PREFIX="../../llvm-13.x/install-msvc2019" -DRR_DEPENDENCIES_INSTALL_PREFIX="../../libroadrunner-deps/install-Release" -DCMAKE_BUILD_TYPE="Release" -DCMAKE_OSX_ARCHITECTURES=arm64 ..
$ cmake --build . --target install --config Release -j$(sysctl -n hw.ncpu)

Then build BioDynaMo with:

cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -Dsbml=true .. && ninja -j16

@sonarqubecloud
Copy link

@nicogno
Copy link
Contributor Author

nicogno commented May 28, 2025

WIP:

  • check if there are unnecessary static libraries
  • allow users to specify their own installation directories for Libroadrunner and LLVM

@vasvav
Copy link
Contributor

vasvav commented Jul 1, 2025

good job @nicogno, i do confirm i've managed to compile and install successfully libroadrunner and its dependencies on my macbookpro M2 Pro (Ventura 13.7.6)

regarding the WIP you mention above: i haven't checked the 1st point, while for the 2nd point i'm in favour we install a "localised version" of libroadrunner within BioDynaMo, instead of using with an externally installed one. so i'm really happy with the proposed solution!

@johnpapad24
Copy link
Collaborator

johnpapad24 commented Jul 2, 2025

Dear @nicogno ,

I had made a script that installs libroadrunner together with biodynamo and I have now included your fixes in this script

I attach you the new script below
build-roadrunner_new(1).zip

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 2, 2025

@johnpapad24
Copy link
Collaborator

I have made a new script that addresses the issue of libroadrunner installation on both intel and arm64 based Mac please note that libroadrunner cannot de compiled in the latest versions of clang so downloading and installing an earlier version on Xcode command line tools must be done in order to proceed with the installation

@johnpapad24
Copy link
Collaborator

@sportokalidis
Copy link
Contributor

Hi @nicogno, this PR adds great value to the project!
Do you consider it ready for merging, or do you have any updates to add?

@johnpapad24
Copy link
Collaborator

Dear @sportokalidis

Nicolo really did a great job, however the libroadrunner library has not been updataed for a while and thus it cannot compile on newer mac os platforms.

@nicogno
Copy link
Contributor Author

nicogno commented Sep 4, 2025

Hi @sportokalidis, as @johnpapad24 said, I think that this PR requires further testing with the most recent macOS before it can be merged.

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.

5 participants