[CMake] Issues trying to use the Anaconda compiler tools with CMake

Ray Donnelly mingw.android at gmail.com
Wed Aug 15 10:19:03 EDT 2018


On Wed, Aug 15, 2018, 3:05 PM Sebastián Mancilla <smancill at jlab.org> wrote:

> My 5c: Docker is just too annoying to work with if you are targeting users
> to run your packages.
>
> From the point of view of the final user of your "binary distribution"
> (some Docker image):
>
> - You have to figure out / copy paste the proper docker command line to
> run the container (mount volumes, open ports, set environment, etc)
> - It runs on a virtual machine if you are not in Linux
> - How to run some graphical application?
> - In Linux if you need to write some output files in the mounted volumen,
> they will have the wrong permissions, unless the image provides a fix for
> it.
> - What if you need some extra package? Now you have to create your own
> image based on the distributed image.
> - You are limited to the package versions available in the Linux
> distribution in which the image is based
>
> Now consider conda:
>
> conda create -n myenv meta-package
> conda activate myenv
> # run all binaries natively, they are already on PATH, access your file
> system, install extra packages, have all your command line tools and IDEs
> at hand.
>
> From the point of view of doing development with Docker, my biggest gripe
> is how to edit the code while running it in the container. Say I have Vim
> in the host (or an IDE).
> When editing the sources in the host, all dependencies and compilers are
> in the container, so I lose linting and compilation errors and
> autocompletion. I would also need to install again all my development tools
> in the container (say tmux, ag, jq, fzf etc).
>
> Trying to do development while inside a Conda environment is something I
> think it should work, and I don't think conda-build is necessary until I am
> ready to create a package.
> Unfortunately I hit the issue of this thread.
>

I already explained how to workaround the issues you saw. The compilers do
work in most normal situations, i use them extensively, even for linking to
rust software (macOS and Linux), the only caveat being that you should
instead so conda cdt packages on Linux for system library dependencies and
on macOS you need to get an old SDK.

>
> I have had no issues creating packages with conda-build and CMake so far,
> and I've packaged a few, including some Qt applications.
>
> El mié., 15 de ago. de 2018 a la(s) 05:29, Eric Noulard (
> eric.noulard at gmail.com) escribió:
>
>>
>>
>> Le mar. 14 août 2018 à 20:38, Sebastián Mancilla <smancill at jlab.org> a
>> écrit :
>>
>>> I wanted to try Conda for normal day-to-day C++ development, while
>>> having all the dependencies isolated from other projects and the base
>>> system.
>>>
>>> - Change the sources
>>> - Build
>>> - Run the tests
>>> - Repeat
>>>
>>
>> Hi Sebastian,
>>
>> Just curious on why you would prefer conda over "real" container
>> technology like docker or rkt for the kind of usage you describe ?
>> Do you ultimately want to distribute your software as conda packages?
>>
>> I'm not proficient in conda but AFAIK docker (or rkt) offers
>> easier/better isolation for the usage you describe.
>> The side-effect being that inside your container cmake should behave like
>> as expected.
>> At least this is my own experience.
>>
>> Some people even try to automatize the container creation out of conda
>> packaged software:
>> https://github.com/BioContainers/mulled
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_BioContainers_mulled&d=DwMFaQ&c=lz9TcOasaINaaC3U7FbMev2lsutwpI4--09aP8Lu18s&r=8hmSv9ww5s9qu3iT8h5WMi8-YcKXaJvelxT3fMih7S4&m=JnhBTDKSV5WKFKq-JlZzEYG4bH3wOaTgi4q6IWG-UnQ&s=NRuZ8XLwEl8KxOeh-vu-2fNEO84SkWzS6ERdc2RhRak&e=>
>> I have no experience with that whatsoever, I usually craft my own
>> dockerfile and work with that.
>>
>> If your goal includes the distrubution of your software as conda package
>> may be you can get in touch with people
>> at conda-forge: https://conda-forge.org/#about
>> <https://urldefense.proofpoint.com/v2/url?u=https-3A__conda-2Dforge.org_-23about&d=DwMFaQ&c=lz9TcOasaINaaC3U7FbMev2lsutwpI4--09aP8Lu18s&r=8hmSv9ww5s9qu3iT8h5WMi8-YcKXaJvelxT3fMih7S4&m=JnhBTDKSV5WKFKq-JlZzEYG4bH3wOaTgi4q6IWG-UnQ&s=bGnXxli7E1vFPnu5D4px_yHm-fP7ll1zBy7vQ5XgbLU&e=>,
>> I bet they build a lot of cmake-based projects in there and may
>> have experienced same caveats with the conda compilers usage.
>>
>>
>> --
>> Eric
>>
>
>
> --
> Sebastian Mancilla Matta
> CCTVal, UTFSM
> Valparaíso, Chile
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180815/2c776399/attachment.html>


More information about the CMake mailing list