Skip to content

Recent conda changes breaking Travis #6030

Closed

Description

@bashtage

Not 100% sure that this is a conda issue, but it looks like changes in .27 are breaking Travis builds that
use extension modules.

In particular, the compiler is identified as

compiler: x86_64-conda_cos6-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -Wstrict-prototypes -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -pipe -fPIC

Not sure why conda would be in the compiler.

And example of a failed build can be see https://travis-ci.org/statsmodels/statsmodels/builds/280537305

Activity

  1. msarahan commented on Sep 27, 2017

    @msarahan
    Contributor

    This is because python bakes in compiler flags at build time. We have used new compilers in the 4.3.27 miniconda. These are available as gcc_linux-64, but it's better to use conda-build 3 and the new compiler jinja2 function.

    Here's a recipe for statsmodels that has been modified to use conda-build 3 features: https://github.com/anacondarecipes/statsmodels-feedstock

  2. bashtage commented on Sep 27, 2017

    @bashtage
    Author

    Is the solution to install gcc_linux-64 so that the normal python setup.py develop will correctly build?

  3. msarahan commented on Sep 27, 2017

    @msarahan
    Contributor

    gcc_linux-64 will provide x86_64-conda_cos6-linux-gnu-gcc - this is a "prefixed" compiler - the stuff preceding gcc is known as the triplet, in gcc terms. Installing the package might work, but it also might not, depending on whether you activate the build environment. If you do, it should work, if you don't, it probably won't be on PATH, and won't work.

    It's a bug in our python packages that things are not falling back to your system gcc. We're going to change the symlinks for miniconda-latest to point to the older release until we have this fixed. Sorry for the headache.

  4. bashtage commented on Sep 27, 2017

    @bashtage
    Author

    Thanks.

    I did a conda install gcc_linux-64 and conda .27 recommended upgrading a Python 3.5 to a Python 3.6 install, which seems pretty heavy handed.

  5. kalefranz commented on Sep 27, 2017

    @kalefranz
    Contributor

    I did a conda install gcc_linux-64 and conda .27 recommended upgrading a Python 3.5 to a Python 3.6 install, which seems pretty heavy handed.

    This is probably a result of #5923

  6. lesteve commented on Sep 27, 2017

    @lesteve
    Contributor

    Similar problem for scikit-learn for example https://travis-ci.org/scikit-learn/scikit-learn/jobs/280535821. Not sure why but it seems to be happening only for our Python 2.7 build using conda. I am hoping to work-around the problem by using an older miniconda installer and not do conda update conda.

  7. kalefranz commented on Sep 27, 2017

    @kalefranz
    Contributor
  8. msarahan commented on Sep 27, 2017

    @msarahan
    Contributor

    As Kale said, we changed the "latest" minicondas to point at the 4.3.21 version from June. We have a fix, and are building packages. We'll upload new minicondas after testing. Sorry for the trouble.

    Updating conda triggers this because updating conda pulls in packages from the new "main" channel, which is part of defaults. That channel has the new python builds that are causing this issue. Updating our python packages will be the fix.

  9. lesteve commented on Sep 27, 2017

    @lesteve
    Contributor

    Great stuff, thanks!

  10. hainm commented on Sep 28, 2017

    @hainm

    gcc: error: unrecognized command line option ‘-fstack-protector-strong’
    gcc: error: unrecognized command line option ‘-fno-plt’

    I got this today :(

  11. twiecki commented on Sep 28, 2017

    @twiecki
    Contributor

    I'm getting when travis is trying to build subprocess32.

      x86_64-conda_cos6-linux-gnu-gcc -pthread -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/travis/miniconda2/envs/testenv/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
    
      unable to execute 'x86_64-conda_cos6-linux-gnu-gcc': No such file or directory
    
      error: command 'x86_64-conda_cos6-linux-gnu-gcc' failed with exit status 1
    
  12. sandys commented on Sep 28, 2017

    @sandys

    hi guys,
    is there a workaround for this ? all our builds are failing . I installed gcc_linux-64, but i keep getting other errors (cc1plus not found, etc)

  13. 69 remaining items

  14. armaneshaghi commented on Dec 6, 2017

    @armaneshaghi

    @mingwandroid thanks for the response, conda install gxx_linux-64 solved my issue. I just wonder why this is no longer automatic for naive users (like me)?

  15. mingwandroid commented on Dec 6, 2017

    @mingwandroid
    Contributor

    Historically we didn't provide any compilers, then we provided old ones but our R packages didn't use the those old ones instead relying on system ones (when you use install.packages()). That brings it's own problems (I don't know how capable your system ones are and anything you build with them will likely not work on other systems and loading R packages built with them could prevent binaries we built from loading or working).

    Forcing our compilers on everyone who installs R on Linux might be the best plan though, but actually upstream R is moving towards providing prebuilt binaries (at least for Windows and macOS).

    The other complication is that you are better off not using install.packages() for most things since we already provide prebuilt binary conda packages for a lot of the most popular R packages, so conda install r-something is better.

    I am considering to patch install.packages() so that it tries installing a conda package first, and failing that, installs compilers if necessary before running the normal code-path.

    Overall it's very difficult to know what is best here!

  16. added a commit that references this issue on Jan 9, 2018
  17. corytu commented on Feb 25, 2018

    @corytu

    @mingwandroid some research on the Internet led me here. I am facing difficulties when installing R packages just like @nick-youngblut did. I see your suggestion for using conda skeleton cran approach instead of using R function install.packages, and I have done conda install gxx_linux-64. However, I keep failing at the conda build step.

    Specifically, I want to install an R package called "RPostgreSQL", and here is what I have done:

    conda install gxx_linux-64
    conda skeleton cran r-rpostgresql
    conda build r-rpostgresql
    # I also tried:
    # conda build --R 3.4.2 r-rpostgresql
    # conda build --R=3.4.2 r-rpostgresql

    The error includes:

    make: /home/ytu/anaconda3/conda-bld/r-rpostgresql_1519544237983/h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/bin/x86_64-conda_cos6-linux-gnu-cc: Command not found

    , and

    make: *** [/home/ytu/anaconda3/conda-bld/r-rpostgresql_1519544237983/h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold/lib/R/etc/Makeconf:160: RS-DBI.o] Error 127
    ERROR: compilation failed for package ‘RPostgreSQL’

    , and finally

    subprocess.CalledProcessError: Command '['/bin/bash', '-e', '/home/ytu/anaconda3/conda-bld/r-rpostgresql_1519544237983/work/conda_build.sh']' returned non-zero exit status 1.

    You could find some other information in my question on Stack Overflow: Installing packages in IRkernel on Jupyter Notebook.

    How should I do to solve this?

  18. added 2 commits that reference this issue on Feb 27, 2019
  19. zhou13 commented on Jul 22, 2019

    @zhou13

    I am on Archlinux and miniconda always gives me file not recognized: file format not recognized when gcc or ld is called. Removing compiler_compat/ld solves the issue.

  20. astrojuanlu commented on Aug 1, 2019

    @astrojuanlu
    Contributor

    @shreyasbapat and I just independently reproduced what @zhou13 mentioned on Arch Linux. I guess this is being tracked in ContinuumIO/anaconda-issues#11152 now.

  21. mingwandroid commented on Aug 2, 2019

    @mingwandroid
    Contributor

    @Juanlu001
    Would it be possible to try the package mentioned in my last comment on issue 11152 please?

  22. astrojuanlu commented on Aug 2, 2019

    @astrojuanlu
    Contributor

    Thanks @mingwandroid, doing conda install -c rdonnelly python=3.7.4 fixes the issue 👍

  23. chux0519 commented on Sep 6, 2019

    @chux0519

    @zhou13 thanks, it works

  24. github-actions commented on Aug 28, 2021

    @github-actions

    Hi there, thank you for your contribution to Conda!

    This issue has been automatically locked since it has not had recent activity after it was closed.

    Please open a new issue if needed.

  25. locked as resolved and limited conversation to collaborators on Aug 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    locked[bot] locked due to inactivity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions