Thanks Philippe,

that was spot on! I already had installed bison via brew but forgotten to put 
it into the PATH, so still the macOS version was used.

I also got another compile error:


gnubg.c:4317:38: error: use of undeclared identifier 
'rl_filename_quote_characters'; did you mean 'rl_completer_quote_characters'?

    rl_basic_word_break_characters = rl_filename_quote_characters = 
szCommandSeparators;

                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

                                     rl_completer_quote_characters

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/readline/readline.h:110:15:
 note: 'rl_completer_quote_characters' declared here

extern char             *rl_completer_quote_characters;

The readline version by brew was incompatible to the once shipped with Xcode. 
This issue I sidestepped by temporarily removing the "readline" folder in 
Xcode. Not a perfect solution, but now it compiled!

The resulting gnubg was playable, also the tutor mode worked.

I noticed two things:

  1.  Animations were gone, everything felt quite clunky.
  2.  When an additional window pops up (like one for equity tables or a small 
one to press cancel/ok), it would not have the focus and clicking a button with 
the mouse wouldn't work. I first had to click the top of the window to give it 
focus.

So in summary: Everything somewhat works on macOS, but for the tutor mode it 
still feels better to use it in a virtual machine running Linux.

Best, Carsten


________________________________
Von: Philippe Michel <[email protected]>
Gesendet: Dienstag, 3. Januar 2023 22:08
An: Carsten Wenderdel <[email protected]>
Cc: [email protected] <[email protected]>
Betreff: Re: Development - an outsider’s perspective

On Sat, Dec 24, 2022 at 12:46:44PM +0000, Carsten Wenderdel wrote:

> 1. Build issues
>
> Last weekend I tried to compile gnubg on my M1 Mac and I couldn’t make
> it compile under macOS.

A few months ago I was contacted by someone who was trying to do exactly
that.

There were a few issues in the source code and in the lack of
documentation for the process but I think the former have beed fixed
now.

The first obstacle was that some of Apple development tools, at least
bison, are too old (probably stuck at an earlier GPL licence). You would
need either those from Homebrew or Macports ; you will need some
libraries from them anyway.

If either of these packages managers is available and the prerequisites
detailed in the INSTALL file from the sources distribution installed

./autogen.sh
./configure <with possibly some adequate options>
make

should complete.

I don't have the exact log of what he finally did (he used homebrew),
but he could build a working version with the GUI enabled. The only
obvious issue was that the Tutor mode didn't work but he wasn't
interested in investigating that at the time.

Reply via email to