Subject: bug#45303: #45303 [feature/native-comp] building error on Windows

From: Pal Gloss <[email-masked]>
Date: Sun, 20 Dec 2020 17:23:25 +0100

Hi Andrea,
 
Sorry for sending my previous mail to your address only and not to the bug tracker.
I'm not used to debbugs (as you can guess from the many HTML mails I sent, blush).

I wrote 
> > I do not understand 3b53a591faed03679382a601b93da7fe6ce3b4af: the way
You answered
> No you are right, this morning I was a little in a rush and I might have
> failed grepping, hopefully ab985f41db is better.

There are still problems related to the usage of Fdirectory_files and
internal_condition_case_5 I think.  At least, I get a crash after the
bootstrap is dumped (? see attached build log)

    Debugger entered--Lisp error: (wrong-type-argument wholenump t)

> With 407fb16583 I think '-lgccjit' should be unnecessary on Windows now, is it?

It is still needed, see my previous mail.  But adding -lgccjit allows the build
to proceed but crashes later on.

Can I propose a patch if I have not signed the paperwork?

Thank you for this great new feature.

These are the commands I ran to produce the attached build log:
#+begin_src shell :exports code
  (
      PROCESSORS_TO_USE="3"
      EMACS_VERSION="emacs-native-comp"
      cd ../emacs
      rm -rf ../build
      git restore .
      git status
      git rev-parse HEAD
      gcc --version
      ./autogen.sh
      mkdir -p ../build
      cd ../build
      ../emacs/configure \
          --with-xml2 \
          --without-pop \
          --prefix="/home/cramaph1/$EMACS_VERSION/dest" \
          --without-compress-install \
          --without-dbus \
          --with-nativecomp \
          --with-modules 'CFLAGS=-O2 -g3'
      # fix linker errors by making sure the correct libraries are added to the linker command
      sed -i -e 's/^LIBGCCJIT = *$/LIBGCCJIT = -lz -lgccjit/' src/Makefile
      make -j"$PROCESSORS_TO_USE"
      make install
  ) 2>&1 | tee /tmp/emacs-$(git rev-parse HEAD)-lz-lgccjit.log
#+end_src