Recent

Author Topic: Online Package Manager  (Read 840581 times)

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #825 on: June 09, 2017, 09:46:32 am »
Quote
@avra
To avoid duplicate work please send me ifdefed version to avra at writeme dot com.
It's already in the central repository. Just open OPM, check WST then click the download button. Apparently I only solved just part of the issues. It works on windows with FPC trunk, but not on the other platforms.   

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Online Package Manager
« Reply #826 on: June 09, 2017, 10:32:03 am »
Quote
@avra
To avoid duplicate work please send me ifdefed version to avra at writeme dot com.
It's already in the central repository. Just open OPM, check WST then click the download button.
Of course, silly me!  :D  %)  :D

Quote
Apparently I only solved just part of the issues. It works on windows with FPC trunk, but not on the other platforms.
Can anyone confirm that WST works on non-windows platforms with FPC 3.0.2 or older?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: Online Package Manager
« Reply #827 on: June 09, 2017, 11:52:19 am »
CCR is in Mantis, so maybe I should go that path? If not for any reason, then it is not a problem for me to send you patches.
Both ways suit me.

Quote
@Juha: It is not clear to me if you have these errors trying to install CT version on FPC trunk only on non Windows OS, or you have it also on Windows? It works for me on Windows. Haven't tested elsewhere.
I tested only on Linux. By looking at code in semaphore.pas I guessed it works on Windows but not elsewhere:
Code: Pascal  [Select][+][-]
  1. {$IFDEF FPC}
  2.   {$IFDEF WINDOWS}
  3.     TSemaphoreHandle = THandle;
  4.   {$ELSE}
  5.     {$DEFINE FPC_TM}
  6.     TSemaphoreHandle = Pointer;
  7.   {$ENDIF}
  8. {$ENDIF}
Then see how FPC_TM is used.

I remember WST trunk worked well with FPC 3.0 on Linux at late last year. I believe it works with FPC 3.0.2, too.
I can test more sometime in near future.

This brings a question in my mind. Why WST needs such a FPC_TM define? FPC libs are cross-platform and lots of effort was used to make them so.
WST should be able to use TThreadManager on every platform, or then the alternative code on every platform, without IFDEFs.
semaphore.pas should not need this:
Code: Pascal  [Select][+][-]
  1. uses
  2. ...
  3. {$IFDEF FPC}
  4.   {$IFDEF WINDOWS}
  5.     ,Windows
  6.   {$ENDIF}
  7. {$ENDIF};
Anyway, any bigger changes should be consulted with Inoussa when he is available.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Online Package Manager
« Reply #828 on: June 15, 2017, 08:42:55 am »
Can anyone confirm that WST works on non-windows platforms with FPC 3.0.2 or older?
Well, trunk WST will work only with FPC from Sep 5 2016 or newer because it uses at least TPasSourcePos introduced in this patch:
https://github.com/graemeg/freepascal/commit/37aa4c79e1ab81558cdfac05090309c2e2e1dc25
Does anyone have an idea how to at least aproximatelly detect FPC version for a compile message suggestion to install older WST?
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: Online Package Manager
« Reply #829 on: June 15, 2017, 09:46:51 am »
Well, trunk WST will work only with FPC from Sep 5 2016 or newer because it uses at least TPasSourcePos introduced in this patch:
https://github.com/graemeg/freepascal/commit/37aa4c79e1ab81558cdfac05090309c2e2e1dc25
No it doesn't. I just searched WST trunk sources and it was not there.
TPasSourcePos is part of Pascal parser fcl-passrc. WST does not parse Pascal code.

Quote
Does anyone have an idea how to at least aproximatelly detect FPC version for a compile message suggestion to install older WST?
Detecting FPC trunk / FPC 3.02 / FPC 3.0 should be enough. It is reasonable if the WST found in OPM supports them.

I can test WST trunk with FPC 3.0.2 on Linux later today if needed.
« Last Edit: June 15, 2017, 09:49:10 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #830 on: June 15, 2017, 10:08:38 am »
Quote
@avra
Does anyone have an idea how to at least aproximatelly detect FPC version?
I don't think it's possible to detect specific revision numbers, like the one from  Sep 5 2016(r. 34429), however a close approximation can be done like this(you can refine it more to detect 3.0.0, etc...):
Code: Pascal  [Select][+][-]
  1. {$IF FPC_VERSION = 3}
  2.   {$IF FPC_RELEASE = 0}
  3.     {$IF FPC_PATCH >= 1}
  4.       {$DEFINE FPC302}
  5.     {$ENDIF}
  6.   {$ELSE}
  7.     {$IF FPC_PATCH > 0}
  8.       {$DEFINE FPC311}
  9.     {$ENDIF}
  10.   {$ENDIF}
  11. {$ENDIF}

Currently trunk is 3.1.1, but that will change in the future.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: Online Package Manager
« Reply #831 on: June 15, 2017, 10:51:48 am »
I don't think it's possible to detect specific revision numbers
And it is not needed either. Supporting trunk always means the latest revision of trunk. Trying to support all intermediate revisions would be a mess.
Right version checks now work also in future because the version numbers are sequential.
3.0.2 < 3.1.1 < 3.2.0.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Online Package Manager
« Reply #832 on: June 15, 2017, 07:49:00 pm »
Well, trunk WST will work only with FPC from Sep 5 2016 or newer because it uses at least TPasSourcePos introduced in this patch:
https://github.com/graemeg/freepascal/commit/37aa4c79e1ab81558cdfac05090309c2e2e1dc25
No it doesn't. I just searched WST trunk sources and it was not there.
TPasSourcePos is part of Pascal parser fcl-passrc. WST does not parse Pascal code.
Check again. I was just a little ahead of time.  8)
https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/wst/trunk/ws_helper/wsdl_parser.pas#l855
« Last Edit: June 15, 2017, 07:56:44 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4468
  • I like bugs.
Re: Online Package Manager
« Reply #833 on: June 15, 2017, 08:51:53 pm »
Check again. I was just a little ahead of time.  8)
https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/wst/trunk/ws_helper/wsdl_parser.pas#l855
Ok, right. Inoussa has committed it.
Why does a Web Service code parse Pascal sources? I am puzzled. I understand it parses XML-based SOAP and WSDL.

Anyway, I have now tested WST trunk with FPC 3.0.2 + Lazarus fixes_1_8 branch and it compiles well.
I guess an OPM package should be made of WST trunk because there is no recent release.
« Last Edit: June 15, 2017, 09:50:19 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Online Package Manager
« Reply #834 on: June 15, 2017, 10:11:55 pm »
Quote from: JuhaManninen
Anyway, I have now tested WST trunk with FPC 3.0.2 + Lazarus fixes_1_8 branch and it compiles well.
I tested on 1.6.4 + 3.0.2 from Manjaro 64bit repo and as expected it doesn't work because of that 9 months old patch. So newer Lazarus is needed, like yours. This is why I would like to show compile message to old Lazarus users that they need to use older WST. Otherwise they might be puzzled why it doesn't work.

I have also tested on Win10x64 TrunkAll (both trunks) and it didn't work initially, so I had to backport from CT. Patch attached.  8)
Any feedback is welcome before asking author to examine the patch.

I will now see how this patched WST in TrunkAll behaves on Linux...

UPDATE: I forgot to say that wst_ics.lpk is not used in CT so it could not be backported. It can't be compiled in TrunkAll, but since wst_indy.lpk and wst_synapse.lpk compile fine it does not matter much to me. Maybe someone else will be motivated enough to take a look...
« Last Edit: June 16, 2017, 10:20:17 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Online Package Manager
« Reply #835 on: June 17, 2017, 03:22:45 pm »
I will now see how this patched WST in TrunkAll behaves on Linux...
Well, there were semaphore problems on Linux as Juha has already reported, so I have backported CT fix (which I don't like that much but in lack of a better one it will have to do for now). This is the only problem on TrunkAll in Manjaro64 which is now fixed with this CT backport, so I checked when this breaking change was introduced:
https://github.com/graemeg/freepascal/commit/b338b3d12d657890b1f7ed2bdc49edfd1eb47c17
and IFDEF-ed changes so it can still compile on 3.0.2. Compilation fixed.

Patch allows WST trunk to compile fine with:
TrunkAll (32) on Win10 (64)
TrunkAll (64) on Manjaro Linux (64)
1.6.4+3.0.2 (64) on Manjaro Linux (64)

Any feedback is welcome before asking author to examine the patch.

Enjoy  :)
« Last Edit: June 17, 2017, 03:26:01 pm by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #836 on: June 18, 2017, 08:08:57 am »
Thanks avra for fixing WST. I will wait until Inoussa applies the patch, then I will add the package to the main repository.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Online Package Manager
« Reply #837 on: June 18, 2017, 10:06:44 pm »
I will wait until Inoussa applies the patch, then I will add the package to the main repository.
Yes, I also think that would be the way to go.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Online Package Manager
« Reply #838 on: June 20, 2017, 08:22:17 am »
I will wait until Inoussa applies the patch, then I will add the package to the main repository.
Inoussa has just told me that he applied the patch. Can't wait to test it.  :)
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

balazsszekely

  • Guest
Re: Online Package Manager
« Reply #839 on: June 21, 2017, 09:25:27 pm »
Quote
Inoussa has just told me that he applied the patch. Can't wait to test it.  :)
Done. Added to the main repository. Please test!
« Last Edit: June 21, 2017, 09:35:39 pm by GetMem »

 

TinyPortal © 2005-2018