Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2009-09

Is lnet compilation working?

11 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

ABorka

Hi,

Trying to send emails and load web pages from Lazarus/FPC programs.

Since the latest Indy cannot be compiled and used in Lazarus/Freepascal at the moment (it seems at least so), I have tried to start using lNet.

However, it seems it does not compile either.
The lNet SVN gives:
.
.
.
Compiling ...\lNet_svn\lib\lcommon.pp
lcommon.pp(319,4) Warning: User defined: check these ambiguous errors lcommon.pp(121,12) Error: Forward declaration not solved "GetHostName6(const AnsiString):AnsiString;"
lcommon.pp(122,12) Error: Forward declaration not solved "GetHostIP6(const AnsiString):AnsiString;"
lcommon.pp(498) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted
Error: ...\pp\bin\i386-win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)

Tried to just unzip the lnet-0.6.2.zip file of lNet and run a make there too, got the following:

.
.
.
Compiling ...\lNet\lib\lspawnfcgi.pp
lwebserver.pp(645,53) Error: absolute can only be associated with a var or const
lwebserver.pp(654,27) Warning: Local variable "lServerSocket" does not seem to be initialized
lwebserver.pp(705,53) Error: absolute can only be associated with a var or const
lwebserver.pp(729,7) Warning: Local variable "lServerSocket" does not seem to be initialized
lwebserver.pp(877,52) Error: absolute can only be associated with a var or const
lwebserver.pp(1119,4) Warning: User defined: TODO
lwebserver.pp(1255) Fatal: There were 3 errors compiling module, stopping Fatal: Compilation aborted

Any help would be appreciated.

Thanks,

AB

Reply by email

Vincent Snijders
to ABorka
ABorka wrote 7 lines
Hi, Trying to send emails and load web pages from Lazarus/FPC programs. Since the latest Indy cannot be compiled and used in Lazarus/Freepascal at the moment (it seems at least so), I have tried to start using lNet.

Did you try with fpc 2.2.4?

Vincent

Reply by email

ABorka
to Vincent Snijders

No, just with the latest FPC/Lazarus SVN

Vincent Snijders wrote 17 lines
ABorka schreef: > Hi, > > Trying to send emails and load web pages from Lazarus/FPC programs. > > Since the latest Indy cannot be compiled and used in > Lazarus/Freepascal at the moment (it seems at least so), I have tried > to start using lNet. > Did you try with fpc 2.2.4? Vincent _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Vincent Snijders
to ABorka
ABorka wrote
No, just with the latest FPC/Lazarus SVN

Then you probably need the get back to 2.2.4 for the released lnet and to svn version of fpc from before the latest changes in the sockets unit.

Vincent

Reply by email

Aleš Katona
to ABorka: Trying to send emails and load web pages from Lazarus/FPC programs. Since the latest Indy…
Show quoted text 23 lines
Hi, Trying to send emails and load web pages from Lazarus/FPC programs. Since the latest Indy cannot be compiled and used in Lazarus/Freepascal at the moment (it seems at least so), I have tried to start using lNet. However, it seems it does not compile either. The lNet SVN gives: . . . Compiling ...\lNet_svn\lib\lcommon.pp lcommon.pp(319,4) Warning: User defined: check these ambiguous errors lcommon.pp(121,12) Error: Forward declaration not solved "GetHostName6(const AnsiString):AnsiString;" lcommon.pp(122,12) Error: Forward declaration not solved "GetHostIP6(const AnsiString):AnsiString;" lcommon.pp(498) Fatal: There were 2 errors compiling module, stopping Fatal: Compilation aborted Error: ...\pp\bin\i386-win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)

Will check this. IPv6 was added to lnet recently, and it works with 2.2.5 (on linux at least). The functions mentioned are from the NetDB unit...

Show quoted text 21 lines
Tried to just unzip the lnet-0.6.2.zip file of lNet and run a make there too, got the following: . . . Compiling ...\lNet\lib\lspawnfcgi.pp lwebserver.pp(645,53) Error: absolute can only be associated with a var or const lwebserver.pp(654,27) Warning: Local variable "lServerSocket" does not seem to be initialized lwebserver.pp(705,53) Error: absolute can only be associated with a var or const lwebserver.pp(729,7) Warning: Local variable "lServerSocket" does not seem to be initialized lwebserver.pp(877,52) Error: absolute can only be associated with a var or const lwebserver.pp(1119,4) Warning: User defined: TODO lwebserver.pp(1255) Fatal: There were 3 errors compiling module, stopping Fatal: Compilation aborted

I got this reported with fpc 2.3.1 before too. If you use stable fpc, you need stable lnet. If you use trunk fpc, trunk lnet should work (but those IPv6 changes might have broken something there).

Show quoted text 11 lines
Any help would be appreciated. Thanks, AB _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Joost van der Sluis
to Vincent Snijders: Then you probably need the get back to 2.2.4 for the released lnet and to svn version of…
Vincent Snijders wrote 6 lines
ABorka schreef: > No, just with the latest FPC/Lazarus SVN > Then you probably need the get back to 2.2.4 for the released lnet and to svn version of fpc from before the latest changes in the sockets unit.

I've added some hacks to make it work with 2.5.1, you can find it here: http://menora.cnoc.nl/extern/fpc/lnet_251.tgz

Joost.

Reply by email

ABorka
to Aleš Katona

lNet latest SVN revision 2316 gives

.
.
.
Target OS: Win32 for i386
Compiling ludp.pp
ludp.pp(84,26) Error: Identifier not found "LADDR_BR" ludp.pp(116) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted
.
.
.

with the latest FPC svn rev 13686

Aleš Katona wrote 7 lines
What did you change? Btw. the forward declaration bug in windows was fixed in lNet trunk, so windows users can use it with fpc fixes branch at least... (didn't try fpc trunk). NOTE: IPv6 will only work for unix atm. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Joost van der Sluis
to Aleš Katona: What did you change? Btw. the forward declaration bug in windows was fixed in lNet trunk,…
Aleš Katona wrote
What did you change? Btw. the forward declaration bug in windows was fixed in lNet trunk, so windows users can use it with fpc fixes branch at least... (didn't try fpc trunk).

Replaced the

'var lServerSocker: TLHTTPServerSocket absolute FSocket;'

constructs with:

'var lServerSocker: TLHTTPServerSocket;
begin
  lServerSocket:=TLHTTPServerSocket(FSocket);'

I don't know for sure that it is ok in all cases, but it works for me.

btw: attached is a patch for lNet. Some browsers (Opera) provide two parameters for the connection-tcp header, namely 'keep-alive' and 'TE'. (According to the specs this is valid)

This patch fixes the recognition of the 'keep-alive' parameter in this case.

Joost

Reply by email