Re: [lazarus] GTK2 for arm-linux, more

2007-08-08 Thread Koenraad Lelong
Mattias Gaertner schreef:
> On Tue, 07 Aug 2007 23:00:26 +0200
> Vincent Snijders <[EMAIL PROTECTED]> wrote:
> 
>> Koenraad Lelong schreef:
>>> Hi,
>>> I'm trying to get further with my issue with GTK2 for arm-linux.
>>> I found where the exception 'Invalid Filer Signature' is raised : in
>>> lresources.pp : procedure TLRSObjectReader.BeginRootComponent;
>>> I added writeln's for Filersignature and Signature and this is the
>>> result : FilerSignature : 4608084
>>> Signature : 809914452
>>> Can anyone comment on this ?
> 
> The FilerSignature is missing the last byte.
> The Signature is correct.
> 
> Probably the typecast is buggy on this platform.
> 
>  
>> Can you try r11758? It might fix it.
> 
> Same idea. :)
> I replaced the other typecasts.
> 
> 
> Mattias
> 
I updated to 11761. It works now ! But it seems rather slow. I modified
the program to show a message after a button-click. It seems like a
second after the button is clicked before the messagebox appears.
I'll have to try bigger programs to see if it's acceptable.

Some remark : the first time the messagebox is shown it occupies the
whole screen. The second and next times it's much smaller, just the size
of the button, like I would expect.
Anyway, thanks guys !
Regards,
Koenraad Lelong.
P.S. When I look at the version of Lazarus in the IDE I see the previous
version (11739) instead of 11761 like svn reports. I did a make clean,
even a make distclean before make.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux, more

2007-08-07 Thread Yury Sidorov

From: "Vincent Snijders" <[EMAIL PROTECTED]>


Koenraad Lelong schreef:

Hi,
I'm trying to get further with my issue with GTK2 for arm-linux.
I found where the exception 'Invalid Filer Signature' is raised : 
in

lresources.pp : procedure TLRSObjectReader.BeginRootComponent;
I added writeln's for Filersignature and Signature and this is the 
result :

FilerSignature : 4608084


This is only the first three chars of the signature. I wonder why it 
is cut of. Maybe an arm bug?


It is due to unaligned data access. It does not raise exception on 
arm-linux, but do not handled properly...


It is needed to use unaligned() keyword.

 if Signature <> LongInt(FilerSignature) then

must be fixed to

 if Signature <> LongInt({$ifdef 
FPC_SUPPORTS_UNALIGNED}unaligned{$endif}(FilerSignature)) then


Yury. 


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux, more

2007-08-07 Thread Vincent Snijders

Koenraad Lelong schreef:

Hi,
I'm trying to get further with my issue with GTK2 for arm-linux.
I found where the exception 'Invalid Filer Signature' is raised : in
lresources.pp : procedure TLRSObjectReader.BeginRootComponent;
I added writeln's for Filersignature and Signature and this is the result :
FilerSignature : 4608084


This is only the first three chars of the signature. I wonder why it is 
cut of. Maybe an arm bug?


Can you try the following program?
program Project1;

{$mode objfpc}{$H+}

uses
  Classes;

begin
  if FilerSignature[4]<>'0' then
writeln('Bug 1');

  if Integer(FilerSignature) and $FF00 <> $3000 then
writeln('Bug 2');

end.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux, more

2007-08-07 Thread Mattias Gaertner
On Tue, 07 Aug 2007 23:00:26 +0200
Vincent Snijders <[EMAIL PROTECTED]> wrote:

> Koenraad Lelong schreef:
> > Hi,
> > I'm trying to get further with my issue with GTK2 for arm-linux.
> > I found where the exception 'Invalid Filer Signature' is raised : in
> > lresources.pp : procedure TLRSObjectReader.BeginRootComponent;
> > I added writeln's for Filersignature and Signature and this is the
> > result : FilerSignature : 4608084
> > Signature : 809914452
> > Can anyone comment on this ?

The FilerSignature is missing the last byte.
The Signature is correct.

Probably the typecast is buggy on this platform.

 
> Can you try r11758? It might fix it.

Same idea. :)
I replaced the other typecasts.


Mattias

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux, more

2007-08-07 Thread Vincent Snijders

Koenraad Lelong schreef:

Hi,
I'm trying to get further with my issue with GTK2 for arm-linux.
I found where the exception 'Invalid Filer Signature' is raised : in
lresources.pp : procedure TLRSObjectReader.BeginRootComponent;
I added writeln's for Filersignature and Signature and this is the result :
FilerSignature : 4608084
Signature : 809914452
Can anyone comment on this ?


Can you try r11758? It might fix it.

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux, more

2007-08-07 Thread Vincent Snijders

Koenraad Lelong schreef:

Hi,
I'm trying to get further with my issue with GTK2 for arm-linux.
I found where the exception 'Invalid Filer Signature' is raised : in
lresources.pp : procedure TLRSObjectReader.BeginRootComponent;
I added writeln's for Filersignature and Signature and this is the result :
FilerSignature : 4608084
Signature : 809914452
Can anyone comment on this ?
Regards,


Can you print them as hexidecimal strings (use SysUtils.HexStr)?

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] GTK2 for arm-linux, more

2007-08-07 Thread Koenraad Lelong
Hi,
I'm trying to get further with my issue with GTK2 for arm-linux.
I found where the exception 'Invalid Filer Signature' is raised : in
lresources.pp : procedure TLRSObjectReader.BeginRootComponent;
I added writeln's for Filersignature and Signature and this is the result :
FilerSignature : 4608084
Signature : 809914452
Can anyone comment on this ?
Regards,
Koenraad Lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-28 Thread Koenraad Lelong
Marc Weustink schreef:
> Koenraad Lelong wrote:
>> Marc Weustink schreef:
>>> Sam Liddicott wrote:
> 
...
> at leas this is no: "Gtk-WARNING **: cannot open display:"
> so you now have your display and ran into a complete different problem.
> 
>   Exception=Invalid Filer Signature:
> maybe some endian issue or a corrupt file or a bad compiled string
> constant (the form layout is stored internally in a string)
> 
> Maybe, as a test, you can write the contents of the result of
> LazarusResources.Find('TForm'):TLResource directly after the line {$I
> unit1.lrs} in the initialization section of your form.
> 
> (and compare this to the contents of unit1.lrs)
> 
> Marc
I tried this (renamed my form to TestForm1) :
initialization
  {$I unit1.lrs}
writeln('test');
TestRes:=TLresource.Create;
TestRes:=LazarusResources.Find('TTestForm1');
writeln('Name:');
writeln(TestRes.Name);
writeln('Valuetype:');
writeln(TestRes.ValueType);
writeln('Classname:');
writeln(TestRes.ClassName);
end.

The result was :
test
Name:
TTestForm1
Valuetype:
FORMDATA
Classname:
TLResource
[FORMS.PP] ExceptionOccurred


unit1.lrs contains :
LazarusResources.Add('TTestForm1','FORMDATA',[
'TPF0'#10'TTestForm1'#9'TestForm1'#4'Left'#3#17#1#6'Height'#2'y'#3'Top'#3#28#1


Any conclusions ?

Regards,
Koenraad Lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-25 Thread Henry Vermaak

On 25/07/07, Koenraad Lelong <[EMAIL PROTECTED]> wrote:

Henry Vermaak schreef:
> On 23/07/07, Marc Weustink <[EMAIL PROTECTED]> wrote:
...
>
> does this viper run a big or little endian kernel?  my vulcan is big
> endian and i can't get any joy out of it when i compile fpc with
> endian_big.  it would be _very_ cool to be able to use lazarus with
> these little devices.
AFAIK it's little endian. How to verify ?
Yes, it's nice to have FPC for that device, it would be perfect to be
able to use Lazarus (and GTK2).


yes, it's little endian (according to the docs).  let us know if you
make progress on it.

good luck!

henry

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-25 Thread Koenraad Lelong
Henry Vermaak schreef:
> On 23/07/07, Marc Weustink <[EMAIL PROTECTED]> wrote:
...
> 
> does this viper run a big or little endian kernel?  my vulcan is big
> endian and i can't get any joy out of it when i compile fpc with
> endian_big.  it would be _very_ cool to be able to use lazarus with
> these little devices.
AFAIK it's little endian. How to verify ?
Yes, it's nice to have FPC for that device, it would be perfect to be
able to use Lazarus (and GTK2).
Regards,
Koenraad Lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-23 Thread Henry Vermaak

On 23/07/07, Marc Weustink <[EMAIL PROTECTED]> wrote:

Koenraad Lelong wrote:
> Marc Weustink schreef:
>> Sam Liddicott wrote:
>>> I may be asking obvious questions here, but you didn't reveal a lot
>>> about your setup.
>>>
>>> Do you event have a DISPLAY environment variable set?
>> Instead of setting your env, you can also start your app like:
>>
>> your_app --display=yourserver:0
>>
>> Marc
>>
> Tried this, and got another result.
> ./project1 --display=viper:0
> gives :
> [FORMS.PP] ExceptionOccured
>  Sender=EReadError
>  Exception=Invalid Filer Signature
>  Stack Trace:
>  ...
> TApplication.HandleException Invalid Filer Signature
>  Stack trace:
>  ...
> then a form appears (with a red circle with a white bar in it) :
>  Invalid Filer Signature
>  Press OK to ingore and risk data corruption.
>  Press Cancel to kill the program
> [ OK ] [ Cancel ]
> And the form seems to respond to a click on one of the buttons, it
> terminates the application.
>
> This is some progress, thanks. Other suggestions ?

at leas this is no: "Gtk-WARNING **: cannot open display:"
so you now have your display and ran into a complete different problem.

   Exception=Invalid Filer Signature:
maybe some endian issue or a corrupt file or a bad compiled string
constant (the form layout is stored internally in a string)


does this viper run a big or little endian kernel?  my vulcan is big
endian and i can't get any joy out of it when i compile fpc with
endian_big.  it would be _very_ cool to be able to use lazarus with
these little devices.

henry

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-23 Thread Marc Weustink

Koenraad Lelong wrote:

Marc Weustink schreef:

Sam Liddicott wrote:

I may be asking obvious questions here, but you didn't reveal a lot
about your setup.

Do you event have a DISPLAY environment variable set?

Instead of setting your env, you can also start your app like:

your_app --display=yourserver:0

Marc


Tried this, and got another result.
./project1 --display=viper:0
gives :
[FORMS.PP] ExceptionOccured
 Sender=EReadError
 Exception=Invalid Filer Signature
 Stack Trace:
 ...
TApplication.HandleException Invalid Filer Signature
 Stack trace:
 ...
then a form appears (with a red circle with a white bar in it) :
 Invalid Filer Signature
 Press OK to ingore and risk data corruption.
 Press Cancel to kill the program
[ OK ] [ Cancel ]
And the form seems to respond to a click on one of the buttons, it
terminates the application.

This is some progress, thanks. Other suggestions ?


at leas this is no: "Gtk-WARNING **: cannot open display:"
so you now have your display and ran into a complete different problem.

  Exception=Invalid Filer Signature:
maybe some endian issue or a corrupt file or a bad compiled string 
constant (the form layout is stored internally in a string)


Maybe, as a test, you can write the contents of the result of 
LazarusResources.Find('TForm'):TLResource directly after the line {$I 
unit1.lrs} in the initialization section of your form.


(and compare this to the contents of unit1.lrs)

Marc

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-23 Thread Marc Santhoff
Am Sonntag, den 22.07.2007, 18:43 +0200 schrieb Koenraad Lelong:
> Marc Santhoff schreef:
> > Am Sonntag, den 22.07.2007, 12:44 +0200 schrieb Koenraad Lelong:
> > 
> >> "startx" on the board (via ssh) gives me a nice xterm with an active
> >> mouse-cursor on the board's LCD. There I can run my "old" GTK2
> >> application. If I start my lazarus app I get the error-message on the LCD.
> >> If I do xinit old-app (again via ssh), I get my old-app running without
> >> nice borders etc. xinit lazarus-app gives me the same problem, but the
> >> error-message comes in my ssh-shell on the development PC.
> >> Just now, from the directory where my app is I did :
> >> DISPLAY=:0 ./project1
> >> with the same problem. My Lazarus app is called project1 b.t.w.
> > 
> > I don't know why it worked with a glade app, but it looks as if you're
> > not starting the X server at all.
> > 
> > Try "man startx" on the ARM or another machine with full manpages
> > installed. The file "startx" is a shell script, it reads ".xinitrc"
> > first and starts the applications and window manager named therein (at
> > the end of the file).
> > 
> > Try starting project1 form your ~/.xinitrc to see if that works.
> > 
> > HTH,
> > Marc
> > 
> Could you explain why you think the X-server is not started ?

I read your mail as you use startx OR project1 - which would have been
nonsense. My fault, sorry.

I'd try ktrace/strace/truss for looking deeper into the problem. Maybe
checking the system log and/or enabling more debugging output where
possible would help...

Marc


_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-23 Thread Christian Iversen

Koenraad Lelong wrote:

Christian Iversen schreef:


What is your "arm-board"? It doesn't sound like the machine that runs
your X-server?

If you use a unix machine as a workstation, then try this line:

DISPLAY=:0 xhost +

(that just runs "xhost +" with the additional environment of
"DISPLAY=:0" so that we are sure it is set)

This problem is not at all related to your program - it's a generic X
problem. Try to get something like xterm or xclock running on the arm
board, and you will see the same problem unless you fix the underlying
problem. (Which could indeed be a missing $DISPLAY environment var, as
pointed out by Tony Maro)


Christian,
Sorry about the missing information, but my "arm-board" is a PC104
computer-board with a PXA255 chip (Arcom Viper if you're interested). It
has a color LCD of 320x240 pixels. My previous application in FPC with
handwritten GTK2 code does run fine on that board, displaying on the
LCD. The GUI design was made with Glade and translated to FPC.
Now I'm trying to run a minimal Lazarus GTK2 application (a form with a
button) on the same board, with the problem I reported.
So that arm-board is the machine that runs my X-server. 


I'm sorry, I don't know exactly what the problem is.

I think it's quite strange that some programs will contact the X-server, 
and others not.


Are you 100% sure that you have started the programs with the same 
$DISPLAY environment var?


If that's not the problem, I'm not really sure what is.

--
Med venlig hilsen
Christian Iversen

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-22 Thread Koenraad Lelong
Marc Santhoff schreef:
> Am Sonntag, den 22.07.2007, 12:44 +0200 schrieb Koenraad Lelong:
> 
>> "startx" on the board (via ssh) gives me a nice xterm with an active
>> mouse-cursor on the board's LCD. There I can run my "old" GTK2
>> application. If I start my lazarus app I get the error-message on the LCD.
>> If I do xinit old-app (again via ssh), I get my old-app running without
>> nice borders etc. xinit lazarus-app gives me the same problem, but the
>> error-message comes in my ssh-shell on the development PC.
>> Just now, from the directory where my app is I did :
>> DISPLAY=:0 ./project1
>> with the same problem. My Lazarus app is called project1 b.t.w.
> 
> I don't know why it worked with a glade app, but it looks as if you're
> not starting the X server at all.
> 
> Try "man startx" on the ARM or another machine with full manpages
> installed. The file "startx" is a shell script, it reads ".xinitrc"
> first and starts the applications and window manager named therein (at
> the end of the file).
> 
> Try starting project1 form your ~/.xinitrc to see if that works.
> 
> HTH,
> Marc
> 
Could you explain why you think the X-server is not started ? If I do
startx then I get :
[EMAIL PROTECTED]:~> ssh [EMAIL PROTECTED]
[EMAIL PROTECTED]'s password:
[EMAIL PROTECTED] root# startx

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/viper:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X Window System Version 7.0.0
Release Date: 21 December 2005
X Protocol Version 11, Revision 0, Release 7.0
Build Operating System:Linux 2.6.15.6 i686
Current Operating System: Linux viper 2.6.16.28-arcom1-1-viper #1 Wed
Sep 13 11:29:51 BST 2006 armv5tel
Build Date: 20 March 2006
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Jul 22 15:57:40 2007
(==) Using config file: "/etc/X11/xorg.conf"

And the cursor does not return until I do a  on
the arm-machine.
Just now I tried to start project1 (the Lazarus-project) which gave me
the error, then right after it my GTK2-app (which displays a form
showing it failed, because of missing hardware). See
http://users.edpnet.be/brouwerij/pics/p7220010.jpg (450k) for a picture
of this.
As for xinitrc, there is no dot-version of it, only
/etc/X11/xinit/xinitrc, this contains :
#! /bin/sh

if [ -e /usr/bin/x-window-manager ]; then
if [ -e /usr/bin/x-terminal-emulator ]; then
x-terminal-emulator &
fi
exec x-window-manager
fi

echo "No window manager available." >&2
exit 1

I modified it to :
#! /bin/sh

if [ -e /usr/bin/x-window-manager ]; then
if [ -e /home/arcom/project1 ]; then
/home/arcom/project1 &
fi
exec x-window-manager
fi

echo "No window manager available." >&2
exit 1

Result is the same :
[EMAIL PROTECTED] root# startx

_XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
_XSERVTransOpen: transport open failed for inet6/viper:0
_XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6

X Window System Version 7.0.0
Release Date: 21 December 2005
X Protocol Version 11, Revision 0, Release 7.0
Build Operating System:Linux 2.6.15.6 i686
Current Operating System: Linux viper 2.6.16.28-arcom1-1-viper #1 Wed
Sep 13 11:29:51 BST 2006 armv5tel
Build Date: 20 March 2006
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sun Jul 22 18:13:15 2007
(==) Using config file: "/etc/X11/xorg.conf"

(project1:3824): Gtk-WARNING **: cannot open display:

Other suggestions ?

Regards,
Koenraad lelong.


_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-22 Thread Koenraad Lelong
Marc Weustink schreef:
> Sam Liddicott wrote:
>> I may be asking obvious questions here, but you didn't reveal a lot
>> about your setup.
>>
>> Do you event have a DISPLAY environment variable set?
> 
> Instead of setting your env, you can also start your app like:
> 
> your_app --display=yourserver:0
> 
> Marc
> 
Tried this, and got another result.
./project1 --display=viper:0
gives :
[FORMS.PP] ExceptionOccured
 Sender=EReadError
 Exception=Invalid Filer Signature
 Stack Trace:
 ...
TApplication.HandleException Invalid Filer Signature
 Stack trace:
 ...
then a form appears (with a red circle with a white bar in it) :
 Invalid Filer Signature
 Press OK to ingore and risk data corruption.
 Press Cancel to kill the program
[ OK ] [ Cancel ]
And the form seems to respond to a click on one of the buttons, it
terminates the application.

This is some progress, thanks. Other suggestions ?

Regards,
Koenraad Lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-22 Thread Marc Weustink

Sam Liddicott wrote:

I may be asking obvious questions here, but you didn't reveal a lot about your 
setup.

Do you event have a DISPLAY environment variable set?


Instead of setting your env, you can also start your app like:

your_app --display=yourserver:0

Marc



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-22 Thread Marc Santhoff
Am Sonntag, den 22.07.2007, 12:44 +0200 schrieb Koenraad Lelong:

> "startx" on the board (via ssh) gives me a nice xterm with an active
> mouse-cursor on the board's LCD. There I can run my "old" GTK2
> application. If I start my lazarus app I get the error-message on the LCD.
> If I do xinit old-app (again via ssh), I get my old-app running without
> nice borders etc. xinit lazarus-app gives me the same problem, but the
> error-message comes in my ssh-shell on the development PC.
> Just now, from the directory where my app is I did :
> DISPLAY=:0 ./project1
> with the same problem. My Lazarus app is called project1 b.t.w.

I don't know why it worked with a glade app, but it looks as if you're
not starting the X server at all.

Try "man startx" on the ARM or another machine with full manpages
installed. The file "startx" is a shell script, it reads ".xinitrc"
first and starts the applications and window manager named therein (at
the end of the file).

Try starting project1 form your ~/.xinitrc to see if that works.

HTH,
Marc


_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-22 Thread Koenraad Lelong
Christian Iversen schreef:

> 
> What is your "arm-board"? It doesn't sound like the machine that runs
> your X-server?
> 
> If you use a unix machine as a workstation, then try this line:
> 
> DISPLAY=:0 xhost +
> 
> (that just runs "xhost +" with the additional environment of
> "DISPLAY=:0" so that we are sure it is set)
> 
> This problem is not at all related to your program - it's a generic X
> problem. Try to get something like xterm or xclock running on the arm
> board, and you will see the same problem unless you fix the underlying
> problem. (Which could indeed be a missing $DISPLAY environment var, as
> pointed out by Tony Maro)
> 
Christian,
Sorry about the missing information, but my "arm-board" is a PC104
computer-board with a PXA255 chip (Arcom Viper if you're interested). It
has a color LCD of 320x240 pixels. My previous application in FPC with
handwritten GTK2 code does run fine on that board, displaying on the
LCD. The GUI design was made with Glade and translated to FPC.
Now I'm trying to run a minimal Lazarus GTK2 application (a form with a
button) on the same board, with the problem I reported.
So that arm-board is the machine that runs my X-server. I searched for a
file named xhost, but his doesn't exist on the arm-board.
"startx" on the board (via ssh) gives me a nice xterm with an active
mouse-cursor on the board's LCD. There I can run my "old" GTK2
application. If I start my lazarus app I get the error-message on the LCD.
If I do xinit old-app (again via ssh), I get my old-app running without
nice borders etc. xinit lazarus-app gives me the same problem, but the
error-message comes in my ssh-shell on the development PC.
Just now, from the directory where my app is I did :
DISPLAY=:0 ./project1
with the same problem. My Lazarus app is called project1 b.t.w.

Sam, could you give quick instructions about X-forwarding ?
The board does not have a running X-server when booted. I have to ssh to
it and do startx. Startx gives me an xterm. What next ? With X running I
tried another ssh to it, now with -X added, seems to do nothing, I mean
I get a prompt but nothing else. There I tried to start my app :
./project1 -> problem reported
DISPLAY=:0 ./project1 -> problem reported
I was curious and I tried running the app without a running X : the same
problem.

I hope I gave enough information now. Thanks for the responses anyway.
Regards,
Koenraad Lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-21 Thread Christian Iversen

Koenraad Lelong wrote:

Christian Iversen schreef:

Koenraad Lelong wrote:

Hi,
I compiled a minimal project for GTK2 on arm-linux. Compilation went
fine but when I run the project on my arm-board I get :
(project1:1448): Gtk-WARNING **: cannot open display:

Any suggestions where I should look to solve this ?

That's the X-server telling you that it cannot open the X display.

I thought so, but why ?
I already made a GTK2-application, by "hand" (using glade) but it's a
pain converting C to Pascal every time you change anything in your app's
GUI. But the program runs fine.


Where do you run it? On the arm board? Where does the X server run?


You can try to run "xhost +" on the X-server, but it is UNSAFE, and ONLY
for debugging. It allows everyone to read and write to your X display.

Is this just "xhost +" from the command-line (without quotes of course)
? This does not work on my arm-board.
No other suggestions ?


What is your "arm-board"? It doesn't sound like the machine that runs 
your X-server?


If you use a unix machine as a workstation, then try this line:

DISPLAY=:0 xhost +

(that just runs "xhost +" with the additional environment of 
"DISPLAY=:0" so that we are sure it is set)


This problem is not at all related to your program - it's a generic X 
problem. Try to get something like xterm or xclock running on the arm 
board, and you will see the same problem unless you fix the underlying 
problem. (Which could indeed be a missing $DISPLAY environment var, as 
pointed out by Tony Maro)


--
Regards,
Christian Iversen

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


RE: [lazarus] GTK2 for arm-linux

2007-07-21 Thread Sam Liddicott
I may be asking obvious questions here, but you didn't reveal a lot about your 
setup.

Do you event have a DISPLAY environment variable set?

What kind of display does your arm board have?

Maybe the easiest setup will be to ssh to your arm board with X forwarding, 
using ssh -Y or ssh -X

Sam

-Original Message-
From: "Koenraad Lelong" <[EMAIL PROTECTED]>
To: lazarus@miraclec.com
Sent: 21/07/07 20:00
Subject: Re: [lazarus] GTK2 for arm-linux

Christian Iversen schreef:
> Koenraad Lelong wrote:
>> Hi,
>> I compiled a minimal project for GTK2 on arm-linux. Compilation went
>> fine but when I run the project on my arm-board I get :
>> (project1:1448): Gtk-WARNING **: cannot open display:
>>
>> Any suggestions where I should look to solve this ?
> 
> That's the X-server telling you that it cannot open the X display.
I thought so, but why ?
I already made a GTK2-application, by "hand" (using glade) but it's a
pain converting C to Pascal every time you change anything in your app's
GUI. But the program runs fine.
> 
> You can try to run "xhost +" on the X-server, but it is UNSAFE, and ONLY
> for debugging. It allows everyone to read and write to your X display.
Is this just "xhost +" from the command-line (without quotes of course)
? This does not work on my arm-board.
No other suggestions ?
Regards,
Koenraad Lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-21 Thread Koenraad Lelong
Christian Iversen schreef:
> Koenraad Lelong wrote:
>> Hi,
>> I compiled a minimal project for GTK2 on arm-linux. Compilation went
>> fine but when I run the project on my arm-board I get :
>> (project1:1448): Gtk-WARNING **: cannot open display:
>>
>> Any suggestions where I should look to solve this ?
> 
> That's the X-server telling you that it cannot open the X display.
I thought so, but why ?
I already made a GTK2-application, by "hand" (using glade) but it's a
pain converting C to Pascal every time you change anything in your app's
GUI. But the program runs fine.
> 
> You can try to run "xhost +" on the X-server, but it is UNSAFE, and ONLY
> for debugging. It allows everyone to read and write to your X display.
Is this just "xhost +" from the command-line (without quotes of course)
? This does not work on my arm-board.
No other suggestions ?
Regards,
Koenraad Lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GTK2 for arm-linux

2007-07-21 Thread Christian Iversen

Koenraad Lelong wrote:

Hi,
I compiled a minimal project for GTK2 on arm-linux. Compilation went
fine but when I run the project on my arm-board I get :
(project1:1448): Gtk-WARNING **: cannot open display:

Any suggestions where I should look to solve this ?


That's the X-server telling you that it cannot open the X display.

You can try to run "xhost +" on the X-server, but it is UNSAFE, and ONLY 
for debugging. It allows everyone to read and write to your X display.


--
Regards,
Christian Iversen

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] GTK2 for arm-linux

2007-07-21 Thread Koenraad Lelong
Hi,
I compiled a minimal project for GTK2 on arm-linux. Compilation went
fine but when I run the project on my arm-board I get :
(project1:1448): Gtk-WARNING **: cannot open display:

Any suggestions where I should look to solve this ?
Regards,
Koenraad lelong.

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives