Can I build RDKIt on ARM64 architecture? #5695
tnguy271
started this conversation in
Development
Replies: 4 comments 6 replies
-
Yes, we already have prebuilt M1/M2 on the Mac. |
Beta Was this translation helpful? Give feedback.
3 replies
-
export RDBASE="your installed rdkit path" like /Users/xxx/Github/rdkit
export PYTHONPATH=$RDBASE
export DYLD_LIBRARY_PATH="$RDBASE/lib:$PYROOT/lib"
export DYLD_FALLBACK_LIBRARY_PATH="$RDBASE/lib:$PYROOT/lib"
mkdir build
cd build
CXXFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY -D_HAS_AUTO_PTR_ETC=0 $CXXFLAGS"
cmake ..
make -j8 install
Le mer. 10 avr. 2024 à 02:58, Jeremy Monat ***@***.***> a
écrit :
… @greglandrum <https://github.com/greglandrum> thanks for explaining
what's required.
If anyone has gotten the RDKit to compile to ARM64 on a Mac, I'd
appreciate them sharing the recipe, for example which complier and SDK to
use, and how to build the required dependencies for ARM64.
—
Reply to this email directly, view it on GitHub
<#5695 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJBWYVUEPAV766ADLR5AITY4SFD5AVCNFSM6AAAAAARPB4UCSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANRUHEZDG>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
2 replies
-
creeate this conda env (here my yml):
name: rdkit_build_fb
channels:
- conda-forge
- default
dependencies:
- cairo
- clangxx_osx-arm64
- cmake
- eigen
- jupyter
- libboost-devel=1.82.0
- libboost-python-devel=1.82.0
- libboost-python=1.82.0
- libboost=1.82.0
- libcxx
- matplotlib
- myst-parser
- nbval
- numpy
- pandas
- pillow
- pytest
- python=3.11
- qt
- sphinx
- swig=4
- ca-certificates
- certifi
- openssl
- wget
- flex
- bison
prefix: /Users/tgg/miniforge3/envs/rdkit_build_fb
Le jeu. 11 avr. 2024 à 05:46, Jeremy Monat ***@***.***> a
écrit :
… @thegodone <https://github.com/thegodone> I ran your recipe. I also added
export to the CXX line because I assumed that's what you meant:
export CXXFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY -D_HAS_AUTO_PTR_ETC=0
$CXXFLAGS"
The build completed successfully, but unfortunately it still seems to be
targeted to x86_64:
***@***.*** build % file /Users/my_username/Projects/rdkit-build8/lib/libRDKitRDGeneral.2024.09.1pre.dylib
/Users/my_username/Projects/rdkit-build8/lib/libRDKitRDGeneral.2024.09.1pre.dylib: Mach-O 64-bit dynamically linked shared library x86_64
Any other suggestions for targeting ARM64?
P.S. Below are some of the cmake .. output:
-- The C compiler identification is AppleClang 15.0.0.15000309
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - 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: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
...
Downloading https://github.com/google/fonts/raw/main/ofl/comicneue/ComicNeue-Regular.ttf...
Downloading https://github.com/google/fonts/raw/main/ofl/comicneue/OFL.txt...
-- Found Freetype: /usr/local/lib/libfreetype.dylib (found version "2.13.2")
-- Found Boost: /usr/local/lib/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable version "1.84.0", minimum required is "1.58.0") found components: program_options
Downloading https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz...
-- Configuring done (10.2s)
-- Generating done (1.1s)
-- Build files have been written to: /Users/my_username/Projects/rdkit-build8/build
and of the make -j8 install output:
[ 0%] Building CXX object Code/RDGeneral/CMakeFiles/RDGeneral.dir/Invariant.cpp.o
[ 0%] Building CXX object External/CoordGen/CMakeFiles/coordgen.dir/coordgen/CoordgenFragmentBuilder.cpp.o
[ 0%] Building CXX object External/CoordGen/CMakeFiles/maeparser.dir/maeparser/Buffer.cpp.o
[ 0%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/benchmark/catch_chronometer.cpp.o
[ 0%] Building CXX object External/CoordGen/CMakeFiles/coordgen_static.dir/coordgen/CoordgenFragmentBuilder.cpp.o
[ 0%] Built target coordgen_support
...
-- Installing: /Users/my_username/Projects/rdkit-build8/rdkit/RDPaths.py
-- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-targets.cmake
-- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-targets-release.cmake
-- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-config.cmake
-- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-config-version.cmake
—
Reply to this email directly, view it on GitHub
<#5695 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJBWYXSHE2MJVPVJJBP2UTY4YBQZAVCNFSM6AAAAAARPB4UCSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANZYGYZDE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
1 reply
-
you don't really need to export CXXFLAGS as it is only used during this
cmake command, I would suggest to keep the cmake as is first. Important
points are clangxx_osx-arm64 & boost libs 1.82 but in that env I have the
correct code in arm64.
Le jeu. 11 avr. 2024 à 06:46, guillaume godin ***@***.***> a
écrit :
… creeate this conda env (here my yml):
name: rdkit_build_fb
channels:
- conda-forge
- default
dependencies:
- cairo
- clangxx_osx-arm64
- cmake
- eigen
- jupyter
- libboost-devel=1.82.0
- libboost-python-devel=1.82.0
- libboost-python=1.82.0
- libboost=1.82.0
- libcxx
- matplotlib
- myst-parser
- nbval
- numpy
- pandas
- pillow
- pytest
- python=3.11
- qt
- sphinx
- swig=4
- ca-certificates
- certifi
- openssl
- wget
- flex
- bison
prefix: /Users/tgg/miniforge3/envs/rdkit_build_fb
Le jeu. 11 avr. 2024 à 05:46, Jeremy Monat ***@***.***> a
écrit :
> @thegodone <https://github.com/thegodone> I ran your recipe. I also
> added export to the CXX line because I assumed that's what you meant:
>
> export CXXFLAGS="-D_LIBCPP_DISABLE_AVAILABILITY -D_HAS_AUTO_PTR_ETC=0
> $CXXFLAGS"
>
> The build completed successfully, but unfortunately it still seems to be
> targeted to x86_64:
>
> ***@***.*** build % file /Users/my_username/Projects/rdkit-build8/lib/libRDKitRDGeneral.2024.09.1pre.dylib
> /Users/my_username/Projects/rdkit-build8/lib/libRDKitRDGeneral.2024.09.1pre.dylib: Mach-O 64-bit dynamically linked shared library x86_64
>
> Any other suggestions for targeting ARM64?
>
> P.S. Below are some of the cmake .. output:
>
> -- The C compiler identification is AppleClang 15.0.0.15000309
> -- The CXX compiler identification is AppleClang 15.0.0.15000309
> -- Detecting C compiler ABI info
> -- Detecting C compiler ABI info - done
> -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - 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: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
> -- Detecting CXX compile features
> -- Detecting CXX compile features - done
> ...
> Downloading https://github.com/google/fonts/raw/main/ofl/comicneue/ComicNeue-Regular.ttf...
> Downloading https://github.com/google/fonts/raw/main/ofl/comicneue/OFL.txt...
> -- Found Freetype: /usr/local/lib/libfreetype.dylib (found version "2.13.2")
> -- Found Boost: /usr/local/lib/cmake/Boost-1.84.0/BoostConfig.cmake (found suitable version "1.84.0", minimum required is "1.58.0") found components: program_options
> Downloading https://github.com/Tencent/rapidjson/archive/v1.1.0.tar.gz...
> -- Configuring done (10.2s)
> -- Generating done (1.1s)
> -- Build files have been written to: /Users/my_username/Projects/rdkit-build8/build
>
> and of the make -j8 install output:
>
> [ 0%] Building CXX object Code/RDGeneral/CMakeFiles/RDGeneral.dir/Invariant.cpp.o
> [ 0%] Building CXX object External/CoordGen/CMakeFiles/coordgen.dir/coordgen/CoordgenFragmentBuilder.cpp.o
> [ 0%] Building CXX object External/CoordGen/CMakeFiles/maeparser.dir/maeparser/Buffer.cpp.o
> [ 0%] Building CXX object _deps/catch2-build/src/CMakeFiles/Catch2.dir/catch2/benchmark/catch_chronometer.cpp.o
> [ 0%] Building CXX object External/CoordGen/CMakeFiles/coordgen_static.dir/coordgen/CoordgenFragmentBuilder.cpp.o
> [ 0%] Built target coordgen_support
> ...
> -- Installing: /Users/my_username/Projects/rdkit-build8/rdkit/RDPaths.py
> -- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-targets.cmake
> -- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-targets-release.cmake
> -- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-config.cmake
> -- Installing: /Users/my_username/Projects/rdkit-build8/lib/cmake/rdkit/rdkit-config-version.cmake
>
> —
> Reply to this email directly, view it on GitHub
> <#5695 (reply in thread)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJBWYXSHE2MJVPVJJBP2UTY4YBQZAVCNFSM6AAAAAARPB4UCSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TANZYGYZDE>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does anyone know or have been able to build RDKit on ARM64 Linux architecture? I'm using Ubuntu 22.04. Thank you !
Beta Was this translation helpful? Give feedback.
All reactions