xpra icon
Bug tracker and wiki

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#2268 closed defect (fixed)

How to build Xpra

Reported by: ymatsuzaki Owned by: ymatsuzaki
Priority: major Milestone: 3.0
Component: packaging Version: 2.5.x
Keywords: Cc:

Description (last modified by Antoine Martin)

Nice to meet you, my name is Matsuzaki

Today, I would like to know how to build a Windows version of Xpra, and I registered a ticket.

The Xpra build method "https://xpra.org/trac/wiki/Building/MSWindows" described on your home page has been successfully set up for all the items in this link.

However, when I execute MINGW_BUILD.sh, the following error occurs and I can not build.

$ bash win32 / MINGW_BUILD.sh
Python 2.7.16
Python 2 version

Xpra 2.5-r22124M (64-bit)


* Cleaning ./dist output directory
* Building CUDA kernels
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
* Building Python 2 Cython modules
* Running unit tests
* Generating installation directory
ERROR: build failed, see win32 / cx_freeze-install.log:
    self.run_command (cmd)
  File "C: /msys64/mingw64/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/dist.py", line 305, in run
    self.run_command ('build_exe')
  File "C: /msys64/mingw64/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command (command)
  File "C: /msys64/mingw64/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/dist.py", line 219, in run
    freezer.Freeze ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/freezer.py", line 621, in Freeze
    self.finder = self._GetModuleFinder ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/freezer.py", line 340, in _GetModuleFinder
    finder.IncludeModule (name)
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/finder.py", line 651, in IncludeModule
    namespace = namespace)
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/finder.py", line 351, in _ImportModule
    raise ImportError ("No module named% r"% name)
ImportError: No module named 'pkg_resources._vendor.packaging'

Please tell me how to build Xpra for Windows.

Target OS: Windows 10
Why I want to build: I want to use Xpra 2.5, but on Windows I get the following error

2019-03-18 19: 42: 24,317 get_interface_info ({2970669E-9B18-4AF5-B3FC-05651DBEA9E2}) = {'adapter-type': 'Ethernet 802.3', 'caption': '[00000001] Intel (R) Ethernet] Connection (4) I219-V ',' description ':' Intel (R) Ethernet Connection (4) I219-V ',' id ': 1,' GUID ':' {2970669E-9B18-4AF5-B3FC-05651DBEA9E2} ',' index ': 1,' name ':' Intel (R) Ethernet Connection (4) I219-V ',' product-name ':' Intel (R) Ethernet Connection (4) I219-V ',' speed ': 1000000000}
2019-03-18 19: 42: 24,317 error preparing connection: local variable 'jitter' referenced before assignment
Traceback (most recent call last):
  File "E: \ Xpra \ trunk \ src / xpra / client / client_base.py", line 360, in send_hello
  File "E: \ Xpra \ trunk \ src / xpra / client / gtk_base / gtk_client_base.py", line 679, in make_hello
  File "E: \ Xpra \ trunk \ src / xpra / client / ui_client_base.py", line 353, in make_hello
  File "E: \ Xpra \ trunk \ src / xpra / client / mixins / network_state.py", line 96, in get_caps
UnboundLocalError: local variable 'jitter' referenced before assignment

This error seems to occur when the adapter name of Win32_NetworkAdapter contains Japanese.
Because it can not be used with this, I would like to use Japanese-language support and build the built-in Xpra.

Sorry to trouble you, but please check

Attachments (2)

xpra.iss (9.8 KB) - added by ymatsuzaki 3 months ago.
"Xpra.iss" when BUILD fails
xpra-install-error.jpg (33.9 KB) - added by ymatsuzaki 3 months ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 3 months ago by Antoine Martin

Description: modified (diff)
Owner: changed from Antoine Martin to ymatsuzaki

Regarding ImportError: No module named 'pkg_resources._vendor.packaging', this is a bug in the MSYS2 distribution of setuptools: This error message is caused by a missing/broken Python setuptools package. (from No module named pkg_resources)
You may want to re-install the package using pip as per ticket:678#comment:61.
See also Msys2-users: pip3: ModuleNotFoundError: No module named 'pkg_resources'

As for UnboundLocalError: local variable 'jitter' referenced before assignment.
This bug was corrected in r22109 and was included in the 2.5 release. Are you sure that you are using up-to-date packages? What is the exact package version? (ie: run xpra_cmd.exe --version)

comment:2 Changed 3 months ago by Antoine Martin

Component: androidpackaging

comment:3 Changed 3 months ago by ymatsuzaki

Thank you for your reply.
We are aware of the MSYS2 distribution bug.
Also, regarding the log mentioned above, the version of Xpra at that time will be Xpra 2.5-r22124M (64-bit)

The latest update information has been obtained through SVN.
The current version is Xpra 2.5.1-r22369M (64-bit)

I tried to execute MINGW_BUILD.sh again after this version is finished with the following error

Once I clean up Windows and executewiki/Building/MSWindows again, will it be possible to BUILD?

ymatsuzaki @ DESKTOP-C8I8FRJ MINGW64 /C/Users/black/Documents/Xpra/tags/v2.5.x/src
$ bash win32 / MINGW_BUILD.sh
Python 2.7.16
Python 2 version

Xpra 2.5.1-r22369M (64-bit)


* Cleaning ./dist output directory
* Building CUDA kernels
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
* Building Python 2 Cython modules
* Running unit tests
* Generating installation directory
ERROR: build failed, see win32 / cx_freeze-install.log:
    self.run_command (cmd)
  File "C: /msys64/mingw64/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/dist.py", line 305, in run
    self.run_command ('build_exe')
  File "C: /msys64/mingw64/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command (command)
  File "C: /msys64/mingw64/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/dist.py", line 219, in run
    freezer.Freeze ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/freezer.py", line 621, in Freeze
    self.finder = self._GetModuleFinder ()
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/freezer.py", line 340, in _GetModuleFinder
    finder.IncludeModule (name)
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/finder.py", line 651, in IncludeModule
    namespace = namespace)
  File "C: /msys64/mingw64/lib/python2.7/site-packages/cx_Freeze/finder.py", line 351, in _ImportModule
    raise ImportError ("No module named% r"% name)
ImportError: No module named 'pkg_resources._vendor.packaging'
Last edited 3 months ago by Antoine Martin (previous) (diff)

comment:4 Changed 3 months ago by Antoine Martin

We are aware of the MSYS2 distribution bug.

Then why aren't you fixing it as per the instructions I gave you?

Also, regarding the log mentioned above, the version of Xpra at that time will be "Xpra 2.5-r22124M (64-bit)"

You should be using the current stable version of xpra from the download area, which is newer than that and does not have the bug that you are having problems with.

(..)
I tried to execute MINGW_BUILD.sh again after this version is finished with the following error
ImportError?: No module named 'pkg_resources._vendor.packaging'

That same error again.
See comment:1 and fix setuptools then things will build just fine.

comment:5 Changed 3 months ago by ymatsuzaki

We are aware of the MSYS2 distribution bug.

Perhaps the content you want to convey is not well translated.
English may be strange because it uses Google translation, but please forgive me

I tried to execute MINGW_BUILD.sh again after this version is finished with the following error
ImportError? ?: No module named 'pkg_resources._vendor.packaging'

About this, but in detail, is this ticket? → http://xpra.org/trac/ticket/2033
I applied now and tried.

As a result of the adaptation error content changes, it becomes below
What's missing from there?

We apologize for any inconvenience but thank you in advance.

ymatsuzaki @ DESKTOP-C8I8FRJ MINGW64 /C/Users/black/Documents/Xpra/tags/v2.5.x/src
$ bash win32 / MINGW_BUILD.sh
Python 2.7.16
Python 2 version

Xpra 2.5.1-r22369M (64-bit)


* Cleaning ./dist output directory
* Building CUDA kernels
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
The system can not find the path specified.
* Building Python 2 Cython modules
* Running unit tests
* Generating installation directory
mv: can not stat 'lib / nacl / libsodium * dll': No such file or directory
* Generating gdk pixbuf loaders.cache
* Generating HTML Manual Page
* Adding TortoisePlink
* Adding OpenSSH
cp: can not stat '/usr/bin/msys-hcrypto*.dll': No such file or directory
* Creating the installer using InnoSetup
InnoSetup error-see win32 / innosetup.log:
Copyright (C) 1997-2018 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2018 Martijn Laan

Compiler engine version: Inno Setup 5.6.1 (a)

Parsing [Setup] section, line 2
Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Parsing [Setup] section, line 9
Parsing [Setup] section, line 10
Parsing [Setup] section, line 11
Parsing [Setup] section, line 12
Parsing [Setup] section, line 13
Parsing [Setup] section, line 14
Error on line 14 in C: \ Users \ black \ Documents \ Xpra \ tags \ v2.5.x \ src \ xpra.iss: Unrecognized [Setup] section directive "// Compression"
Compile aborted.

comment:6 Changed 3 months ago by Antoine Martin

mv: can not stat 'lib / nacl / libsodium * dll': No such file or directory

libsodium should have been installed as a dependency of paramiko, I've added it to the setup script in r22370, you should install it by hand.

cp: can not stat '/usr/bin/msys-hcrypto*.dll': No such file or directory

Same for openssh: heimdal-libs should have been installed, also added in r22370, you can install it by hand.

Error on line 14 in C: \ Users \ black \ Documents \ Xpra \ tags \ v2.5.x \ src \ xpra.iss: Unrecognized [Setup] section directive "// Compression"

Please build trunk revision r22371 or later (this change prevents the src\xpra.iss file from being removed so we can inspect it) and attach the src\xpra.iss file to this ticket.
There must be some kind of a syntax error in that file, it is generated during the build. (and this works fine on all my build systems).

Last edited 3 months ago by Antoine Martin (previous) (diff)

comment:7 Changed 3 months ago by ymatsuzaki

mv: can not stat 'lib / nacl / libsodium * dll': No such file or directory

libsodium should have been installed as a dependency of paramiko, I've added it to the setup script in r22370, you should install it by hand.

cp: can not stat '/usr/bin/msys-hcrypto*.dll': No such file or directory

Same for openssh: heimdal-libs should have been installed, also added in r22370, you can install it by hand.

Regarding the above two points, the error no longer occurs when installing "Xpra_Setup_2.5-r22135.exe" to the work directory

Error on line 14 in C: \ Users \ black \ Documents \ Xpra \ tags \ v2.5.x \ src \ xpra.iss: Unrecognized [Setup] section directive " Compression"

Please build trunk revision r22371 or later (this change prevents the src\xpra.iss file from being removed so we can inspect it) and attach the src\xpra.iss file to this ticket.
There must be some kind of a syntax error in that file, it is generated during the build. (and this works fine on all my build systems).

I understand. "Xpra.iss" file is attached

By the way, if you execute "MINGW_BUILD.sh" again in the current environment, it will be the following

# bash win32/MINGW_BUILD.sh
Python 2.7.16
Python2 version

Xpra 2.5.1-runknownM (64-bit)


* Cleaning ./dist output directory
* Building CUDA kernels
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
* Building Python 2 Cython modules
* Running unit tests
* Generating installation directory
* Generating gdk pixbuf loaders.cache
* Generating HTML Manual Page
* Adding TortoisePlink
* Adding OpenSSH
* Creating the installer using InnoSetup
InnoSetup error - see win32/innosetup.log:
Copyright (C) 1997-2018 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2018 Martijn Laan

Compiler engine version: Inno Setup 5.6.1 (a)

Parsing [Setup] section, line 2
Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Parsing [Setup] section, line 9
Parsing [Setup] section, line 10
Parsing [Setup] section, line 11
Parsing [Setup] section, line 12
Parsing [Setup] section, line 13
Parsing [Setup] section, line 14
Error on line 14 in C:\Users\black\Documents\Xpra\tags\v2.5.x-Copy\src\xpra.iss: Unrecognized [Setup] section directive "//Compression"
Compile aborted.

Changed 3 months ago by ymatsuzaki

Attachment: xpra.iss added

"Xpra.iss" when BUILD fails

comment:8 Changed 3 months ago by Antoine Martin

The file looks just fine. Maybe newer versions of innosetup don't like finding comments starting with //.
You can try removing all the comments starting with // in the original file found in win32\xpra.iss.
Does that help?

comment:9 Changed 3 months ago by ymatsuzaki

Removed all comments out // of "xpra.iss" and executed "MINGW_BUILD.sh" and proceeded!
However, if you install using the installer created at this time, you will get an error like attached file

Are there any missing places after that?

[email protected] MINGW64 /C/Users/black/Documents/Xpra/tags/v2.5.x-Copy/src
# bash win32/MINGW_BUILD.sh
Python 2.7.16
Python2 version

Xpra 2.5.1-runknownM (64-bit)


* Cleaning ./dist output directory
* Building CUDA kernels
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
* Building Python 2 Cython modules
* Running unit tests
* Generating installation directory
* Generating gdk pixbuf loaders.cache
* Generating HTML Manual Page
* Adding TortoisePlink
* Adding OpenSSH
* Creating the installer using InnoSetup
* Signing EXE
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
signtool command failed, see win32/signtool.log:
-rwxr-xr-x 1 ymatsuzaki なし 50347962 Apr 11 14:34 Xpra-x86_64_Setup_2.5.1-runknownM.exe
* Finished - running the new installer
Last edited 3 months ago by Antoine Martin (previous) (diff)

Changed 3 months ago by ymatsuzaki

Attachment: xpra-install-error.jpg added

comment:10 Changed 3 months ago by Antoine Martin

However, if you install using the installer created at this time, you will get an error like attached file


Try r22373.
This crypto lib is only used by openssh, if we don't bundle it (BUNDLE_OPENSSH=0 set by the patch) then it should not be installed and the error should go away.

comment:11 Changed 3 months ago by ymatsuzaki

After executing "r22373", the installer created when executed with MINGW_SETUP.sh was successfully installed!
thank you very much

comment:12 Changed 3 months ago by Antoine Martin

Resolution: fixed
Status: newclosed

Backport to v2.5 in r22374.

comment:13 Changed 3 months ago by totaamwin32

This was causing problems on my build system, so r22379 reverts some of those changes.

Note: See TracTickets for help on using tickets.