Complete Guide to Compiling CPPtango with Conda
Learn how to compile CPPtango in a Conda environment using mamba, create isolated environments, and set up compilers and build tools easily. Conda simplifies package and dependency management for various languages like Python, R, and more across Windows, macOS, and Linux platforms. Explore the steps and tools required for successful compilation within a Conda environment.
Download Presentation
Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
E N D
Presentation Transcript
Developing and compiling tango with conda Benjamin Bertrand
Conda Package, dependency and environment management for any language Python, R, Ruby, Lua, Scala, Java, Javascript, C/C++, FORTRAN Run on Windows, macOS and Linux Create isolated environments OS independent (conda Linux packages can be installed on any Linux distribution) Many packages available on conda-forge Several Tango packages on conda-forge: cpptango, itango, pytango, tango- access-control, tango-admin, tango-database, tango-gateway, tango-starter, tango-test https://conda.io 3
Installing conda/mamba Use Mambaforge: https://github.com/conda-forge/miniforge Minimal installer for conda that also includes mamba and is configured with conda-forge as the default and only channel On Unix like platforms: curl -L -O https://github.com/conda- forge/miniforge/releases/latest/download/Mambaforge-$(uname)- $(uname -m).sh bash Mambaforge-$(uname)-$(uname -m).sh -f -b -p ~/mambaforge ~/mambaforge/bin/mamba init On Windows, use the Mambaforge-Windows-x86_64.exe installer 4
Compiling in a conda env Compilers and build tools are available on conda-forge Require Build Tools for Visual Studio 2017 Require Xcode Command Line Tools 5
Compiling cppTango in a conda environment (Linux) 1/2 $ mamba create -y -n tango-dev \ make cmake cxx-compiler libtool pkg-config \ jpeg omniorb cppzmq zeromq tango-idl $ mamba activate tango-dev $ echo $CC /home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-cc $ echo $CXX /home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-c++ $ echo $CMAKE_ARGS -DCMAKE_AR=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-ar -DCMAKE_CXX_COMPILER_AR=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_C_COMPILER_AR=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_RANLIB=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_C_COMPILER_RANLIB=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_LINKER=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-ld -DCMAKE_STRIP=/home/vagrant/mambaforge/envs/tango-dev/bin/x86_64-conda-linux-gnu-strip 6
Compiling cppTango in a conda environment (Linux) 2/2 7
Compiling TangoDatabase with conda 1/2 To compile against cppTango stable: $ mamba create -y -n tango-stable-dev \ cmake make cxx-compiler libtool pkg-config \ cppzmq cpptango mysql-devel omniorb $ mamba list -n tango-stable-dev | grep cpptango cpptango 9.3.5 he78764c_1 conda-forge To compile against cppTango main branch: $ mamba create -y -n tango-main-dev \ -c tango-controls/label/dev \ cmake make cxx-compiler libtool pkg-config \ cppzmq cpptango mysql-devel omniorb $ mamba list -n tango-main-dev | grep cpptango cpptango 9.4.0dev0 g5beab02d tango-controls/label/dev 8
Compiling cppTango on macOS 1/2 Fork from Thomas Juerges: https://gitlab.com/tjuerges/cppTango/- /tree/main-macOS_build Install Xcode Command Lines Tools: xcode-select --install $ mamba create -y -n tango-dev \ make cmake cxx-compiler libtool pkg-config \ jpeg omniorb cppzmq zeromq tango-idl $ mamba activate tango-dev 10
Compiling cppTango on macOS 2/2 Exactly same instructions as on Linux 11
Compiling TangoTest on Windows Donwload and install the Build Tools for Visual Studio 2017 Create the conda environment: 13
Conclusion Conda gives a reliable way to install binary packages whatever the operating system The long list of packages maintained by conda-forge includes compilers and build tools easy to setup a development environment which is OS independent you can rely on modern versions of those tools even on an older OS This is for development and testing only. Compile only what you need. Conda is of course just an alternative. Use the solution that works for you! 15
References conda: https://docs.conda.io/en/latest conda-build: https://docs.conda.io/projects/conda- build/en/latest/index.html conda-forge: https://github.com/conda-forge mamba: https://mamba.readthedocs.io/en/latest/index.html Miniforge/Mambaforge: https://github.com/conda-forge/miniforge miniconda: https://docs.conda.io/en/latest/miniconda.html cpptango-feedstock: https://github.com/conda-forge/cpptango- feedstock tango-test-feedstock: https://github.com/conda-forge/tango-test- feedstock 16