Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Jonas Maebe

Mark Morgan Lloyd wrote:

/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function
`_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function
`_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
chmcmd.lpr(238,46) Error: Error while linking
chmcmd.lpr(238,46) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted


This is also related to the fact that you have an armhf system that uses 
the directory/file layout of an armel system. Pass 
-Fl/usr/lib/arm-linux-gnueabi to the compiler, as it is only looking in 
/usr/lib/arm-linux-gnueabihf for the crt*.o files (which contain those 
symbols).



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


Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Mark Morgan Lloyd

Jonas Maebe wrote:

Mark Morgan Lloyd wrote:

/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function
`_haltproc_eabi':
(.text+0x88): undefined reference to `_fini'
/usr/local/src/fpc/fixes_3_0/rtl/units/arm-linux/cprt0.o: In function
`_haltproc_eabi':
(.text+0x90): undefined reference to `_init'
chmcmd.lpr(238,46) Error: Error while linking
chmcmd.lpr(238,46) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted


This is also related to the fact that you have an armhf system that uses 
the directory/file layout of an armel system. Pass 
-Fl/usr/lib/arm-linux-gnueabi to the compiler, as it is only looking in 
/usr/lib/arm-linux-gnueabihf for the crt*.o files (which contain those 
symbols).


I've already got both in the fpc.cfg file:

# path to the gcclib
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3
-Fl/usr/lib/arm-linux-gnueabi

where the system already has the symlink

/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -> 4.6

Doing a brute-force search for crt*.o:

/usr/lib/arm-linux-gnueabi/crtn.o
/usr/lib/arm-linux-gnueabi/crti.o
/usr/lib/arm-linux-gnueabi/crt1.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtbegin.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtbeginT.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtbeginS.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtend.o
/usr/lib/gcc/arm-linux-gnueabi/4.6/crtendS.o
/usr/local/lib/fpc/3.0.1/units/arm-linux/rtl-console/crt.o
/usr/local/src/fpc/fixes_3_0/rtl/palmos/m68k/crt0.o

I really do think that I need to get Raspbian upgraded, I know that 
there are problems with the one currently running.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Jonas Maebe

Mark Morgan Lloyd wrote:

I've already got both in the fpc.cfg file:

# path to the gcclib
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3
-Fl/usr/lib/arm-linux-gnueabi


"make all" in the top level directory ignores your fpc.cfg (by design).


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


Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Mark Morgan Lloyd

Jonas Maebe wrote:

Mark Morgan Lloyd wrote:

I've already got both in the fpc.cfg file:

# path to the gcclib
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3
-Fl/usr/lib/arm-linux-gnueabi


"make all" in the top level directory ignores your fpc.cfg (by design).


[Slaps forehead] I'll be back.

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Mark Morgan Lloyd

Mark Morgan Lloyd wrote:

Jonas Maebe wrote:

Mark Morgan Lloyd wrote:

I've already got both in the fpc.cfg file:

# path to the gcclib
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3
-Fl/usr/lib/arm-linux-gnueabi


"make all" in the top level directory ignores your fpc.cfg (by design).


[Slaps forehead] I'll be back.


Thanks Jonas, that fixes it. To wrap this up and for the benefit of 
anybody getting here via Google: this is for a Raspeberry Pi with 
2014-era Raspbian.


Binaries from: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Corresponding sources from 
http://svn.freepascal.org/svn/fpc/branches/fixes_3_0  using svn co


Build command line: make NO_GDB=1 OPT='-FL/lib/ld-linux.so.3 
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' 
all  with OVERRIDEVERSIONCHECK=1 if necessary, and my preference is to 
also use -O- -gl -Xs- for ease of debugging.


Install command line: sudo OPT='-FL/lib/ld-linux.so.3 
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi' 
make install


Those -Fl and -FL options will probably need to be added to fpc.cfg for 
that specific version of Raspbian.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Martin Schreiber
On Monday 31 August 2015 13:00:59 Mark Morgan Lloyd wrote:

> Thanks Jonas, that fixes it. To wrap this up and for the benefit of
> anybody getting here via Google: this is for a Raspeberry Pi with
> 2014-era Raspbian.
>
> Binaries from: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/
>
> Corresponding sources from
> http://svn.freepascal.org/svn/fpc/branches/fixes_3_0  using svn co
>
> Build command line: make NO_GDB=1 OPT='-FL/lib/ld-linux.so.3
> -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi'
> all  with OVERRIDEVERSIONCHECK=1 if necessary, and my preference is to
> also use -O- -gl -Xs- for ease of debugging.
>
> Install command line: sudo OPT='-FL/lib/ld-linux.so.3
> -Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi'
> make install
>
How it worked for me with a Raspbian image from last week from here:
https://www.raspberrypi.org/downloads/raspbian/

In my Raspbian RPi 1 model B rev2 I installed FPC 2.6.0 by
"
sudo apt-get update
sudo apt-get install fpc
"

Then I extracted fpc_eabihf_3_0_1.tar.gz from
http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ to /home/pi/fpc.
cd to the svn fixes_3_0 checkout,
"
make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all
"

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


Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Mark Morgan Lloyd

Martin Schreiber wrote:

On Monday 31 August 2015 13:00:59 Mark Morgan Lloyd wrote:


Thanks Jonas, that fixes it. To wrap this up and for the benefit of
anybody getting here via Google: this is for a Raspeberry Pi with
2014-era Raspbian.

Binaries from: http://sourceforge.net/projects/mseide-msegui/files/fpcarm/

Corresponding sources from
http://svn.freepascal.org/svn/fpc/branches/fixes_3_0  using svn co

Build command line: make NO_GDB=1 OPT='-FL/lib/ld-linux.so.3
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi'
all  with OVERRIDEVERSIONCHECK=1 if necessary, and my preference is to
also use -O- -gl -Xs- for ease of debugging.

Install command line: sudo OPT='-FL/lib/ld-linux.so.3
-Fl/usr/lib/gcc/arm-linux-gnueabi/4.6.3 -Fl/usr/lib/arm-linux-gnueabi'
make install


How it worked for me with a Raspbian image from last week from here:
https://www.raspberrypi.org/downloads/raspbian/

In my Raspbian RPi 1 model B rev2 I installed FPC 2.6.0 by
"
sudo apt-get update
sudo apt-get install fpc
"

Then I extracted fpc_eabihf_3_0_1.tar.gz from
http://sourceforge.net/projects/mseide-msegui/files/fpcarm/ to /home/pi/fpc.
cd to the svn fixes_3_0 checkout,
"
make PP=/home/pi/fpc/3_0/eabihf/lib/fpc/3.0.1/ppcarm OVERRIDEVERSIONCHECK=1 all
"


As I've said already- more than once- the Raspbian version I'd got dated 
from 2014 and an attempt to load 2.6.0 on it failed due to various 
missing/held packages. An attempt to do an update/upgrade/dist-upgrade 
also failed, leaving it in a broken state with e.g. the display manager 
deinstalled and not installable. So I'm very grateful for Jonas's help 
and patience, when he could easily have told me to get lost and fix the 
system software.


I anticipate that once I'm working from the current (2015-05-05) 
Raspbian that things will be much easier. However it looks as though the 
people who put the older version together left it in a state where the 
metadata was broken or inconsistent, which was possibly unavoidable 
taking into account that source.list and sources.list.d identify three 
distinct repositories (debian.net, qmh-project.org and raspberrypi.org).


Incidentally (and I hope that the ML managers will excuse the 
digression), if anybody has a plugtop USB PSU badged "MW" with their Rpi 
I strongly suggest checking that it's robustly assembled: one of these 
came apart when I tried to unplug it and I found that it was held 
together only by silicone RTV sealant. Scraping the gunge off and gluing 
properly appears to have improved reliability, presumably by improving 
heat dissipation.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Martin Schreiber
On Monday 31 August 2015 16:25:38 Mark Morgan Lloyd wrote:
> 
> As I've said already- more than once-

I wrote the previous mail "for the benefit of 
anybody getting here via Google" too. ;-)
Sorry for annoying you.

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


Re: [fpc-pascal] https support; call for testers

2015-08-31 Thread sami
Hi all, 

I´m follow the same ideia from fpHttpClient by use a event to handle the
creation of
TSSLSocketHandler for fpHttpServer. 

the event handler was implemented this way: 

procedure TForm1.sockHandleEvent(Sender: TObject; const UseSSL: Boolean; out
  aHandler: TSocketHandler);
var
  h: TSSLSocketHandler;
begin
  aHandler := nil;
  if UseSSL then
  begin
h := TSSLSocketHandler.Create;
// h.RemoteHostName:= ;
h.SSLType := stTLSv1;
h.CertCA.FileName := 'c:\ca_certificate.pem';
h.Certificate.FileName := 'c:\certificate.pem';
h.PrivateKey.FileName := 'c:\privatekey.pem';
//  h.KeyPassword := ;
//  h.PFX.FileName := 'cert.pfx'; / if exists 
aHandler := h;
  end;
end; 

it work without errors and i can put the server to StartAccepting incoming
connections. 

but when a https request arrives, i get a SIGSEGV error 
on TSSLSocketHandler.Accept method 
line 379 = "Result:=CheckSSL(FSSL.setfd(Socket.Handle));"
because Socket is NIL. looking the code, i could not find
where the TSSLSocketHandler.Socket property would be set. 
  

function TSSLSocketHandler.Accept: Boolean;

begin
  Result:=InitContext(True);
  if Result then
begin
Result:=CheckSSL(FSSL.setfd(Socket.Handle)); // here Socket is NIL =
SIGSEGV
if Result then
  Result:=CheckSSL(FSSL.Accept);
end;
  FSSLActive:=Result;
end;

So i need some help on this. 

Thanks. 



--
View this message in context: 
http://free-pascal-general.1045716.n5.nabble.com/https-support-call-for-testers-tp5718919p5722519.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] FPC 3.0.0-rc1 release

2015-08-31 Thread Mark Morgan Lloyd

Martin Schreiber wrote:

On Monday 31 August 2015 16:25:38 Mark Morgan Lloyd wrote:

As I've said already- more than once-


I wrote the previous mail "for the benefit of 
anybody getting here via Google" too. ;-)

Sorry for annoying you.


[GRIN] Nonono, I'm not annoyed. But particularly taking into account the 
ld-linux issue there was something very obviously wrong with the 
2014-era Raspbian, and since the Raspberry Pi Foundation (via Element 14 
and their resellers) shipped a lot of cards containing that I think it's 
important for the casual user to know what to blame.


Anyway, even with that older Rasbian release FPC 3.0.1 is now making a 
valiant attempt to compile Lazarus. Whichever way that goes I'll discuss 
it in the Lazarus mailing list.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] arm-linux for Raspberry 1 FPC 3.0.0-rc1 release

2015-08-31 Thread Pierre Muller
On Thu, August 27, 2015 06:55, Martin Schreiber wrote:
> On Wednesday 26 August 2015 20:14:09 Mark Morgan Lloyd wrote:
>>
>> Is there a native ARM version compatible with the Raspberry Pi?
I uploaded a tar file to install FPC 3.0.0rc1 to a arm-linux Raspberry v1
compiled on a RaspBian wheezy machine.

Hope this will help,

Pierre Muller

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