FPC console executables on Arch have blank output lazarus / 1-Linux ---------------------------------------------------------------------- Laphicet · 2022-09-03 20:25 So I've been trying to code with FPC on Arch. The compiler and its tools are fine, but when I compile and run so much as a "Hello, world" program, nothing is output to the terminal when executed. I even copy and pasted a Tao Yue code snippet to see if I did something wrong missed by the compiler. That, too, was not output. C code works, Rust code works, but for some reason not FPC. The compiler issues no warnings or errors on it. ---------------------------------------------------------------------- MarkMLl · 2022-09-03 20:42 (1) Put a concise example in code tags, (2) say exactly how you're compiling and running it, (3) say in the body of your message what version of FPC etc. you're using. If those are missing we quite simply don't have enough info to help. MarkMLl ---------------------------------------------------------------------- marcov · 2022-09-03 21:47 You could also try to strace it to see what is happening. And avoid unit crt for these tests, that is a special case. ---------------------------------------------------------------------- dbannon · 2022-09-04 00:52 To be obsessively clear Laphicet, you are doing this - https://wiki.freepascal.org/Installing_the_Free_Pascal_Compiler#Testin g_the_FPC_Install   ? What way have you used to install the compiler ? ie, from Arch repos or from means described further up on page linked to above ? Davo ---------------------------------------------------------------------- Thaddy · 2022-09-04 11:38 Or AARCH vs ARCH linux? ---------------------------------------------------------------------- Bogen85 · 2022-09-28 18:02 FPC on Arch Linux x86_64 works. FPC on a Aarch64 Linux works. Waiting on @Laphicet's feedback from previous questions... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i program hellofpcworld; begin  writeln('Hello FPC world!');end.  This is on Arch Linux x86_64 Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ fpc lazforum/hellofpcworld.pas Free Pascal Compiler version 3.3.1 [2022/09/26] for x86_64Copyright (c) 1993-2022 by Florian Klaempfl and othersTarget OS: Linux for x86-64Compiling lazforum/hellofpcworld.pasLinking lazforum/hellofpcworld5 lines compiled, 0.1 sec, 141968 bytes code, 54216 bytes data ./lazforum/hellofpcworldHello FPC world! $ cat /etc/os-release NAME="Arch Linux"PRETTY_NAME="Arch Linux"ID=archBUILD_ID=rollingANSI_C OLOR="38;2;23;147;209"HOME_URL="https://archlinux.org/"DOCUMENTATION_U RL="https://wiki.archlinux.org/"SUPPORT_URL="https://bbs.archlinux.org /"BUG_REPORT_URL="https://bugs.archlinux.org/"LOGO=archlinux-logo  This is on AlmaLinux 9 aarch64 Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i $ fpc ./lazforum/hellofpcworld.pas Free Pascal Compiler version 3.2.2 [2022/08/17] for aarch64Copyright (c) 1993-2021 by Florian Klaempfl and othersTarget OS: Linux for AArch64Compiling ./lazforum/hellofpcworld.pasAssembling hellofpcworldLinking ./lazforum/hellofpcworld5 lines compiled, 0.1 secWed 28Sep22 12:58:12 /home/shared-development/fedora-almalinux-live- installers ./lazforum/hellofpcworld Hello FPC world!Wed 28Sep22 12:58:24 /home/shared-development/fedora-almalinux-live-installers $ cat /etc/os-release NAME="AlmaLinux"VERSION="9.0 (Emerald Puma)"ID="almalinux"ID_LIKE="rhel centos fedora"VERSION_ID="9.0"PLATFO RM_ID="platform:el9"PRETTY_NAME="AlmaLinux 9.0 (Emerald Puma)"ANSI_COLOR="0;34"LOGO="fedora-logo-icon"CPE_NAME="cpe:/o:almalin ux:almalinux:9::baseos"HOME_URL="https://almalinux.org/"DOCUMENTATION_ URL="https://wiki.almalinux.org/"BUG_REPORT_URL="https://bugs.almalinu x.org/" ALMALINUX_MANTISBT_PROJECT="AlmaLinux- 9"ALMALINUX_MANTISBT_PROJECT_VERSION="9.0"REDHAT_SUPPORT_PRODUCT="Alma Linux"REDHAT_SUPPORT_PRODUCT_VERSION="9.0" ---------------------------------------------------------------------- MarkMLl · 2022-09-28 18:14 Quote from: Bogen85 on September 28, 2022, 08:02:43 pmFPC on Arch Linux x86_64 works. FPC on a Aarch64 Linux works. Thanks for doing that. Comparatively few of us run Arch- although at least the Linux users are obviously very much aware of it. MarkMLl ---------------------------------------------------------------------- Seenkao · 2022-09-28 19:53 Quote from: Bogen85 on September 28, 2022, 08:02:43 pmFPC on Arch Linux x86_64 works. FPC on a Aarch64 Linux works. ARM32 - + ARM64 - + yes. Its Works. ---------------------------------------------------------------------- PascalDragon · 2022-09-29 07:09 Quote from: MarkMLl on September 28, 2022, 08:14:29 pmQuote from: Bogen85 on September 28, 2022, 08:02:43 pmFPC on Arch Linux x86_64 works. FPC on a Aarch64 Linux works. Thanks for doing that. Comparatively few of us run Arch- although at least the Linux users are obviously very much aware of it. I run Arch. Both natively on x86_64 and aarch64 and on WSL. ---------------------------------------------------------------------- MarkMLl · 2022-09-29 08:41 Quote from: PascalDragon on September 29, 2022, 09:09:42 amI run Arch. Both natively on x86_64 and aarch64 and on WSL. Yeah well, you're incomparable (in terms of your knowledge of the innards of FPC etc.) even if there are areas in which we disagree :-) MarkMLl ---------------------------------------------------------------------- colo · 2022-10-02 16:50 Quote from: Laphicet on September 03, 2022, 10:25:55 pmSo I've been trying to code with FPC on Arch. The compiler and its tools are fine, but when I compile and run so much as a "Hello, world" program, nothing is output to the terminal when executed. I even copy and pasted a Tao Yue code snippet to see if I did something wrong missed by the compiler. That, too, was not output. Can you provide a transcript of your "Hello, world" toy programs executing under strace(1)? For reference, on my Arch Linux x86_84 system: Code: [Select]$ cat hello.pas program hellofpcworld; begin   writeln('Hello FPC world!'); end. $ fpc hello.pas >/dev/null $ ./hello Hello FPC world! $ strace ./hello execve("./hello", ["./hello"], 0x7ffe79d8f2c0 /* 45 vars */) = 0 getrlimit(RLIMIT_STACK, {rlim_cur=8192*1024, rlim_max=RLIM64_INFINITY}) = 0 rt_sigaction(SIGFPE, {sa_handler=0x423290, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x401280}, {sa_handler=SIG_IGN, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGSEGV, {sa_handler=0x423290, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x401280}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGBUS, {sa_handler=0x423290, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x401280}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 rt_sigaction(SIGILL, {sa_handler=0x423290, sa_mask=[], sa_flags=SA_RESTORER|SA_SIGINFO, sa_restorer=0x401280}, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=0}, 8) = 0 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(2, TCGETS, {B38400 opost isig icanon echo ...}) = 0 readlink("/proc/self/exe", "/tmp/hello", 255) = 10 write(1, "Hello FPC world!\n", 17Hello FPC world! )      = 17 exit_group(0)                           = ? +++ exited with 0 +++