[GNC-dev] Building MacOS/Quartz from source: environment PREFIX, CXXFLAGS, etc?
Jim DeLaHunt
list+gnucash at jdlh.com
Mon Oct 31 16:51:53 EDT 2022
On 2022-10-31 10:50, john wrote:
>
>> On Oct 31, 2022, at 12:53 AM, Jim DeLaHunt <list+gnucash at jdlh.com> wrote:
>>
>> Hi,
>>
>> I am trying to build GnuCash 4.11 from source on macOS 12.6 (M1 CPU), following the instructions at https://wiki.gnucash.org/wiki/MacOS/Quartz .
>>
>> I have finished the preliminaries, so I appear to have jhbuild running. I encounter difficulty with the command:
>>
>> jhbuild bootstrap-gtk-osx
>>
>> It throws a succession of Python KeyErrors, looking for environment variables PREFIX, CXXFLAGS, and I assume CC and CFLAGS as well. For instance
>>
>> % jhbuild bootstrap-gtk-osx
>> Loading .env environment variables...
>> Traceback (most recent call last):
>> File "/Users/gtkdeveloper/Source/jhbuild/jhbuild/config.py", line 194, in load
>> execfile(filename, config)
>> File "/Users/gtkdeveloper/Source/jhbuild/jhbuild/utils/compat.py", line 67, in execfile
>> exec(code, globals, locals)
>> File "/Users/gtkdeveloper/.config/jhbuildrc", line 474, in <module>
>> exec(compile(open(_user_rc, "rb").read(), _user_rc, 'exec'))
>> File "/Users/gtkdeveloper/.config/jhbuildrc-custom", line 3, in <module>
>> prefix = os.environ['PREFIX']
>> File "/Users/gtkdeveloper/.new_local/share/pyenv/versions/3.10.2/lib/python3.10/os.py", line 679, in __getitem__
>> raise KeyError(key) from None
>> KeyError: 'PREFIX'
>> jhbuild: could not load config file
>> %
>>
>> The wiki page MacOS/Quartz does not mention these environment variables.
>>
>> Where are they described? What values should I assign for them? I would appreciate a link to whatever page I should read next.
> Jim,
>
> Sorry.
>
> There were a couple of mistakes in gnucash-on-osx/jhbuild-custom. I just pushed a commit to fix them. With that in place, the build will default to $HOME/gnucash with subdirectories src, build, and inst, the latter being short for install. You can override that by setting PREFIX in the environment, e.g. PREFIX=$HOME/mygnucashbuild/ and jhbuild will create the subdirectories.
>
> I've updated the wiki page to reflect the current layout.
Thank you, John!
Those changes to gnucash-on-osx/jhbuild-custom seem to have been
effective. The build process is now busily filling my screen with build
chatter.
I found what looks like a very low-severity typo in a message which
jhbuild-custom prints to stdout. I propose a correction with
<https://github.com/Gnucash/gnucash-on-osx/pull/22> . I think it is not
urgent.
Best regards,
—Jim DeLaHunt
More information about the gnucash-devel
mailing list