xpra icon indicating copy to clipboard operation
xpra copied to clipboard

setup.py cannot find nvcc or nvjpeg

Open Geremia opened this issue 1 year ago • 3 comments

Warning: could not get branch information
'git describe --long --always --tags' failed with return code 128
updated ./xpra/src_info.py with:
* BRANCH               = unknown
* COMMIT               = unknown
* LOCAL_MODIFICATIONS  = unknown
* REVISION             = unknown
'nvcc --version' failed with return code 127
stderr: None
updated ./xpra/build_info.py with:
* BUILD_BIT            = 64bit
* BUILD_CPU            = AMD Ryzen Threadripper 2990WX 32-Core Processor
* BUILD_DATE           = 2024-03-22
* BUILD_MACHINE        = x86_64
* BUILD_OS             = linux
* BUILD_TIME           = 14:04
* BUILT_BY             = root
* BUILT_ON             = Geremia
* COMPILER_VERSION     = gcc (GCC) 13.2.0
* CYTHON_VERSION       = 3.0.9
* LINKER_VERSION       = ld di GNU version 2.42-slack151
* PYTHON_VERSION       = 3.9.19
* lib_gobject_introspection = 1.80.0
* lib_gtk              = 3.24.41
* lib_gtk_x11          = 3.24.41
* lib_py3cairo         = 1.26.0
* lib_pygobject        = 3.48.1
* lib_python3          = 3.9
* lib_vpx              = 1.14.0
* lib_x11              = 1.8.7
* lib_x264             = 0.130.x
* lib_xcomposite       = 0.4.6
* lib_xdamage          = 1.1.6
* lib_xext             = 1.3.6
* lib_xfixes           = 6.0.1
* lib_xkbfile          = 1.1.3
* lib_xrandr           = 1.5.4
* lib_xtst             = 1.2.4
setup.py install --root=/tmp/SBo/package-xpra --without-docs --without-strict --without-debug
Xpra version 5.0.4
found Cython version 3.0.9
found pkg-config version: 0.29.2
ARCH=x86_64
using INCLUDE_DIRS=['/usr/include', '/usr/local/include']
CPP=cpp
CC=cpp
build switches:
* PIC                  : Y
* Xdummy               : Auto
* Xdummy_wrapper       : Auto
* annotate             : Y
* argb                 : Y
* audio                : Y
* avif                 : N
* bencode              : Y
* brotli               : Y
* bundle_tests         : N
* client               : Y
* clipboard            : Y
* codecs               : Y
* csc_cython           : Y
* csc_libyuv           : N
* csc_swscale          : Y
* cuda_kernels         : Y
* cuda_rebuild         : Y
* cython               : Y
* cython_bencode       : Y
* cython_tracing       : N
* data                 : Y
* dbus                 : Y
* debug                : N
* dec_avcodec2         : Y
* docs                 : N
* drm                  : Y
* enc_ffmpeg           : Y
* enc_proxy            : Y
* enc_x264             : N
* evdi                 : N
* example              : Y
* ffmpeg               : Y
* gstreamer            : Y
* gtk3                 : Y
* gtk_x11              : Y
* http                 : Y
* jpeg_decoder         : Y
* jpeg_encoder         : Y
* keyboard             : Y
* lz4                  : Y
* mdns                 : Y
* modules              : Y
* netdev               : Y
* notifications        : Y
* nvdec                : N
* nvenc                : N
* nvfbc                : N
* nvidia               : Y
* nvjpeg_decoder       : Y
* nvjpeg_encoder       : Y
* opengl               : Y
* openh264             : N
* openh264_decoder     : N
* openh264_encoder     : N
* pam                  : /usr/include/security
* pandoc_lua           : Y
* pillow               : Y
* printing             : Y
* proc                 : Y
* proxy                : Y
* qrencode             : Y
* quic                 : Y
* rebuild              : Y
* rencodeplus          : Y
* rfb                  : Y
* scripts              : Y
* sd_listen            : N
* server               : Y
* service              : Y
* shadow               : Y
* spng_decoder         : N
* spng_encoder         : N
* ssh                  : Y
* strict               : N
* tests                : N
* uinput               : Y
* v4l2                 : Y
* verbose              : N
* vpx                  : Y
* vsock                : Y
* warn                 : Y
* webcam               : Y
* webp                 : Y
* x11                  : Y
* xdg_open             : Y
* xinput               : Y
Traceback (most recent call last):
  File "/tmp/SBo/xpra-5.0.4/setup.py", line 2245, in <module>
    assert nvcc, "cannot find nvcc compiler!"
AssertionError: cannot find nvcc compiler!

If I set:

export PATH=$PATH:/usr/share/cuda/bin
export CUDA_HOME=/usr/share/cuda
export NVIDIA_CODECS=1
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64

setup.py then says it cannot find nvjpeg. For me, nvcc is in /usr/share/cuda/bin/, and libnvjpeg is in /usr/lib64/.

Geremia avatar Mar 22 '24 21:03 Geremia

/tmp/SBo/xpra-5.0.4/setup.py

Try something newer!

That's odd because it should look it up in $PATH, twice even:

  • https://github.com/Xpra-org/xpra/blob/5992663d24cbf650336c9b8560117abe0ae20dca/setup.py#L2232
  • https://github.com/Xpra-org/xpra/blob/5992663d24cbf650336c9b8560117abe0ae20dca/setup.py#L2244

What happens if you run nvcc --version from your command line with these variables set?

export NVIDIA_CODECS=1

What is this for?

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64

Why would you need to set this?

setup.py then says it cannot find nvjpeg.

It is looking for a pkgconfig file, such as this one: https://github.com/Xpra-org/repo-build-scripts/blob/main/pkgconfig/nvjpeg.pc Which you can edit.

totaam avatar Mar 23 '24 02:03 totaam

@totaam

What happens if you run nvcc --version from your command line with these variables set?

nvcc --version:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Tue_Feb_27_16:19:38_PST_2024
Cuda compilation tools, release 12.4, V12.4.99
Build cuda_12.4.r12.4/compiler.33961263_0

Geremia avatar Mar 23 '24 20:03 Geremia

You haven't answered the other questions

totaam avatar Mar 24 '24 06:03 totaam

@totaam export PATH=$PATH:/usr/share/cuda/bin is really all that was needed. Those others didn't change anything.

Geremia avatar Mar 27 '24 19:03 Geremia

So you didn't set the $PATH in your original question? How did you expect xpra to find nvcc in /usr/share/cuda/bin without that?

Those others didn't change anything.

I know, I'm was asking what made you think they would.

totaam avatar Mar 28 '24 06:03 totaam

Not heard back, very likely PEBKAC.

totaam avatar May 31 '24 09:05 totaam