Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long build root error masked by long-prefix changes #1337

Closed
pelson opened this issue Sep 8, 2016 · 9 comments
Closed

Long build root error masked by long-prefix changes #1337

pelson opened this issue Sep 8, 2016 · 9 comments
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@pelson
Copy link
Contributor

pelson commented Sep 8, 2016

Just wanted to raise the fact that having a CONDA_BLD_PATH that is long can cause some grief with the new conda-build because of the automatic re-try behaviour implemented in conda-build 2.

Essentially, conda-build initially tries to build a recipe against a long build prefix, and then when that fails, falls back to trying a shorter prefix. The problem is that the shorter prefix is still too long, and the error message is hard to decipher (it just exits without any information).

Example output:

CONDA_BLD_PATH=${TMPDIR}/0123456789012345678901234567890123456789012345678901234567890123456789/build conda build ./recipe/
BUILD START: click-plugins-1.0.3-py35_0
    (actual version deferred until further download or env creation)
updating index in: /Users/pelson/miniconda/pkgs
updating index in: /var/folders/mh/cy5_fjpx1277hvwgw4756dpw0000gn/T/0123456789012345678901234567890123456789012345678901234567890123456789/build/osx-64
updating index in: /var/folders/mh/cy5_fjpx1277hvwgw4756dpw0000gn/T/0123456789012345678901234567890123456789012345678901234567890123456789/build/noarch
Using Anaconda API: https://api.anaconda.org

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2016.8.31  |                0         163 KB  conda-forge

The following NEW packages will be INSTALLED:

    ca-certificates: 2016.8.31-0      conda-forge
    certifi:         2016.8.31-py35_0 conda-forge
    click:           6.6-py35_1       conda-forge
    ncurses:         5.9-9            conda-forge
    openssl:         1.0.2h-2         conda-forge
    python:          3.5.2-2          conda-forge
    readline:        6.2-0            conda-forge
    setuptools:      26.1.1-py35_0    conda-forge
    sqlite:          3.13.0-1         conda-forge
    tk:              8.5.19-0         conda-forge
    xz:              5.2.2-0          conda-forge
    zlib:            1.2.8-3          conda-forge

WARNING:/Users/pelson/miniconda/lib/python3.5/site-packages/conda_build/build.py:Build prefix failed with prefix length 255
WARNING:/Users/pelson/miniconda/lib/python3.5/site-packages/conda_build/build.py:Error was: 
WARNING:/Users/pelson/miniconda/lib/python3.5/site-packages/conda_build/build.py:ERROR: placeholder '/Users/travis/miniconda3/envs/_build_placehold_placehold_placehold_placehold_pla' too short in: conda-forge::ncurses-5.9-9

WARNING:/Users/pelson/miniconda/lib/python3.5/site-packages/conda_build/build.py:One or more of your package dependencies needs to be rebuilt with a longer prefix length.
WARNING:/Users/pelson/miniconda/lib/python3.5/site-packages/conda_build/build.py:Falling back to legacy prefix length of 80 characters.
WARNING:/Users/pelson/miniconda/lib/python3.5/site-packages/conda_build/build.py:Your package will not install into prefixes > 80 characters.
updating index in: /Users/pelson/miniconda/pkgs
updating: ca-certificates-2016.8.31-0.tar.bz2
updating index in: /var/folders/mh/cy5_fjpx1277hvwgw4756dpw0000gn/T/0123456789012345678901234567890123456789012345678901234567890123456789/build/osx-64
updating index in: /var/folders/mh/cy5_fjpx1277hvwgw4756dpw0000gn/T/0123456789012345678901234567890123456789012345678901234567890123456789/build/noarch

The following NEW packages will be INSTALLED:

    ca-certificates: 2016.8.31-0      conda-forge
    certifi:         2016.8.31-py35_0 conda-forge
    click:           6.6-py35_1       conda-forge
    ncurses:         5.9-9            conda-forge
    openssl:         1.0.2h-2         conda-forge
    python:          3.5.2-2          conda-forge
    readline:        6.2-0            conda-forge
    setuptools:      26.1.1-py35_0    conda-forge
    sqlite:          3.13.0-1         conda-forge
    tk:              8.5.19-0         conda-forge
    xz:              5.2.2-0          conda-forge
    zlib:            1.2.8-3          conda-forge

ERROR: placeholder '/Users/travis/miniconda3/envs/_build_placehold_placehold_placehold_placehold_pla' too short in: conda-forge::ncurses-5.9-9

conda-build doesn't need to do anything about this (as we will soon have packages that can support long prefixes), I just wanted to raise awareness. Ping @bjlittle & @lbdreyer

@pelson
Copy link
Contributor Author

pelson commented Sep 8, 2016

@msarahan - please close at will.

@msarahan
Copy link
Contributor

msarahan commented Sep 8, 2016

You just wanted to claim 1337, didn't you?

This is a good point - thank you for raising it, and giving people some information to find.

@mingwandroid
Copy link
Contributor

I should've held out 20 minutes before submitting 1336.

@pelson
Copy link
Contributor Author

pelson commented Sep 8, 2016

Wow - feeling a little behind the times... 😄 I haven't heard of 1337 as a thing b3f0r3...

@pelson
Copy link
Contributor Author

pelson commented Sep 8, 2016

As a thing, it would probably be helpful if conda spat out a better message here. Ping @kalefranz to raise awareness.

@licode
Copy link

licode commented Sep 12, 2016

I also see the same error. This also fails on conda-build=1.21.3.
Here is my config

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ncurses-5.9                |                9         954 KB  conda-forge
    patchelf-0.9               |                1         349 KB  conda-forge
    sqlite-3.13.0              |                0         4.9 MB  conda-forge
    xz-5.2.2                   |                0         853 KB  conda-forge
    python-3.5.2               |                3        31.8 MB  conda-forge
    conda-env-2.5.1            |           py35_0          27 KB  defaults
    markupsafe-0.23            |           py35_2          32 KB  defaults
    psutil-4.3.1               |           py35_0         228 KB  defaults
    pytz-2016.6.1              |           py35_0         162 KB  conda-forge
    ruamel_yaml-0.11.14        |           py35_0         377 KB  defaults
    six-1.10.0                 |           py35_0          18 KB  conda-forge
    clyent-1.2.2               |           py35_0          15 KB  defaults
    conda-4.1.12               |           py35_0         204 KB  defaults
    jinja2-2.8                 |           py35_1         278 KB  conda-forge
    python-dateutil-2.5.3      |           py35_0         237 KB  conda-forge
    anaconda-client-1.4.0      |           py35_0         101 KB  defaults
    conda-build-1.21.3         |           py35_0         238 KB  defaults
    conda-execute-0.6.0        |           py35_0          14 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        40.7 MB

The following NEW packages will be INSTALLED:

    anaconda-client: 1.4.0-py35_0    defaults
    clyent:          1.2.2-py35_0    defaults
    conda-build:     1.21.3-py35_0   defaults
    conda-execute:   0.6.0-py35_0    conda-forge
    jinja2:          2.8-py35_1      conda-forge
    markupsafe:      0.23-py35_2     defaults
    ncurses:         5.9-9           conda-forge
    patchelf:        0.9-1           conda-forge
    psutil:          4.3.1-py35_0    defaults
    python-dateutil: 2.5.3-py35_0    conda-forge
    pytz:            2016.6.1-py35_0 conda-forge
    ruamel_yaml:     0.11.14-py35_0  defaults
    six:             1.10.0-py35_0   conda-forge

The following packages will be UPDATED:

    conda:           4.0.5-py35_0 defaults    --> 4.1.12-py35_0   defaults
    conda-env:       2.4.5-py35_0 defaults    --> 2.5.1-py35_0    defaults
    python:          3.5.1-0      conda-forge --> 3.5.2-3         conda-forge
    sqlite:          3.9.2-0      conda-forge --> 3.13.0-0        conda-forge
    xz:              5.0.5-1      conda-forge --> 5.2.2-0         conda-forge

@msarahan
Copy link
Contributor

@licode this error is caused by conda-forge's packages being built with a prefix that is shorter than the prefix that you're trying to install into. Conda-build 2 will try to build packages with a longer prefix, but fall back to a shorter one if any package that it is installing is limited to a shorter prefix.

The only way that you'll be successful is to have packages for all of your prerequisites that are built with conda-build 2. They need to be built in order - any dependency with a short prefix will mess up attempts to get a long prefix in something that uses it.

Most of the packages in defaults have been rebuilt with the long prefix. Based on your log, it looks to me like you need sqlite and xz from defaults right now, until conda-forge starts using conda-build 2 and rebuilds their packages.

@licode
Copy link

licode commented Sep 12, 2016

thanks. I put default before conda-forge in .condarc to make sure we get packages (like sqlite and xz) first from default channel. So it looks working now.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Jul 19, 2022
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Aug 19, 2022
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Aug 19, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

4 participants