Re: [fpc-pascal] Re: FPC 2.2.1 on Mac OS X

2008-06-04 Thread Damien Gerard


Le Jun 4, 2008 à 8:51 AM, Karl-Michael Schindler a écrit :


Hi

I only noticed now the discussion on the mailing list about fpc  
2.2.1 and lazarus on Mac OS X. As the maintainer of the .info files  
of fpc and lazarus I should probably lay out my ideas about the  
future.


The next step is fpc 2.2.2. It should resolve some of the issues in  
a clean way and enable to remove some workarounds as well as serve  
as a solid base for a lazarus installation.


When this is settled, I will extend lazarus in the following way:

1) create so-called splitoffs, so there will be separate packages  
for lazarus-gtk1, lazarus-aqua and when ready lazarus-gtk2.
Then the user can simply choose the best interface for his  
situation. This can be done, whatever the default setting of  
LCLPLATFORM will be.


2) create double clickable Lazarus applications with links in / 
Applications/Fink.




Please not Fink. Put only Lazarus.app as it already exists (Carbon  
widgetset) into /Applications/ (through an installer since it installs  
FPC too).


A remaining question is about the code base I will use for lazarus.  
The best solution would clearly be that lazarus 0.9.26 comes out  
shortly before i am ready and so I could base in on that. If not, I  
would submit versions based on plain 0.9.24 as a first step.  
Depending on the conditions then, one could consider an intermediate  
0.9.25 version.


What is the status of the aqua version? Is 0.9.24 good enough at  
least as a start until 0.9.26 is ready or is it absolutely necessary  
to include the fixes since 0.9.24?


Best wishes - Michael.




--
Damien Gerard
[EMAIL PROTECTED]

"Intelligence is 10 million rules."
   -- Douglas Lenat





___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Built in Query language (or abuse)

2008-06-04 Thread Adrian Veith

L schrieb:

A creative idea:

--Another idea--
Remember the "file of Record" innovation in pascal?

Table of Record...

A "file of record" allows one to remain strongly typed. What about a 
"DatabaseTable of Record".


var
 // F: File Of DataRec;
 DB: Table of DataRec; // aka a RelVar



We do something similar with our dbGonzales Database engine with 
standard pascal code. The tables are typed and have coresponding 
interface classes in oo-pascal. A table can hold any of the subclasses 
of its baseclass. If you access a "record" you get automatically the 
corresponding interface class and can use its methods.


A small demo to visualize this is here 
http://www.db-gonzales.de/download/GDemo.zip. The demo draws objects 
(circle, line, rectangle, ellips) stored in database and animates them 
(or adds new). If you start more instances of the demo, you can see what 
the other instance is doing with the objects.


If you look at the source of the demo, you can see, that it is also 
possible to write queries with pascal notation, which are already 
checked at compile time - but I must admit, that this a little bit clumsy.


   qy:= TGdfFilteredTableOp.Create(tb, [],
   TfComp.New(tb.BaseClass.FieldByName('ParentID'), 
TvVariant.Val(Null), [cvEQ]));


could also be written as:

   qy:= TGdfFilteredTableOp.Create(tb, [],
   TfComp.New(TPaintObject(tb.BaseInterfaceClass).ParentID, 
TvVariant.Val(Null), [cvEQ]));


and is the same as:

   qy:= TGdfFilteredTableOp.Create(tb, [],
   'ParentID is null' );

which is better readable.


So my opinion is - we don't need to change pascal to achieve things like 
that, it's already in the language


Cheers, Adrian.

p.s: The information on the webpage about the database is outdated - i 
haven't found the time to write a documentation.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC_ARMEL system calls

2008-06-04 Thread Luca Olivetti

En/na Henry Vermaak ha escrit:


what output does:

qemu-arm -strace hello


h, my qemu-arm doesn't have a -strace option:

$ devkits/cputransp/bin/qemu-arm-cvs -strace 
users/luca/home/luca/fpc-svn/hello

qemu-arm version 0.9.0, Copyright (c) 2003-2007 Fabrice Bellard
usage: qemu-arm [-h] [-g] [-d opts] [-L path] [-s size] [-cpu model] 
program [arguments...]

Linux CPU emulator (compiled for arm emulation)

-hprint this help
-g port   wait gdb connection to port
-L path   set the elf interpreter prefix 
(default=/usr/gnemul/qemu-arm)

-s size   set the stack size in bytes (default=524288)
-cpu modelselect CPU (-cpu ? for list)
-drop-ld-preload  drop LD_PRELOAD for target process

debug options:
-d options   activate log (logfile=/tmp/qemu.log)
-p pagesize  set the host page size to 'pagesize'





give? (run on your i386 after cross-compiling)

did you compile this with the 2.18 binutils?


Yes.
Could you send me your compiled hello program?

Bye
--
Luca
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC_ARMEL system calls

2008-06-04 Thread Henry Vermaak
2008/6/4 Luca Olivetti <[EMAIL PROTECTED]>:
> Could you send me your compiled hello program?
>

sent in private.

henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC_ARMEL system calls

2008-06-04 Thread Henry Vermaak
for info:

the problem here is that the arm eabi compiler (and/or rtl) must be
built with -O- to work.

henry
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Widestring string functions

2008-06-04 Thread Felipe Monteiro de Carvalho
Hello,

While working with the WinCE interface I note a lack of immediate
substitutes for many PChar rountines. Are them, maybe, somewhere I
couldn't find?

Or else, maybe we could have a new unit, or add new functions to the
strings unit for widestrings?

I have noted this several times, the last is trying to find a replace
for stricomp.

thanks,
-- 
Felipe Monteiro de Carvalho
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC_ARMEL system calls

2008-06-04 Thread Florian Klaempfl

I've fixed some stuff, so it should work with -O2 as well.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC_ARMEL system calls

2008-06-04 Thread Luca Olivetti

En/na Luca Olivetti ha escrit:

runs but it doesn't print anything, neither under scratchbox nor on the 
tablet.


Thanks to Henry Vermaak I rebuilt the cross compiler with -O- and now it 
prints "hello" :-)




I'm trying to cross-compile the gtk2 example but it seems the compiler 
is ignoring -Xd and -Xr:



Well, the compiler it's passing as -rpath what I put in -Xr but the 
linker is ignoring it (at least it seems so).


Anyway, I tried passing -k'L 
/path/where/I/copied/all/the/target/libraries' and it's progressing (it 
isn't finding some libraries that are there, like libc) but I see a 
bunch of messages like these:


/home/luca/crossbinutils/bin/armel-linux-ld: ERROR: Source object 
/scratchbox/users/luca/targets/CHINOOK_ARMEL/pippo/libgobject-2.0.so has 
EABI version 4, but target packages/gtk2/examples/helloworld/helloworld 
has EABI version 0
/home/luca/crossbinutils/bin/armel-linux-ld: failed to merge target 
specific data of file 
/scratchbox/users/luca/targets/CHINOOK_ARMEL/pippo/libgobject-2.0.so
/home/luca/crossbinutils/bin/armel-linux-ld: ERROR: Source object 
/scratchbox/users/luca/targets/CHINOOK_ARMEL/pippo/libglib-2.0.so has 
EABI version 4, but target packages/gtk2/examples/helloworld/helloworld 
has EABI version 0
/home/luca/crossbinutils/bin/armel-linux-ld: failed to merge target 
specific data of file 
/scratchbox/users/luca/targets/CHINOOK_ARMEL/pippo/libglib-2.0.so



Bye
--
Luca
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] x86_64 assembler

2008-06-04 Thread mm

Hello,

How can one declare a constant of type qword with the INTEL assembler?
I am using FPC 2.2.0 and the mnemonic "dq"  stops the compilation with
the message "Error: Unrecognized opcode DQ".

Thanks,
mm

http://www.ellipsa.net/
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] steering fpcmake for multiple platforms

2008-06-04 Thread Marc Santhoff
Hi,

I'm in the process of making a package for fpc platform aware. It is
developed and working on FreeBSD and I want to make it usable on
Windows, too.

My problems are:

1. How can/should the target path of the target "zipsourceinstall" be
set, so that it will work on both platforms? Currently it comes out as 

"share/src/fpc-$(version)/packagename"

This is mostly correct (since it is an "extra" package in contrast to a
"base" package) but makes no sense on windows.

2. How can I set the compiling target path, the path where the .ppu
and .o will be stored to match the installation?

3. How can I deal with the original source linking to libc and using
basunix, which when omitted leads to missing basic type declarations
like "ssize_t" or "time_t"?

TIA,
Marc


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] steering fpcmake for multiple platforms

2008-06-04 Thread Marc Santhoff
Am Mittwoch, den 04.06.2008, 23:38 +0200 schrieb Marc Santhoff:
> Hi,
> 
> I'm in the process of making a package for fpc platform aware. It is
> developed and working on FreeBSD and I want to make it usable on
> Windows, too.
> 
> My problems are:
> 
> 1. How can/should the target path of the target "zipsourceinstall" be
> set, so that it will work on both platforms? Currently it comes out as 
> 
>   "share/src/fpc-$(version)/packagename"

No solution yet ...

> This is mostly correct (since it is an "extra" package in contrast to a
> "base" package) but makes no sense on windows.
> 
> 2. How can I set the compiling target path, the path where the .ppu
> and .o will be stored to match the installation?

Okay, this is done in the installation step, not when compiling. Done.

> 3. How can I deal with the original source linking to libc and using
> basunix, which when omitted leads to missing basic type declarations
> like "ssize_t" or "time_t"?

This is done so far by re-defining some missing symbols. If there is a
unit on windows defining "off_t" and "time_t" I still like to know.

Going forward I ran into another problem:

4. When the sources are compiled the "libimphdf5.a" is built, but it is
mostly empty. There is only an "!arch" tag (or so) in it and no
definitions. The library "hdf5.dll" is in the windows directory and in
the program directory (to be sure ;).

What is missing here?

Regards,
Marc


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: FPC 2.2.1 on Mac OS X

2008-06-04 Thread Karl-Michael Schindler

Hallo

Am 4. Jun 2008 um 09:56 schrieb Damien Gerard:


Le Jun 4, 2008 à 8:51 AM, Karl-Michael Schindler a écrit :

I only noticed now the discussion on the mailing list about fpc  
2.2.1 and lazarus on Mac OS X. As the maintainer of the .info files  
of fpc and lazarus I should probably lay out my ideas about the  
future.


The next step is fpc 2.2.2. It should resolve some of the issues in  
a clean way and enable to remove some workarounds as well as serve  
as a solid base for a lazarus installation.


When this is settled, I will extend lazarus in the following way:

1) create so-called splitoffs, so there will be separate packages  
for lazarus-gtk1, lazarus-aqua and when ready lazarus-gtk2.
Then the user can simply choose the best interface for his  
situation. This can be done, whatever the default setting of  
LCLPLATFORM will be.


2) create double clickable Lazarus applications with links in / 
Applications/Fink.




Please not Fink. Put only Lazarus.app as it already exists (Carbon  
widgetset) into /Applications/ (through an installer since it  
installs FPC too).


I do not really understand this. Fink is not suppossed to install  
anything anywhere else than in the /sw/... tree and /Applications/ 
Fink. Direct installations into /Applications are the matter of  
the .dmg based packages, which is a different way not related to fink.


How do you use fink for your work with freepascal and lazarus?

Best wishes - Michael Schindler___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal