Xpra: Ticket #1875: Local builds building without server support

As mentioned in the IRC - I've been doing local builds for quite some time and they stopped supporting servers last week.

For reference, here is the script I've been using to do builds:

#clean up build info
rm -f xpra/build_info.py
rm -f xpra/src_info.py
#clean up old build
./setup.py clean
#LDFLAGS=-Wl,-rpath=/usr/lib64/xpra \
#PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib64/xpra/pkgconfig \
#    ./setup.py install
#no longer needed
python3 ./setup.py install \
--rpath=/usr/lib64/xpra --pkg-config-path=/usr/lib64/xpra/pkgconfig \
--without-html5 --without-printing
rm -f /usr/bin/xpra
python2 ./setup.py install \
--rpath=/usr/lib64/xpra --pkg-config-path=/usr/lib64/xpra/pkgconfig

I'll attach the build log to this ticket.

Perusing the logs - it shows that it at least appears (as far as I can tell) that it's building correctly - the Python3 build builds without server support, and the Python2 builds show that the server is enabled in the build config at the beginning of the build.

Mon, 11 Jun 2018 16:28:39 GMT - J. Max Mena: attachment set

Build log

Mon, 11 Jun 2018 16:29:14 GMT - J. Max Mena: description changed

Mon, 11 Jun 2018 16:29:24 GMT - J. Max Mena: description changed

Mon, 11 Jun 2018 16:33:20 GMT - Antoine Martin: owner changed

they stopped supporting servers last week

How so? Logs, debug output?

Mon, 11 Jun 2018 16:36:19 GMT - J. Max Mena: owner changed

My log output shows nothing of consequence, just that servers aren't supported:

xpra initialization error:
 invalid mode 'start'

Mon, 11 Jun 2018 16:37:00 GMT - J. Max Mena:

Here's with -d all:

[max@Vorfuehreffekt ~] $ xpra start :13 --no-daemon -d all
2018-06-11 09:35:51,266 get_enabled_encoders(['rencode', 'bencode', 'yaml']) enabled=['rencode', 'bencode', 'yaml']
2018-06-11 09:35:51,267 run_mode error
Traceback (most recent call last):
  File "/usr/local/lib64/python3.6/site-packages/xpra/scripts/main.py", line 76, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "/usr/local/lib64/python3.6/site-packages/xpra/scripts/main.py", line 404, in run_mode
    error_cb("invalid mode '%s'" % mode)
  File "/usr/local/lib64/python3.6/site-packages/xpra/scripts/main.py", line 75, in err
    raise InitException(*args)
xpra.scripts.config.InitException: invalid mode 'start'
xpra initialization error:
 invalid mode 'start'

Mon, 11 Jun 2018 16:37:32 GMT - J. Max Mena:

xpra --help shows that servers are not supported:

[max@Vorfuehreffekt ~] $ xpra --help
	xpra attach [DISPLAY]
	xpra detach [DISPLAY]
	xpra screenshot filename [DISPLAY]
	xpra info [DISPLAY]
	xpra control DISPLAY command [arg1] [arg2]..
	xpra print DISPLAY filename
	xpra version [DISPLAY]
	xpra showconfig
	xpra list
	xpra sessions
	xpra stop [DISPLAY]
	xpra exit [DISPLAY]
	xpra list-mdns
	xpra mdns-gui
	xpra shadow [DISPLAY]
(This xpra installation does not support starting local servers.)

Mon, 11 Jun 2018 16:39:02 GMT - Antoine Martin: status changed; resolution set

Your /usr/bin/xpra uses python3, as can be seen in the stacktrace. Remove it then build for python2 again to re-install it.

Mon, 11 Jun 2018 16:43:38 GMT - J. Max Mena: status changed; resolution deleted

Good spot.

However, I checked my /usr/bin/xpra earlier and it shows that the shebang at the top points to Python2.

My build script builds the Python3 first then deletes /usr/bin/xpra and then runs the Python2 build.

So then why is it running Python3?

Just to check my sanity, I did what you said and it still says it's running with Python3.

Mon, 11 Jun 2018 16:44:31 GMT - J. Max Mena:

(the actual file for reference):

[root@Vorfuehreffekt src] # cat /usr/bin/xpra
import sys
    import xpra
    assert xpra
except ImportError as e:
    sys.stderr.write("Error: xpra for python %s is not installed\n" % (".".join(str(x) for x in sys.version_info[:2])))
from xpra.platform import init, set_default_name
from xpra.scripts.main import main
sys.exit(main(sys.argv[0], sys.argv))

Mon, 11 Jun 2018 16:46:30 GMT - Antoine Martin: owner, status changed

which xpra
cat `which xpra`

Mon, 11 Jun 2018 16:48:05 GMT - J. Max Mena:

That did it -

/usr/local/bin/xpra was the offending file. I'll edit my build script to account for that one too.

Thanks. I'll close this now.

Mon, 11 Jun 2018 16:48:10 GMT - J. Max Mena: status changed; resolution set

Python3 ticket: #1568

Sat, 23 Jan 2021 05:36:06 GMT - migration script:

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