Re: [fpc-devel] Getting error building fpc for clang 16
On 09/12/2023 17:03, Martin Frb via fpc-devel wrote: Anyway, I changed the make make install INSTALL_PREFIX=/home/m/fpc/$INSTPATH/gw3 OPT=" -Clv16.0 " LLVM=1 Then next it fails, with the same error on make clean Yes, it tries to compile a file while doing "make clean" Interestingly, "make clean" refuses to start, unless it has a compiler in path (ok, even if it should not need it, as it should not compile anything...) As Tomas mentioned, this is required to know which target to clean. You can try specifying FPC=$PWD/compiler/ppcx64 when doing the "make install" to ensure it has the same default target as the one that was just built. If all else fails, you can try remake to see why it is recompiling things: https://github.com/rocky/remake/ Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Getting error building fpc for clang 16
On 09/12/2023 10:50, Jonas Maebe via fpc-devel wrote: On 07/12/2023 13:52, Martin Frb via fpc-devel wrote: I also looked for msg2inc. And msg2inc was compiled before Maybe check the timestamps of compiler/msg*.inc, compiler/utils/msg2inc.pp and compiler/msg/errore.msg. Perhaps some of those have timestamps far in the future? The seem ok to me. Either checkout date, or build date. Anyway, I changed the make make install INSTALL_PREFIX=/home/m/fpc/$INSTPATH/gw3 OPT=" -Clv16.0 " LLVM=1 Then next it fails, with the same error on make clean Yes, it tries to compile a file while doing "make clean" Interestingly, "make clean" refuses to start, unless it has a compiler in path (ok, even if it should not need it, as it should not compile anything...), but then it uses source/compiler/ppc1 make[8]: '/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux' is up to date. make[8]: Leaving directory '/home/m/fpc/rel_3.3.1/source/rtl/linux' as --64 -o /home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux/abitag.o x86_64/abitag.as /home/m/fpc/rel_3.3.1/source/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fix86_64 -FE. -FU/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -O-1 -gw3 -dx86_64 -dRELEASE -Us -Sg system.pp /home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux/system.ll:9990:76: error: expected '(' define void @"\01SYSTEM_$$_STRPAS$PANSICHAR$$SHORTSTRING"([256 x i8]* sret noalias nocapture %p.$result, i8* %p.p) inlinehint nobuiltin "null-pointer-is-valid"="true" strictfp !dbg !1643 { ^ 1 error generated. -- the files with date, after "make all" before "make install" got started: [m@fedora fpc]$ find rel_3.3.1/source/ -name '*msg2inc*' | xargs ls -la -rwxr-xr-x. 1 m m 341048 Dec 9 12:12 rel_3.3.1/source/compiler/utils/msg2inc -rw-r--r--. 1 m m 20180 Dec 6 23:07 rel_3.3.1/source/compiler/utils/msg2inc.pp -rw-r--r--. 1 m m 63416 Dec 9 12:12 rel_3.3.1/source/compiler/utils/units/x86_64-linux/msg2inc.o [m@fedora fpc]$ ls -la rel_3.3.1/source/compiler/msg*inc* -rw-r--r--. 1 m m 47096 Dec 6 23:07 rel_3.3.1/source/compiler/msgidx.inc -rw-r--r--. 1 m m 112167 Dec 6 23:07 rel_3.3.1/source/compiler/msgtxt.inc [m@fedora fpc]$ ls -la rel_3.3.1/source/compiler/msg/* -rw-r--r--. 1 m m 139307 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorct.msg -rw-r--r--. 1 m m 244571 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorda.msg -rw-r--r--. 1 m m 304534 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errord.msg -rw-r--r--. 1 m m 305647 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errordu.msg -rw-r--r--. 1 m m 291024 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errore.msg -rw-r--r--. 1 m m 246429 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errores.msg -rw-r--r--. 1 m m 250649 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorfi.msg -rw-r--r--. 1 m m 105908 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorf.msg -rw-r--r--. 1 m m 151642 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorhe.msg -rw-r--r--. 1 m m 258978 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorheu.msg -rw-r--r--. 1 m m 248955 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorid.msg -rw-r--r--. 1 m m 188895 Dec 6 23:07 rel_3.3.1/source/compiler/msg/erroriu.msg -rw-r--r--. 1 m m 241199 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorn.msg -rw-r--r--. 1 m m 136463 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorpli.msg -rw-r--r--. 1 m m 136451 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorpl.msg -rw-r--r--. 1 m m 220070 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorpt.msg -rw-r--r--. 1 m m 255864 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorptu.msg -rw-r--r--. 1 m m 177521 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorr.msg -rw-r--r--. 1 m m 347094 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorru.msg -rw-r--r--. 1 m m 246714 Dec 6 23:07 rel_3.3.1/source/compiler/msg/errorues.msg ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Getting error building fpc for clang 16
On 07/12/2023 13:52, Martin Frb via fpc-devel wrote: I also looked for msg2inc. And msg2inc was compiled before Maybe check the timestamps of compiler/msg*.inc, compiler/utils/msg2inc.pp and compiler/msg/errore.msg. Perhaps some of those have timestamps far in the future? Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Getting error building fpc for clang 16
On 07/12/2023 13:52, Martin Frb via fpc-devel wrote: On 07/12/2023 12:19, Jonas Maebe via fpc-devel wrote: On 2023-12-07 01:09, Martin Frb via fpc-devel wrote: But I am getting make[8]: '/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux' is up to date. make[8]: Leaving directory '/home/m/fpc/rel_3.3.1/source/rtl/linux' as --64 -o /home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux/abitag.o x86_64/abitag.as /home/m/fpc/rel_3.3.1/source/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fix86_64 -FE. -FU/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE -Us -Sg system.pp The -Clv parameter is missing here for some reason, so the compiler is generating code for LLVM 7.0 rather than 16.0. It seems to happen during "make install". Strange, why does it compile during installation? Starting compiler is 3.2.2 I should mention that the compiler is not installed to /usr/ , nor anywhere in a global available place. (As I have several versions on that machine, I made sure non of them has anything in a place where it could be found by others. (that includes no /etc/fpc.cfg, nor fpc.cfg in my home dir. / each fpc has an fpc.cfg inside its install dir) But before the make is called the PATH is set to include the 3.2.2 fpc. I use identical setup on several Linux boxes, including the one that successfully build with clang 11 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Getting error building fpc for clang 16
On 07/12/2023 12:19, Jonas Maebe via fpc-devel wrote: On 2023-12-07 01:09, Martin Frb via fpc-devel wrote: But I am getting make[8]: '/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux' is up to date. make[8]: Leaving directory '/home/m/fpc/rel_3.3.1/source/rtl/linux' as --64 -o /home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux/abitag.o x86_64/abitag.as /home/m/fpc/rel_3.3.1/source/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fix86_64 -FE. -FU/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE -Us -Sg system.pp The -Clv parameter is missing here for some reason, so the compiler is generating code for LLVM 7.0 rather than 16.0. It seems to happen during "make install". Strange, why does it compile during installation? My script issues the following commands: (I am using the same on another machine with clang 11) make clean make all OPT=" " OPTNEW=" -Clv16.0 " FPCMAKEOPT=" -Clv16.0 " LLVM=1 make install INSTALL_PREFIX=/home/m/fpc/$INSTPATH/def LLVM=1 The captured output does not have the commands itself, only the output The "100%" should still be from the "make all" (there is no install in the text before that) I assume "installbase" is the start of the output of above make install. And then it starts the compiler Why? Before that there are 10 other occurrences of "Entering directory '/home/m/fpc/rel_3.3.1/source/compiler/utils'" [100%] Compiled package utils-wasmbin make[2]: Leaving directory '/home/m/fpc/rel_3.3.1/source/utils' make[1]: Leaving directory '/home/m/fpc/rel_3.3.1/source' /usr/bin/echo Build > build-stamp.x86_64-linux /usr/bin/echo Build > base.build-stamp.x86_64-linux make installbase FPC=/home/m/fpc/rel_3.3.1/source/compiler/ppcx64 ZIPDESTDIR=/home/m/fpc/rel_3.3.1/source FPCMAKE=/home/m/fpc/rel_3.3.1/source/utils/fpcm/bin/x86_64-linux/fpcmake make[1]: Entering directory '/home/m/fpc/rel_3.3.1/source' /usr/bin/install -m 755 -d /home/m/fpc/rel_3.3.1/clang64/def/lib/fpc/3.3.1 /usr/bin/install -m 755 -d /home/m/fpc/rel_3.3.1/clang64/def/bin make compiler_distinstall FPC=/home/m/fpc/rel_3.3.1/source/compiler/ppcx64 ZIPDESTDIR=/home/m/fpc/rel_3.3.1/source FPCMAKE=/home/m/fpc/rel_3.3.1/source/utils/fpcm/bin/x86_64-linux/fpcmake make[2]: Entering directory '/home/m/fpc/rel_3.3.1/source' make -C compiler distinstall make[3]: Entering directory '/home/m/fpc/rel_3.3.1/source/compiler' make quickinstall auxfilesinstall make[4]: Entering directory '/home/m/fpc/rel_3.3.1/source/compiler' make -C utils install make[5]: Entering directory '/home/m/fpc/rel_3.3.1/source/compiler/utils' /home/m/fpc/rel_3.3.1/source/compiler/ppcx64 -Ur -Xs -O2 -n -Fu.. -Fu/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE msg2inc.pp units/x86_64-linux/msg2inc.ll:663:71: error: expected '(' invoke void (i8**, i8*, i64, i64) @"\01fpc_ansistr_copy" (i8** sret %reg.1_276, i8* %reg.1_275, i64 %reg.1_274, i64 %reg.1_270) to label %.Lj88 unwind label %.Lj9 ^ 1 error generated. Error: Error while assembling exitcode 1 = I also looked for msg2inc. And msg2inc was compiled before msg2inc.pp is only twice in the log. As below, and as in the error above Without the pp extension it is present in a few "rm". All above the below snippet make[5]: Leaving directory '/home/m/fpc/rel_3.3.1/source/compiler/utils' /home/m/fpc/rel_3.3.1/source/compiler/ppcx64 -Clv16.0 -Ur -Xs -O2 -n -Fu.. -Fu/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE mka64ins.pp /home/m/fpc/rel_3.3.1/source/compiler/ppcx64 -Clv16.0 -Ur -Xs -O2 -n -Fu.. -Fu/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE mkarmins.pp /home/m/fpc/rel_3.3.1/source/compiler/ppcx64 -Clv16.0 -Ur -Xs -O2 -n -Fu.. -Fu/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE mkx86ins.pp /home/m/fpc/rel_3.3.1/source/compiler/ppcx64 -Clv16.0 -Ur -Xs -O2 -n -Fu.. -Fu/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE msg2inc.pp /home/m/fpc/rel_3.3.1/source/compiler/ppcx64 -Clv16.0 -Ur -Xs -O2 -n -Fu.. -Fu/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE mkx86inl.pp /home/m/fpc/rel_3.3.1/source/compiler/ppcx64 -Clv16.0 -Ur -Xs -O2 -n -Fu.. -Fu/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -FE. -FUunits/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE mkz80ins.pp make[4]: Leaving directory '/home/m/fpc/rel_3.3.1/source/compiler/utils' make[3]: Leaving
Re: [fpc-devel] Getting error building fpc for clang 16
On 2023-12-07 01:09, Martin Frb via fpc-devel wrote: But I am getting make[8]: '/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux' is up to date. make[8]: Leaving directory '/home/m/fpc/rel_3.3.1/source/rtl/linux' as --64 -o /home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux/abitag.o x86_64/abitag.as /home/m/fpc/rel_3.3.1/source/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fix86_64 -FE. -FU/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE -Us -Sg system.pp The -Clv parameter is missing here for some reason, so the compiler is generating code for LLVM 7.0 rather than 16.0. Jonas ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
[fpc-devel] Getting error building fpc for clang 16
I was trying to build an fpc for clang 16 (same commands worked on a diff machine for clang 11) I changed the version in the make line: make all OPT=" " OPTNEW=" -Clv16.0 " FPCMAKEOPT=" -Clv16.0 " LLVM=1 I also tried version 16.0.6 fpc 49cb7b256476409924c581145a760b863b9e755d (I had tried earlier with an older fpc on that machine. I don't know if the error was the same) clang --version clang version 16.0.6 (Fedora 16.0.6-3.fc38) Target: x86_64-redhat-linux-gnu Thread model: posix InstalledDir: /usr/bin But I am getting make[8]: '/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux' is up to date. make[8]: Leaving directory '/home/m/fpc/rel_3.3.1/source/rtl/linux' as --64 -o /home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux/abitag.o x86_64/abitag.as /home/m/fpc/rel_3.3.1/source/compiler/ppc1 -Ur -Ur -Xs -O2 -n -Fi../inc -Fi../x86_64 -Fi../unix -Fix86_64 -FE. -FU/home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux -Cg -Fl/usr/lib/gcc/x86_64-redhat-linux/13 -dx86_64 -dRELEASE -Us -Sg system.pp /home/m/fpc/rel_3.3.1/source/rtl/units/x86_64-linux/system.ll:9713:76: error: expected '(' define void @"\01SYSTEM_$$_STRPAS$PANSICHAR$$SHORTSTRING"([256 x i8]* sret noalias nocapture %p.$result, i8* %p.p) inlinehint nobuiltin "null-pointer-is-valid"="true" strictfp { ^ 1 error generated. system.pp(747,1) Error: Error while assembling exitcode 1 system.pp(747,1) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted make[7]: *** [Makefile:2870: system.ppu] Error 1 make[7]: Leaving directory '/home/m/fpc/rel_3.3.1/source/rtl/linux' make[6]: *** [Makefile:2367: linux_all] Error 2 make[6]: Leaving directory '/home/m/fpc/rel_3.3.1/source/rtl' make[5]: *** [Makefile:5486: rtl] Error 2 make[5]: Leaving directory '/home/m/fpc/rel_3.3.1/source/compiler' make[4]: *** [Makefile:5319: next] Error 2 make[4]: Leaving directory '/home/m/fpc/rel_3.3.1/source/compiler' make[3]: *** [Makefile:5327: ppc2] Error 2 make[3]: Leaving directory '/home/m/fpc/rel_3.3.1/source/compiler' make[2]: *** [Makefile:5337: cycle] Error 2 make[2]: Leaving directory '/home/m/fpc/rel_3.3.1/source/compiler' make[1]: *** [Makefile:3256: compiler_cycle] Error 2 make[1]: Leaving directory '/home/m/fpc/rel_3.3.1/source' make: *** [Makefile:3288: build-stamp.x86_64-linux] Error 2 ___ fpc-devel maillist - fpc-devel@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel