conda-forge / qt-feedstock

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

linux-64 package contains a spurious (and almost empty) sysroot #208

Open matthiasdiener opened 2 years ago

matthiasdiener commented 2 years ago

(E.g.) https://anaconda.org/conda-forge/qt/5.12.9/download/linux-64/qt-5.12.9-hda022c4_4.tar.bz2 has a spurious sysroot folder, with only a single file:

x86_64-conda-linux-gnu/sysroot/usr/include/linux/input.h.bak

This file is created by the code here: https://github.com/conda-forge/qt-feedstock/blob/636c8b55355fbb908d5c6c67e909e289bcdf39bc/recipe/build.sh#L147-L153

For this reason, after installing qt other packages sometimes fail to compile:

$ conda create -n test
[...]
$ conda activate test
$ conda install qt
[...]
$ pip cache purge
$ pip install mpi4py
[...]
checking for MPI compile and link ...
/usr/bin/mpicc -pthread -B /home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/mdiener/emirge/miniforge3/envs/ceesd/include -fPIC -O2 -isystem /home/mdiener/emirge/miniforge3/envs/ceesd/include -fPIC -I/home/mdiener/emirge/miniforge3/envs/ceesd/include/python3.9 -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
/usr/bin/mpicc -pthread -B /home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/mdiener/emirge/miniforge3/envs/ceesd/include -fPIC -O2 -isystem /home/mdiener/emirge/miniforge3/envs/ceesd/include -fPIC -I/home/mdiener/emirge/miniforge3/envs/ceesd/include/python3.9 -c _configtest.c -o _configtest.o
/usr/bin/mpicc -pthread -B /home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat _configtest.o -Lbuild/temp.linux-x86_64-3.9 -o _configtest
/home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat/ld: warning: libopen-rte.so.40, needed by /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so, not found (try using -rpath or -rpath-link)
/home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat/ld: warning: libopen-pal.so.40, needed by /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so, not found (try using -rpath or -rpath-link) /home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat/ld: warning: libm.so.6, needed by /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so, not found (try using -rpath or -rpath-link)
/home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat/ld: warning: libhwloc.so.15, needed by /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so, not found (try using -rpath or -rpath-link)
/home/mdiener/emirge/miniforge3/envs/ceesd/compiler_compat/ld: /usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so: undefined reference to `mca_base_framework_components_close'
[...]

The workaround I found is to remove the sysroot directory after installing qt:

$ rm -rf miniforge3/envs/test/x86_64-conda-linux-gnu/sysroot/
$ pip install mpi4py  # works fine now

Issue:


Environment (conda list):

``` $ conda list ```


Details about conda and system ( conda info ):

``` $ conda info ```
jakirkham commented 2 years ago

Probably just need to remove that file in the recipe build script. It’s getting packaged because it wasn’t cleaned up

matthiasdiener commented 2 years ago

206 looks like it will fix this issue

matthiasdiener commented 2 years ago

@isuruf @jakirkham : Since #206 went into a new package instead, could we simply modify the tar.bz2 file for this package as outlined above (removing the spurious file/directory) and re-upload to anaconda?

jakirkham commented 2 years ago

Would it be possible to bump the build number for that package with the needed change?

matthiasdiener commented 2 years ago

Would it be possible to bump the build number for that package with the needed change?

I'm not sure, but I think this might be possible.