conda-forge / ctng-compilers-feedstock

A conda-smithy repository for ctng-compilers.
BSD 3-Clause "New" or "Revised" License
12 stars 28 forks source link

ld doesn't find quadmath with latest ctng build (7) #26

Closed xhochy closed 4 years ago

xhochy commented 4 years ago

This is working:

conda create -n test-build6 compilers 'gxx_impl_linux-64=7.5.0=*_6' 'gfortran_impl_linux-64=7.5.0=*_6' pip
conda activate test-build6
pip wheel git+https://github.com/johnlees/glmnet_python.git@94101a0d88cc8a5505e61d97df552b6e5defab7a

While this fails:

conda create -y -n test-build7 compilers 'gxx_impl_linux-64=7.5.0=*_7' 'gfortran_impl_linux-64=7.5.0=*_7' pip
conda activate test-build7
pip wheel git+https://github.com/johnlees/glmnet_python.git@94101a0d88cc8a5505e61d97df552b6e5defab7a

with the following error:

…
  copying glmnet_python/loadGlmLib.py -> build/lib.linux-x86_64-3.8/glmnet_python
  running build_ext
  /home/uwe/miniconda3/envs/test-build7/bin/../lib/gcc/x86_64-conda-linux-gnu/7.5.0/../../../../x86_64-conda-linux-gnu/bin/ld: cannot find -lquadmath
  collect2: error: ld returned 1 exit status
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-req-build-h1hnpswb/setup.py", line 41, in <module>
      setup(name='glmnet_python',
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/site-packages/setuptools/__init__.py", line 161, in setup
      return distutils.core.setup(**attrs)
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/tmp/pip-req-build-h1hnpswb/setup.py", line 22, in run
      self.build_extension(ext)
    File "/tmp/pip-req-build-h1hnpswb/setup.py", line 35, in build_extension
      subprocess.check_call(['gfortran', ext.input] + gfortran_args, cwd=self.build_temp, env=env)
    File "/home/uwe/miniconda3/envs/test-build7/lib/python3.8/subprocess.py", line 364, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['gfortran', '/tmp/pip-req-build-h1hnpswb/glmnet_python/GLMnet.f', '-fPIC', '-fdefault-real-8', '-shared', '-o', '/tmp/pip-req-build-h1hnpswb/glmnet_python/GLMnet.so']' returned non-zero exit status 1.
  ----------------------------------------
  ERROR: Failed building wheel for glmnet-python
  Running setup.py clean for glmnet-python
Failed to build glmnet-python
xhochy commented 4 years ago

cc @beckermr

isuruf commented 4 years ago

Can you show conda list?

isuruf commented 4 years ago

@beckermr, we need to fix the libgcc-and-libstdcxx-9 branch. Do you have time to send a PR? If not, I'll have to mark the package as broken until this is fixed. (At least on x86_64)

xhochy commented 4 years ago

For the failing one:

% conda list
# packages in environment at /home/uwe/miniconda3/envs/test-build7:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       0_gnu    conda-forge
binutils-meta             1.0.4                         0    conda-forge
binutils_impl_linux-64    2.34                 h53a641e_4    conda-forge
binutils_linux-64         2.34                hc952b39_20    conda-forge
c-compiler                1.0.4                h516909a_0    conda-forge
ca-certificates           2020.4.5.1           hecc5488_0    conda-forge
certifi                   2020.4.5.1       py38h32f6830_0    conda-forge
compilers                 1.0.4                         0    conda-forge
cxx-compiler              1.0.4                hc9558a2_0    conda-forge
fortran-compiler          1.0.4                he991be0_0    conda-forge
gcc_impl_linux-64         7.5.0                hda68d29_7    conda-forge
gcc_linux-64              7.5.0               h09487f9_20    conda-forge
gfortran_impl_linux-64    7.5.0                h64c220c_7    conda-forge
gfortran_linux-64         7.5.0               h09487f9_20    conda-forge
gxx_impl_linux-64         7.5.0                h64c220c_7    conda-forge
gxx_linux-64              7.5.0               h09487f9_20    conda-forge
ld_impl_linux-64          2.34                 h53a641e_4    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc-ng                 9.2.0                h24d8f2e_2    conda-forge
libgfortran-ng            7.5.0                hdf63c60_7    conda-forge
libgomp                   9.2.0                h24d8f2e_2    conda-forge
libstdcxx-ng              9.2.0                hdf63c60_2    conda-forge
ncurses                   6.1               hf484d3e_1002    conda-forge
openssl                   1.1.1g               h516909a_0    conda-forge
pip                       20.1.1                     py_1    conda-forge
python                    3.8.3           cpython_he5300dc_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
readline                  8.0                  hf8c457e_0    conda-forge
setuptools                47.1.1           py38h32f6830_0    conda-forge
sqlite                    3.30.1               hcee41ef_0    conda-forge
sysroot_linux-64          2.12                 h3a0023d_5    conda-forge
tk                        8.6.10               hed695b0_0    conda-forge
wheel                     0.34.2                     py_1    conda-forge
xz                        5.2.5                h516909a_0    conda-forge
zlib                      1.2.11            h516909a_1006    conda-forge

For the working one:

# packages in environment at /home/uwe/tmp/compiler-test:
#
# Name                    Version                   Build  Channel
_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       0_gnu    conda-forge
_sysroot_linux-64_curr_repodata_hack 3                    ha9d2b57_4    conda-forge
binutils-meta             1.0.4                         0    conda-forge
binutils_impl_linux-64    2.34                 h53a641e_4    conda-forge
binutils_linux-64         2.34                hc952b39_20    conda-forge
c-compiler                1.0.4                h516909a_0    conda-forge
ca-certificates           2020.4.5.1           hecc5488_0    conda-forge
certifi                   2020.4.5.1       py38h32f6830_0    conda-forge
compilers                 1.0.4                         0    conda-forge
cxx-compiler              1.0.4                hc9558a2_0    conda-forge
fortran-compiler          1.0.4                he991be0_0    conda-forge
gcc_impl_linux-64         7.5.0                hd420e75_6    conda-forge
gcc_linux-64              7.5.0               h09487f9_20    conda-forge
gfortran_impl_linux-64    7.5.0                hdf63c60_6    conda-forge
gfortran_linux-64         7.5.0               h09487f9_20    conda-forge
gxx_impl_linux-64         7.5.0                hdf63c60_6    conda-forge
gxx_linux-64              7.5.0               h09487f9_20    conda-forge
kernel-headers_linux-64   3.10.0               h3a0023d_4    conda-forge
ld_impl_linux-64          2.34                 h53a641e_4    conda-forge
libedit                   3.1.20191231         h46ee950_0    conda-forge
libffi                    3.2.1             he1b5a44_1007    conda-forge
libgcc-ng                 9.2.0                h24d8f2e_2    conda-forge
libgfortran-ng            7.5.0                hdf63c60_7    conda-forge
libgomp                   9.2.0                h24d8f2e_2    conda-forge
libstdcxx-ng              9.2.0                hdf63c60_2    conda-forge
ncurses                   6.1               hf484d3e_1002    conda-forge
openssl                   1.1.1g               h516909a_0    conda-forge
pip                       20.1.1                     py_1    conda-forge
python                    3.8.3           cpython_he5300dc_0    conda-forge
python_abi                3.8                      1_cp38    conda-forge
readline                  8.0                  hf8c457e_0    conda-forge
setuptools                47.1.1           py38h32f6830_0    conda-forge
sqlite                    3.31.1               h7b6447c_0    defaults
sysroot_linux-64          2.17                 h3a0023d_4    conda-forge
tk                        8.6.10               hed695b0_0    conda-forge
wheel                     0.34.2                   py38_0    conda-forge
xz                        5.2.5                h516909a_0    conda-forge
zlib                      1.2.11            h516909a_1006    conda-forge
beckermr commented 4 years ago

Yes. I can send a pr. Can we confirm the versions we did push work first?

beckermr commented 4 years ago

We'll want version 7.5.0 of everything

isuruf commented 4 years ago

Yes, it does work

beckermr commented 4 years ago

great! PR coming.

isuruf commented 4 years ago

Here's what we need to do,

  1. Build the new compilers so that they have run_constrains like libgcc-ng !=7.3,8.3,9.1,9.2
  2. Build libgcc-and-libstdcxx branch with the same, but bump to 9.3.
  3. Patch repodata so that older libgcc-ng conflicts with sysroot_linux-64
isuruf commented 4 years ago

We should mark the new builds as broken, since we need to do 1. anyway.

isuruf commented 4 years ago

I'm sending a PR to cf-mark-broken

isuruf commented 4 years ago

We should move those symlinks from the libgcc-ng package to gcc_impl package.

beckermr commented 4 years ago

Yes they don't need to be around unless we are building IIUIC.

beckermr commented 4 years ago

ok @xhochy a compiler with a fix is live. Care to test it out?

beckermr commented 4 years ago

alright. I test this and it works. I am going to close this issue for now.