xpra icon
Bug tracker and wiki

This bug tracker and wiki are being discontinued
please use https://github.com/Xpra-org/xpra instead.


Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#3004 closed defect (invalid)

xpra cannot be built

Reported by: TCH68k Owned by: TCH68k
Priority: blocker Milestone:
Component: encodings Version:
Keywords: Cc:

Description

Hello,

I am trying to build xpra, but it keeps failing at the final linking with this message:

/usr/bin/ld: /usr/local/lib/libx264.a(cabac-a.o): relocation R_X86_64_PC32 against symbol `x264_cabac_range_lps' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

The command line was ./setup.py --without-strict build.
I tried options --without-dec_avcodec2, --without-csc_swscale, --without-enc_ffmpeg and even --with-PIC, though i saw in the source that it is the default. Tried them separately, together, whatever. It keeps failing.

I did not set any milestone or version, because i've tried it with 2.0.3, 2.5.3 and 3.0.13 and all of them did this. I need at least xpra 2.0, so i did not tried below and 4.0 refused to compile by telling Python 3.6 is the minimum (it is installed), so i did not try above either. Most probably all versions are affected, or at least all of them from 2.0.0 to 3.0.13.

The build switches and "diagnostics" dumped on the terminal at the start of the build:

Xpra version 2.0.3
found pkg-config version: 0.29
build switches:
* enc_x264             : Y
* enc_x265             : Y
* enc_ffmpeg           : Y
* nvenc7               : N
* cuda_rebuild         : Y
* vpx                  : Y
* pillow               : Y
* jpeg                 : N
* v4l2                 : Y
* dec_avcodec2         : Y
* csc_swscale          : Y
* csc_libyuv           : N
* bencode              : Y
* cython_bencode       : Y
* vsock                : Y
* mdns                 : Y
* clipboard            : Y
* server               : Y
* client               : Y
* dbus                 : Y
* x11                  : Y
* gtk_x11              : Y
* service              : Y
* gtk2                 : Y
* gtk3                 : N
* html5                : Y
* minify               : Y
* pam                  : Y
* sound                : Y
* opengl               : Y
* printing             : Y
* webcam               : Y
* rebuild              : Y
* annotate             : Y
* warn                 : Y
* strict               : N
* shadow               : Y
* proxy                : Y
* debug                : N
* PIC                  : Y
* Xdummy               : Auto
* Xdummy_wrapper       : Auto
* verbose              : N
* tests                : N
* bundle_tests         : N
error running (['uglifyjs', '--version'],),{'stderr': -1, 'stdout': -1}: [Errno 2] No such file or directory
Warning: uglifyjs failed and return -1
Warning: yuicompressor module not found, cannot minify
'nvcc --version' failed with return code 127
stderr: None
updated ./xpra/build_info.py with:
* BUILD_BIT            = 64bit
* BUILD_CPU            = AMD FX(tm)-8350 Eight-Core Processor
* BUILD_DATE           = 2021-01-17
* BUILD_MACHINE        = x86_64
* BUILD_OS             = Linux Devuan 2.1 ascii
* BUILD_TIME           = 20:43
* BUILT_BY             = root
* BUILT_ON             = Csabi
* COMPILER_VERSION     = gcc (Debian 7.3.0-1~mx17+1) 7.3.0
* CYTHON_VERSION       = 0.25.2
* LINKER_VERSION       = GNU ld (GNU Binutils for Debian) 2.28
* PYTHON_VERSION       = 2.7.13
* RELEASE_BUILD        = True
* lib_pygobject        = 2.28.6
* lib_pygtk            = 2.24.0
* lib_vpx              = 1.6.1
* lib_x11              = 1.6.4
* lib_x264             = 0.142.x
* lib_x265             = 0.0
* lib_xcomposite       = 0.4.4
* lib_xdamage          = 1.1.4
* lib_xext             = 1.3.3
* lib_xfixes           = 5.0.3
* lib_xkbfile          = 1.0.9
* lib_xrandr           = 1.5.1
* lib_xtst             = 1.2.3
found gcc version: 7.3.0

Change History (9)

comment:1 Changed 9 months ago by Antoine Martin

Owner: changed from Antoine Martin to TCH68k

Please see wiki/ReportingBugs, I don't know what platform this is but it is almost certainly not a supported one.
Your gcc is old too.

I need at least xpra 2.0

2.0 is not supported, see wiki/Versions.

so i did not tried below and 4.0 refused to compile by telling Python 3.6 is the minimum (it is installed)

python3 is not the default then and so you must specify it explicitly, ie:

python3.6 ./setup.py ...

comment:2 Changed 9 months ago by TCH68k

GCC 7 was released in 2017 (7.3 in 2018) and Xpra 2.0.3 was also released in 2017. So my compiler simply cannot be too old for Xpra 2.0.3, since they were both released at the same time.
The platform page gave me the information that for Xpra 2.x, only Debian Wheezy and Jessie is not supported, which means Stretch is and Devuan ASCII is Debian Stretch.

2.x is no longer supported, okay, but Xpra 3 too, gave the very same results, which if it was not caused by the compiler being too old with Xpra 2, cannot be the cause with Xpra 3 either. (Neither of your linked wiki pages contained any information about the minimum GCC version. The INSTALL and README files also did not.)
Still, i have CLang 12 if that works; how can i tell the buildsystem to use that without changing the symlinks in the system?

As for 4.x, i now tried

python3.6 ./setup.py --without-strict build

Result:

./setup.py --without-strict build
Xpra version 4.0.6
found pkg-config version: 0.29
build switches:
* PIC                  : Y
* Xdummy               : Auto
* Xdummy_wrapper       : Auto
* annotate             : Y
* bencode              : Y
* bundle_tests         : N
* client               : Y
* clipboard            : Y
* csc_libyuv           : N
* csc_swscale          : Y
* cuda_kernels         : Y
* cuda_rebuild         : Y
* cython               : Y
* cython_bencode       : Y
* data                 : Y
* dbus                 : Y
* debug                : N
* dec_avcodec2         : Y
* enc_ffmpeg           : Y
* enc_x264             : Y
* enc_x265             : Y
* example              : Y
* gtk3                 : Y
* gtk_x11              : Y
* html5                : Y
* html5_brotli         : Y
* html5_gzip           : Y
* jpeg_decoder         : N
* jpeg_encoder         : N
* keyboard             : Y
* mdns                 : Y
* minify               : Y
* modules              : Y
* netdev               : Y
* notifications        : Y
* nvenc                : N
* nvfbc                : N
* opengl               : Y
* pam                  : Y
* pillow               : Y
* printing             : Y
* proxy                : Y
* rebuild              : Y
* rfb                  : Y
* scripts              : Y
* sd_listen            : N
* server               : Y
* service              : Y
* shadow               : Y
* sound                : 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
error running (['uglifyjs', '--version'],),{'stdout': -1, 'stderr': -1}: [Errno 2] No such file or directory: 'uglifyjs': 'uglifyjs'
Warning: uglifyjs failed and return -1
Warning: yuicompressor module not found, cannot minify
'nvcc --version' failed with return code 127
stderr: None
updated ./xpra/build_info.py with:
* BUILD_BIT            = 64bit
* BUILD_CPU            = AMD FX(tm)-8350 Eight-Core Processor
* BUILD_DATE           = 2021-01-18
* BUILD_MACHINE        = x86_64
* BUILD_OS             = Linux Devuan 2.1 ascii
* BUILD_TIME           = 12:11
* BUILT_BY             = root
* BUILT_ON             = Csabi
* COMPILER_VERSION     = gcc (Debian 7.3.0-1~mx17+1) 7.3.0
* CYTHON_VERSION       = 0.25.2
* LINKER_VERSION       = GNU ld (GNU Binutils for Debian) 2.28
* PYTHON_VERSION       = 3.6.3
* RELEASE_BUILD        = True
* lib_vpx              = 1.6.1
* lib_x11              = 1.6.4
* lib_x264             = 0.142.x
* lib_x265             = 0.0
* lib_xcomposite       = 0.4.4
* lib_xdamage          = 1.1.4
* lib_xext             = 1.3.3
* lib_xfixes           = 5.0.3
* lib_xkbfile          = 1.0.9
* lib_xrandr           = 1.5.1
* lib_xtst             = 1.2.3
Traceback (most recent call last):
  File "./setup.py", line 1824, in <module>
    **pkgconfig("gdk-3.0")
  File "./setup.py", line 639, in exec_pkgconfig
    (" or ".join(options), os.environ.get("PKG_CONFIG_PATH", "(empty)")))
Exception: ERROR: cannot find a valid pkg-config entry for gdk-3.0 using PKG_CONFIG_PATH=(empty)

GTK3 is not and will not be available here.

comment:3 Changed 9 months ago by Antoine Martin

So my compiler simply cannot be too old for Xpra 2.0.3, since they were both released at the same time

As per comment:1, xpra 2.0.x is no longer supported.
Also, I didn't say it was "too old", just old.

GTK3 is not and will not be available here.

Then you won't be able to use xpra with python3.

Debian Stretch (assuming that this is what you're running) is supported and runs fine. If you are unable to build from source for whatever reason, you may want to consider using the packages we provide.

comment:4 Changed 9 months ago by TCH68k

As per comment:1, xpra 2.0.x is no longer supported.


I understood. I also said, Xpra 3 does this too.

Also, I didn't say it was "too old", just old.


I asked if CLang 12 will do it, you did not answered that. I also told you that there are no available information about the minimum required GCC version (or it is very well hidden). Which GCC is the minimum?

Then you won't be able to use xpra with python3.


That is okay, i have Python 2 too. If 4 needs GTK3 with Python3 then i will use Xpra 3. I only need 2.0 minimum.

Debian Stretch (assuming that this is what you're running) is supported and runs fine. If you are unable to build from source for whatever reason, you may want to consider using the packages we provide.


Yes, Devuan ASCII is practically Debian Stretch. The packages can be a solution, but i still would like to know why this is happening.

comment:5 Changed 9 months ago by Antoine Martin

Resolution: invalid
Status: newclosed

I asked if CLang 12 will do it

Try it, it isn't hard:

CC=clang pythonXX ./setup.py build --without-strict

but i still would like to know why this is happening.

You have custom built x264 packages in /usr/local/:

/usr/bin/ld: /usr/local/lib/libx264.a(cabac-a.o)

Those are probably compiled with options that are non-standard, or incompatible with xpra.
For a start, it is trying to link with a static library.
This is not supported, you should be using the libx264 shared library from your distribution instead.

comment:6 Changed 9 months ago by TCH68k

Try it, it isn't hard:
CC=clang pythonXX ./setup.py build --without-strict


That was what i have asked, how can i do it. I had no idea that this building environment uses the $CC envvar (which is empty by default here). Did not work though.

You have custom built x264 packages in /usr/local/:

/usr/bin/ld: /usr/local/lib/libx264.a(cabac-a.o)


Those are probably compiled with options that are non-standard, or incompatible with xpra.

For a start, it is trying to link with a static library.
This is not supported, you should be using the libx264 shared library from your distribution instead.


I have my own reason to do this. So, the correct combination was

./setup.py --without-strict build --without-enc_x264 --without-dec_avcodec2 --without-enc_ffmpeg

With that, 2.0.3 has successfully been built.
I also tried the pre-built package of 2.0.3 and that works too.

While the problem lied in the syslibs' incompatibility and not Xpra itself, still the builder could inform the user about the problem's nature - and it's solution - if it encounters this situation. Or maybe even a warning in the install files would be sufficient.

Thank you for your help.

comment:7 Changed 9 months ago by Antoine Martin

CC=clang

That was what i have asked, how can i do it
I had no idea that this building environment uses the $CC envvar

That's how it is done with almost all build systems.

So, the correct combination was..
With that, 2.0.3 has successfully been built.

2.0.x has been EOLed years ago, running this version is dangerous.
You are also running a configuration without the default codecs, which is not going to work well.

still the builder could inform the user about the...

No, that's impossible to do reliably and you should know that you've installed custom libraries, or at least remember it when the error points you to that path.

comment:8 Changed 9 months ago by TCH68k

That's how it is done with almost all build systems.


Python-based build systems tend to ignore everything and run by their configuration files. Or at least, that is my experience with them.

2.0.x has been EOLed years ago, running this version is dangerous.
You are also running a configuration without the default codecs, which is not going to work well.


I only needed it to have per-application upscaling locally and that is works fine, but thanks for the warning.

No, that's impossible to do reliably


As i said: maybe even a warning in the install files would be sufficient.

and you should know that you've installed custom libraries, or at least remember it when the error points you to that path.


Of course i should know what have i installed (i do), but how should i know if a particular software cannot work with it? Until this point, every other program could use the newer, locally-built package.

comment:9 Changed 9 months ago by migration script

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/3004

Note: See TracTickets for help on using tickets.