conda-forge / icu-feedstock

A conda-smithy repository for icu.
BSD 3-Clause "New" or "Revised" License
1 stars 21 forks source link

More trouble on OSX #13

Closed mikaem closed 6 years ago

mikaem commented 8 years ago

Hi

I'm getting into some trouble with icu-56.1-4 that seems similar to issue #9. I install a fresh Anaconda 4.2.0 on OSX 10.11 and the first thing I do is

conda install -c conda-forge icu

This leads to

Fetching package metadata .............
Solving package specifications: ..........

Package plan for installation in environment /Users/mikaelmortensen/anaconda2:

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
icu-56.1                   |                4        22.0 MB  conda-forge
conda-env-2.5.2            |           py27_0          26 KB  conda-forge
conda-4.1.11               |           py27_1         204 KB  conda-forge
------------------------------------------------------------
                                       Total:        22.3 MB

The following NEW packages will be INSTALLED:

conda-env: 2.5.2-py27_0 conda-forge
icu:       56.1-4       conda-forge

The following packages will be SUPERCEDED by a higher-priority channel:

conda:     4.2.9-py27_0             --> 4.1.11-py27_1 conda-forge

Proceed ([y]/n)? 

Fetching packages ...
icu-56.1-4.tar 100%           |####################################################################################################################################################      #| Time: 0:00:03   6.41 MB/s
conda-env-2.5. 100% |#####################################################################################################################################################| Time: 0:00:00 240.89 kB/s
conda-4.1.11-p 100% |#####################################################################################################################################################| Time: 0:00:00 467.87 kB/s
Extracting packages ...
[      COMPLETE      ]|########################################################################################################################################################################| 100%
Unlinking packages ...
[      COMPLETE      ]|########################################################################################################################################################################| 100%
Linking packages ...
CondaOSError: OS error: failed to link (src=u'/Users/mikaelmortensen/anaconda2/pkgs/icu-56.1-  4/lib/icu/current', dst='/Users/mikaelmortensen/anaconda2/lib/icu/current', type=3, error=OSError(17, 'File exists')) 

And after this my entire conda package is broken

 conda
-bash: /Users/mikaelmortensen/anaconda2/bin/conda: No such file or directory

Looks like the old ~/anaconda2/lib/icu/current cannot be overwritten by a new link. And it turns out that the /anaconda2/lib/icu folder is not removed when doing

conda uninstall icu

So whos fault is that? The original package I suppose?

ccordoba12 commented 8 years ago

Why don't you create a new environment to install conda-forge's icu there?

mikaem commented 8 years ago

@ccordoba12 Naturally, in that case there's no issue because the original icu will not be replaced. The issue only applies to an attempt to upgrade icu in the main environment.

ccordoba12 commented 8 years ago

The problem is defaults and conda-forge are not compatible. Basically, you need to create a new environment to install conda-forge packages.

Please see this (long) discussion to understand the reasons for this:

https://github.com/conda-forge/boost-feedstock/pull/15

mikaem commented 8 years ago

I see. I understand many of the issues raised in that link. It gets complicated. I'm building Fenics that depends on boost+vtk+mpi+hdf5+++. And conda-forges hdf5 is built without mpi, vtk is built against serial hdf5 etc. Bottom line, the conda-forge recipes are nice, but they always (for me) needs tweaking. Or new features.

Current issue is not really a conda-forge/icu issue or a compatibility thing. Uninstalling icu from defaults does not clean up properly, leading to issues with upgrading. Easily avoided using environments.

ocefpaf commented 6 years ago

Closing this. Most of the points here are in https://conda-forge.org/docs/conda-forge_gotchas.html#using-multiple-channels