Hi,
I'm searching for a rpm for the fpc source snapshot. (1.0.x or 1.1)
thx in advance for any hints,
Mattias Gaertner

Mailing lists / fpc-devel / 2003-02
28 messages · 11 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
I'm searching for a rpm for the fpc source snapshot. (1.0.x or 1.1)
thx in advance for any hints,
Mattias Gaertner
Hi, I'm searching for a rpm for the fpc source snapshot. (1.0.x or 1.1)
There is none atm. If there are enough request for such a snapshot it can be generated on a daily base. But it should already be possible to use a daily CVS checkout and call 'make rpm' to build the rpm.
I want to create a lazarus rpm and it should require fpc and its sources. For lazarus the fpc and the source package do not need to correspond. But I know from other sources, what strange hokuspokus you get, when trying to understand why the source behave differently than the installed lib. In the last two years lazarus provided some fpc rpms, and I guess this will be especially the case for the 1.1. So I need a 'make fpc_source_rpm' with a very simple spec file.
But it should already be possible to use a daily CVS checkout and call 'make rpm' to build the rpm.
Yesterday the 1.0.7 failed for me when compiling gtkglarea, because it tries to recompile gl.ppu.
The 1.1 also failed with DOS unit not found in sysutils.pp.
Mattias
There is none atm. If there are enough request for such a snapshot it can be generated on…
I will start a simple fpc source rpm. Should I take the whole cvs export output of FIXES_1_0_0 (~9mb) or only the content of the snapshot? According to the linux FHS a good place is /usr/share/<packagename>. What is a good name for the package: fpcsrc, fpcsource, fpsource, ... ?
Mattias
I will start a simple fpc source rpm. Should I take the whole cvs export output of FIXES_1_0_0 (~9mb) or only the content of the snapshot? According to the linux FHS a good place is /usr/share/<packagename>. What is a good name for the package: fpcsrc, fpcsource, fpsource, ... ?
Anyway, Linux C-programmers will be shocked after seeing in 'source' *.pas files ;)
IMHO, "fpcsrc" is good choice.
On Fri, 7 Feb 2003 07:17:04 +0100 (CET) I will start a simple fpc source rpm. Should I…
I don't know FHS, but what I do for the FPC *BSD ports:
$PREFIX/share is for anything not OS/architecture dependant. So also the docs should be there, examples etc. This is a general Unix convention btw, not just BSD.
Under BSD I create $PREFIX/share/fpc/src/ and then put the entire FIXES_1_0_0 tree there.
Then doc in $PREFIX/share/fpc/doc
examples in $PREFIX/share/fpc/examples etc.
Does FHS still stuff doc in $PREFIX/doc ? If not, then it probably belongs in share/ too under Linux.
$PREFIX= /usr when the package is in the base systems (IOW it is always installed, things like gcc)
$PREFIX=/usr/local under FreeBSD and OpenBSD, (and NetBSD if not installed via NetBSD's own installation system, NetBSD package systems uses /usr/pkg)
The Slackware distro is also pretty close to this layout.
ok. rpm defines $datadir as $PREFIX/share, so I think, I will take this.
Yep, FHS suggests /usr/share/doc.
Mattias
I'm searching for a rpm for the fpc source snapshot. (1.0.x or 1.1) Mattias Gaertner
Hi,
I'm just wondering if there are any extra docs for the standard units that are acutally not described in the manual, e.g. the windows-unit. Are there any and if so, where can I find them. Or is there at least a command-listing for these units?
Christian Keck
There are no extra docs. For the windows unit you can look at http://msdn.microsoft.com
Peter
PV> There are no extra docs. For the windows unit you can look at PV> http://msdn.microsoft.com
PV> Peter
PV> _______________________________________________ PV> fpc-devel maillist -
PV> http://lists.freepascal.org/mailman/listinfo/fpc-devel
Thanks for the reply...
But how shall I find information about a FPC unit on MSDN?! I do not know what's extactly included in this unit, so what shall I search for there? ;)
Chris
There is no description of all of the stuff in the windoze unit.
It just calls the windows functions - there are 100s and 100s of them. The windows functions are/were documented in a large (8M) zip (win32.zip?) containing win32.hlp which used to be available as a free download from borland's site - not sure how up to date it is. If it's not there email me privately & I'll send you a copy.
Regards John
http://info.borland.com/devsupport/delphi/downloads/#Delphi 2
This is link, click on win32.zip & download... J
It just calls the windows functions - there are 100s and 100s of them. The windows functions are/were documented in a large (8M) zip (win32.zip?) containing win32.hlp which used to be available as a free download from borland's site - not sure how up to date it is.
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
PV> There are no extra docs. For the windows unit you can look at PV>…
The windows unit is simply a pascal binding for the Windows API. The C calls are all valid. So you can simply search the WINAPI functions for the parts that you need and call them from your application as described in the MSDN.
For a lot of Linux the same true. You can check the man page for the C function and call it as described in the man page.
Peter
There is no description of all of the stuff in the windoze unit. It just calls the…
Hi,
i wrote some unit to handle my own FS :> but that's not important. well, i've got a constructor looking like this:
constructor CFile.Create(var AFS:CDataFile;APath:string);
var SavedPath : string;
begin
FFS:=AFS;
SavedPath:=AFS.GetCurrentPath;
// Writeln(SavedPath);
FFileName:=CopyUntilReversed(APath,'/');
FFilePath:=APath;
AFS.ChDir(FFilePath);
FIndex:=AFS.GetFileID(FFileName);
if FIndex=0 then
raise EDataFileException.Create('file '+APath+'doesn''t exist');
if FFS.Header.Files[FIndex].IsCompressed then
DataStream:=TDataFileCompressedStream.Create(FFS,FIndex)
else
DataStream:=TDataFileStream.Create(AFS,FIndex);
FFS.ChDir(SavedPath);
end;this code is 100% correct, but in some specific circumstances it works buggy, the variables(class's fields) have weird values(like 0 or ''). when I uncomment the commented line the results are ok. so how's that possible a writeln can fix the code? it does only print the 'debug-info' :>? it shouldn't change anything. the point is i don't need that line infact i don't want it at all. :/
i guess it has something to do with optimiser.
i even triedthe latest snapshot from cvs - it didnt work out.
Help Plz :>.
Best Regards,
Luke 'Maly' O.
There is no description of all of the stuff in the windoze unit. It just calls the…
LJ> There is no description of all of the stuff in the windoze unit.
LJ> It just calls the windows functions - there are 100s and 100s of them. The LJ> windows functions are/were documented in a large (8M) zip (win32.zip?) LJ> containing win32.hlp which used to be available as a free download from LJ> borland's site - not sure how up to date it is. If it's not there email me LJ> privately & I'll send you a copy.
LJ> Regards John
Thanks for the answer.
I already found the Win32.hlp on my Delphi CD.
So all functions are supported by the windows unit? I'm asking, because I need the Sleep()-funtion of the "Process and Thread Functions" group for my program.
I do not want to use Delay(), because I would have to include the crt or wincrt unit then and the output is no longer made to stdout then... However, Sleep() does not work here for me. Also SleepEx() seems to be unsupported... Any ideas?
regards
Chris
LJ> -----Original Message-----
LJ> From: Chris
LJ> Sent: Wednesday, February 12, 2003 16:17
LJ> To:
LJ> Subject: [fpc-devel]Missing References for supplied units?!
LJ> Hi,
LJ> I'm just wondering if there are any extra docs for the standard units LJ> that are acutally not described in the manual, e.g. the windows-unit. LJ> Are there any and if so, where can I find them. Or is there at least a LJ> command-listing for these units?
LJ> Christian Keck
To find out which fns are supported you have to look at the source of the windows unit, eg ...rtl\win32\windows.pp or something like that (eg in fpc.zip or fpc10.zip from ftp.freepascal.fpc\source but most of them are supported by win32.
sleep certainly ok, I use it all the time...
d10.pp - sleeps for 10 secs file is:
uses windows;
begin
sleep(10000);
end.just tried it on v10...on my PC, running win95...
750-c:\pas>v10nw
win32/v10n(s) c:\v10nw\bin\ppc386 (size=268800) 1.0.7 [2003/02/07] --installed:07/02/03 18:49:02 v10 from:d:\fpk\basew32_v10.zip 07/02/03 02:48
750-c:\pas>pas d10
win32/v10n(s) c:\v10nw\bin\ppc386 (size=268800) 1.0.7 [2003/02/07]--Free Pascal
Compiler version 1.0.7 [2003/02/07] for i386
Copyright (c) 1993-2003 by Florian Klaempfl
Target OS: Win32 for i386
Compiling d10.pp
Linking d10.exe
3 Lines compiled, 5.6 sec
-- d10.exe made ok
750-c:\pas>d10
sleeps for 10 secs...
LJ> To find out which fns are supported you have to look at the source of the LJ> windows unit, eg ...rtl\win32\windows.pp or something like that (eg in LJ> fpc.zip or fpc10.zip from ftp.freepascal.fpc\source but most of them are LJ> supported by win32.
LJ> sleep certainly ok, I use it all the time...
LJ> d10.pp - sleeps for 10 secs file is:
LJ> uses windows;
LJ> begin
LJ> sleep(10000);
LJ> end.
LJ> just tried it on v10...on my PC, running win95... 750-c:\pas>>v10nw
LJ> win32/v10n(s) c:\v10nw\bin\ppc386 (size=268800) 1.0.7 [2003/02/07] LJ> --installed:07/02/03 18:49:02 v10 from:d:\fpk\basew32_v10.zip 07/02/03 02:48
750-c:\pas>>pas d10
LJ> win32/v10n(s) c:\v10nw\bin\ppc386 (size=268800) 1.0.7 [2003/02/07]--Free LJ> Pascal
LJ> Compiler version 1.0.7 [2003/02/07] for i386
LJ> Copyright (c) 1993-2003 by Florian Klaempfl
LJ> Target OS: Win32 for i386
LJ> Compiling d10.pp
LJ> Linking d10.exe
LJ> 3 Lines compiled, 5.6 sec
LJ> -- d10.exe made ok
750-c:\pas>>d10
LJ> sleeps for 10 secs...
Very strange! I tried to compile the source a second time from within the IDE and now it didn't complain about any missing declaration any more :-/
Anyway, it works :)
So thanks again to everybody here :)
Chris
LJ> -----Original Message-----
LJ> From: Chris
LJ> Sent: Wednesday, February 12, 2003 18:21
LJ> To: Lee, John
LJ> Subject: Re[2]: [fpc-devel]Missing References for supplied units?!
LJ>> There is no description of all of the stuff in the windoze unit.
LJ>> It just calls the windows functions - there are 100s and 100s of them. LJ> The
LJ>> windows functions are/were documented in a large (8M) zip (win32.zip?) LJ>> containing win32.hlp which used to be available as a free download from LJ>> borland's site - not sure how up to date it is. If it's not there email LJ> me
LJ>> privately & I'll send you a copy.
LJ>> Regards John
LJ> Thanks for the answer.
LJ> I already found the Win32.hlp on my Delphi CD. LJ> So all functions are supported by the windows unit? LJ> I'm asking, because I need the Sleep()-funtion of the "Process and LJ> Thread Functions" group for my program.
LJ> I do not want to use Delay(), because I would have to include the crt LJ> or wincrt unit then and the output is no longer made to stdout then... LJ> However, Sleep() does not work here for me. Also SleepEx() seems to be LJ> unsupported... Any ideas?
LJ> regards
LJ> Chris
LJ>> -----Original Message-----
LJ>> From: Chris
LJ>> Sent: Wednesday, February 12, 2003 16:17
LJ>> To:
LJ>> Subject: [fpc-devel]Missing References for supplied units?!
LJ>> Hi,
LJ>> I'm just wondering if there are any extra docs for the standard units LJ>> that are acutally not described in the manual, e.g. the windows-unit. LJ>> Are there any and if so, where can I find them. Or is there at least a LJ>> command-listing for these units?
LJ>> Christian Keck
Good. It sounds as if either you haven't got your path to the rtl (eg #ifdef win32
-FuC:\PPw\RTL\win32 #endif)set properly in ppc.cfg or pc386.cfg, or you have found a bug in the ide or compiler/rtl. If your problem is still there please send as fault report with source + brief description of error to this email list.
Regards John
Very strange! I tried to compile the source a second time from within the IDE and now it didn't complain about any missing declaration any more :-/
Anyway, it works :)
So thanks again to everybody here :)
Chris
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
Hello! I didn't read all your code. But you should change: constructor CFile.Create(var…
well, yes You're right about that, the previous
version of that declaration was without the 'var', i added var after this bug came up - i tried
everything to correct this :/. but that's not
the cause of my problem - anyway i'll change it
back to the previous form i.e. without 'var'.
(currently i have added 'Write;' without any
arguments, there is no output, code works but
it's still not right - i don't want any Write :/)
p.s.
I guess it's a bit like a problem i had a long time ago the code 'crashed' FPU (if it's possible), and just adding delay(1) to the main processing loop helped.
Still waiting for some help.
Best Regards
Luke 'Maly' O.
i wrote some unit to handle my own FS :> but that's not important. well, i've got a…
It is not. You should AT LEAST put the
AFS.ChDir(FFilePath);
FFS.ChDir(SavedPath);In a try/finally block:
AFS.ChDir(FFilePath);
Try
FIndex:=AFS.GetFileID(FFileName);
if FIndex=0 then
raise EDataFileException.Create('file '+APath+'doesn''t exist');
if FFS.Header.Files[FIndex].IsCompressed then
DataStream:=TDataFileCompressedStream.Create(FFS,FIndex)
else
DataStream:=TDataFileStream.Create(AFS,FIndex);
Finally
FFS.ChDir(SavedPath);
end;This is one thing. Secondly, it sounds like you have some memory buffer overrun. Did you try using the -gh option ? the heaptrc unit gives you some extra possibilities.
Did you try running the code without optimization ?
Michael.
i wrote some unit to handle my own FS :> but that's not important. well, i've got a…
Hello!
I didn't read all your code. But you should change:
constructor CFile.Create(var AFS:CDataFile;APath:string);to
constructor CFile.Create(AFS:CDataFile;APath:string);when AFS is an already constructed class. The reason is that AFS is a pointer to the instance. If AFS is already valid, i. e. points to an instance, there's no need and even danger when you pass it as var. You should pass a class as var only if you intend to make it point to a new or different instance.
HTH
Anton Tichawa.
----------
"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben."
Doris Langley Moore: Ada, Countess of Lovelace (London 1977).
----------
Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email:
----------
Hi! In your example, you actually put the AFS.ChDir(FFilePath) OUTSIDE the try/finally…
Anton Tichawa wroteIn your example, you actually put the AFS.ChDir(FFilePath) OUTSIDE the try/finally block (smile).
well, exception handling isn't important, they'are handled outside this code and ChDir can't fail i.e raise any exception. The main question is why Write changes code execution/generation ?
i tried anything and if there is no Write inside the constructor i'll alway get a FIndex=0 and the Exception isn't even raised :O.
The next thing i want to try is delphi's compiler. I'm almost 100% sure about this code being correct. and if delphi will compile this and it'll work ok
then i guess i'll hang myself :) or just wait til
release of a bugless fpc snapshot/1.2/2.0 :>
Best regards
Luke 'Maly' O.
It is not. You should AT LEAST put the AFS.ChDir(FFilePath); FFS.ChDir(SavedPath); In a…
Hi!
In your example, you actually put the AFS.ChDir(FFilePath) OUTSIDE the try/finally block (smile).
Anton.
----------
"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben."
Doris Langley Moore: Ada, Countess of Lovelace (London 1977).
----------
Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email:
----------
Hi! Convernig the optimization .. try replacing the last line, FFS.ChDir(SavedPath); with…
/me bows deeply in respect :)
i don't know how did You figure it out but i commented the Write and applied Your suggestion. and now everything's OK
Thank You Anton.
Best regards
Luke 'Maly' O.
well, exception handling isn't important, they'are handled outside this code and ChDir…
Hi!
Convernig the optimization .. try replacing the last line,
FFS.ChDir(SavedPath);with
AFS.ChDir(SavedPath);Because, it might seem to the compiler, that the last instruction is write-only and should be deleted.
Anton.
----------
"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte Berechnungen einzuweben."
Doris Langley Moore: Ada, Countess of Lovelace (London 1977).
----------
Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
mobil: +43 664 52 07 907
email:
----------
Hi! In your example, you actually put the AFS.ChDir(FFilePath) OUTSIDE the try/finally…
That is as it should be :-)
Michael.
/me bows deeply in respect :) i don't know how did You figure it out but i commented the…
Nevertheless, there is a bug in the compiler, since it should work correctly both ways. Jonas, any comments ?
Michael.
well, exception handling isn't important, they'are handled outside this code and ChDir…
Maly wrotewell, exception handling isn't important, they'are handled outside this code and ChDir can't fail i.e raise any exception. The main question is why Write changes code execution/generation ?
In general this is due to you having an uninitialized variable somewhere. When you call write(), it write things to the stack, causing it to have different values that may accidentally give another variable a valid value later on. We've already had lots of bugreports that contained the comment that adding a write or read solved their problem and in (almost?) every case it was a bug somewhere in the submitter's program.
It's quite possible that a Delphi generated program will not give the problem in this case, since the stack layout will be different (since it generates different code). That does not mean it's definitely a bug in FPC though (though of course it's possible).
Jonas