-
-
Notifications
You must be signed in to change notification settings - Fork 156
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
Non-system header builds (e.g. conda) have inconsistent /usr/include header checks #3360
Comments
The commit above should make it easier for you to use a different include directory: INCLUDE_DIR=$CONDA_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/include/ ./setup.py build (xpra) $ touch xpra/codecs/v4l2/pusher.pyx
(xpra) $ python3 ./setup.py build
(..)
gcc -pthread -B /home/antoine/.conda/envs/xpra/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/antoine/.conda/envs/xpra/include -fPIC -O2 -isystem /home/antoine/.conda/envs/xpra/include -fPIC -Ixpra/codecs/v4l2 -I/home/antoine/.conda/envs/xpra/include/python3.10 -c xpra/codecs/v4l2/pusher.c -o build/temp.linux-x86_64-3.10/xpra/codecs/v4l2/pusher.o -Wall -Werror -fPIC
gcc -pthread -B /home/antoine/.conda/envs/xpra/compiler_compat -shared -Wl,-rpath,/home/antoine/.conda/envs/xpra/lib -Wl,-rpath-link,/home/antoine/.conda/envs/xpra/lib -L/home/antoine/.conda/envs/xpra/lib -Wl,-rpath,/home/antoine/.conda/envs/xpra/lib -Wl,-rpath-link,/home/antoine/.conda/envs/xpra/lib -L/home/antoine/.conda/envs/xpra/lib build/temp.linux-x86_64-3.10/xpra/codecs/v4l2/pusher.o -o build/lib.linux-x86_64-3.10/xpra/codecs/v4l2/pusher.cpython-310-x86_64-linux-gnu.so -Wall Now running this again using Note: you're also missing a bunch of printing related dependencies, etc. I assume you're aware of that. |
Thank you! That seemed to do the trick.
If I were to omit the sysroot upgrade step I posted (as I did the first time I tried), I end up with
(Because my After upgrading sysroot to 2.17 and after install
I wasn't, but thanks. I have to admit I didn't carefully check that all dependencies were installed but just added the bare minimum to compile successfully. |
also try harder to detect the presence of device_caps correctly
It should have already used the correct file for the feature detection. INCLUDE_DIR=/usr/local/include/ ./setup.py build Does that work for you? |
Sorry, perhaps I wasn't clear. I just meant that the linux headers provided by conda's sysroot package don't get installed to Put another way, if there's only one |
Ah, gotcha. The sysroot is incomplete so you need both dirs. INCLUDE_DIRS=/usr/include/:/usr/local/include/ python3 ./setup.py build |
My guess is that |
Thanks. I tried |
OK, so I can finally close this ticket.
That was just an example. |
I ran into a few traps trying to build xpra v4.0+ with conda, primarily for a headless Centos 7 server that only had v3.1 available. Essentially, any of the checks pointed at
/usr/include
(e.g. in setup.py) aren't consistent with builds in other environments. For example, if you have a conda environment withoutkernel-headers_linux-64
,linux/videodev2.h
andlinux/vm_sockets.h
will be missing entirely (from e.g.$CONDA_PREFIX/x86_64-conda-linux-gnu/sysroot/usr/include/
), andsysroot_linux-64<2.17
don't definev4l2_capability.device_caps
, all of which will cause compilation errors if they differ from their/usr/include
counterparts.I'm not sure if there's any easy way to determine the actual include path of those headers. Having said that, with reference to providing a conda package, I have been able to build xpra up to
4.2.3
on python 3.9 as follows on both Centos and Fedora:The current master branch appears to also require
libxres
, which I haven't found on conda; it can be built from source with the addition ofxorg-xorgproto
and either system or conda-providedaclocal
,autoconf
andautomake
.The text was updated successfully, but these errors were encountered: