mayavi2 fails to build from source (FTBFS) on jaunty

Bug #346931 reported by Andrew Straw
2
Affects Status Importance Assigned to Milestone
mayavi2 (Ubuntu)
Fix Released
Medium
Andrea Colangelo

Bug Description

Binary package hint: mayavi2

Hi mayavi2 3.1.0-1ubuntu1 fails to build from source on jaunty.

The attached patch fixes this.

The error I fixed during building was:

Building TVTK classes...
Traceback (most recent call last):
  File "setup.py", line 436, in <module>
    **config
  File "/usr/lib/python2.6/dist-packages/numpy/distutils/core.py", line 184, in setup
    return old_setup(**new_attr)
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.6/dist-packages/numpy/distutils/command/install.py", line 51, in run
    r = self.setuptools_run()
  File "/usr/lib/python2.6/dist-packages/numpy/distutils/command/install.py", line 25, in setuptools_run
    return old_install_mod._install.run(self)
  File "/usr/lib/python2.6/distutils/command/install.py", line 608, in run
    self.run_command('build')
  File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "setup.py", line 246, in run
    build_tvtk_classes_zip()
  File "setup.py", line 233, in build_tvtk_classes_zip
    gen_tvtk_classes_zip()
  File "enthought/tvtk/setup.py", line 61, in gen_tvtk_classes_zip

  File "enthought/tvtk/code_gen.py", line 160, in build_zip
  File "/usr/lib/python2.6/shutil.py", line 254, in move
    raise Error, "Destination path '%s' already exists" % real_dst
shutil.Error: Destination path '/build/astraw-mayavi2_3.1.0-1ubuntu1-amd64-m7Sw3h/mayavi2-3.1.0-1ubuntu1/enthought/tvtk/tvtk_classes.zip' already exists
make: *** [python-install-2.6] Error 1
dpkg-buildpackage: failure: /usr/bin/fakeroot debian/rules binary gave error exit status 2

Related branches

Revision history for this message
Andrew Straw (astraw) wrote :
Revision history for this message
Andrew Straw (astraw) wrote :

Just to make what I did clear, here's the debdiff output against 3.1.0-1ubuntu1:

diff -u mayavi2-3.1.0/debian/changelog mayavi2-3.1.0/debian/changelog
--- mayavi2-3.1.0/debian/changelog
+++ mayavi2-3.1.0/debian/changelog
@@ -1,3 +1,9 @@
+mayavi2 (3.1.0-1ubuntu2) jaunty; urgency=low
+
+ * Fix FTBFS.
+
+ -- Andrew Straw <email address hidden> Sun, 22 Mar 2009 12:08:57 -0700
+
 mayavi2 (3.1.0-1ubuntu1) jaunty; urgency=low

   * Don't use reserved keyword in Python 2.6 as variable name.
only in patch2:
unchanged:
--- mayavi2-3.1.0.orig/enthought/tvtk/setup.py
+++ mayavi2-3.1.0/enthought/tvtk/setup.py
@@ -52,6 +52,9 @@
     except:
         pass
     print '-'*70
+ if os.path.exists(target):
+ print "Unlinking possibly old TVTK classes...",
+ os.unlink(target)
     print "Building TVTK classes...",
     sys.stdout.flush()
     cwd = os.getcwd()

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote : Re: [Bug 346931] Re: mayavi2 fails to build from source (FTBFS) on jaunty

On Sun, Mar 22, 2009 at 07:41:59PM -0000, Andrew Straw wrote:
> Just to make what I did clear, here's the debdiff output against
> 3.1.0-1ubuntu1:

Hey Andrew,

Thanks for reporting this. I have fixed the problem in upstream svn
[23371]. I am not sure if the upstream fix will trickle down to ubuntu in
time for Jaunty release, so I suggest the debdiff is applied to the
downstream ubuntu package.

Gaël

Revision history for this message
Andrew Straw (astraw) wrote :

Gaël, my patch is more of a band-aid -- since we're past the feature freeze for Jaunty, I don't think any more can easily be done.

For upstream, I think the real problem is that the distutils build command gets called twice by the Debian build system. First, it does "python setup.py build" and the tvtk zip file is built. Then, during a second run, "python setup.py install" (distutils install command calls build again), the zip file is there and the bug is triggered. Thus, my patch simply lets build start again during the install step, but this is actually curing only a symptom, not the cause.

That said, a band-aid in upstream is better than a complete failure!

Andrew

Revision history for this message
Gael Varoquaux (gael-varoquaux) wrote :

On Mon, Mar 23, 2009 at 01:15:04AM -0000, Andrew Straw wrote:
> Gaël, my patch is more of a band-aid -- since we're past the feature
> freeze for Jaunty, I don't think any more can easily be done.

> For upstream, I think the real problem is that the distutils build
> command gets called twice by the Debian build system. First, it does
> "python setup.py build" and the tvtk zip file is built. Then, during a
> second run, "python setup.py install" (distutils install command calls
> build again), the zip file is there and the bug is triggered. Thus, my
> patch simply lets build start again during the install step, but this is
> actually curing only a symptom, not the cause.

> That said, a band-aid in upstream is better than a complete failure!

Totally agreed with you, with both points. I asked Prabhu for his opinion
on the upstream modification.

Gaël

Changed in mayavi2:
status: New → Confirmed
Changed in mayavi2 (Ubuntu):
assignee: nobody → warp10
importance: Undecided → Medium
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mayavi2 - 3.1.0-1ubuntu2

---------------
mayavi2 (3.1.0-1ubuntu2) jaunty; urgency=low

  * enthought/tvtk/setup.py: add check to avoid FTBFS. Thanks to
    Andrew Straw for the patch (LP: #346931)
  * setup.py: actually loads data required to run the Mayavi2 tests. Thanks to Gael
    Varoquaux for the patch. (LP: #350497)

 -- Andrea Colangelo <email address hidden> Sat, 28 Mar 2009 20:39:45 +0100

Changed in mayavi2:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.