From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pal Gloss Newsgroups: gmane.emacs.bugs Subject: bug#45303: #45303 [feature/native-comp] building error on Windows Date: Sat, 19 Dec 2020 19:07:17 +0100 Message-ID: References: <83k0te6c7i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31594"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 45303@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Dec 19 19:08:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kqgeI-00082U-U3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 19:08:11 +0100 Original-Received: from localhost ([::1]:52408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kqgeH-0006Hr-VL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Dec 2020 13:08:09 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56380) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kqgeA-0006Hj-G8 for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 13:08:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59795) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kqgeA-0007MJ-1d for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 13:08:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kqge9-0007CY-SS for bug-gnu-emacs@gnu.org; Sat, 19 Dec 2020 13:08:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pal Gloss Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Dec 2020 18:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45303 X-GNU-PR-Package: emacs Original-Received: via spool by 45303-submit@debbugs.gnu.org id=B45303.160840125027643 (code B ref 45303); Sat, 19 Dec 2020 18:08:01 +0000 Original-Received: (at 45303) by debbugs.gnu.org; 19 Dec 2020 18:07:30 +0000 Original-Received: from localhost ([127.0.0.1]:43108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqgdb-0007Bk-NX for submit@debbugs.gnu.org; Sat, 19 Dec 2020 13:07:29 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:35973) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kqgdX-0007BV-U2 for 45303@debbugs.gnu.org; Sat, 19 Dec 2020 13:07:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1608401237; bh=kKwGYPHU/0TeCozBRaXYqjchs9LSfY23qYnLXfg7L2I=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YkiMyenLDjAGEB447WEgxLt1VzXigecJDhvAI42+g1gq0hFV0yQ1jza/Xpm4rZZUf nlXItoKJUlSAAytbjKO9ePPLyus+7eQXfs3LVDO0qZKZPdAxapkK15xhDU+HGf10iZ gqEf87pDAJUDqmtYNArcgDN0XZRldxSDBH1XPOEE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [217.136.108.250] ([217.136.108.250]) by web-mail.gmx.net (3c-app-mailcom-bs10.server.lan [172.19.170.178]) (via HTTP); Sat, 19 Dec 2020 19:07:17 +0100 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:ZGZ5tqQjLOntHxKp3LEPeXlZTWSwqJ3GjmTreMN/NCMJ+o/+dZNsivLcnOnfxPIvtPk++ VRRpYcGSMcRfnSjUzAhG61UklQvB9Jm9GfU2glCZLrL476HZbfXYLK6smKJBjqFrXd7g8aDV+Trr uLtuQpeNJs9aZMr/rI/gz5NQtJTTBFjAXqEi5UytK0bn6eJOHII5vCIc8UuLHTEAb2xDksJYHn23 o+cKk2vYjdaPZFiKBjNLNBNj8tSKehpkXUevsz/uz15hGs8GQ5NE8rFLUO4E5xmF2d8lOAvBhgZ6 tw= X-UI-Out-Filterresults: notjunk:1;V03:K0:38i656oyoig=:kOFlWDILofqFCdWwNQN08Q KHb6awDj6PLclOr0NuCYL/hy1BgekfTNBMnmnA5aB+IUTp4llytCosrIYoeKjfnb0/AEXo91x D0zysbdBppBDU85/IuByb2f6Tw5eAJPgbCdtxx1OU9uFkcgfKtibmCBbmA5FxxoK7vfTiAs81 DlohyfdqYH9SJfBUJLi62lkOJJTmiPHAu8bMC/lMA4FDoyZObeLwpKB1NbW3f/qHmG1gQ3gOm In9ay377cWx6yoohSpOR9hz17KxjWCav+clgP/DX+m4ddT5GzXOV9A5GMcFennj8eMJiH5ANE dzpA84KKS5FYsyg7TXeIh3cTqSYszKB+W1lwCC9QQloz2uIwkMqAnu9bUUyX13EGKL97hlcdV ZIqqSI9yCCc9X56UT6fT1BKvYkYlSj6on8lZEPiMa5peh6Nqeds3xxMbINyoDBeaKN0cVpsK0 AC+lj3zShmER+u2kPEun2fYOeD7b5J871+f+4AaEALsTe228zoFtIwjWfGM4+q27bhLXi/UmX LygS3wqWnGpkUn+KadvnPRMiwmJSRxWvWCmbVIgiT3gKD0fT5Yxm7G9ceLEjH0Y8mSy5akTXy GcPC+NK3T96Cc= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:196407 Archived-At: Hi, thank you for the quick fixes I do not understand 3b53a591faed03679382a601b93da7fe6ce3b4af: the way I sa= w the problem is that directory-files now takes an optional COUNT paramete= r (see thread starting with https://lists.gnu.org/archive/html/emacs-devel= /2020-10/msg00691.htmlhttps://lists.gnu.org/archive/html/emacs-devel/2020-= 10/msg00691.htm) so that the compiler rightly warned that we passed a func= tion expecting 5 parameters to internal_condition_case_4 that works with a= pointer to a function with 4 arguments. I did not see any special warnin= g anymore and haven't seen it crash yet, so the change is probably OK. > > #+begin_example > > Info-default-directory-list > > ("%emacs_dir%/share/info/") > > ---------------- > > configure-info-directory > > "%emacs_dir%/share/info" > > #+end_example I just checked and these %emacs_dir% are also present in a "normal" emacs = 27.1 (installed via msys2/mingw pacman, not self-built). > Right so (unless I'm forgetting something) just the zlib linker error > should be remaining, correct? It was not only zlib that was missing, but also gccjit (my hack sets both:= LIBGCCJIT =3D -lz -lgccjit) > The Windows port is a bit rusty, I believe nobody compiled it since 6+ > months, is good we resurrect it and keep it running. I was not able to build libgccjit before, but now it is in MSYS2/MINGW pac= man, I can build from time to time. Kind regards, =2D- Pal Gloss For reference, here are the commands I used for my latest build #+begin_src shell :exports code git rev-parse HEAD feature/native-comp ; gcc --version #+end_src : 3b53a591faed03679382a601b93da7fe6ce3b4af : 3b53a591faed03679382a601b93da7fe6ce3b4af : gcc.exe (Rev6, Built by MSYS2 project) 10.2.0 : Copyright (C) 2020 Free Software Foundation, Inc. : This is free software; see the source for copying conditions. There is = NO : warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPO= SE. * Linker errors There are 2 linker errors that prevent advancing: zlib and libgccjit. There is also an issue with strsignal which I will not care about just yet : C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x= 86_64-w64-mingw32/bin/ld.exe: comp.o: in function `md5_gz_stream': : C:\msys64\home\cramaph1\emacs-native-comp\build\src/../../emacs/src/comp= .c:713: undefined reference to `inflateInit2_' : C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x= 86_64-w64-mingw32/bin/ld.exe: C:\msys64\home\cramaph1\emacs-native-comp\bu= ild\src/../../emacs/src/comp.c:730: undefined reference to `inflate' : C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x= 86_64-w64-mingw32/bin/ld.exe: C:\msys64\home\cramaph1\emacs-native-comp\bu= ild\src/../../emacs/src/comp.c:741: undefined reference to `inflateEnd' : C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x= 86_64-w64-mingw32/bin/ld.exe: C:\msys64\home\cramaph1\emacs-native-comp\bu= ild\src/../../emacs/src/comp.c:741: undefined reference to `inflateEnd' : C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/10.2.0/../../../../x= 86_64-w64-mingw32/bin/ld.exe: comp.o: in function `declare_imported_func': : C:\msys64\home\cramaph1\emacs-native-comp\build\src/../../emacs/src/comp= .c:973: undefined reference to `gcc_jit_type_get_const' #+begin_src shell :exports code pacman -S --needed base-devel \ mingw-w64-x86_64-toolchain \ mingw-w64-x86_64-xpm-nox \ mingw-w64-x86_64-libtiff \ mingw-w64-x86_64-giflib \ mingw-w64-x86_64-libpng \ mingw-w64-x86_64-libjpeg-turbo \ mingw-w64-x86_64-librsvg \ mingw-w64-x86_64-lcms2 \ mingw-w64-x86_64-jansson \ mingw-w64-x86_64-libxml2 \ mingw-w64-x86_64-gnutls \ mingw-w64-x86_64-zlib \ mingw-w64-x86_64-harfbuzz \ mingw-w64-x86_64-libgccjit PROCESSORS_TO_USE=3D"3" EMACS_VERSION=3Demacs-native-comp ./autogen.sh mkdir -p ../build cd ../build ../emacs/configure \ --with-xml2 \ --without-pop \ --prefix=3D"/home/cramaph1/$EMACS_VERSION/dest" \ --without-compress-install \ --without-dbus \ --with-nativecomp \ --with-modules 'CFLAGS=3D-O2 -g3' # fix 2 linker errors by making sure the correct libraries are added to = the linker command sed -i -e 's/^LIBGCCJIT =3D *$/LIBGCCJIT =3D -lz -lgccjit/' src/Makefile make -j"$PROCESSORS_TO_USE" && make install #+end_src