Subject: emacs
From: Han Boetes <[email-masked]>
To: [email-masked]
Date: Mon, 8 Nov 2021 17:44:54 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

I compiled emacs with native compilation on OpenBSD-7.0 amd64 like this:

    export CC=egcc \
           CPP="ecpp" \
           CPPFLAGS="-I/usr/local/include" \
           LDFLAGS="-L/usr/local/lib"
    ./autogen.sh
    ./configure --without-makeinfo --without-x --mandir=/usr/local/man --with-native-compilation
    gmake

egcc (GCC) 11.2.0, is just gcc-11 which is traditionally installed as
egcc to avoid conflicts with the usually somewhat older gcc in base.

Now if I start emacs with:

    emacs -nw -Q ~/.config/emacs/init.el

The file init.el is not loaded and I get a single error message:

    Symbol’s function definition is void: regexp-opt-group

After which emacs works OK, for example c-x c-f ~/.config/emacs/init.el works as expected.

Then I recompiled emacs without native compilation and the error did not occur.

And now to make the case even more mysterious, if I start emacs normally, like:

    emacs -nw ~/.config/emacs/init.el

Everything works fine. I accidentally discovered the problem by
running emacs as a test user without configuration.

Please let me know if there is anything I can do to help debugging this problem.

# Han