Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Michael Van Canneyt
On Mon, 9 Nov 2009, Wimpie Nortje wrote: Marc Santhoff wrote: You can send any defined signal using kill. Try: # kill -TERM for sending the TERM signal. At least FreeBSDs kill works that way. If yours doesn't try: That is what I did. This doesn't run my daemon's exit routines. I don't k

Re: [fpc-pascal] TCustomApplication and QApplication

2009-11-09 Thread ik
I'm using the binding, but it still does not answer the question (that I already found the answer on my own, but I do not like it). In order to work with QT widgets, you must initialize it also by using QApplication and it's family... Why ? well it's the same as TApplication in Lazarus/Delphi, it h

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Marco van de Voort
In our previous episode, Wimpie Nortje said: > > No plans yet. The problem is also a bit that whatever you do is an island. I > > think this is more something for freedesktop to standarize first. > I know there is a standard/recomended way to write a daemon. If you use > KDevelop it will create s

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Wimpie Nortje
Michael Van Canneyt wrote: It should stop the daemons properly. This is the code that gets executed: Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context : PSigContext); cdecl; begin Application.StopDaemons(True); Application.Terminate; end; If it doesn't, something is wrong :(

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Jonas Maebe
On 09 Nov 2009, at 09:07, Michael Van Canneyt wrote: It should stop the daemons properly. This is the code that gets executed: Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context : PSigContext); cdecl; begin Application.StopDaemons(True); Application.Terminate; end; If it doe

[fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Graeme Geldenhuys
Hi, What can the 32bit FPC compiler (currently I run under Linux) cross-compile to 32bit Windows or 64bit Linux. But the 64bit FPC (Linux) can only cross-compile to other 64bit platforms. Why not 32bit platforms too? Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using F

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Torsten Bonde Christiansen
Graeme Geldenhuys wrote: Hi, What can the 32bit FPC compiler (currently I run under Linux) cross-compile to 32bit Windows or 64bit Linux. But the 64bit FPC (Linux) can only cross-compile to other 64bit platforms. Why not 32bit platforms too? It can, i've successfully managed to cross-compile

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Vincent Snijders
Graeme Geldenhuys schreef: Hi, What can the 32bit FPC compiler (currently I run under Linux) cross-compile to 32bit Windows or 64bit Linux. Do you mean that ppcx64 can generate code for win32? I don't think that is true. But the 64bit FPC (Linux) can only cross-compile to other 64bit plat

Re: [fpc-pascal] Re: Stack checking in dynamic libraries

2009-11-09 Thread Joost van der Sluis
On Sun, 2009-11-08 at 19:54 +0100, Jonas Maebe wrote: > cobines wrote on Sun, 08 Nov 2009: > > > I have to conclude that the values in rtl/inc/systemh.inc: StackTop, > > StackBottom, StackLength are not behaving as thread-specific variables > > in the library, even though they are declared using T

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Graeme Geldenhuys
Vincent Snijders wrote: > Graeme Geldenhuys schreef: >> Hi, >> >> What can the 32bit FPC compiler (currently I run under Linux) >> cross-compile to 32bit Windows or 64bit Linux. > > Do you mean that ppcx64 can generate code for win32? I don't think > that is true. See the output below. The 32bi

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Jonas Maebe
On 09 Nov 2009, at 13:49, Graeme Geldenhuys wrote: See the output below. The 32bit Linux FPC can target 32bit & 64bit platforms. But 64bit Linux FPC cannot target 32bit platforms. The later can only cross-compile to other 64bit platforms. I guess you mean this: -- ./p

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Joost van der Sluis
On Mon, 2009-11-09 at 13:02 +0200, Wimpie Nortje wrote: > > Michael Van Canneyt wrote: > > It should stop the daemons properly. This is the code that gets executed: > > > > Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context : > > PSigContext); > > cdecl; > > > > begin > > Application.

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Michael Van Canneyt
On Mon, 9 Nov 2009, Joost van der Sluis wrote: On Mon, 2009-11-09 at 13:02 +0200, Wimpie Nortje wrote: Michael Van Canneyt wrote: It should stop the daemons properly. This is the code that gets executed: Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context : PSigContext); cdecl; b

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Wimpie Nortje
Joost van der Sluis wrote: On Mon, 2009-11-09 at 13:02 +0200, Wimpie Nortje wrote: Michael Van Canneyt wrote: It should stop the daemons properly. This is the code that gets executed: Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context : PSigContext); cdecl; begin Appli

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Graeme Geldenhuys
Jonas Maebe wrote: >> Supported targets: > [snip] >> Linux for x64_6432 > > x64_6432 is not the same as x64_64. It means, afaik, a 32 bit binary > running on a 64 bit Linux system. It probably changes some default Ah yes. Sorry, I did not notice the '32' at the end. > library search paths or

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Joost van der Sluis
On Mon, 2009-11-09 at 14:14 +0100, Michael Van Canneyt wrote: > > On Mon, 9 Nov 2009, Joost van der Sluis wrote: > > > > I don't know how I did it exactly, but I ahve this working properly in a > > production system. (Even created my own SysV init script for it. It > > should be generally usable f

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Henry Vermaak
2009/11/9 Michael Van Canneyt : > > That's good news: I had it on my todo list to let the 'Install' mode > generate > this script in the appropriate directory. If I can use your script as a > start, then I can implement that. I've got /etc/init.d/skeleton (in debian), which looks like a very good

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Jonas Maebe
On 09 Nov 2009, at 14:27, Graeme Geldenhuys wrote: Jonas Maebe wrote: library search paths or so. The i386 compiler cannot generate x86_64 binaries. The appropriate code generator is simply not available. Ummm... I'll go read the wiki and buildfaq again. I'm a bit confused though. When I swi

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Rainer Stratmann
Is it possible to create an .exe file at linux os when choosing target 'windows'? If I change on a linux os the target to windows there is a message 'the system.ppu was not found in the FPC directories. ...' Sorry if I did not read the thread exactly... _

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Graeme Geldenhuys
Jonas Maebe wrote: > > If you do a "make all CPU_TARGET=x86_64" in the FPC directory on a > Linux/i386 platform, then the Makefile will automatically first > compile a cross-compiler to x86_64 and then a native compiler for and > to x86_64. Thanks for explaining that Jonas. It's much clear

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Graeme Geldenhuys
Rainer Stratmann wrote: > Is it possible to create an .exe file at linux os when choosing > target 'windows'? Yes - when you compile your applications using the cross compiler. The crosscompiler wiki page explains it all. I have successfully created Windows 32bit .exe files from my Linux system.

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Jonas Maebe
On 09 Nov 2009, at 15:01, Graeme Geldenhuys wrote: Rainer Stratmann wrote: Is it possible to create an .exe file at linux os when choosing target 'windows'? Yes - when you compile your applications using the cross compiler. The crosscompiler wiki page explains it all. I have successfully cre

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Rainer Stratmann
Am Monday 09 November 2009 15:06:23 schrieb Jonas Maebe: > On 09 Nov 2009, at 15:01, Graeme Geldenhuys wrote: > > Rainer Stratmann wrote: > >> Is it possible to create an .exe file at linux os when choosing > >> target 'windows'? > > > > Yes - when you compile your applications using the cross comp

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Vincent Snijders
Rainer Stratmann schreef: #!/bin/sh gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F gpg --export 6A11800F | apt-key add - echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" \ >/etc/apt/sources.list.d/lazarus.list apt-get update apt-get install lazarus

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Rainer Stratmann
Am Monday 09 November 2009 15:56:30 schrieb Vincent Snijders: > Rainer Stratmann schreef: > > #!/bin/sh > > gpg --keyserver hkp://pgp.mit.edu:11371 --recv-keys 6A11800F > > gpg --export 6A11800F | apt-key add - > > echo "deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe" > > \ >

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Florian Klaempfl
Jonas Maebe schrieb: > > On 09 Nov 2009, at 13:49, Graeme Geldenhuys wrote: > >> See the output below. The 32bit Linux FPC can target 32bit & 64bit >> platforms. But 64bit Linux FPC cannot target 32bit platforms. The later >> can only cross-compile to other 64bit platforms. > > I guess you mean

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Vincent Snijders
Rainer Stratmann schreef: If your source os and cpu is i386-linux and your target is i386-win32, then you get the fpc-crosswin32 deb package from that location. I can not find such a package there..., rgds Rainer Well, it is there: http://www.hu.freepascal.org/lazarus/dists/lazarus-stable/univ

Re: [fpc-pascal] Why can't 64bit FPC cross-compile 32bit

2009-11-09 Thread Rainer Stratmann
Am Monday 09 November 2009 16:15:35 schrieb Vincent Snijders: > Rainer Stratmann schreef: > >> If your source os and cpu is i386-linux and your target is i386-win32, > >> then you get the fpc-crosswin32 deb package from that location. > > > > I can not find such a package there..., rgds Rainer > >

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Vinzent Höfler
Michael Van Canneyt : > On Mon, 9 Nov 2009, Wimpie Nortje wrote: > > It should stop the daemons properly. This is the code that gets executed: > > Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context : > PSigContext); > cdecl; > > begin >Application.StopDaemons(True); >Applicati

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Michael Van Canneyt
On Mon, 9 Nov 2009, "Vinzent Höfler" wrote: Michael Van Canneyt : On Mon, 9 Nov 2009, Wimpie Nortje wrote: It should stop the daemons properly. This is the code that gets executed: Procedure DoShutDown(Sig : Longint; Info : PSigInfo; Context : PSigContext); cdecl; begin Application.Sto

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Jonas Maebe
On 09 Nov 2009, at 21:03, Michael Van Canneyt wrote: On Mon, 9 Nov 2009, "Vinzent Höfler" wrote: As wrong as in "Don't call most system functions from within a signal handler.", maybe? Hmm... In that case, many exceptions would not work either ? The sigaction handlers for catching except

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Vinzent Höfler
Jonas Maebe : > On 09 Nov 2009, at 21:03, Michael Van Canneyt wrote: > > > On Mon, 9 Nov 2009, "Vinzent Höfler" wrote: > > > >> As wrong as in "Don't call most system functions from within a > >> signal handler.", maybe? > > > > Hmm... In that case, many exceptions would not work either ? > >

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Michael Van Canneyt
On Mon, 9 Nov 2009, Jonas Maebe wrote: On 09 Nov 2009, at 21:03, Michael Van Canneyt wrote: On Mon, 9 Nov 2009, "Vinzent Höfler" wrote: As wrong as in "Don't call most system functions from within a signal handler.", maybe? Hmm... In that case, many exceptions would not work either ?

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Jonas Maebe
On 09 Nov 2009, at 21:51, Michael Van Canneyt wrote: Hm. Quite complex code, and not processor independent. It never was processor-independent, because the siginfo codes already varied between architectures. Is there not a more generic way of handling this ? I doubt it. Jonas ___

Re: [fpc-pascal] Stopping daemon in linux

2009-11-09 Thread Michael Van Canneyt
On Mon, 9 Nov 2009, Jonas Maebe wrote: On 09 Nov 2009, at 21:51, Michael Van Canneyt wrote: Hm. Quite complex code, and not processor independent. It never was processor-independent, because the siginfo codes already varied between architectures. I remember days when it was processor-i