Lazarus

Installation => General => Topic started by: guest64953 on December 04, 2019, 04:49:49 pm

Title: FPC + Laz on DFBSD
Post by: guest64953 on December 04, 2019, 04:49:49 pm
This BSD use the gold linker as the default linker. I tried to get FPC + Laz running on it using the last version of Fpcupdeluxe for it (Don no longer build for it). I don't know why despite ld.bfd already there, even after I replace /usr/bin/ld with ld.bfd, fpc still try to call ld.gold instead, it's unreasonable. I could workaround the linker issue with this script:

Code: Bash  [Select][+][-]
  1. #!/usr/local/bin/bash
  2.  
  3. mv /usr/bin/ld /usr/bin/ld.old
  4. cp /usr/bin/ld.bfd /usr/bin/ld
  5. mv /usr/libexec/binutils227/elf/ld.gold /usr/libexec/binutils227/elf/ld.gold.old
  6. cp /usr/libexec/binutils227/elf/ld.bfd /usr/libexec/binutils227/elf/ld.gold
  7.  

Now fpc picks the new ld.gold (which indeed is ld.bfd) and the linker issue was resolved. The new problem is it failed because missing of unit lnet or something like that as I recall. Both stable or trunk have the same error.
Title: Re: FPC + Laz on DFBSD
Post by: guest64953 on December 05, 2019, 03:04:40 pm
The version from dports worked very well. It means fpc + laz is ready on dfbsd. Why don't we backport their patches to fpc to allow correctly using the corect ld.bfd linker?

https://i.imgur.com/UWD0txh.png

This is laz running happily on dfbsd, installed from pkg. This version is a bit old, though. Don, do you here me? Could you build a version of fpcupdeluxe for dfbsd? It will help me testing newer version of fpc + laz on this OS much easier.
Title: Re: FPC + Laz on DFBSD
Post by: DonAlfredo on December 05, 2019, 03:31:59 pm
Yes, I will help you.
Bit busy with sanity checks for fpcupdeluxe ...  8)
Will keep you informed.
Title: Re: FPC + Laz on DFBSD
Post by: guest64953 on December 06, 2019, 05:15:15 pm
This BSD use the gold linker as the default linker. I tried to get FPC + Laz running on it using the last version of Fpcupdeluxe for it (Don no longer build for it). I don't know why despite ld.bfd already there, even after I replace /usr/bin/ld with ld.bfd, fpc still try to call ld.gold instead, it's unreasonable. I could workaround the linker issue with this script:

Code: Bash  [Select][+][-]
  1. #!/usr/local/bin/bash
  2.  
  3. mv /usr/bin/ld /usr/bin/ld.old
  4. cp /usr/bin/ld.bfd /usr/bin/ld
  5. mv /usr/libexec/binutils227/elf/ld.gold /usr/libexec/binutils227/elf/ld.gold.old
  6. cp /usr/libexec/binutils227/elf/ld.bfd /usr/libexec/binutils227/elf/ld.gold
  7.  

Now fpc picks the new ld.gold (which indeed is ld.bfd) and the linker issue was resolved. The new problem is it failed because missing of unit lnet or something like that as I recall. Both stable or trunk have the same error.

Use this script to revert the changes made by the above script:

Code: Bash  [Select][+][-]
  1. #!/usr/local/bin/bash
  2.  
  3. rm /usr/bin/ld
  4. mv /usr/bin/ld.old /usr/bin/ld
  5. rm /usr/libexec/binutils227/elf/ld.gold
  6. mv /usr/libexec/binutils227/elf/ld.gold.old /usr/libexec/binutils227/elf/ld.gold
  7.  
Title: Re: FPC + Laz on DFBSD
Post by: guest64953 on December 06, 2019, 05:16:22 pm
Yes, I will help you.
Bit busy with sanity checks for fpcupdeluxe ...  8)
Will keep you informed.

Thanks.
Title: Re: FPC + Laz on DFBSD
Post by: guest64953 on December 06, 2019, 05:17:46 pm
This post was originally sent to Don. But I want if there is some devs visit this thread they could read this too.

@hunghung

You are welcome to try:

https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/1.6.6a/fpcupdeluxe-x86_64-dragonfly

The same old error like previous version of fpcupdeluxe:

Quote
Start compiling package utils-fppkg for target x86_64-dragonfly.
       Compiling fppkg/fppkg.pp
       Compiling fppkg/pkglnet.pp
The installer encountered the following error:
External command "/home/hunghung/fpcupdeluxe/fpcsrc/compiler/ppcx64 -Tdragonfly -FEfppkg/bin/x86_64-dragonfly -FUfppkg/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/rtl/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-base/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-res/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/rtl-objpas/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-xml/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-process/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-net/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-passrc/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-async/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/rtl-extra/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/paszlib/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/hash/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fppkg/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fpmkunit/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/libtar/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-web/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-db/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/ibase/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/mysql/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/odbc/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/oracle/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/postgres/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/sqlite/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/dblib/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/pxlib/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-json/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fcl-fpcunit/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/openssl/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/fastcgi/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/httpd22/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/httpd24/units/x86_64-dragonfly/ -Fu/home/hunghung/fpcupdeluxe/fpcsrc/packages/libmicrohttpd/units/x86_64-dragonfly/ -Ur -Xs -O2 -n -Cg -Sg -vw-n-h-l-d-u-t-p-c- -Fl/usr/local/lib -Fl/usr/pkg/lib -Fl/usr/pkg/lib -dx86_64 -dRELEASE -Sm "-dpackage_version_major:=3" "-dpackage_version_minor:=3" "-dpackage_version_micro:=1" "-dpackage_version_build:=-1" -viq fppkg/fppkg.pp" failed with exit code 256. Console output:
Target OS: DragonFly for x86-64
Compiling fppkg/fppkg.pp
Compiling fppkg/pkglnet.pp
pkglnet.pp(10,3) Fatal: Can't find unit lnet used by pkglnet
Fatal: Compilation aborted

gmake[1]: *** [Makefile:2690: utils_all] Error 2
gmake: *** [Makefile:2895: build-stamp.x86_64-dragonfly] Error 2

fpcupdeluxe: ERROR: FPCNativeInstaller (BuildModuleCustom: FPC): Error running gmake for FPC failed with exit code 512
. Details:


ERROR: Fpcupdeluxe fatal error !

p/s: Even though I can workaround the linker issue, but it will easily messed my system. I don't know if this is the fault of fpcupdeluxe or fpc itself but why fpcupdeluxe always select /usr/libexec/binutils227/ld.gold even if I installed binutils 2.32 (it's on /usr/local/bin/ld) and there is binutils225 on /usr/libexec/binutils225 too? Did you hardcoded the search path? I think you will need to revisit freebsd and it derivatives more seriously. Add more platform specific code and remove all linuxism assumptions, e.g: everything on /usr/bin, it's /usr/local/bin on these OS.

Anyway, thank for your kindness to provide an up-to-date version for dfbsd  :-*
Title: Re: FPC + Laz on DFBSD
Post by: guest64953 on December 06, 2019, 05:36:52 pm
Devs, if you did read this thread please read this thread too, thanks: https://forum.lazarus.freepascal.org/index.php/topic,47663.0.html (https://forum.lazarus.freepascal.org/index.php/topic,47663.0.html)
TinyPortal © 2005-2018