After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 654592 - Do something with modules that don't support DESTDIR
Do something with modules that don't support DESTDIR
Status: RESOLVED FIXED
Product: jhbuild
Classification: Infrastructure
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Jhbuild maintainers
Jhbuild QA
: 654615 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-07-14 06:07 UTC by Ross Burton
Modified: 2011-07-18 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ross Burton 2011-07-14 06:07:26 UTC
The .la cleaner asserts after installing expat:

...
/usr/bin/install -c -m 644 ./lib/expat.h ./lib/expat_external.h /home/ross/Programming/MeeGo/netbook/install/include
/bin/sh ./conftools/mkinstalldirs /home/ross/Programming/MeeGo/netbook/install/bin /home/ross/Programming/MeeGo/netbook/install/man/man1
mkdir /home/ross/Programming/MeeGo/netbook/install/man
mkdir /home/ross/Programming/MeeGo/netbook/install/man/man1
/bin/sh ./libtool --mode=install /usr/bin/install -c xmlwf/xmlwf /home/ross/Programming/MeeGo/netbook/install/bin/xmlwf
/usr/bin/install -c xmlwf/.libs/xmlwf /home/ross/Programming/MeeGo/netbook/install/bin/xmlwf
/usr/bin/install -c -m 644 ./doc/xmlwf.1 /home/ross/Programming/MeeGo/netbook/install/man/man1
Traceback (most recent call last):
  • File "/home/ross/BUILD/bin/jhbuild", line 31 in <module>
    jhbuild.main.main(sys.argv[1:])
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/main.py", line 147 in main
    rc = jhbuild.commands.run(command, config, args, help=lambda: print_help(parser))
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/commands/__init__.py", line 123 in run
    return cmd.execute(config, args, help)
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/commands/__init__.py", line 52 in execute
    return self.run(config, options, args, help)
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/commands/base.py", line 293 in run
    return build.build()
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/frontends/buildscript.py", line 149 in build
    error, altphases = module.run_phase(self, phase)
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/modtypes/__init__.py", line 272 in run_phase
    method(buildscript)
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/modtypes/autotools.py", line 276 in do_install
    self.process_install(buildscript, self.get_revision())
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/modtypes/__init__.py", line 215 in process_install
    self._clean_la_files(destdir)
  • File "/home/ross/BUILD/lib/python2.6/site-packages/jhbuild/modtypes/__init__.py", line 168 in _clean_la_files
    assert os.path.isdir(prefixdir) AssertionError

I inserted a print statement and prefixdir is /home/ross/Programming/MeeGo/netbook/install/_jhbuild/root-expat/home/ross/Programming/MeeGo/netbook/install, which as it says doesn't exist.
Comment 1 Matthias Clasen 2011-07-14 11:09:12 UTC
Do you have the latest git jhbuild ?

author	Colin Walters <walters@verbum.org>	2011-07-13 13:41:57 (GMT)
committer	Colin Walters <walters@verbum.org>	2011-07-13 13:41:57 (GMT)
commit	b9fa6e3078589d023c05c4247466b71becc9f47b (patch) (side-by-side diff)
tree	4dabbbf56a377bba72c9a9d4c3433580667e3f72
parent	aa84ad152c4c8e47b38db96464e3ca98bb051649 (diff)
buildscript: Avoid failing if we don't have a manifest for a package yet
https://bugzilla.gnome.org/show_bug.cgi?id=654522 

was supposed to fix (and has fixed) a similar symptom seen on my system.
Comment 2 Ross Burton 2011-07-14 11:18:34 UTC
Yes, I have that commit.
Comment 3 Craig Keogh 2011-07-14 12:17:26 UTC
Thank you for the report.

I can reproduce with nss. It seems any module that doesn't support DESTDIR will assert.

I've rushed through some fixes that get JHBuild working again. Colin, if I've done the fixes the wrong way, you're welcome to correct me. I'm happy to review patches that solve this bug another way.

http://git.gnome.org/browse/jhbuild/commit/?id=041be453c01bf00a6a025b01611e5920e35c8a4f
http://git.gnome.org/browse/jhbuild/commit/?id=f5dc73514649b3d8aa647266fa82c9bdf959af20
Comment 4 Colin Walters 2011-07-14 13:03:45 UTC
Hmm...if the module doesn't support DESTDIR though, the 'install' phase will currently do nothing.

Given that we need DESTDIR to be able to delete no longer shipped files, I think we have to deal with these modules in some way.

I see two options:

* Create a patch for the module, which ideally can be upstreamed
* Implement the 'install' phase with a custom script

We could *try* to strace the 'make install' phase but I'd really like to avoid that.
Comment 5 Colin Walters 2011-07-14 13:07:06 UTC
*** Bug 654615 has been marked as a duplicate of this bug. ***
Comment 6 Colin Walters 2011-07-14 13:10:48 UTC
Looking at the Fedora .spec file, expat looks like buildapi (configure/make) project to me.  So it might simply be a bug in the module.
Comment 7 Colin Walters 2011-07-14 13:52:31 UTC
So expat has been fixed for ~4 years:
http://expat.cvs.sourceforge.net/viewvc/expat/expat/README?r1=1.35&r2=1.36

We just need to update to a newer version.
Comment 8 Colin Walters 2011-07-14 14:29:01 UTC
(In reply to comment #7)
> So expat has been fixed for ~4 years:
> http://expat.cvs.sourceforge.net/viewvc/expat/expat/README?r1=1.35&r2=1.36
> 
> We just need to update to a newer version.

Done. 

Also, I added further checks to the install processing so we fail hard if the module doesn't support DESTDIR at all.
Comment 9 Craig Keogh 2011-07-14 23:43:32 UTC
What about nss?
What about nspr? (I haven't checked if nspr supports DESTDIR, but if nss doesn't then nspr probably doesn't)
Comment 10 Ross Burton 2011-07-15 09:35:00 UTC
With current head (update to expat 3.0.1):

*** Error during phase install of nss: Module failed to install into DESTDIR u'/home/ross/Programming/MeeGo/netbook/install/_jhbuild/root-nss-broken' *** [51/104]

Yeah, something needs to be done about NSS.  Re-opening.
Comment 11 Craig Keogh 2011-07-15 12:18:32 UTC
I've pushed a fix to display a warning rather than fail the module. nss doesn't support DESTDIR and installs to prefix. Other modules that depend on nss can still continue. You can't uninstall nss, but that is better stopping the whole JHBuild stack.

When nss and all modules are fixed, I'm happy for this fix to be reverted and the error becomes fatal again.

http://git.gnome.org/browse/jhbuild/commit/?id=5f346cbcec01a10d7dbc046b0fae3bc0ab392929
Comment 12 Colin Walters 2011-07-15 15:10:01 UTC
(In reply to comment #11)
> I've pushed a fix to display a warning rather than fail the module. nss doesn't
> support DESTDIR and installs to prefix. Other modules that depend on nss can
> still continue. You can't uninstall nss, but that is better stopping the whole
> JHBuild stack.

nspr already supports DESTDIR, it's just nss that has an *ancient* copy of Mozilla's build system.

It turned out to be pretty easy to update Frederic's current nss patch to properly handle DESTDIR, so that's done now.

I think I'd like to flip it back to fatal...if people hit other problems, let me know.
Comment 13 Sascha Silbe 2011-07-18 09:34:43 UTC
Forcing DESTDIR support broke sugar-jhbuild because the build system used by our bundles doesn't support DESTDIR. It's a known issue (SL#2947) and will take some time to fix: for whatever historical reason we're using our own custom build system that presents an incomplete distutils (setup.py) interface instead of hooking into distutils.
We'd appreciate if you could refrain from failing hard for modules without DESTDIR support - if just by setting some internal attribute on Package (we have a custom module type for bundles, based on DistutilsModule).
Comment 14 Colin Walters 2011-07-18 15:27:56 UTC
(In reply to comment #13)
> Forcing DESTDIR support broke sugar-jhbuild because the build system used by
> our bundles doesn't support DESTDIR. It's a known issue (SL#2947) and will take
> some time to fix: for whatever historical reason we're using our own custom
> build system that presents an incomplete distutils (setup.py) interface instead
> of hooking into distutils.

Gross =)

> We'd appreciate if you could refrain from failing hard for modules without
> DESTDIR support - if just by setting some internal attribute on Package (we
> have a custom module type for bundles, based on DistutilsModule).

You need to override do_install() then.