Recent

Author Topic: Indy problem on FreeBSD  (Read 4390 times)

BSaidus

  • Hero Member
  • *****
  • Posts: 540
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Indy problem on FreeBSD
« on: April 24, 2017, 08:55:19 am »
Hello.
Indy servers don't works on FreeBSD.
to test : Just drop any server component, configure it and make  Active = true at design time.
the executable wont run, and a dump core is generated.


ah, another problem :
Code: Pascal  [Select][+][-]
  1. var
  2.   {$IFDEF UNIX}
  3.  
  4.   // For linux the user needs to set this variable to be accurate where used (mail, etc)
  5.   GOffsetFromUTC: TDateTime = 0{$IFDEF HAS_DEPRECATED}{$IFDEF USE_SEMICOLON_BEFORE_DEPRECATED};{$ENDIF} deprecated{$ENDIF};
  6.  
  7.     {$IFDEF DARWIN}
  8.   GMachTimeBaseInfo: TTimebaseInfoData;
  9.     {$ENDIF}
  10.   {$ENDIF}
  11.  
  12.  
it give me a message :
Code: Pascal  [Select][+][-]
  1.  IdGlobal.pas(1889,105) Error: expected ;, but deprecated found


Thanks for help.
« Last Edit: April 24, 2017, 09:18:00 am by BSaidus »
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

BSaidus

  • Hero Member
  • *****
  • Posts: 540
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Indy problem on FreeBSD
« Reply #1 on: April 24, 2017, 09:39:38 am »
Hhhh!!
for Server components, I've see on : https://github.com/skelter/Indy/tree/master/Lib/fpcnotes
I must add define  : -dUseCThreads on project options and it works.


thanks anyway  :D.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1312
    • Lebeau Software
Re: Indy problem on FreeBSD
« Reply #2 on: April 25, 2017, 01:18:42 am »
Indy servers don't works on FreeBSD.

In what way exactly?

to test : Just drop any server component, configure it and make  Active = true at design time.
the executable wont run, and a dump core is generated.

And what does it say exactly?

ah, another problem :
Code: Pascal  [Select][+][-]
  1. var
  2.   {$IFDEF UNIX}
  3.  
  4.   // For linux the user needs to set this variable to be accurate where used (mail, etc)
  5.   GOffsetFromUTC: TDateTime = 0{$IFDEF HAS_DEPRECATED}{$IFDEF USE_SEMICOLON_BEFORE_DEPRECATED};{$ENDIF} deprecated{$ENDIF};
  6.  
  7.     {$IFDEF DARWIN}
  8.   GMachTimeBaseInfo: TTimebaseInfoData;
  9.     {$ENDIF}
  10.   {$ENDIF}
  11.  
  12.  
it give me a message :
Code: Pascal  [Select][+][-]
  1.  IdGlobal.pas(1889,105) Error: expected ;, but deprecated found

Which version of FreePascal are you using?  That error suggests USE_SEMICOLON_BEFORE_DEPRECATED is not defined, which it should be in FPC 2.4.4 - 2.6.1.  From 2.6.2 onwards, it is not needed anymore (see this discussion).
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

BSaidus

  • Hero Member
  • *****
  • Posts: 540
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Indy problem on FreeBSD
« Reply #3 on: April 25, 2017, 10:34:35 am »
Hi Remy !
The server components works well, I've just missing to define the use od CThread in the project options.
Concerning the variable:
Code: Pascal  [Select][+][-]
  1. var
  2.   {$IFDEF UNIX}
  3.  
  4.   // For linux the user needs to set this variable to be accurate where used (mail, etc)
  5.   GOffsetFromUTC: TDateTime = 0{$IFDEF HAS_DEPRECATED}{$IFDEF USE_SEMICOLON_BEFORE_DEPRECATED};{$ENDIF} deprecated{$ENDIF};
  6.  
  7.     {$IFDEF DARWIN}
  8.   GMachTimeBaseInfo: TTimebaseInfoData;
  9.     {$ENDIF}
  10.   {$ENDIF}
  11.  
when I push Ctrl+Space the lazarus IDE gives me Error :
Code: Pascal  [Select][+][-]
  1.  IdGlobal.pas(1889,105) Error: expected ;, but deprecated found  

PS:  I use Lazarus 1.6.4/FPC 3.0.2 on FreeBSD 10.3 (GhostBSD).
Thanks.
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

Remy Lebeau

  • Hero Member
  • *****
  • Posts: 1312
    • Lebeau Software
Re: Indy problem on FreeBSD
« Reply #4 on: April 25, 2017, 08:27:05 pm »

PS:  I use Lazarus 1.6.4/FPC 3.0.2 on FreeBSD 10.3 (GhostBSD).

As I said in my last reply, Indy does not define USE_SEMICOLON_BEFORE_DEPRECATED for FPC 3.x.  In the other discussion, it was already confirmed that the compiler happily accepts this code:

Code: [Select]
var
  GOffsetFromUTC: TDateTime = 0 deprecated;

But your error message suggests your compiler is expecting this code instead:

Code: [Select]
var
  GOffsetFromUTC: TDateTime = 0; deprecated;

You say the error happens when you press Ctrl+Space in the IDE, so maybe this is just a Lazarus bug?  Do you get the same error when you just compile the code normally?
« Last Edit: April 25, 2017, 08:31:12 pm by Remy Lebeau »
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) - Admin, Developer (Support forum)

BSaidus

  • Hero Member
  • *****
  • Posts: 540
  • lazarus 1.8.4 Win8.1 / cross FreeBSD
Re: Indy problem on FreeBSD
« Reply #5 on: April 26, 2017, 10:27:15 am »
Ah !!
The code while compiling works fine !!!
I think that this is lazarus BUG
thanks
lazarus 1.8.4 Win8.1 / cross FreeBSD
dhukmucmur vernadh!

 

TinyPortal © 2005-2018