Please describe the problem: I am using gentoo system that uses "USE" flags to enable/disable package functionality. Similar to --with/--without flags. When I upgraded new guile 1.8 (from 1.6) - all extra functionality was disabled by default. When I launched gnucash, it complained about missing "deprecated" functionality, so I added the "deprecated" flag. However, then gnucash would crash with the following trace: Backtrace: In unknown file: ?: 0* [primitive-load-path "qif-import/qif-parse.scm"] In /usr/share/gnucash/scm/qif-import/qif-parse.scm: 8: 1* (define qif-category-compiled-rexp #) 9: 2* (make-regexp "^ *(\\[)?([^]/\\|]*)(]?)(/?)([^\\|]*)(\\|(\\[)?([^]/]*)(] ?)(/?)(.*))? *$") /usr/share/gnucash/scm/qif-import/qif-parse.scm:9:3: In expression (make-regexp "^ *(\\[)?([^]/\\|]*)(]?)(/?)([^\\|]*)(\\|(\\[)?([^]/]*)(]?)(/?)(.*))? *$"): /usr/share/gnucash/scm/qif-import/qif-parse.scm:9:3: Unbound variable: make-regexp After spending an hour recompiling packages and searching the internet, I accidentally saw the "regex" flag for guile and linked that with "make-regexp" failing. Enabling the flag solved all the problems. Steps to reproduce: 1. Use guile 1.8.1 without regexp 2. Launch gnucash Actual results: Backtrace: In unknown file: ?: 0* [primitive-load-path "qif-import/qif-parse.scm"] In /usr/share/gnucash/scm/qif-import/qif-parse.scm: 8: 1* (define qif-category-compiled-rexp #) 9: 2* (make-regexp "^ *(\\[)?([^]/\\|]*)(]?)(/?)([^\\|]*)(\\|(\\[)?([^]/]*)(] ?)(/?)(.*))? *$") /usr/share/gnucash/scm/qif-import/qif-parse.scm:9:3: In expression (make-regexp "^ *(\\[)?([^]/\\|]*)(]?)(/?)([^\\|]*)(\\|(\\[)?([^]/]*)(]?)(/?)(.*))? *$"): /usr/share/gnucash/scm/qif-import/qif-parse.scm:9:3: Unbound variable: make-regexp Expected results: Display message "guile is compiled without regex support" Does this happen every time? Yes Other information:
(FWIW, the gentoo ebuild for gnucash implements this check.) The gnucash configure script should check for required guile features, though it wouldn't have caught this either. The only solution would be to check for all required features at run-/init-time.
Gentoo ebuild did not implement either deprecated or regexp flags check. I know this because when I emerged gnucash it didn't complain. It only informed about deprecated flag *after* I ran it (so I had to re-emerge guile). It would actually be nice to include those checks in the ebuild, so people wouldn't have to recompile everything *afterwards*. I'll try post a bug/request to the gentoo ebuild maintainer. But if there was a way to trap "make-regexp" exception within gnucash and display a more meaningful error message - that would help too. I haven't tried compiling from source, but I have a feeling someone compiling on a machine where guile is w/o regexp support won't see any warning? Of course this all may be in a README somewhere, and should've RTFM, but I'm just too used to gentoo doing all the hard work for me. :-)
triage: I think this is no longer an issue
@gjanssens - I thought initially CMake could detect guile-regex, but it seems that runtime guile *can* be compiled without regex, so, I agree we can autodetect regex support in utilities.scm and emit error if it's not found. Alternatively qif-parse (and transaction report's regex matcher) can be disabled if regex is not found.
fixed in maint. qif-import is disabled if guile has no regex.