xpra icon
Bug tracker and wiki

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#194 closed defect (fixed)

.so-files are not installed anymore for xpra-0.7.0 using gentoo-distutils installation

Reported by: olifre Owned by: Antoine Martin
Priority: major Milestone: 0.7
Component: core Version: trunk
Keywords: Cc: Michael Weber

Description

My other problems with 0.7.0 appear to be related to all .so-files from xpra missing which are generated through cython.
As you can see in the attached build-log (from a build on Gentoo using a minimalistic ebuild), cython actually runs and the .so-files are generated, but not installed as in 0.6.0.
For comparison, I also attached a build-log from 0.6.0 from the same system.

Attachments (3)

20120911-073406.log.gz (13.6 KB) - added by olifre 8 years ago.
Build log of version 0.6.0 (on Gentoo)
20121008-220555.log.gz (14.2 KB) - added by olifre 8 years ago.
Build log of version 0.7.0 (on Gentoo)
xpra-0.7.0-r1.ebuild (1.9 KB) - added by olifre 8 years ago.
Modified version of the ebuild from Gentoo Portage for new archive

Download all attachments as: .zip

Change History (12)

Changed 8 years ago by olifre

Attachment: 20120911-073406.log.gz added

Build log of version 0.6.0 (on Gentoo)

Changed 8 years ago by olifre

Attachment: 20121008-220555.log.gz added

Build log of version 0.7.0 (on Gentoo)

comment:1 Changed 8 years ago by olifre

Summary: build_ext is not run anymore for xpra-0.7.0: No installation of shared libraries.so-files are not installed anymore for xpra-0.7.0 using gentoo-distutils installation

I actually had a closer look at the problem now. Gentoo distutils uses this call for installation to a temporary directory:
setup.py build -b build-2.7 install --no-compile --root=/var/tmp/portage/x11-wm/xpra-0.7.0/temp/images/2.7

For xpra 0.6.0, this also installes the .so-files if they have been compiled before using the build-call.
For xpra 0.7.0, this IGNORES the already built .so-files and they are not installed.

You can see this problem in the attached build-logs.

comment:2 Changed 8 years ago by Antoine Martin

Status: newaccepted

Hah, ok, this is due to this changeset: r1748

It works fine on other distros (..): we build first, then the install step does not repeat the cython step (already done by build step)

Any ideas?

comment:3 Changed 8 years ago by Antoine Martin

Does this patch to setup.py help?

Index: src/setup.py
===================================================================
--- src/setup.py	(revision 1793)
+++ src/setup.py	(working copy)
@@ -131,7 +131,10 @@
                  % (cython_version, ".".join([str(part) for part in min_version])))
 
 def cython_add(extension, min_version=(0, 14, 0)):
-    if "--no-compile" in sys.argv:
+    #gentoo does weird things, calls --no-compile with build *and* install
+    #then expects to find the cython modules!? ie:
+    #python2.7 setup.py build -b build-2.7 install --no-compile --root=/var/tmp/portage/x11-wm/xpra-0.7.0/temp/images/2.7
+    if "--no-compile" in sys.argv and not ("build" in sys.argv and "install" in sys.argv):
         return
     global ext_modules, cmdclass
     cython_version_check(min_version)

comment:4 Changed 8 years ago by olifre

It does help perfectly well :).
I just added it to my hacky ebuild to apply it before compilation, and the .so-files are back.
I am also wondering why gentoo calls the setup.py with such funny parameters, this appears to be triggered by the function "distutils_src_install" of the distutils-eclass there... Mystical.
But with the patch, it is fine ;).

Thanks for the very fast response and the quick fix!

comment:5 Changed 8 years ago by Antoine Martin

Resolution: fixed
Status: acceptedclosed

Merged in r1889, I've also put an updated gentoo-only 0.7.0 archive with those patches applied here: http://xpra.org/dists/gentoo/xpra-0.7.0-r1.tar.bz2

Unfortunately, I can't figure out how to get the ebuild to apply the patches from the archive - has it really been broken for that long?
Can you share you hacked ebuild?

comment:6 Changed 8 years ago by olifre

Thanks for the new archive,
I actually used the ebuild from the portage tree (so xpra is kind of 'in gentoo' already):
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-wm/xpra/xpra-0.6.4.ebuild?revision=1.1&view=markup
and modified it to download the .tar.xz-archive and apply patches from a subdirectory in a local overlay. This was done by adding an "epatch ${FILESDIR}/somepatch.patch" in the ebuild, and adding "somepatch.patch" to the subdirectory "files" next to the ebuild.

After seeing your new archive now, I generated a modified ebuild which downloads the gentoo-specific tar.bz2 and builds it without further patching ;).
I will attach that one to this bug. It also contains the additional line
S="${WORKDIR}/${PF}"
over the ebuild from portage, so portage looks into to correct subdirectory including the "-r1".
I can also commit it to the gentoo-bugtracker as a bump request, so it shall be included in the portage tree for easy installation. The ebuild-maintainer on the gentoo-side appears to be Michael "xmw" Weber, who is also wrote the original version of the ebuild I modified.

Changed 8 years ago by olifre

Attachment: xpra-0.7.0-r1.ebuild added

Modified version of the ebuild from Gentoo Portage for new archive

comment:7 Changed 8 years ago by Antoine Martin

merged in r1891 and available here: http://xpra.org/dists/gentoo/

Thanks!

comment:8 Changed 8 years ago by Michael Weber

Hi, this is xmw from Gentoo.

I put some effort in an ebuild cleanup after the 0.6 to 0.7 changes.
The "fun" part about --no-compile is to disable .pyc creation, the not-compiling of the .so is an mishap. I added am similar patch to my version [1], but this is gone with 0.7.1 I just added to Gentoo.

Are there any discomfort in pointing Gentoo users to the regular (portage repo) ebuild [2]? I don't really see the point in maintaining 2 locations.

Obliviously I just stumbled over this bug after reading diff -ru of the 0.7.1 -> 0.7.2 source tree changes.

I'm open for input and would appreciate being included in such discussions.

Michael

[1]
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-wm/xpra/files/xpra-0.7.0-ignore-gentoo-no-compile.patch?revision=1.1&view=markup
[2] http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/x11-wm/xpra/

comment:9 Changed 8 years ago by Antoine Martin

Cc: Michael Weber added

The only concern about pointing users to another location is that by definition it will lag behind any releases we make, whereas the ebuilds found here will be up to date as soon as the release announcement is made.

Note: See TracTickets for help on using tickets.