Bug 1151870 - gnucash-2.6.4-1.fc20.x86_64 doesn't launch
Summary: gnucash-2.6.4-1.fc20.x86_64 doesn't launch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gnucash
Version: 20
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-12 21:20 UTC by Jonathan Kamens
Modified: 2015-01-28 21:40 UTC (History)
5 users (show)

Fixed In Version: gnucash-2.6.5-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-01-26 02:30:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Jonathan Kamens 2014-10-12 21:20:40 UTC
gnucash-2.6.4-1.fc20.x86_64, to which I upgraded today, won't launch. Backtrace (the output of /usr/bin/gnucash) is below. "sudo yum downgrade gnucash" to 2.4.13-5.fc20 makes the problem go away. So does installing 2.6.3-1.fc20.

Backtrace:
In ice-9/boot-9.scm:
 157: 16 [catch #t #<catch-closure 1149100> ...]
In unknown file:
   ?: 15 [apply-smob/1 #<catch-closure 1149100>]
In ice-9/boot-9.scm:
3597: 14 [process-use-modules (((gnucash price-quotes)))]
 702: 13 [map #<procedure 10e9540 at ice-9/boot-9.scm:3597:25 (mif-args)> ((#))]
3598: 12 [#<procedure 10e9540 at ice-9/boot-9.scm:3597:25 (mif-args)> (#)]
2864: 11 [resolve-interface (gnucash price-quotes) #:select ...]
2789: 10 [#<procedure f9d400 at ice-9/boot-9.scm:2777:4 (name #:optional autoload version #:key ensure)> # ...]
3065: 9 [try-module-autoload (gnucash price-quotes) #f]
2401: 8 [save-module-excursion #<procedure 283d480 at ice-9/boot-9.scm:3066:17 ()>]
3085: 7 [#<procedure 283d480 at ice-9/boot-9.scm:3066:17 ()>]
In unknown file:
   ?: 6 [primitive-load-path "gnucash/price-quotes" ...]
In gnucash/price-quotes.scm:
  41: 5 [#<procedure 289efe0 ()>]
In ice-9/boot-9.scm:
3597: 4 [process-use-modules (((www main)))]
 702: 3 [map #<procedure 10e9540 at ice-9/boot-9.scm:3597:25 (mif-args)> ((#))]
3598: 2 [#<procedure 10e9540 at ice-9/boot-9.scm:3597:25 (mif-args)> ((www main))]
2867: 1 [resolve-interface (www main) #:select ...]
In unknown file:
   ?: 0 [scm-error misc-error #f "~A ~S" ("no code for module" (www main)) #f]

ERROR: In procedure scm-error:
ERROR: no code for module (www main)

Comment 1 Bill Nottingham 2014-10-13 03:11:08 UTC
Haven't seen this problem here on F20 x86_64. What guile do you have installed?

Comment 2 Jonathan Kamens 2014-10-13 03:13:55 UTC
guile-2.0.11-1.fc20.x86_64

Comment 3 Chris Rorvick 2014-10-16 16:39:56 UTC
I can reproduce this and confirm that downgrading resolves the issue.  With 2.4.13-5 installed I see the www/main.scm module:

    $ rpm -ql gnucash | grep www
    /usr/share/gnucash/guile-modules/www
    /usr/share/gnucash/guile-modules/www/cgi.scm
    /usr/share/gnucash/guile-modules/www/http.scm
    /usr/share/gnucash/guile-modules/www/main.scm
    /usr/share/gnucash/guile-modules/www/url.scm

The gnucash-2.6.4-1 RPM does not contain any of these files but still seems to still have a dependency on www/main.scm?

Comment 4 neyuki 2014-10-18 12:41:28 UTC
Just cleanup local guile cache before run: rm -rf ~/.cache/guile.

Comment 5 Jonathan Kamens 2014-10-18 15:54:43 UTC
>Just cleanup local guile cache before run: rm -rf ~/.cache/guile.

Yes, I tried this and it worked, but it should not be necessary. The RPM upgrade scripts need to do the necessary cleanup.

Comment 6 neyuki 2014-10-18 20:11:33 UTC
(In reply to Jonathan Kamens from comment #5)
> >Just cleanup local guile cache before run: rm -rf ~/.cache/guile.
> 
> Yes, I tried this and it worked, but it should not be necessary. The RPM
> upgrade scripts need to do the necessary cleanup.

In this case it's more a gnucash itself work, or a guile autocompilation issue, than rpm or upgrade process. I don't think upgrade process will touch somehow any user files.

Comment 7 Bill Nottingham 2014-10-25 03:34:38 UTC
CC'ing Geert, who knows more about this than I do.

We certainly can't muck around in the user cache dir on upgrade.

What would seem to be the proper thing to do would be to ship precompiled guile objects; however, I'm not having a lot of success figuring out how this would be packaged.

For everything in guile-modules, this is easily done by placing the .go files in %{libdir}/guile/2.0/site-ccache/gnucash. But for the scheme files under /scm, Guile seems to only want to load precompiled versions from the user's homedir cache, regardless of the setting of GUILE_LOAD_COMPILED_PATH. Am I missing something?

Comment 8 info@kobaltwit.be 2014-10-25 10:56:24 UTC
(In reply to Bill Nottingham from comment #7)
> CC'ing Geert, who knows more about this than I do.
> 
I'm flattered :)

> We certainly can't muck around in the user cache dir on upgrade.
> 
> What would seem to be the proper thing to do would be to ship precompiled
> guile objects; however, I'm not having a lot of success figuring out how
> this would be packaged.
> 
Agreed. This has been on the back of my mind for a while but so far I haven't gotten around to implement this.

> For everything in guile-modules, this is easily done by placing the .go
> files in %{libdir}/guile/2.0/site-ccache/gnucash. But for the scheme files
> under /scm, Guile seems to only want to load precompiled versions from the
> user's homedir cache, regardless of the setting of GUILE_LOAD_COMPILED_PATH.
> Am I missing something?

I tried locally and got the same results. After some fiddling it turns out to be an issue with how we are loading the files in gnucash.
We typically use
(load-from-path "<name>.scm")
It appears this prevents guile from using <name>.go as compiled file for <name>.scm

This can be fixed by using
(load-from-paht "<name>")

Now <name>.go will properly be used. I'm whipping up a patch for this and will push it into maint soon.

I still need to test if this change doesn't cause any issues on the other platforms we support (particularly Windows, which is still using guile 1.8).

Comment 9 info@kobaltwit.be 2014-10-26 22:16:01 UTC
Bill, this commit fixes the issue that you can't use pre-compiled scheme files in scm. This is actually a bug in guile, but I've worked around it.

If you apply this patch to your tarball, you should be able to complete the pre-compile work.

I am looking at doing this straight in the gnucash build scripts. That will take me some time however.


And as an aside I was also thinking there may be another way around this issue that doesn't need the pre-compiled scheme files at all:

If the rpm's post-install step would touch each scm file it installs, these files would be guaranteed to be newer than the existing autocompiled files and hence an autocompile would always be triggered on the next gnucash run.

I don't know very much about rpm packaging though. So perhaps such a workaround is simply "not done".

Comment 10 info@kobaltwit.be 2014-10-28 16:46:21 UTC
Oops - I seem to have forgotten to add the link to the commit:
https://github.com/Gnucash/gnucash/commit/283dfa2d8317dada0ec494f2fe933dc38320a604

Comment 11 info@kobaltwit.be 2014-12-03 20:46:30 UTC
Update: I have reworked this for the upcoming 2.6.5. Guile 2 precompilation is now part of the build system.

Comment 12 Jonathan Kamens 2014-12-03 20:51:46 UTC
Thank you!

Comment 13 Bill Nottingham 2014-12-03 21:59:25 UTC
Awesome, apologies for being so slow in trying to get this going on the Fedora side.

Comment 14 Bill Nottingham 2014-12-06 05:45:45 UTC
Scratch build (F21) at:
   http://koji.fedoraproject.org/koji/taskinfo?taskID=8313521

if others would like to test.

Comment 15 Felix Schwarz 2015-01-06 09:28:10 UTC
So this bug should go away the upgrade to 2.6.5 (bug 1176892) is pushed? Just being curious because 2.6.5 also contains some bug fixes I'm waiting for (https://bugzilla.gnome.org/show_bug.cgi?id=726891).

Comment 16 Bill Nottingham 2015-01-06 15:13:35 UTC
Yes, should get to that this week sometime.

Comment 17 Fedora Update System 2015-01-09 04:40:39 UTC
gnucash-2.6.5-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/gnucash-2.6.5-1.fc21

Comment 18 Fedora Update System 2015-01-09 04:41:22 UTC
gnucash-2.6.5-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/gnucash-2.6.5-1.fc20

Comment 19 Fedora Update System 2015-01-09 04:42:00 UTC
gnucash-2.6.5-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/gnucash-2.6.5-1.el7

Comment 20 Fedora Update System 2015-01-09 11:55:19 UTC
Package gnucash-2.6.5-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gnucash-2.6.5-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-0474/gnucash-2.6.5-1.fc20
then log in and leave karma (feedback).

Comment 21 Fedora Update System 2015-01-26 02:30:23 UTC
gnucash-2.6.5-1.fc20, gnucash-docs-2.6.5-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2015-01-26 02:34:55 UTC
gnucash-2.6.5-1.fc21, gnucash-docs-2.6.5-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2015-01-28 21:40:01 UTC
gnucash-2.6.5-1.el7, gnucash-docs-2.6.5-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.