[fpc-pascal] fpc and boehm

2007-08-26 Thread blackdog

Hi List

This is my first post to the list and I'm new to fpc too. 

I'm interested in using fpc to create .so/.dll for the Neko
virtual machine (http://www.nekovm.org), instead of using C for the same
task. So that means translating header files. I've done some of this
and had some success but I'm getting some random problems occurring.

Neko uses the boehm garbage collector, so my question is, does
fpc play well with boehm? My assumption has been that fpc
could be used as a straight replacement for C.

Thanks for any wisdom.

bd

-- 
http://www.blackdog-haxe.com/

"It is no measure of health to be well adjusted to a profoundly sick
society." --Jiddu Krishnamurti
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread Daniël Mantione


Op Sun, 26 Aug 2007, schreef blackdog:

> 
> Hi List
> 
> This is my first post to the list and I'm new to fpc too. 
> 
> I'm interested in using fpc to create .so/.dll for the Neko
> virtual machine (http://www.nekovm.org), instead of using C for the same
> task. So that means translating header files. I've done some of this
> and had some success but I'm getting some random problems occurring.
> 
> Neko uses the boehm garbage collector, so my question is, does
> fpc play well with boehm? My assumption has been that fpc
> could be used as a straight replacement for C.

I'm not aware of any uses in practice, but I expect it will work. FPC's 
memory manager is repleacable by means of procvars, so you have a lot of 
flexibility.

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread Jonas Maebe


On 26 Aug 2007, at 13:53, Daniël Mantione wrote:


Neko uses the boehm garbage collector, so my question is, does
fpc play well with boehm? My assumption has been that fpc
could be used as a straight replacement for C.


I'm not aware of any uses in practice, but I expect it will work.


Someone recently posted on this list that he tried to get it to work  
with FPC, but didn't manage to do so.



Jonas


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


Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread blackdog

Hi Daniël

Thanks for the quick reply. I don't necessarily want fpc to interact
with boehm directly by redirecting the memory manager calls, however now
that you've mentioned it could be a solution, my question is should
an fpc .so be a direct replacement for a C .so? Can you think of any
reason when that would not be the case - apart from bad translation of
header files. For example, neko uses dlopen with RTLD_LAZY to load
the .so, does fpc expect RTLD_NOW or anything like that?

Thanks again

bd

On Sun, 26 Aug 2007 13:53:12 +0200 (CEST)
Daniël Mantione <[EMAIL PROTECTED]> wrote:

> 
> 
> Op Sun, 26 Aug 2007, schreef blackdog:
> 
> > 
> > Hi List
> > 
> > This is my first post to the list and I'm new to fpc too. 
> > 
> > I'm interested in using fpc to create .so/.dll for the Neko
> > virtual machine (http://www.nekovm.org), instead of using C for the
> > same task. So that means translating header files. I've done some
> > of this and had some success but I'm getting some random problems
> > occurring.
> > 
> > Neko uses the boehm garbage collector, so my question is, does
> > fpc play well with boehm? My assumption has been that fpc
> > could be used as a straight replacement for C.
> 
> I'm not aware of any uses in practice, but I expect it will work.
> FPC's memory manager is repleacable by means of procvars, so you have
> a lot of flexibility.
> 
> Daniël


-- 
http://www.blackdog-haxe.com/

"It is no measure of health to be well adjusted to a profoundly sick
society." --Jiddu Krishnamurti
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Win64 Cross Compiling

2007-08-26 Thread Robert Wolfe
Hi all!  I would like to add Win64 cross compiling capabilities to the
FP.EXE editor.  I was wondering if anyone has done this already and if so,
how?

Robert Wolfe [MCP/Linux+] [EMAIL PROTECTED]
Shatter IT Global Services, LLC
http://www.shatterit.com


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


[fpc-pascal] SMTP server using FPC

2007-08-26 Thread Robert Wolfe
Second posting to the mailing list this morning.

I am wanting to write an SMTP server using FPC.  However, I am having a
tough time trying to find libraries/units that will allow me to do so.  I
know about Synapse as I use that to write client software.  Now I just need
something to write software for the server-side of things.

Any points in the right direction would be helpful.

Robert Wolfe [MCP/Linux+] [EMAIL PROTECTED]
Shatter IT Global Services, LLC
http://www.shatterit.com


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


Re: [fpc-pascal] SMTP server using FPC

2007-08-26 Thread ik
On 8/26/07, Robert Wolfe <[EMAIL PROTECTED]> wrote:
> Second posting to the mailing list this morning.
>
> I am wanting to write an SMTP server using FPC.  However, I am having a
> tough time trying to find libraries/units that will allow me to do so.  I
> know about Synapse as I use that to write client software.  Now I just need
> something to write software for the server-side of things.
>
> Any points in the right direction would be helpful.

How about lnet ? It's "Official" FPC socket library multi-platform, it
already has a SMTP client, and all you need to do is to create a
server... and you can always contribute it back :)

>
> Robert Wolfe [MCP/Linux+] [EMAIL PROTECTED]
> Shatter IT Global Services, LLC
> http://www.shatterit.com
>

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


Re: [fpc-pascal] SMTP server using FPC

2007-08-26 Thread Marco van de Voort
> > Any points in the right direction would be helpful.
> 
> How about lnet ? It's "Official" FPC socket library multi-platform,

No it's not :-)

And afaik Indy already comes with a socket server.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Win64 Cross Compiling

2007-08-26 Thread Daniël Mantione


Op Sun, 26 Aug 2007, schreef Robert Wolfe:

> Hi all!  I would like to add Win64 cross compiling capabilities to the
> FP.EXE editor.  I was wondering if anyone has done this already and if so,
> how?

That is not possible as there can be only only code generator inside the 
IDE. The IDE can be compiled for Win64 afaik, but there exists no gdb for 
Win64 so debugging is impossible.

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread Daniël Mantione


Op Sun, 26 Aug 2007, schreef blackdog:

> 
> Hi Daniël
> 
> Thanks for the quick reply. I don't necessarily want fpc to interact
> with boehm directly by redirecting the memory manager calls, however now
> that you've mentioned it could be a solution, my question is should
> an fpc .so be a direct replacement for a C .so?

An FPC .so can be a perfect replacement for a C .so. I'm not aware of 
limitations.

> Can you think of any
> reason when that would not be the case - apart from bad translation of
> header files. For example, neko uses dlopen with RTLD_LAZY to load
> the .so, does fpc expect RTLD_NOW or anything like that?

No, it should work.

Daniël___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Installation/Compilation of FPC for Darwin 8.0 (x86)

2007-08-26 Thread Jonas Maebe


On 24 Aug 2007, at 08:31, Werner Bochtler wrote:


I have a running installation of Darwin 8.0 (x86) in a virtual machine
(vmware). Can anyone give me some hints how to install the current
snapshot of FPC in this environment. I was not able to locate a  
working
FPC 2.0 binary for Darwin (x86) to compile the current compiler  
sources.


ftp://ftpmaster.freepascal.org/fpc/beta/2.1.4/source/ 
fpc-2.1.4.universal-darwin.bootstrap.tar.bz2



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


Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread Jonas Maebe


On 26 Aug 2007, at 15:00, Daniël Mantione wrote:


An FPC .so can be a perfect replacement for a C .so. I'm not aware of
limitations.


Except for a bug caused by the *prt*.as -> si_*prc*.inc transition  
which means that currently under Linux the initialization sections  
are not executed:

http://www.freepascal.org/mantis/view.php?id=9089


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


Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread blackdog

Thanks ,

That removes some variables from my bug hunt.

Cheers

bd

On Sun, 26 Aug 2007 15:00:11 +0200 (CEST)
Daniël Mantione <[EMAIL PROTECTED]> wrote:

> 
> 
> Op Sun, 26 Aug 2007, schreef blackdog:
> 
> > 
> > Hi Daniël
> > 
> > Thanks for the quick reply. I don't necessarily want fpc to interact
> > with boehm directly by redirecting the memory manager calls,
> > however now that you've mentioned it could be a solution, my
> > question is should an fpc .so be a direct replacement for a C .so?
> 
> An FPC .so can be a perfect replacement for a C .so. I'm not aware of 
> limitations.
> 
> > Can you think of any
> > reason when that would not be the case - apart from bad translation
> > of header files. For example, neko uses dlopen with RTLD_LAZY to
> > load the .so, does fpc expect RTLD_NOW or anything like that?
> 
> No, it should work.
> 
> Daniël

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


Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread Marco van de Voort
> > with boehm directly by redirecting the memory manager calls, however now
> > that you've mentioned it could be a solution, my question is should
> > an fpc .so be a direct replacement for a C .so?
> 
> An FPC .so can be a perfect replacement for a C .so. I'm not aware of 
> limitations.

Note, this list is a few weeks old. Don't know what is merged from the
"fixed" items.

1) Afaik t_linux.pas:375 should have begin..end in the else form?   fixed

2) if not linking to libc, but when shared libs are used (e.g. pascal built), 
shared libs are not inited and finalized at all?

3) shared libs are not finalized because there is none. (they are inited in
the libs pascalmain which is called in the .init section)

4) there is no .fini in the internal assembler.   fixed by Florian tbt

5) problem in t_linux (initsysinitunits), in a simple test program that
imports cmem, linklibc is not triggered here, because cmem's importlibrary.*
contains "libc.so" not "c". (which is then copied in to linkotherlib)

6) if I temporarily fix that (so now si_c21 is chosen), the program GPFs on
shutdown.  libc_* constants appear to be NIL

7) without -Bsymbolic linking multiple parts (mainprogram or lib) is 
unreliable. However adding -Bsymbolic systematically is not doable due to 
http://www.freepascal.org/mantis/view.php?id=8397

8) if no libc, must we then walk the ctor/dtor tables by ourselves? These
  are constructed by the dynloader, but I assume the main program at least
  _triggers_ this walking, if the code isn't in libc to begin with.

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


Re: [fpc-pascal] fpc and boehm

2007-08-26 Thread blackdog

I am running under linux - but I'm not using initalization or
finalization sections, so i think i'm ok. 

thanks for the info

bd


On Sun, 26 Aug 2007 15:07:44 +0200
Jonas Maebe <[EMAIL PROTECTED]> wrote:

> 
> On 26 Aug 2007, at 15:00, Daniël Mantione wrote:
> 
> > An FPC .so can be a perfect replacement for a C .so. I'm not aware
> > of limitations.
> 
> Except for a bug caused by the *prt*.as -> si_*prc*.inc transition  
> which means that currently under Linux the initialization sections  
> are not executed:
> http://www.freepascal.org/mantis/view.php?id=9089
> 
> 
> Jonas___
> 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] special numbers detected by val()

2007-08-26 Thread Joao Morais

Marc Santhoff wrote:

I want to read in text files containing matrix data. The data is
organized in rectangular manner, but some places are not valid because
they are from physical measurements at places that are not reachable by
any instrument.

In this data files I have to use a convention to detect this invalid
spots.

My idea was to uses the string "NaN" or the like because anything else
would narrow the range of input values (e.g. using -999 or similar for
expressing the special case). If val could handle this itself, I'd not
have to write any parsing code.


You can implement your own data type (eg as a class) and include some 
flags as IsNull, IsEmpty, etc.


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


Re: [fpc-pascal] Problem with interfaces

2007-08-26 Thread Joao Morais

Joao Morais wrote:
I simply don't know how to register the issue since I can't create a 
small sample that reproduce it, but I can send about 1 mb of sources to 
a volunteer though.


Was this one forgotten? Let me know how can I help.

--
Joao Morais

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


Re: [fpc-pascal] special numbers detected by val()

2007-08-26 Thread Marc Santhoff
Am Sonntag, den 26.08.2007, 13:43 -0300 schrieb Joao Morais:
> Marc Santhoff wrote:
> > I want to read in text files containing matrix data. The data is
> > organized in rectangular manner, but some places are not valid because
> > they are from physical measurements at places that are not reachable by
> > any instrument.
> > 
> > In this data files I have to use a convention to detect this invalid
> > spots.
> > 
> > My idea was to uses the string "NaN" or the like because anything else
> > would narrow the range of input values (e.g. using -999 or similar for
> > expressing the special case). If val could handle this itself, I'd not
> > have to write any parsing code.
> 
> You can implement your own data type (eg as a class) and include some 
> flags as IsNull, IsEmpty, etc.

I would, but it wouldn't fit the existing program that is intended to
use these values.

I simply made a new procedure that evaluates the special strings and
calls system.val() if none is found. Once these values are parsed "NaN"
and "Infinity" can be used as float values. So far this seems to work
and gives a good source for exceptions, too.

Thank you and thanks to Jonas for answering quickly,
Marc


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


Re: [fpc-pascal] Installation/Compilation of FPC for Darwin 8.0 (x86)

2007-08-26 Thread Werner Bochtler
Jonas Maebe schrieb:
> 
> On 24 Aug 2007, at 08:31, Werner Bochtler wrote:
> 
>> I have a running installation of Darwin 8.0 (x86) in a virtual machine
>> (vmware). Can anyone give me some hints how to install the current
>> snapshot of FPC in this environment. I was not able to locate a working
>> FPC 2.0 binary for Darwin (x86) to compile the current compiler sources.
> 
> ftp://ftpmaster.freepascal.org/fpc/beta/2.1.4/source/fpc-2.1.4.universal-darwin.bootstrap.tar.bz2
> 
> 
> 
> Jonas
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 

Many thanks for this link.

Unfortunately 'ppcuniversal -h' raises the following error message on my
darwin 8.0.1 x86 machine:

/bin/ppcuniversal: Bad executable (or shared library)

Any ideas what's going wrong?

Many thanks in advance,
Werner



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