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

Placeholder of length '80' too short in package gcc-4.8.5-3 #1484

Closed
jhunkeler opened this issue Oct 26, 2016 · 6 comments
Closed

Placeholder of length '80' too short in package gcc-4.8.5-3 #1484

jhunkeler opened this issue Oct 26, 2016 · 6 comments
Labels
locked [bot] locked due to inactivity

Comments

@jhunkeler
Copy link
Contributor

jhunkeler commented Oct 26, 2016

tldr - On OS X using conda-build 2.0.7 I receive an error telling me I need to rebuild my package with conda-build > 2.0:

conda.exceptions.PaddingError: Placeholder of length '80' too short in package gcc-4.8.5-3.
The package must be rebuilt with conda-build > 2.0.

Snippets from automated build log follow:

Obtaining Miniconda3-latest-MacOSX-x86_64.sh...
PREFIX=/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain
installing: python-3.5.2-0 ...
installing: conda-env-2.5.2-py35_0 ...
installing: openssl-1.0.2h-1 ...
installing: pycosat-0.6.1-py35_1 ...
installing: pyyaml-3.11-py35_4 ...
installing: readline-6.2-2 ...
installing: requests-2.10.0-py35_0 ...
installing: ruamel_yaml-0.11.14-py35_0 ...
installing: sqlite-3.13.0-0 ...
installing: tk-8.5.18-0 ...
installing: xz-5.2.2-0 ...
installing: yaml-0.1.6-0 ...
installing: zlib-1.2.8-3 ...
installing: conda-4.1.11-py35_0 ...
installing: pycrypto-2.6.1-py35_4 ...
installing: pip-8.1.2-py35_0 ...
installing: wheel-0.29.0-py35_0 ...
installing: setuptools-23.0.0-py35_0 ...
Python 3.5.2 :: Continuum Analytics, Inc.
creating default environment...
installation finished.
Installing extra package: git
Fetching package metadata .......
Solving package specifications: ..........

Package plan for installation in environment /Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    conda-env-2.6.0            |                0          601 B
    expat-2.1.0                |                0         104 KB
    curl-7.49.0                |                1         493 KB
    git-2.9.3                  |                0        11.3 MB
    conda-4.2.11               |           py35_0         386 KB
    ------------------------------------------------------------
                                           Total:        12.2 MB

The following NEW packages will be INSTALLED:

    curl:      7.49.0-1     
    expat:     2.1.0-0      
    git:       2.9.3-0      

The following packages will be UPDATED:

    conda:     4.1.11-py35_0 --> 4.2.11-py35_0
    conda-env: 2.5.2-py35_0  --> 2.6.0-0      

Installing: conda-build
Fetching package metadata .......
Solving package specifications: ..........

Package plan for installation in environment /Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain:

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    filelock-2.0.6             |           py35_0           8 KB
    markupsafe-0.23            |           py35_2          24 KB
    pkginfo-1.3.2              |           py35_0          32 KB
    jinja2-2.8                 |           py35_1         302 KB
    conda-build-2.0.7          |           py35_0         276 KB
    ------------------------------------------------------------
                                           Total:         643 KB

The following NEW packages will be INSTALLED:

    conda-build: 2.0.7-py35_0
    filelock:    2.0.6-py35_0
    jinja2:      2.8-py35_1  
    markupsafe:  0.23-py35_2 
    pkginfo:     1.3.2-py35_0

BUILD START: hstcal-1.1.1rc1.dev0-1

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    gmp-5.1.2                  |                6         612 KB
    isl-0.12.2                 |                1         933 KB
    mpfr-3.1.2                 |                0         276 KB
    cloog-0.18.0               |                0         115 KB
    mpc-1.0.1                  |                0          65 KB
    gcc-4.8.5                  |                3        53.6 MB
    ------------------------------------------------------------
                                           Total:        55.5 MB

The following NEW packages will be INSTALLED:

    cloog: 0.18.0-0
    gcc:   4.8.5-3 
    gmp:   5.1.2-6 
    isl:   0.12.2-1
    mpc:   1.0.1-0 
    mpfr:  3.1.2-0 


The following NEW packages will be INSTALLED:

    cloog: 0.18.0-0
    gcc:   4.8.5-3 
    gmp:   5.1.2-6 
    isl:   0.12.2-1
    mpc:   1.0.1-0 
    mpfr:  3.1.2-0 

Traceback (most recent call last):
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 977, in link
    update_prefix(join(prefix, filepath), prefix, placeholder, mode)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 372, in update_prefix
    data = replace_prefix(mode, data, placeholder, new_prefix)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 356, in replace_prefix
    data = binary_replace(data, placeholder.encode(UTF8), new_prefix.encode(UTF8))
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 277, in binary_replace
    data = pat.sub(replace, data)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 272, in replace
    raise _PaddingError
conda.install._PaddingError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/build.py", line 504, in create_env
    plan.execute_actions(actions, index, verbose=config.debug)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/plan.py", line 643, in execute_actions
    inst.execute_instructions(plan, index, verbose)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/instructions.py", line 134, in execute_instructions
    cmd(state, arg)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/instructions.py", line 78, in LINK_CMD
    link(state['prefix'], dist, lt, index=state['index'])
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 979, in link
    raise PaddingError(dist, placeholder, len(placeholder))
conda.exceptions.PaddingError: Placeholder of length '80' too short in package gcc-4.8.5-3.
The package must be rebuilt with conda-build > 2.0.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 977, in link
    update_prefix(join(prefix, filepath), prefix, placeholder, mode)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 372, in update_prefix
    data = replace_prefix(mode, data, placeholder, new_prefix)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 356, in replace_prefix
    data = binary_replace(data, placeholder.encode(UTF8), new_prefix.encode(UTF8))
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 277, in binary_replace
    data = pat.sub(replace, data)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 272, in replace
    raise _PaddingError
conda.install._PaddingError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/bin/conda-build", line 6, in <module>
    sys.exit(conda_build.cli.main_build.main())
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/cli/main_build.py", line 242, in main
    execute(sys.argv[1:])
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/cli/main_build.py", line 234, in execute
    already_built=None, config=config)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/api.py", line 77, in build
    need_source_download=need_source_download, config=config)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/build.py", line 1099, in build_tree
    config=recipe_config)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/build.py", line 634, in build
    create_env(config.build_prefix, specs, config=config)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/build.py", line 528, in create_env
    clear_cache=clear_cache)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda_build/build.py", line 504, in create_env
    plan.execute_actions(actions, index, verbose=config.debug)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/plan.py", line 643, in execute_actions
    inst.execute_instructions(plan, index, verbose)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/instructions.py", line 134, in execute_instructions
    cmd(state, arg)
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/instructions.py", line 78, in LINK_CMD
    link(state['prefix'], dist, lt, index=state['index'])
  File "/Users/shared/iraf_conda/bldtmp/porcelain.d9opiDafPN/porcelain/lib/python3.5/site-packages/conda/install.py", line 979, in link
    raise PaddingError(dist, placeholder, len(placeholder))
conda.exceptions.PaddingError: Placeholder of length '80' too short in package gcc-4.8.5-3.
The package must be rebuilt with conda-build > 2.0.

Possibly related to:
#1371

@msarahan
Copy link
Contributor

msarahan commented Oct 27, 2016

We have a bug right now where conda-build's logger messages are being silenced somehow.

This particular bit of your output tells me what is happening:

The following NEW packages will be INSTALLED:

    cloog: 0.18.0-0
    gcc:   4.8.5-3 
    gmp:   5.1.2-6 
    isl:   0.12.2-1
    mpc:   1.0.1-0 
    mpfr:  3.1.2-0 


The following NEW packages will be INSTALLED:

    cloog: 0.18.0-0
    gcc:   4.8.5-3 
    gmp:   5.1.2-6 
    isl:   0.12.2-1
    mpc:   1.0.1-0 
    mpfr:  3.1.2-0 

Conda build tries to create a prefix that is 255 characters. If any package with binary prefix that is specified for installation into that prefix was built with shorter than 255 characters, conda-build will fail to create that environment.

It falls back, trying to create an environment that is 80 characters (the old standard). However, the only variable that it has to work with is those obnoxious _placehold additions. If your prefix without those is already greater than 80 characters, then it does not truncate it. That means that your end prefix may still be too long (>80 characters) to install the package that was built with a short prefix.

One potential workaround is to use the --no-build-id argument to conda-build, which shortens the build path a lot, but also then disables the ability to run more than one build in parallel.

@jhunkeler
Copy link
Contributor Author

jhunkeler commented Oct 27, 2016

Thank you for the clarification, @msarahan. I'll have to try --no-build-id as a workaround. The hstcal package I'm building relies on Continuum's gcc and libgcc packages. Maybe one or more of those dependencies need to be rebuilt on your end so they can support the larger prefix.

I'm not seeing the same behavior under Linux, because I'm not including gcc or libgcc. I'm using the following selectors in the recipe:

build:
    - gcc [osx]
run:
    - libgcc [osx]

EDIT:
Or are we talking about my local $CONDA_PREFIX being >80 characters at build-time? Sorry, I feel like I may have misinterpreted your response.

@mingwandroid
Copy link
Contributor

@jhunkeler Can you try adding the qttesting anaconda.org channel to your ~/.condarc above defaults so that the gcc-4.8.5-7 package build I uploaded there today gets used instead.

This build fixes the prefix length and also a few other issues. I'd like to know if this works out for you, both for this problem and more generally before I move it to defaults.

@jhunkeler
Copy link
Contributor Author

@mingwandroid The gcc package in qttesting worked perfectly. 👍

BUILD START: hstcal-1.1.1rc1.dev0-1

[...]

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    gmp-5.1.2                  |                6         612 KB
    isl-0.12.2                 |                1         933 KB
    mpfr-3.1.2                 |                0         276 KB
    cloog-0.18.0               |                0         115 KB
    mpc-1.0.1                  |                0          65 KB
    gcc-4.8.5                  |                7        55.5 MB  qttesting
    ------------------------------------------------------------
                                           Total:        57.4 MB

The following NEW packages will be INSTALLED:

    cloog: 0.18.0-0
    gcc:   4.8.5-7  qttesting
    gmp:   5.1.2-6
    isl:   0.12.2-1
    mpc:   1.0.1-0
    mpfr:  3.1.2-0

[...]

Package: hstcal-1.1.1rc1.dev0-1
source tree in: /Users/shared/iraf_conda/bldtmp/porcelain.YE5LK8SqUs/porcelain/conda-bld/hstcal_1477664837780/work
number of files: 21

[...]

Nothing to test for: hstcal-1.1.1rc1.dev0-1
# Automatic uploading is disabled
# If you want to upload this package to anaconda.org later, type:
#
# $ anaconda upload /Users/shared/iraf_conda/bldtmp/porcelain.YE5LK8SqUs/porcelain/conda-bld/osx-64/hstcal-1.1.1rc1.dev0-1.tar.bz2
#
# To have conda build upload to anaconda.org automatically, use
# $ conda config --set anaconda_upload yes

@msarahan
Copy link
Contributor

Closing as fixed by the package built by @mingwandroid - with the caveat that I still need to fix whatever is silencing our logging messages.

@mingwandroid - please put that fixed gcc on defaults when you get a chance.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically locked because it has not had recent activity after being closed.

Please open a new issue if needed.

Thanks!

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

No branches or pull requests

3 participants