Re: [Videlibri-xidel] Trying to build a Linux Xidel binary on WSL2
Client for public libraries
Brought to you by:
benibela
|
From: Reino W. <rwi...@xs...> - 2024-12-27 23:02:15
|
Hello Benito, On 2024-12-27T23:08:19+0100, Benito van der Zander <be...@be...> wrote: >> I've been experimenting with Windows Subsystem for Linux, but I'm >> having difficulty building a Xidel binary for Linux. > why not build one for Windows? I've already succeeded in doing that. It's quite interesting. With -Twin64 I can crosscompile a win64 binary in WSL2. >> (are fp-units-net and fp-units-math even required for xidel?) > net is probably needed for openssl. For math I implemented a > replacement myself It's not. Both of them aren't needed. I've removed both packages and I still ended up with a working win64 binary. >> xidel.pas(86,1) Warning: "crti.o" not found, this will probably cause >> a linking failure >> xidel.pas(86,1) Warning: "crtbegin.o" not found, this will probably >> cause a linking failure >> xidel.pas(86,1) Warning: "crtend.o" not found, this will probably >> cause a linking failure >> xidel.pas(86,1) Warning: "crtn.o" not found, this will probably cause >> a linking failure >> /usr/bin/ld.bfd: cannot find -ldl: No such file or directory >> /usr/bin/ld.bfd: cannot find -lc: No such file or directory > you need libc and libdl, and perhaps some crt This forum post, https://forum.lazarus.freepascal.org/index.php/topic,56114.msg417081.html#msg417081, proved to be the solution: $ sudo apt install build-essential I have a working Linux binary now. However, in the process I came accross another issue which I thought was fixed 3 years ago. $ xidel -se 'round-half-to-even("60",3)' 60.000000000000014 In addition to -Fucomponents/pascal/import/pasdblstrutils, I explicitly had to add -dUSE_PASDBLSTRUTILS, after I found out (after a lot of searching) that you silently disabled the define in https://github.com/benibela/internettools/commit/f91961910298bb7d99a67f10c7b3441e143f9bf9. Why? With -dUSE_PASDBLSTRUTILS it at least returns... $ xidel -se 'round-half-to-even("60",3)' 60 -- Reino |