* * *

Author Topic: Indy - any hope to have IdStreamVCL issue fixed  (Read 919 times)

MISV

  • Full Member
  • ***
  • Posts: 202
Indy - any hope to have IdStreamVCL issue fixed
« on: January 30, 2017, 01:40:38 pm »
This problem continues to bug me down.

I have a huge package of my own. I have eliminated Indy usage here by using defines and then create a large unit that redeclares all Indy classes, methods etc. I use.

I use the redeclaration-unit + defines for my own apps that otherwise use Indy + own package. But when I need to release - this is not a suitable solution :)

Sometimes it works to compile the Indy package first and then try compile my app again, but often I have spent hours trying to compile/double-compile/install indy package, my own package and then my app. Even if I get both packages compile - the app can still fail building throwing the IdStreamVCL error.

Is there any hope this will sometime double-compile need will be removed from Indy/Lazarus?


rvk

  • Hero Member
  • *****
  • Posts: 2407
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #1 on: January 30, 2017, 01:53:48 pm »
My guess is that you didn't redeclare everything and when you try to compiled your app with your redclaration-unit it still needs something from indy.

In that case the double compile need is not the fault of Indy/Lazarus but of your own app.

You should uninstall indy and when your app, in combination with the redeclaration-unit, throws an error, solve that error (without indy).

Cyrax

  • Sr. Member
  • ****
  • Posts: 490
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #2 on: January 30, 2017, 03:59:26 pm »
The problem is that FPC does have a bug with multiple include files with same name and with Indy, this bug is showing its ugly head.

You could try the trunk version of FPC to check if it is fixed already or fix your Indy package file so only one directory appears in the include file path option.

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5260
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #3 on: January 30, 2017, 04:10:54 pm »
The problem is that FPC does have a bug with multiple include files with same name and with Indy, this bug is showing its ugly head.

I had the same problem, and after killing the duplicate files the problem went away.


But it is not a bug, but a feature of FPC   ;)

Graeme

  • Hero Member
  • *****
  • Posts: 1339
    • Graeme on the web
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #4 on: January 31, 2017, 01:54:53 am »
Sometimes it works to compile the Indy package first and then try compile my app again, but often I have spent hours trying to compile/double-compile/install indy package, my own package and then my app. Even if I get both packages compile - the app can still fail building throwing the IdStreamVCL error.

Create a build script for your application and compile without using Lazarus IDE. The issue, as far as I could tell with the debugging I did, is that the Lazarus Package System is the cause of the problem. Compiling the same project with MSEide, bash script or even fpGUI's demo IDE, and my Indy based applications compile every time and I never get that IdStreamVCL error (clean build, build all etc... they all work).
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

MISV

  • Full Member
  • ***
  • Posts: 202
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #5 on: February 13, 2017, 01:02:39 am »
My guess is that you didn't redeclare everything and when you try to compiled your app with your redclaration-unit it still needs something from indy.

In that case the double compile need is not the fault of Indy/Lazarus but of your own app.

You should uninstall indy and when your app, in combination with the redeclaration-unit, throws an error, solve that error (without indy).


As I stated - everything of course compiles when when using the redeclaration unit. (Where I recompile everything from scratch)

I get no other errors ever than what mentioned in original post. (And yes, have removed all binary files, recompiling all libraries etc. in all sors of orders with/without a redeclaration unit.)

MISV

  • Full Member
  • ***
  • Posts: 202
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #6 on: February 13, 2017, 01:04:31 am »
The problem is that FPC does have a bug with multiple include files with same name and with Indy, this bug is showing its ugly head.

You could try the trunk version of FPC to check if it is fixed already or fix your Indy package file so only one directory appears in the include file path option.

Or maybe there could be a hope the Indy people somehow possibly could make a construct that would solve the issue?

But otherwise I guess I will try:

Quote
fix your Indy package file so only one directory appears in the include file path option.

The issue drives me nuts on regular basis, so I will be happy to try anything.

MISV

  • Full Member
  • ***
  • Posts: 202
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #7 on: February 13, 2017, 01:05:59 am »
Create a build script for your application and compile without using Lazarus IDE. The issue, as far as I could tell with the debugging I did, is that the Lazarus Package System is the cause of the problem. Compiling the same project with MSEide, bash script or even fpGUI's demo IDE, and my Indy based applications compile every time and I never get that IdStreamVCL error (clean build, build all etc... they all work).

I will consider hat solution. I would prefer building from inside the IDE though (alhough I suppose for release builds, I really should get a make script like I do for Windows)

Graeme

  • Hero Member
  • *****
  • Posts: 1339
    • Graeme on the web
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #8 on: February 13, 2017, 10:44:35 am »
I will consider hat solution. I would prefer building from inside the IDE though
You still can... Simply don't use the Lazarus Packages included with Indy, but instead set the Unit Search Paths and Include Paths of your Project Settings to find the Indy code you need. If you use Indy often, tick the checkbox to make those settings as project defaults, so any future project you create will have those already filled in.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Remy Lebeau

  • Full Member
  • ***
  • Posts: 220
    • Lebeau Software
Re: Indy - any hope to have IdStreamVCL issue fixed
« Reply #9 on: February 13, 2017, 11:54:37 pm »
The problem is that FPC does have a bug with multiple include files with same name and with Indy, this bug is showing its ugly head.

You could try the trunk version of FPC to check if it is fixed already or fix your Indy package file so only one directory appears in the include file path option.

IIRC, the commonly used procedure for installing Indy into Lazarus involves first copying all of Indy's source files into a single folder, and then compiling the Indy packages from that folder.  That would eliminate the duplicate include files.  And FYI, the whole reason Indy even uses duplicate include files in the first place is to address issues in older versions of FreePascal (Delphi has no problem using include files across folders :P).  Maybe that is or is not still a problem in FreePascal, but Indy doesn't take a chance with it.

That being said, I am in the process of restructuring Indy's folders and package files (for future inclusion of Indy into Embarcadero's GetIt package manager), and that does involve moving all of the source files into a single folder.  No ETA on that release, though.
« Last Edit: February 13, 2017, 11:58:07 pm by Remy Lebeau »
Remy Lebeau
Lebeau Software - Owner, Developer
Internet Direct (Indy) open source project - Admin, Developer

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus