[fpc-pascal] Re: Too tired? Forcedirectories does not seem to work
On 6-2-2012 20:48, Sven Barth wrote: > On 06.02.2012 19:31, Reinier Olislagers wrote: >> Task for tomorrow is to find out how to do chmod u+x someexecutable, but >> that's for tomorrow - right now I'm liable to start throwing keyboards >> through the window or falling asleep ;) > > The documentation is your friend: > http://www.freepascal.org/docs-html/rtl/baseunix/fpchmod.html > Thanks Sven, strange as it may seem, I did start with the documentation today - but ended up in the oldlinux unit, so thanks for the link ;) It even works ;) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On 6-2-2012 20:53, Sven Barth wrote: > On 06.02.2012 18:14, Reinier Olislagers wrote: >> On 6-2-2012 17:50, Henry Vermaak wrote: >>> On 06/02/12 16:40, Reinier Olislagers wrote: >> Perhaps I should submit a patch for the docs indicating that: >> - ForceDirectories requires an absolute path > > This is wrong. ForceDirectories works with relative paths as well. It > just does not work with path variables that are only known to the shell. > >> - On Unix/Linux, directories starting with ~ are considered relative >> (but where should that be put...) > > This is basic Linux/Unix knowledge: every path that does not start with > a "/" is a relative path. Mmmm, must have been my tiredness. Yes, I know ~ is not an absolute path. I supposed ForceDirectories' failure to expand ~ meant it could not deal with absolute paths. Too tired to investigate further. And while ~ is a relative path, the defining characteristic is that is a character that gets expanded by (at least) the shell, as Mattias pointed out in his other mail. Still, ExpandFileName DOES expand ~ to /home/whatever, and that is not mentioned in help: "ExpandFileName expands the filename to an absolute filename." I think the docs for ExpandFileName should be updated to indicate ~ gets expanded, e.g.: "ExpandFileName expands the filename to an absolute filename. On Unix/Linux systems, ExpandFileName will also expand the ~ (home directory) symbol." Thanks, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat
On Tue, 7 Feb 2012 01:47:52 +0100 Mattias Gaertner wrote: > On Mon, 19 Dec 2011 10:39:09 +0100 (CET) > michael.vancann...@wisa.be wrote: > > >[...] > > What does 'strace' say ? > > Same happens on fpc wiki: uses Classes, SysUtils, fphttpclient; ... var Response: TStringStream; client: TFPHTTPClient; URL: String; begin Response:=nil; client:=nil; try client:=TFPHTTPClient.Create(nil); Response:=TStringStream.Create(''); URL:='http://wiki.freepascal.org/index.php?title=Special:Export&pages=Lazarus_Documentation'&curonly=1&action=submit'; writeln('URL=',URL); client.Get(URL,Response); //writeln(Response.DataString); finally client.Free; Response.Free; end; end; > Here is the strace: > > sendto(3, "GET /index.php?title=Special:Exp"..., 135, 0, NULL, 0) = 135 > recvfrom(3, "HTTP/1.1 200 OK\r\nDate: Tue, 07 F"..., 4096, 0, NULL, NULL) = > 2880 > recvfrom(3, " and create spreadsheets, text d"..., 4096, 0, NULL, NULL) = 1440 > recvfrom(3, "interface to various hardware de"..., 4096, 0, NULL, NULL) = 2880 > recvfrom(3, "lements and links to the referen"..., 4096, 0, NULL, NULL) = 1440 > recvfrom(3, "eploying Your Application]] - Ho"..., 4096, 0, NULL, NULL) = 2880 > recvfrom(3, "zarus GUI\n*[[Roadmap]] - An idea"..., 4096, 0, NULL, NULL) = > 1440 > recvfrom(3, " A few notes for programmers on "..., 4096, 0, NULL, NULL) = 1440 > recvfrom(3, "s Component]] for more component"..., 4096, 0, NULL, NULL) = 1440 > recvfrom(3, "blogspot.com/ Porting to Lazarus"..., 4096, 0, NULL, NULL) = 2061 > recvfrom(3, "17\r\n \n\n\r\n0\r\n"..., 4096, 0, NULL, > NULL) = 34 > recvfrom(3, > > After some time it continues: > > "", 4096, 0, NULL, NULL)= 0 > close(3)= 0 > munmap(0x7f1daa4d1000, 262144) = 0 > munmap(0x7f1daa52d000, 32768) = 0 > munmap(0x7f1daa51d000, 32768) = 0 > munmap(0x7f1daa4c9000, 32768) = 0 > munmap(0x7f1daa4b9000, 32768) = 0 > munmap(0x7f1daa4b1000, 32768) = 0 > munmap(0x7f1daa4c1000, 32768) = 0 > exit_group(0) = ? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] TFPHTTPClient Post works with jetty, fails with tomcat
On Mon, 19 Dec 2011 10:39:09 +0100 (CET) michael.vancann...@wisa.be wrote: >[...] > What does 'strace' say ? Same happens on fpc wiki: Here is the strace: sendto(3, "GET /index.php?title=Special:Exp"..., 135, 0, NULL, 0) = 135 recvfrom(3, "HTTP/1.1 200 OK\r\nDate: Tue, 07 F"..., 4096, 0, NULL, NULL) = 2880 recvfrom(3, " and create spreadsheets, text d"..., 4096, 0, NULL, NULL) = 1440 recvfrom(3, "interface to various hardware de"..., 4096, 0, NULL, NULL) = 2880 recvfrom(3, "lements and links to the referen"..., 4096, 0, NULL, NULL) = 1440 recvfrom(3, "eploying Your Application]] - Ho"..., 4096, 0, NULL, NULL) = 2880 recvfrom(3, "zarus GUI\n*[[Roadmap]] - An idea"..., 4096, 0, NULL, NULL) = 1440 recvfrom(3, " A few notes for programmers on "..., 4096, 0, NULL, NULL) = 1440 recvfrom(3, "s Component]] for more component"..., 4096, 0, NULL, NULL) = 1440 recvfrom(3, "blogspot.com/ Porting to Lazarus"..., 4096, 0, NULL, NULL) = 2061 recvfrom(3, "17\r\n \n\n\r\n0\r\n"..., 4096, 0, NULL, NULL) = 34 recvfrom(3, After some time it continues: "", 4096, 0, NULL, NULL)= 0 close(3)= 0 munmap(0x7f1daa4d1000, 262144) = 0 munmap(0x7f1daa52d000, 32768) = 0 munmap(0x7f1daa51d000, 32768) = 0 munmap(0x7f1daa4c9000, 32768) = 0 munmap(0x7f1daa4b9000, 32768) = 0 munmap(0x7f1daa4b1000, 32768) = 0 munmap(0x7f1daa4c1000, 32768) = 0 exit_group(0) = ? Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On Mon, 06 Feb 2012 18:14:03 +0100 Reinier Olislagers wrote: >[...] > - On Unix/Linux, directories starting with ~ are considered relative > (but where should that be put...) Only in shells the tilde has the special meaning. Linux (the kernel) does not treat tilde special. Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Why is Free Pascal a blacklisted package on linux distro?
Jonas Maebe wrote: On 06 Feb 2012, at 15:29, Graeme Geldenhuys wrote: The article lists all the packages that are blacklisted. Very strangely, Free Pascal is in that list? http://repo.parabolagnulinux.org/docs/blacklist.txt -> freepascal::includes proprietary code from silicon graphics See http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=20200 for the full story (it's less spectacular than that message may suggest at first sight). It has been resolved in FPC 2.6.0, so if anyone tells them they'll presumably include it. Sounds like it came out of "Project Fahrenheit" which was supposed to be a collaborative effort between SGI and MS. IIRC SGI eventually disposed of the documentation on the bonfire at a beach party. -- Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues] ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] inline function vs recursive function
On 06.02.2012 19:51, ik wrote: Hello, Let's say I have a function that some of it's code (or all) can be used in more then one location inside the function itself. I can make a nested function with the code and set it to inline, make it normal, or make a recursion with it. What's the best practice in your opinion to take, and why ? Recursion won't help you here, because recursion is something like the following: function factorial(aValue: LongInt): LongInt; begin if aValue <= 1 then Result := 1 else Result := factorial(aValue - 1) * aValue; end; Whether you inline the function or not depends on whether it's a complex function or not. Something like function foo(aValue: LongInt): LongInt; begin Result := aValue * 6 + 5 - SomeParam; end; can definitely be declared inline. You just need to keep in mind that when inlining a function the function call will be replaced by the function's/procedure's body so the code size will increase (no, you don't need to pay attention for duplicate variable names). Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Why is Free Pascal a blacklisted package on linux distro?
On Monday, 6. February 2012 15.47:00 Jonas Maebe wrote: > -> freepascal::includes proprietary code from silicon graphics > > See http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=20200 for > the full story (it's less spectacular than that message may suggest at > first sight). It has been resolved in FPC 2.6.0, so if anyone tells them > they'll presumably include it. > glu.pp still has the old header. Martin ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On 06.02.2012 18:14, Reinier Olislagers wrote: On 6-2-2012 17:50, Henry Vermaak wrote: On 06/02/12 16:40, Reinier Olislagers wrote: This code: OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); debugln('todo: debug: forcedirectories bootstrap compiler dir: '+bootstrapcompilerdirectory+' result: '+BoolToStr(Operationsucceeded)); should create a directory (~/fpcbootstrap by default): What am I doing wrong? Your shell expands ~ to your home directory. Your program will have to do this manually (i.e. read the "HOME" environment variable). I understand. Apparently ExpandFileName does this for me. Still, I don't understand why I got a result that was true when FPC apparent!??! Oh now I do, it created the directory "~\fpcbootstrap". That was fun ;) Perhaps I should submit a patch for the docs indicating that: - ForceDirectories requires an absolute path This is wrong. ForceDirectories works with relative paths as well. It just does not work with path variables that are only known to the shell. - On Unix/Linux, directories starting with ~ are considered relative (but where should that be put...) This is basic Linux/Unix knowledge: every path that does not start with a "/" is a relative path. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Re: Too tired? Forcedirectories does not seem to work
On 06.02.2012 19:31, Reinier Olislagers wrote: On 6-2-2012 19:26, Rich Saunders wrote: On 2/6/12 11:49 AM, ik wrote: You should use ExpandFileName on ForceDirectory's content prior on sending it to it. And then go find the directory that you created in error and remove it! ;) Rich Thanks, Rich, did that ;) Task for tomorrow is to find out how to do chmod u+x someexecutable, but that's for tomorrow - right now I'm liable to start throwing keyboards through the window or falling asleep ;) The documentation is your friend: http://www.freepascal.org/docs-html/rtl/baseunix/fpchmod.html Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to use pam?
In our previous episode, Mattias Gaertner said: > I need to authenticate user name and password under Linux. These are normal > accounts so I guess "libpam" is the weapon of choice. But I can't find any > pam binding in the FPC sources. > Is there a better way or has really no one yet used pam with fpc? There is an user package that deals with username and pwd via libc, and also works on FreeBSD. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to use pam?
On 06.02.2012 17:37, Mattias Gaertner wrote: Hi, I need to authenticate user name and password under Linux. These are normal accounts so I guess "libpam" is the weapon of choice. But I can't find any pam binding in the FPC sources. Is there a better way or has really no one yet used pam with fpc? If no one comes up with a header translation you might simply try whether h2pas can convert the header files of libpam. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to use pam?
On 06.02.2012 17:45, ik wrote: On Mon, Feb 6, 2012 at 18:37, Mattias Gaertner mailto:nc-gaert...@netcologne.de>> wrote: __ Hi, I need to authenticate user name and password under Linux. These are normal accounts so I guess "libpam" is the weapon of choice. But I can't find any pam binding in the FPC sources. Is there a better way or has really no one yet used pam with fpc? You can use the /etc/shadows and /etc/passwd files yourself, but that require you to implement the hashing algorithm for the password inside (depends on what the user/admin choose as local login). Processing these files does not allow you to utilize other mechanisms for authentication like fingerprint sensors or security keys which are supported by PAM. So implementing a PAM binding is the way to go. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Problem using make install in Windows
On 06.02.2012 17:59, Felipe Monteiro de Carvalho wrote: In Windows I am executing: PATH=F:\Programas\lazarus31_fpc26\fpc\2.6.1\bin\i386-win32 make all make install INSTALL_PREFIX=F:\Programas\fpcsvn\dest\ pause Try without the "\" at the end (this is a problem of make AFAIK). And it will build the RTL and put it in the expected place, then it starts putting hash in the place and then ... I get the following error: make[3]: Entering directory `F:/Programas/fpcsvn/packages' make -C hash distinstall make[4]: Entering directory `F:/Programas/fpcsvn/packages/hash' F:/Programas/fpcsvn/compiler/ppc386.exe fpmake.pp -n -FuF:/Programas/fpcsvn/pack ages/fpmkunit/units_bs/i386-win32 -FuF:/Programas/fpcsvn/rtl/units/i386-win32 ./fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i3 86 -o -Ur -o -Xs -o -O2 -o -n -o -FuF:/Programas/fpcsvn/rtl/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 -o -dRELEASE --compiler=F:/Programas/fpcsv n/compiler/ppc386.exe --prefix=F:\Programas\fpcsvn\dest\ --unitinstalldir=F:\Pr ogramas\fpcsvn\dest\/units/i386-win32/hash -ie The installer encountered the following error: Failed to create directory "F:\Programas\fpcsvn\dest \examples\fpc-hash-2.7.1\ex amples\" make[4]: *** [distinstall] Error 1 make[4]: Leaving directory `F:/Programas/fpcsvn/packages/hash' make[3]: *** [hash_distinstall] Error 2 make[3]: Leaving directory `F:/Programas/fpcsvn/packages' make[2]: *** [packages_distinstall] Error 2 make[2]: Leaving directory `F:/Programas/fpcsvn' make[1]: *** [installother] Error 2 make[1]: Leaving directory `F:/Programas/fpcsvn' make: *** [install] Error 2 I see the space between \dest and \examples but I dont see how it is something that I did wrong, or else it should fail in the RTL too. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] inline function vs recursive function
You can make a function inside the function. Like this: function Test: Integer; var i: Integer procedure IncI(aIncI: Integer); begin i := i +aIncI; end; begin i := 1; while i <= 100 do IncI(i); Result := i; end; This make an geometric progression in i. Em 06/02/2012, às 16:51, ik escreveu: > Hello, > > Let's say I have a function that some of it's code (or all) can be used in > more then one location inside the function itself. > I can make a nested function with the code and set it to inline, make it > normal, or make a recursion with it. > > What's the best practice in your opinion to take, and why ? > > Thanks, > Ido > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] inline function vs recursive function
Hello, Let's say I have a function that some of it's code (or all) can be used in more then one location inside the function itself. I can make a nested function with the code and set it to inline, make it normal, or make a recursion with it. What's the best practice in your opinion to take, and why ? Thanks, Ido ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Too tired? Forcedirectories does not seem to work
On 6-2-2012 19:26, Rich Saunders wrote: > On 2/6/12 11:49 AM, ik wrote: >> You should use ExpandFileName on ForceDirectory's content prior on >> sending it to it. > > And then go find the directory that you created in error and remove it! ;) > > Rich Thanks, Rich, did that ;) Task for tomorrow is to find out how to do chmod u+x someexecutable, but that's for tomorrow - right now I'm liable to start throwing keyboards through the window or falling asleep ;) Regards, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On 2/6/12 11:49 AM, ik wrote: > You should use ExpandFileName on ForceDirectory's content prior on > sending it to it. And then go find the directory that you created in error and remove it! ;) Rich ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Re: Too tired? Forcedirectories does not seem to work
On 6-2-2012 18:01, Henry Vermaak wrote: > On 06/02/12 16:50, Henry Vermaak wrote: >> >> Your shell expands ~ to your home directory. Your program will have to >> do this manually (i.e. read the "HOME" environment variable). > > Like Ido mentioned, ExpandFileName does this already. Perhaps the > documentation could mention it. > > Henry Tried to add some remarks using fpdoc editor. svn diff gave a huge list of changes against svn... ForceDirectories: description Note: this function only accepts absolute directories. E.g. on Unix, directories starting with ~ or .. need to be expanded to absolute directories first (e.g. using ) ExpandFileName: description On Unix/Linux systems, this will also expand directories with ~ (the home directory) to the full, absolute path. Giving up for now... Thanks for all the help, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On 6-2-2012 17:50, Henry Vermaak wrote: > On 06/02/12 16:40, Reinier Olislagers wrote: >> This code: >> OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); >> debugln('todo: debug: forcedirectories bootstrap compiler dir: >> '+bootstrapcompilerdirectory+' result: '+BoolToStr(Operationsucceeded)); >> >> should create a directory (~/fpcbootstrap by default): >> What am I doing wrong? > > Your shell expands ~ to your home directory. Your program will have to > do this manually (i.e. read the "HOME" environment variable). > I understand. Apparently ExpandFileName does this for me. Still, I don't understand why I got a result that was true when FPC apparent!??! Oh now I do, it created the directory "~\fpcbootstrap". That was fun ;) Perhaps I should submit a patch for the docs indicating that: - ForceDirectories requires an absolute path - On Unix/Linux, directories starting with ~ are considered relative (but where should that be put...) Suggestions welcome. In any case, glad this works, thanks for the help! Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On 06/02/12 16:50, Henry Vermaak wrote: Your shell expands ~ to your home directory. Your program will have to do this manually (i.e. read the "HOME" environment variable). Like Ido mentioned, ExpandFileName does this already. Perhaps the documentation could mention it. Henry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to use pam?
On Mon, Feb 6, 2012 at 14:37, Mattias Gaertner wrote: > Hi, > > I need to authenticate user name and password under Linux. These are normal > accounts so I guess "libpam" is the weapon of choice. But I can't find any > pam binding in the FPC sources. > > Is there a better way or has really no one yet used pam with fpc? > At [1] there's a good recipe of how to implement a PAM login app, I believe it could be an interesting point to start a fpc binding. [1] http://www.ibm.com/developerworks/linux/library/l-pam/index.html (search for "10 steps to designing a simple PAM login app") ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On 6-2-2012 17:49, ik wrote: > On Mon, Feb 6, 2012 at 18:40, Reinier Olislagers > mailto:reinierolislag...@gmail.com>> wrote: > > Busy porting FPCUP to Linux... think it's time to quit for the day > > This code: > OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); > debugln('todo: debug: forcedirectories bootstrap compiler dir: > '+bootstrapcompilerdirectory+' result: '+BoolToStr(Operationsucceeded)); > > should create a directory (~/fpcbootstrap by default): > The output that debugln produces: > Debug: todo: debug: forcedirectories bootstrap compiler dir: > ~/fpcbootstrap/ result: -1 > > Result=-1, so that's true & it must have worked, right? > > No, the directory is not created: > pascaldev@debianlaz:~$ ls ~/fpcbootstrap > ls: cannot access /home/pascaldev/fpcbootstrap: No such file or > directory > > > What am I doing wrong? > Should I spell out the entire path /home/pascaldev/fpcbootstrap/? Leave > > > You should use ExpandFileName on ForceDirectory's content prior on > sending it to it. Thanks Ido, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Problem using make install in Windows
In Windows I am executing: PATH=F:\Programas\lazarus31_fpc26\fpc\2.6.1\bin\i386-win32 make all make install INSTALL_PREFIX=F:\Programas\fpcsvn\dest\ pause And it will build the RTL and put it in the expected place, then it starts putting hash in the place and then ... I get the following error: make[3]: Entering directory `F:/Programas/fpcsvn/packages' make -C hash distinstall make[4]: Entering directory `F:/Programas/fpcsvn/packages/hash' F:/Programas/fpcsvn/compiler/ppc386.exe fpmake.pp -n -FuF:/Programas/fpcsvn/pack ages/fpmkunit/units_bs/i386-win32 -FuF:/Programas/fpcsvn/rtl/units/i386-win32 ./fpmake.exe install --localunitdir=../.. --globalunitdir=.. --os=win32 --cpu=i3 86 -o -Ur -o -Xs -o -O2 -o -n -o -FuF:/Programas/fpcsvn/rtl/units/i386-win32 -o -FE. -o -FUunits/i386-win32 -o -di386 -o -dRELEASE --compiler=F:/Programas/fpcsv n/compiler/ppc386.exe --prefix=F:\Programas\fpcsvn\dest\ --unitinstalldir=F:\Pr ogramas\fpcsvn\dest\/units/i386-win32/hash -ie The installer encountered the following error: Failed to create directory "F:\Programas\fpcsvn\dest \examples\fpc-hash-2.7.1\ex amples\" make[4]: *** [distinstall] Error 1 make[4]: Leaving directory `F:/Programas/fpcsvn/packages/hash' make[3]: *** [hash_distinstall] Error 2 make[3]: Leaving directory `F:/Programas/fpcsvn/packages' make[2]: *** [packages_distinstall] Error 2 make[2]: Leaving directory `F:/Programas/fpcsvn' make[1]: *** [installother] Error 2 make[1]: Leaving directory `F:/Programas/fpcsvn' make: *** [install] Error 2 I see the space between \dest and \examples but I dont see how it is something that I did wrong, or else it should fail in the RTL too. -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On 06/02/12 16:40, Reinier Olislagers wrote: Busy porting FPCUP to Linux... think it's time to quit for the day This code: OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); debugln('todo: debug: forcedirectories bootstrap compiler dir: '+bootstrapcompilerdirectory+' result: '+BoolToStr(Operationsucceeded)); should create a directory (~/fpcbootstrap by default): The output that debugln produces: Debug: todo: debug: forcedirectories bootstrap compiler dir: ~/fpcbootstrap/ result: -1 Result=-1, so that's true& it must have worked, right? No, the directory is not created: pascaldev@debianlaz:~$ ls ~/fpcbootstrap ls: cannot access /home/pascaldev/fpcbootstrap: No such file or directory What am I doing wrong? Should I spell out the entire path /home/pascaldev/fpcbootstrap/? Leave the trailing slash? Your shell expands ~ to your home directory. Your program will have to do this manually (i.e. read the "HOME" environment variable). Henry ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Too tired? Forcedirectories does not seem to work
On Mon, Feb 6, 2012 at 18:40, Reinier Olislagers < reinierolislag...@gmail.com> wrote: > Busy porting FPCUP to Linux... think it's time to quit for the day > > This code: > OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); > debugln('todo: debug: forcedirectories bootstrap compiler dir: > '+bootstrapcompilerdirectory+' result: '+BoolToStr(Operationsucceeded)); > > should create a directory (~/fpcbootstrap by default): > The output that debugln produces: > Debug: todo: debug: forcedirectories bootstrap compiler dir: > ~/fpcbootstrap/ result: -1 > > Result=-1, so that's true & it must have worked, right? > > No, the directory is not created: > pascaldev@debianlaz:~$ ls ~/fpcbootstrap > ls: cannot access /home/pascaldev/fpcbootstrap: No such file or directory > > > What am I doing wrong? > Should I spell out the entire path /home/pascaldev/fpcbootstrap/? Leave > You should use ExpandFileName on ForceDirectory's content prior on sending it to it. > the trailing slash? > > Thanks for any tips, > Reinier > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] How to use pam?
On Mon, Feb 6, 2012 at 18:37, Mattias Gaertner wrote: > ** > > Hi, > > > > I need to authenticate user name and password under Linux. These are > normal accounts so I guess "libpam" is the weapon of choice. But I can't > find any pam binding in the FPC sources. > Is there a better way or has really no one yet used pam with fpc? > You can use the /etc/shadows and /etc/passwd files yourself, but that require you to implement the hashing algorithm for the password inside (depends on what the user/admin choose as local login). > > > thanks, > > Mattias > > > > ___ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal > ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Too tired? Forcedirectories does not seem to work
Busy porting FPCUP to Linux... think it's time to quit for the day This code: OperationSucceeded:=ForceDirectories(BootstrapCompilerDirectory); debugln('todo: debug: forcedirectories bootstrap compiler dir: '+bootstrapcompilerdirectory+' result: '+BoolToStr(Operationsucceeded)); should create a directory (~/fpcbootstrap by default): The output that debugln produces: Debug: todo: debug: forcedirectories bootstrap compiler dir: ~/fpcbootstrap/ result: -1 Result=-1, so that's true & it must have worked, right? No, the directory is not created: pascaldev@debianlaz:~$ ls ~/fpcbootstrap ls: cannot access /home/pascaldev/fpcbootstrap: No such file or directory What am I doing wrong? Should I spell out the entire path /home/pascaldev/fpcbootstrap/? Leave the trailing slash? Thanks for any tips, Reinier ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] How to use pam?
Hi, I need to authenticate user name and password under Linux. These are normal accounts so I guess "libpam" is the weapon of choice. But I can't find any pam binding in the FPC sources. Is there a better way or has really no one yet used pam with fpc? thanks, Mattias ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Why is Free Pascal a blacklisted package on linux distro?
On 06 Feb 2012, at 15:29, Graeme Geldenhuys wrote: > The article lists all the packages that are blacklisted. Very > strangely, Free Pascal is in that list? http://repo.parabolagnulinux.org/docs/blacklist.txt -> freepascal::includes proprietary code from silicon graphics See http://bugs.freepascal.org/bug_view_advanced_page.php?bug_id=20200 for the full story (it's less spectacular than that message may suggest at first sight). It has been resolved in FPC 2.6.0, so if anyone tells them they'll presumably include it. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] Why is Free Pascal a blacklisted package on linux distro?
Hi, I just read this story about Parabola (yet another linux distro). It believes that everything must be free and open source. Thus no binary ATI or nVidia drivers, no JDK, no Flash, on MP3 support etc etc... The article lists all the packages that are blacklisted. Very strangely, Free Pascal is in that list Anybody know why Free Pascal isn't considered free and open source? http://www.osnews.com/story/25576/Parabola_GNU_Linux_Freedom_Packaged (second column, third from the top) -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc 2.6.0 for arm-embedded
On 06-02-12 14:47, Graeme Geldenhuys wrote: Strange. Last time I downloaded Paul's Windows archive he released, it was indeed a cross-compiler for x86 (32-bit) to ARM (and not a native arm executable). I could then compile my mobile application under Windows 2000, then copy my compiled application to my ARM / WinCE based PDA and run in there. Of the various download links on Paul's website, which one did you download? http://www.turbocontrol.com/EasyfpGUI-fpc-2.2.2.arm-linux-052111.zip Like I said, I think these systems are for systems with a full Operating System (Linux, WinCE ...). I'm trying to make software for a bare microcontroller. Koenraad. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc 2.6.0 for arm-embedded
On 06-02-12 14:34, Rainer Stratmann wrote: I am also interested in crosscompiling for embedded ARM. How did you install the crosscompiler on Linux OS? Is there an easy way of doing this? Is it in the debian packages precompiled and ready for use? On a Suse 12.1 virtual machine I downloaded the binutils from CodeSourcery and installed them. I downloaded and installed fpc 2.6.0 and it's sources. In the "root" of the sources I did (as superuser) : make clean buildbase installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m CROSSBINDIR=/home/koenraad/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin BINUTILSPREFIX=arm-none-eabi- CROSSOPT="-CfSoft" PREFIX=/usr I'm afraid there are no ready make packages for crosscompiling. I would be interested too. But fpc has a way to make packages (at least rpm) for fpc for linux so I think it should be possible to make them for crosscompiling too. Regards, Koenraad Lelong. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On 06 Feb 2012, at 14:55, Graeme Geldenhuys wrote: > On 6 February 2012 15:47, Jonas Maebe wrote: >> >> As I tried to explain in my previous message, copyright covers much more >> than verbatim copying and people who read the original text get tainted. >> > > Once again, I fully understand. Your suggestion will only work in an > "ideal world" situation though. Realistically, we don't all live in a > cave - we interact with some many things ever day. Nobody is 100% > untainted!. Again, as I wrote in my original message "And the more recent the exposure, the more tainted you are", and "There are no hard and fast rules regarding what is copyright infringement and what not". The point is not to be holier than the Pope. The point is to show good faith and prevent as many accidents or unwanted exposure as possible. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On 6 February 2012 15:47, Jonas Maebe wrote: > > As I tried to explain in my previous message, copyright covers much more than > verbatim copying and people who read the original text get tainted. > Once again, I fully understand. Your suggestion will only work in an "ideal world" situation though. Realistically, we don't all live in a cave - we interact with some many things ever day. Nobody is 100% untainted!. What should be interesting, is to do a poll here and in the lazarus mailing list. Who owns or has access to a copy of Delphi or Kylix? Probably 90+% of the developers here. On a side note: -- Now not to raise any alarms or point fingers, but I know for a fact that the person that wrote ALL the FPC documentation still works to this day with Delphi. Oops - talk about tainted! ;-) [see what I mean] -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc 2.6.0 for arm-embedded
On 6 February 2012 15:27, Koenraad Lelong wrote: > > I downloaded that package, and I tried it on my x86_64 Ubuntu-laptop. ppcarm > can't be executed, "file ppcarm" shows this : > ppcarm: ELF 32-bit LSB executable, ARM, version 1, statically linked, > stripped > AFAIK this means it's a binary to run on an arm-system, so it's not a > crosscompiler and I do not have an arm-system at hand that can run a > compiler. Strange. Last time I downloaded Paul's Windows archive he released, it was indeed a cross-compiler for x86 (32-bit) to ARM (and not a native arm executable). I could then compile my mobile application under Windows 2000, then copy my compiled application to my ARM / WinCE based PDA and run in there. Of the various download links on Paul's website, which one did you download? -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On 06 Feb 2012, at 14:39, Graeme Geldenhuys wrote: > On 6 February 2012 15:02, Jonas Maebe wrote: >> >> In general: please do not copy/paste any text or code by > > So what's the difference between me posting the Kylix 3 / Delphi 7 > description here, or posting a link to Embarcadero's publicly visible > documentation on their website? If you post a link, people can choose to go there or not. > In no means did I intend that the Kylix description must be > copied verbatim into the FPC docs. As I tried to explain in my previous message, copyright covers much more than verbatim copying and people who read the original text get tainted. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On 6 February 2012 15:15, wrote: > > Correct. I've adapted the text. Rev 889. Thanks Michael. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On 6 February 2012 15:02, Jonas Maebe wrote: > > In general: please do not copy/paste any text or code by So what's the difference between me posting the Kylix 3 / Delphi 7 description here, or posting a link to Embarcadero's publicly visible documentation on their website? The latter has been done many many times on this and lazarus mailing lists. Anyway, I fully understand the issue with copyright material - posting of the Kylix description was simply to highlight the problem in the FPC docs. In no means did I intend that the Kylix description must be copied verbatim into the FPC docs. I simply commented that the Kylix documentation was correct and clearer to understand. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc 2.6.0 for arm-embedded
Am Monday 06 February 2012 14:27:20 schrieb Koenraad Lelong: > I do have a working crosscompiler (I think), only I have to call it via > /usr/lib/fpc/2.6.0/ppcrossarm ..., instead of via fpc ... > The code seems not to work, but that could be my own RTL, which I copied > from SMT32F103RE. I'm working on that. I am also interested in crosscompiling for embedded ARM. How did you install the crosscompiler on Linux OS? Is there an easy way of doing this? Is it in the debian packages precompiled and ready for use? ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc 2.6.0 for arm-embedded
On 06-02-12 10:04, Graeme Geldenhuys wrote: For a much easier cross-compiling experience, try using Paul Breneman's downloads. He has packages the FPC arm cross-compiler is a very small archive. Simply unzip and run - and it works no problems. As a bonus, he also includes fpGUI (for GUI development) with his cross-compiler archives. http://www.turbocontrol.com/easyfpgui.htm I downloaded that package, and I tried it on my x86_64 Ubuntu-laptop. ppcarm can't be executed, "file ppcarm" shows this : ppcarm: ELF 32-bit LSB executable, ARM, version 1, statically linked, stripped AFAIK this means it's a binary to run on an arm-system, so it's not a crosscompiler and I do not have an arm-system at hand that can run a compiler. I think there is some misunderstanding. What I'm trying to do is make software for an embedded system. There is no OS. The controller I'm targetting has 128K of flash-rom and 8K of RAM. I do have a working crosscompiler (I think), only I have to call it via /usr/lib/fpc/2.6.0/ppcrossarm ..., instead of via fpc ... The code seems not to work, but that could be my own RTL, which I copied from SMT32F103RE. I'm working on that. Regards, Koenraad Lelong. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On Mon, 6 Feb 2012, Graeme Geldenhuys wrote: ReadBuffer actually reads data from the stream to the buffer. Just like read. Sorry, I got my email all twisted - to many open windows at the same time. My issue is with the TStream.WriteBuffer's short description. It reads as follows... "Writes data from the stream to the buffer" And now the Kylix 3 description of TStream.WriteBuffer. "Writes Count bytes from Buffer onto the stream and advances "the current position of the stream by Count bytes." As you can see, the FPC documentation describes the flow of data from the stream to the buffer parameter, but Kylix/Delphi describes it other way round - data from the Buffer is written to the Stream. In FPC's docs, the WriteBuffer and ReadBuffer short descriptions are saying the same thing. Suggesting a simple documentation copy-and-paste error. The correct short description for TStream.WriteBuffer should be something like... "Writes data from the buffer to the stream" ...though the Kylix/Delphi short description is much better and clearer. :) Correct. I've adapted the text. Rev 889. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On 06 Feb 2012, at 13:54, Graeme Geldenhuys wrote: > ...though the Kylix/Delphi short description is much better and clearer. :) And anyone who now read that description should be very careful to modify the current description in the FPC documentation, because if the result looks too much like the Delphi description then it would be extremely hard to argue that the author came up with it independently. In general: please do not copy/paste any text or code by Borland/CodeGear/Embarcadero on our mailing lists, fora, bug tracker etc. That is simply the nature of copyright: once you are exposed to something, you are tainted. And the more recent the exposure, the more tainted you are. There are no hard and fast rules regarding what is copyright infringement and what not (even in case of identical copies it depends on the length and nature), but not posting any direct quotes at all is always safe. Jonas___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
> > ReadBuffer actually reads data from the stream to the buffer. Just like > read. Sorry, I got my email all twisted - to many open windows at the same time. My issue is with the TStream.WriteBuffer's short description. It reads as follows... "Writes data from the stream to the buffer" And now the Kylix 3 description of TStream.WriteBuffer. "Writes Count bytes from Buffer onto the stream and advances "the current position of the stream by Count bytes." As you can see, the FPC documentation describes the flow of data from the stream to the buffer parameter, but Kylix/Delphi describes it other way round - data from the Buffer is written to the Stream. In FPC's docs, the WriteBuffer and ReadBuffer short descriptions are saying the same thing. Suggesting a simple documentation copy-and-paste error. The correct short description for TStream.WriteBuffer should be something like... "Writes data from the buffer to the stream" ...though the Kylix/Delphi short description is much better and clearer. :) -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
On Mon, 6 Feb 2012, Graeme Geldenhuys wrote: Hi, I'm I just not reading/understanding this correctly, or is it indeed a documentation bug (in which case I'll file a bug report with a patch). http://www.freepascal.org/docs-html/rtl/classes/tstream.readbuffer.html The "short description", as far as I'm concerned, is completely wrong for TStream.ReadBuffer. It reads as follows: "Reads data from the stream to a buffer" It seems to me that it describes the flow of data going from the stream to the buffer parameter. But that is what TStream.WriteBuffer() does, not ReadBuffer()?? The explanation is correct. ReadBuffer actually reads data from the stream to the buffer. Just like read. Just like you read from a file. Data goes from the file to your variable. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] FPC docs wrong for TStream.WriteBuffer()
Hi, I'm I just not reading/understanding this correctly, or is it indeed a documentation bug (in which case I'll file a bug report with a patch). http://www.freepascal.org/docs-html/rtl/classes/tstream.readbuffer.html The "short description", as far as I'm concerned, is completely wrong for TStream.ReadBuffer. It reads as follows: "Reads data from the stream to a buffer" It seems to me that it describes the flow of data going from the stream to the buffer parameter. But that is what TStream.WriteBuffer() does, not ReadBuffer()?? Then in the "long description" in correctly explains the method. "ReadBuffer reads Count bytes of the stream into Buffer. If the stream "does not contain Count bytes, then an exception is raised." Also compare the short descriptions of .ReadBuffer and .WriteBuffer - they seem to be saying the same thing. So it seems there was a copy-and-paste error when the documentation was written. -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] fpc 2.6.0 for arm-embedded
On 3 February 2012 14:23, Koenraad Lelong wrote: > > I just had some time to look into this again. > I downloaded the latest 2.6.0 sources and mostly followed > http://wiki.freepascal.org/TARGET_Embedded to make a crosscompiler. In > /usr/lib/fpc/2.6.0 there is a ppcrossarm with a date of today when I run > ppcrossarm -i. > But when I try > > fpc -Parm -Tembedded -Wplpc2124 -Cparmv7m > > I get an error : For a much easier cross-compiling experience, try using Paul Breneman's downloads. He has packages the FPC arm cross-compiler is a very small archive. Simply unzip and run - and it works no problems. As a bonus, he also includes fpGUI (for GUI development) with his cross-compiler archives. http://www.turbocontrol.com/easyfpgui.htm -- Regards, - Graeme - ___ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] libjpeg, libjpeg-turbo - pascal bindings
'In our previous episode, dmitry boyarintsev said: > Has anyone ever met libjpeg or libjpeg-turbo (by IJG) pascal bindings > (for dynamic libraries)? > The most commonly used PasJPEG doesn't meet the requirements. > > If there's none, would it be useful to add them to FCL? Yes and no. New dependency (libjpeg) means new package. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal