Unpredictable make -- possibly related to intl-scm/guile-strings.c

Jeff Kletsky gnucash at allycomm.com
Thu Mar 11 01:08:31 EST 2010


This pretty much looks like a build system problem:

# Clean everything out
# the build directory

rm -rf gnucash-build/
mkdir gnucash-build

# and the working repository

cd gnucash-devel/
rm -rf *
rm .gitignore

# Get the "good" version, totally fresh

git checkout edd8b26
git reset --hard

# Build the good version

./autogen.sh
cd ../gnucash-build/
cat /home/jeff/test-builds/test_build.sh
../configure --enable-ofx --enable-aqbanking --prefix=/opt/gnucash 
--with-html-engine=webkit
../gnucash-devel/configure --enable-ofx --enable-aqbanking 
--prefix=/opt/gnucash --with-html-engine=webkit
make -j4
make install

# try the good version -- it is good

/opt/gnucash/bin/gnucash --nofile

# Ok, check out the "broken" version

cd ../gnucash-devel/
git checkout df0f85d

# Build the broken version

cd ../gnucash-build/
../gnucash-devel/configure --enable-ofx --enable-aqbanking 
--prefix=/opt/gnucash --with-html-engine=webkit
make clean
make -j4
make install

# Though it shouldn't, it tests out "good"

/opt/gnucash/bin/gnucash --nofile

# Nail-in-the-coffin -- build from exactly the same source, but from a 
different build directory

cd ..
mkdir gnucash-build2
cd gnucash-build2/
../gnucash-devel/configure --enable-ofx --enable-aqbanking 
--prefix=/opt/gnucash --with-html-engine=webkit
make clean
make -j4
make install

# and, when built from the different directory, it fails, as it "should"

/opt/gnucash/bin/gnucash --nofile


Jeff Kletsky wrote:
> I've been running in circles for the last several days with a problem 
> that manifests itself when, from what I can tell, the code in engine.i 
> tries to create Guile variables using the SET_ENUM construct. The 
> console, in my case, reports
>
> Backtrace:
> In current input:
> 1: 0* (set! OPTION-SECTION-ACCOUNTS (OPTION-SECTION-ACCOUNTS))
>
> <unnamed port>:1:1: In expression (set! OPTION-SECTION-ACCOUNTS 
> (OPTION-SECTION-ACCOUNTS)):
> <unnamed port>:1:1: Unbound variable: OPTION-SECTION-ACCOUNTS
>
>
> This has been especially hard to track down as the order of compiling 
> different (git) checkouts of the source code changes the result.
>
> I don't know if it is a git/make problem, or something not quite right 
> in the GNUCash build process.
>
> I can, for example,
> 0) Run some builds
> 1) Checkout df0f85d and have it work
> 2) Checkout 8b062ba and have it fail
> 3) Checkout df0f85d (again) and have it fail this time
>
> or
>
> 4) Checkout edd8b26 and have it work (as it should)
> 5) Checkout df0f85d and have it work (which it does NOT if built in a 
> "fresh" directory)
>
> From what I can tell, the only file different in the source tree 
> between (1) and (3) in this case was intl-scm/guile-strings.c
>
> Compilation is being done out of a different directory than where the 
> source resides.
>
> I've confirmed that df0f85d is "bad" by checking it out into a clean 
> directory and compiling it either there, or in another build directory.
>
> I've tried:
> * make clean
> * removing the install target directories
> * re-running configure
>
> The non-comment differences between edd8b26 and df0f85d are:
>
> diff --git a/src/libqof/qof/qofbookslots.h 
> b/src/libqof/qof/qofbookslots.h
> index d01d10b..93287eb 100644
> --- a/src/libqof/qof/qofbookslots.h
> +++ b/src/libqof/qof/qofbookslots.h
>
> +#include <glib/gi18n.h>
> -#define KVP_OPTION_PATH         "options"
> -#define OPTION_SECTION_ACCOUNTS "Accounts"
> -#define OPTION_NAME_TRADING_ACCOUNTS "Trading Accounts"
> +#define KVP_OPTION_PATH  "options"
> +#define OPTION_SECTION_ACCOUNTS        _("Accounts")
> +#define OPTION_NAME_TRADING_ACCOUNTS   _("Trading Accounts")
>
>
> There doesn't seem to be any significant differences in the source 
> directories between "wrongly working" df0f85d and "properly failing" 
> df0f85d:
>
> jeff at fx:~$ diff -rq state.16/gnucash-devel/ state.17/should-be-bad/
> Files state.16/gnucash-devel/src/doc/design/gnucash-design.info and 
> state.17/should-be-bad/src/doc/design/gnucash-design.info differ
> Files state.16/gnucash-devel/src/doc/design/stamp-vti and 
> state.17/should-be-bad/src/doc/design/stamp-vti differ
> Files state.16/gnucash-devel/src/doc/design/version.texi and 
> state.17/should-be-bad/src/doc/design/version.texi differ
>
> I'm thinking that something isn't right in the build process, probably 
> related to the generation of Guile-related translations.
>
> Does this sound familiar to anyone?
>
> I'd rather not have to do a fresh checkout and compile every time I 
> take a step forward.
>
>
>
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-devel


More information about the gnucash-devel mailing list