xpra icon
Bug tracker and wiki

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#1534 closed defect (fixed)

Seeing syntax error when launching newly built 1.x server

Reported by: alas Owned by: Antoine Martin
Priority: minor Milestone:
Component: server Version: 1.0.x
Keywords: Cc:

Description

It's been a little while, so maybe my build script is out of date, but when I try to launch a 1.x server that I've freshly built, I'm seeing a traceback from main.py.

$ xpra --no-daemon --bind-tcp=0.0.0.0:1234 --start-child=xterm --start-child=google-chrome --start-new-commands=yes start :13 -d all
using systemd-run to wrap 'start' server command
'systemd-run' '--description' 'xpra-start' '--scope' '--user' '/usr/bin/xpra' '--bind-tcp=0.0.0.0:1234' '--start-child=xterm' '--start-child=google-chrome' '--start-new-commands=yes' 'start' ':13' '-d' 'all' '--daemon=no' '--systemd-run=no'
Running scope as unit: run-r7b7c0bcbeaf34f3b8b3574cda0e1ba83.scope
2017-06-01 12:39:53,721 get_enabled_encoders(['bencode', 'rencode', 'yaml']) enabled=['rencode', 'bencode']
2017-06-01 12:39:53,721 get_enabled_encoders(['bencode', 'rencode', 'yaml']) enabled=['rencode', 'bencode']
2017-06-01 12:39:53,721 get_enabled_encoders(['bencode', 'rencode', 'yaml']) enabled=['rencode', 'bencode']
2017-06-01 12:39:53,721 get_enabled_encoders(['bencode', 'rencode', 'yaml']) enabled=['rencode', 'bencode']

...

2017-06-01 12:39:54,071 run_mode error
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/main.py", line 140, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/main.py", line 1206, in run_mode
    return run_server(error_cb, options, mode, script_file, args, current_display)
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/server.py", line 1373, in run_server
    from xpra.platform.gui import init as gui_init
  File "/usr/lib64/python2.7/site-packages/xpra/platform/gui.py", line 278, in <module>
    "get_info")
  File "/usr/lib64/python2.7/site-packages/xpra/platform/__init__.py", line 150, in platform_import
    platform_module = __import__(module, {}, {}, imports)
  File "/usr/lib64/python2.7/site-packages/xpra/platform/xposix/gui.py", line 177
    except Exception as e:
         ^
SyntaxError: invalid syntax
xpra main error:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/main.py", line 140, in main
    return run_mode(script_file, err, options, args, mode, defaults)
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/main.py", line 1206, in run_mode
    return run_server(error_cb, options, mode, script_file, args, current_display)
  File "/usr/lib64/python2.7/site-packages/xpra/scripts/server.py", line 1373, in run_server
    from xpra.platform.gui import init as gui_init
  File "/usr/lib64/python2.7/site-packages/xpra/platform/gui.py", line 278, in <module>
    "get_info")
  File "/usr/lib64/python2.7/site-packages/xpra/platform/__init__.py", line 150, in platform_import
    platform_module = __import__(module, {}, {}, imports)
  File "/usr/lib64/python2.7/site-packages/xpra/platform/xposix/gui.py", line 177
    except Exception as e:
         ^
SyntaxError: invalid syntax

When building, I remove the old build with the following.

sudo rm -fr /usr/bin/xpra* \
            /usr/bin/airgap* \
            /usr/lib*/python*/site-packages/airgap* \
            /usr/lib*/python*/site-packages/xpra* \
            /usr/lib*/python*/site-packages/wimpiggy \
            /usr/lib*/python*/site-packages/parti* \
            /usr/share/icons/xpra.png \
            /usr/share/man/man1/xpra* \
            /usr/share/xpra* \
            /usr/share/applications/airgap.desktop \
            /usr/share/applications/xpra.desktop \
            /usr/share/applications/xpra_launcher.desktop

And then, to build the 1.x, I use the following.

#set some environment variables for buildings
export LDFLAGS=-Wl,-rpath=/usr/lib64/xpra
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib64/xpra/pkgconfig

#go into directory
cd /home/jimador/Xpra/tags/v1.0.x/src

#update from svn
svn up

#clean up build
sudo ./setup.py clean

#build stuff
./setup.py build

#install as root
sudo LDFLAGS=-Wl,-rpath=/usr/lib64/xpra PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib64/xpra/pkgconfig ./setup.py install

It was working about a month ago, and the script I use to build the 2.x is working fine (except that it doesn't seem to be clearing the build number in order to reset, which I'll investigate a bit once this is sorted out).

Change History (2)

comment:1 Changed 3 years ago by Antoine Martin

Resolution: fixed
Status: newclosed

This was caused by r15921 and is fixed in r15991.

Thanks for the report!

FYI: you can simplify you command line wrt rpath and pkg-config, ie:

sudo ./setup.py build --rpath=/usr/lib64/xpra --pkg-config-path=/usr/lib64/xpra/pkgconfig

(rpath is only used by the "build" step, pkg-config-path is used by both "build" and "install")

comment:2 Changed 3 years ago by alas

Yep, that did the trick.

Good to hear it wasn't just me.

Note: See TracTickets for help on using tickets.