Forum > Unix

[Solved] FreeBSD 13 and DirectoryExists problem


It seems user found a bug in FPC 3.2.3 Linux x64 cross compiled to FreeBSD x64. Installed from fpcUpDeluxe.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---uses sysutils;var  s: string;  b: boolean;begin  s:= ParamStr(1);  if s='' then begin writeln('Param needed, folder path'); exit; end;  b:= DirectoryExists(s);  writeln('DirectoryExists for "'+s+'": '+BoolToStr(b, true));end. 
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...

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.
Please re-install the cross-compiler with these libs. And re-compile your app with the new cross-compiler.
This might help.
--- End quote ---


[0] Message Index

Go to full version