Recent

Author Topic: [Solved] FreeBSD 13 and DirectoryExists problem  (Read 3506 times)

AlexTP

  • Hero Member
  • *****
  • Posts: 2489
    • UVviewsoft
[Solved] FreeBSD 13 and DirectoryExists problem
« on: September 04, 2023, 10:12:27 pm »
It seems user found a bug in FPC 3.2.3 Linux x64 cross compiled to FreeBSD x64. Installed from fpcUpDeluxe.

Code: Pascal  [Select][+][-]
  1. uses sysutils;
  2. var
  3.   s: string;
  4.   b: boolean;
  5. begin
  6.   s:= ParamStr(1);
  7.   if s='' then begin writeln('Param needed, folder path'); exit; end;
  8.   b:= DirectoryExists(s);
  9.   writeln('DirectoryExists for "'+s+'": '+BoolToStr(b, true));
  10. end.
  11.  

FreeBSD burzum 13.2-RELEASE-p2 FreeBSD 13.2-RELEASE-p2 #6 releng/13.2-n254627-4341433a673f-dirty: Sat Aug 26 13:30:58 MSK 2023 alex@burzum:/usr/obj/usr/src/amd64.amd64/sys/ALEXS amd64

1) Free Pascal Compiler version 3.2.2 [2023/09/04] for x86_64
$ ./test /usr/home/alex/.config/cudatext/settings/
DirectoryExists for "/usr/home/alex/.config/cudatext/settings/": True

2) Free Pascal Compiler version 3.2.3-767-gf2c446c29b [2023/07/24] for x86_64
Cross compiled on Linux x64 to Freebsd x64

DirectoryExists for "/usr/home/alex/.config/cudatext/settings/": False

I need some confirmation of bug before I make the bugreport.
main branch was not tested yet...
« Last Edit: September 05, 2023, 06:32:41 pm by AlexTP »

AlexTP

  • Hero Member
  • *****
  • Posts: 2489
    • UVviewsoft
Re: FreeBSD 13 and DirectoryExists
« Reply #1 on: September 05, 2023, 06:32:26 pm »
Problem solved! It was in the cross compiler in fpcUpDeluxe.

I got super advice from fpcupdeluxe author:
Quote
As the app has to run on FreeBSD13, the first thing you might try is to use the libs for FreeBSD13.
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/download/crosslibs_all/FreeBSD_AMD64_FreeBSD_13.zip
Please re-install the cross-compiler with these libs. And re-compile your app with the new cross-compiler.
This might help.

 

TinyPortal © 2005-2018