Re: [gtk-osx-users] Crash of jhbuild at install phase





On Feb 26, 2021, at 12:43 AM, Andrius Rinkevicius <andriusrin gmail com> wrote:



On Thu, Feb 25, 2021 at 7:52 PM John Ralls <jralls ceridwen us> wrote:
On Feb 25, 2021, at 6:37 AM, Andrius Rinkevicius <andriusrin gmail com> wrote:
On Thu, Feb 25, 2021 at 9:56 AM Andrius Rinkevicius <andriusrin gmail com> wrote:
On Thu, Feb 25, 2021 at 3:45 AM John Ralls <jralls ceridwen us> wrote:
On Feb 24, 2021, at 11:05 AM, Andrius Rinkevicius via gtk-osx-users-list <gtk-osx-users-list gnome 
org> wrote:

Hi all,
I am getting crash when building my own program using custom moduleset.
configure, build and install steps all are OK, however, jhbuild fails at final move of build files to 
~/gtk/inst/.
The traceback is
W: Ignoring uninstalled package: bluefish
Traceback (most recent call last):
  File "/Users/andrius/.new_local/libexec/run_jhbuild.py", line 17, in <module>
    jhbuild.main.main(sys.argv[1:])
  File "/Users/andrius/Source/jhbuild/jhbuild/main.py", line 120, in main
    rc = jhbuild.commands.run(command, config, args, help=lambda: print_help(parser))
  File "/Users/andrius/Source/jhbuild/jhbuild/commands/__init__.py", line 188, in run
    return cmd.execute(config, args, help)
  File "/Users/andrius/Source/jhbuild/jhbuild/commands/__init__.py", line 56, in execute
    return self.run(config, options, args, help)
  File "/Users/andrius/Source/jhbuild/jhbuild/commands/base.py", line 341, in run
    return build.build()
  File "/Users/andrius/Source/jhbuild/jhbuild/frontends/buildscript.py", line 172, in build
    error, altphases = module.run_phase(self, phase)
  File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/__init__.py", line 420, in run_phase
    method(buildscript)
  File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/autotools.py", line 320, in do_install
    self.process_install(buildscript, self.get_revision())
  File "/Users/andrius/Source/jhbuild/jhbuild/modtypes/__init__.py", line 317, in process_install
    new_contents = fileutils.accumulate_dirtree_contents(destdir_prefix)
  File "/Users/andrius/Source/jhbuild/jhbuild/utils/fileutils.py", line 44, in 
accumulate_dirtree_contents
    _accumulate_dirtree_contents_recurse(path, contents)
  File "/Users/andrius/Source/jhbuild/jhbuild/utils/fileutils.py", line 26, in 
_accumulate_dirtree_contents_recurse
    names = os.listdir(path)
FileNotFoundError: [Errno 2] No such file or directory: 
'/Users/andrius/gtk/inst/_jhbuild/root-bluefish/Users/andrius/gtk/inst'

I looks strange that it appends prefix at the end of path, however, as far as I can see this is done 
fileutils.accumulate_dirtree_contents(destdir_prefix), it is intended.
I am not sure if this is gtk-osx or jhbuild related bug, however, it seems that there are no such a n 
errors reported on jhbuild bug tracker.
I can see all build files located in '/Users/andrius/gtk/inst/_jhbuild/root-bluefish, so why there is 
extra part added is hard to say. From the other hand, I have build complete gkt+ stack without any 
issues, just one particular program fails without apparent reason.
Another strange thing is that it says "W: Ignoring uninstalled package: bluefish", while package is not 
uninstalled, it stays in source three. However, since it was installed via svn type repo, there is no 
package in pkgs folder. 
Any hints what to look for would be useful!

Andrius,

jhbuild does a two-step install. It first runs make or ninja install with 
DESTDIR=$PREFIX/_jhbuild/root-project-name; make/ninja is supposed to install to $DESTDIR/$PREFIX. Once 
make/ninja reports that the install completed normally jhbuild moves everything to $PREFIX and deletes 
$DESTDIR.

So if the files wound up as e.g. $DESTDIR/bin/bluefish instead of $DESTDIR/$PREFIX/bin/bluefish then when 
jhbuild went back to do the move it wouldn't be able to find the files. That's where I'd start 
investigating:

'Ignoring uninstalled package:' is from the triggers feature. I don't know anything about that, but 
there's a triggers/README in the jhbuild source tree with a brief description.

Regards,
John Ralls


John,
on occasion I learned more about jhbuild internals, which is nice. In the past I was doing some hacks for 
building, however, it seems that actually I could have used jhbuild functionality to do the same.
I am using autotools (make) to build my program.
It seems that jhbuild operates not exactly how you described.
$PREFIX on my system is set to /Users/andrius/gtk/inst (judging by --prefix during autogen). This is 
getting set in jhbuildrc file, I think.
Install is done with following command:
make DESTDIR=/Users/andrius/gtk/inst/_jhbuild/root-bluefish install
and then make adds its own prefix /usr/local (which is I think pretty standard for Linux program), so 
resulting install directory is
/Users/andrius/gtk/inst/_jhbuild/root-bluefish/usr/local/ where bin, share etc folders are created.
<image.png>
In does not looks like install is done in $DESTDIR/$PREFIX, one also should take into account extra 
prefix added for Linux. While code of jhbuild uses the same $PREFIX for both DESTDIR, and install dir, 
which does not look right for me. 
Is there any workaroud?
Andrius

Have read once again make manual, and it seems that I am not passing --prefix to configure correctly. 
Bluefish is using two-step configure (first autogen.sh, and then configure), and it seems --prefix is 
getting lost in between. Thats might be a cause why in uses /usr/local prefix.
Andrius

Yes, that's what /usr/local in the path implies. You didn't say before that's what the path in $DESTDIR was.

If you don't set autogen-sh or if you set it to "autogen.sh" then jhbuild expects the GNOME-standard 
behavior of passing autogenargs including prefix to autopen.sh for forwarding to configure.

It might work to set autogen-sh="autoreconf". If it doesn't then you'll need to set 
autogen-template="pushd %(srcdir)s &amp;&amp; ./autogen.sh &amp;&amp; automake -ac &amp;&amp; popd 
&amp;&amp; %(srcdir)s/configure --prefix %(prefix)s  %(autogenargs)s" and leave autogen-sh unset.

Regards,
John Ralls


Hi John,
thanks for your suggestion, configuring autogen-template solved my issue. For reference, I used
autogen-template="pushd %(srcdir)s &amp;&amp; ./autogen.sh %(autogenargs)s &amp;&amp; popd &amp;&amp; 
%(srcdir)s/configure --prefix %(prefix)s"
Thanks for the help!
Andrius

Great, but please remember to copy the list so that everybody knows.

Regards,
John Ralls




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]