Recent

Author Topic: Bundling Indy with Lazarus  (Read 21239 times)

Rave

  • Full Member
  • ***
  • Posts: 160
Bundling Indy with Lazarus
« on: February 04, 2014, 10:16:40 am »
I think Internet Direct components are very useful and IMO they should be bundled with Lazarus. Installation process of Indy is kinda hard, especially on Linux where you need root privileges to do so (recompiling lazarus...) and that would take burden out of it.

JD

  • Hero Member
  • *****
  • Posts: 1758
Re: Bundling Indy with Lazarus
« Reply #1 on: February 04, 2014, 12:17:09 pm »
It is bundled with Delphi by default BUT Lazarus is network component neutral and there are probably more Synapse users than Indy users who use Lazarus. A cursory reading of the posts on this forum will confirm that. Indy seems to have more features than Synapse & LNet (the other networking library) & it takes more time to learn than the other two. If you prefer Indy, great, welcome to the club.  :D
« Last Edit: February 04, 2014, 12:19:22 pm by JD »
Windows (10, 7) - Lazarus 2.0RC3/FPC 3.2, NewPascal, Delphi

Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

motaz

  • Hero Member
  • *****
  • Posts: 508
    • http://code.sd
Re: Bundling Indy with Lazarus
« Reply #2 on: February 04, 2014, 12:32:06 pm »
I moved to Synapse because it does not require recompiling Lazarus, it is a library

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7590
Re: Bundling Indy with Lazarus
« Reply #3 on: February 04, 2014, 01:13:44 pm »
Neither does Indy if you don't use it designtime.

Anyway, for all those, I think there first should be some project that does building (and release engineering) for these components for a while. Like Lazarus-CCR.

The only thing worse than not having it with lazarus is having a defunct version package with Lazarus that you have to deinstall first.

JD

  • Hero Member
  • *****
  • Posts: 1758
Re: Bundling Indy with Lazarus
« Reply #4 on: February 04, 2014, 02:02:42 pm »
The only thing worse than not having it with lazarus is having a defunct version package with Lazarus that you have to deinstall first.

Given the pace at which Indy is updated, that is exactly what will happen! But then it is already that way with Delphi. The bundled Delphi version is always an old sometimes outdated version of Indy and most of us uninstall the bundled Delphi version in order to get the newest Indy features.
Windows (10, 7) - Lazarus 2.0RC3/FPC 3.2, NewPascal, Delphi

Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

Rave

  • Full Member
  • ***
  • Posts: 160
Re: Bundling Indy with Lazarus
« Reply #5 on: February 05, 2014, 12:12:48 pm »
I disagree with updating thing. Even if version will be bit dated compared to what is in Indy, it is still useful library that can be used to do many cool things.

JD

  • Hero Member
  • *****
  • Posts: 1758
Re: Bundling Indy with Lazarus
« Reply #6 on: February 07, 2014, 01:59:00 pm »
I disagree with updating thing. Even if version will be bit dated compared to what is in Indy, it is still useful library that can be used to do many cool things.

Do you realize how many changes/bug fixes an SVN version of Indy differs from a default installation of Indy on < Delphi 2007? For instance Indy 9 is very useful BUT the class structure has undergone many changes in Indy 10. In the same vein the outdated Indy 10.2.03 package available for Lazarus is too far behind.
« Last Edit: February 07, 2014, 02:11:23 pm by JD »
Windows (10, 7) - Lazarus 2.0RC3/FPC 3.2, NewPascal, Delphi

Indy 10.6 series; mORMot; Zeos 7.2.1; SQLite, Firebird, PostgreSQL & MariaDB; VirtualTreeView 5.5.3 R1

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7590
Re: Bundling Indy with Lazarus
« Reply #7 on: February 07, 2014, 08:18:10 pm »
Do you realize how many changes/bug fixes an SVN version of Indy differs from a default installation of Indy on < Delphi 2007?

I meant to hint more that e.g. the D6 packaged version is unstable on systems with any form of SMP (even P4's with just a bit of hyperthreading)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5769
    • wiki
Re: Bundling Indy with Lazarus
« Reply #8 on: February 07, 2014, 10:00:39 pm »
Going about off topic, or rather extended topic.

I think it would be better to look at the underlying issues (or the myth of such issues).
Indy is not the only component people may want to use. There are lots of, and I would be sure that more people have to rebuild the IDE due to the *SUM* of these others, than due to INDY (I would not not even be sure INDY was the biggest single reason for rebuilds.

1) not sure if an issue, but people need to be aware that: It exists, and where to get it.

2) Installation. This should be easy, including rebuild. If installing a package, and rebuilding (assuming a correct Lazarus install) is more than open and click install, then that needs to be solved.

I haven't tested that on linux, but each time someone says root, someone else says: no root needed.
So why do we get to opposing statements, and how can we make it that none root works for everyone?

IMHO that is the real issue.

Rave

  • Full Member
  • ***
  • Posts: 160
Re: Bundling Indy with Lazarus
« Reply #9 on: February 10, 2014, 01:54:31 pm »
When you compiled Lazarus to the home directory or did some silly thing like that, then yes, no root needed indeed. But if you used rpm/deb packages, then you unfortunately need to have root.

Anyway the underlying issue is most likely "lazarus needs to rebuild itself when installing new components instead of dynamically link those like Delphi does".

To fix this following changes would be required:

- Populating component palette from a file instead of having it in lazarus' code when Lazarus is started.
- Such "component file" would contain meta data such as component's class name, tab on which it is located (if tab with that name does not exist in palette, it will be created, otherwise component will be added to tab with specified name) and the location of ppu file with code needed to link it to the program

Additionally, after those changes are made, we could make "component repository" that would work like repo in ordinary Linux distribution but would install components for Lazarus.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3652
  • I like bugs.
Re: Bundling Indy with Lazarus
« Reply #10 on: February 10, 2014, 05:31:34 pm »
When you compiled Lazarus to the home directory or did some silly thing like that, then yes, no root needed indeed. But if you used rpm/deb packages, then you unfortunately need to have root.

Yes, you need root access when you actually install Lazarus from rpm/deb, but you don't need root access when installing packages for it.
There is apparenly lots of misinformation about this issue. Please see:
  http://wiki.lazarus.freepascal.org/startlazarus#Searching_the_right_executable
and
  http://wiki.lazarus.freepascal.org/Lazarus_directory_permissions_on_Linux_and_Unix
which Bart just rewrote.
There is one bug associated with the process, so don't click on "Clean all" with a standard installation.
  http://bugs.freepascal.org/view.php?id=25695
If you find more bugs, please report with steps to reproduce.
See also thread
  http://forum.lazarus.freepascal.org/index.php/topic,23534.0.html

Quote
Anyway the underlying issue is most likely "lazarus needs to rebuild itself when installing new components instead of dynamically link those like Delphi does".

It is not a big issue. Compilation is fast and you don't need root access.

Quote
To fix this following changes would be required:

- Populating component palette from a file instead of having it in lazarus' code when Lazarus is started.
- Such "component file" would contain meta data such as component's class name, tab on which it is located (if tab with that name does not exist in palette, it will be created, otherwise component will be added to tab with specified name) and the location of ppu file with code needed to link it to the program

Packages must be also in IDE for design-time. Component palette configuration does not help for that.

Quote
Additionally, after those changes are made, we could make "component repository" that would work like repo in ordinary Linux distribution but would install components for Lazarus.

Yes, there is such plan. The current static package system is not a hindrance, somebody just have to design and code the repository thingy.
« Last Edit: February 10, 2014, 11:28:08 pm by JuhaManninen »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5769
    • wiki
Re: Bundling Indy with Lazarus
« Reply #11 on: February 10, 2014, 06:13:30 pm »
@Rave:

If rebuild does not work for you without root, then give the exact steps you used, and what error you get.

Then someone should be able to help.

With a normal Lazarus install (install is in /usr )

You MUST:
- always use "startlazarus" , never use "lazarus"
- have a home directory with sufficient disk space/quota
  (The IDE creates a .lazarus directory in your home)
- NOT edit any path by hand, let the IDE do that

You do NOT need write access to /usr to rebuild

This is supposed to work (as none root), if it does not, then a detailed bug description is needed to fix it.
« Last Edit: February 10, 2014, 06:15:20 pm by Martin_fr »

Rave

  • Full Member
  • ***
  • Posts: 160
Re: Bundling Indy with Lazarus
« Reply #12 on: February 11, 2014, 07:37:08 pm »
Packages must be also in IDE for design-time. Component palette configuration does not help for that.

Somehow Delphi doesn't have issue with that. Dynamic linking, anyone?

@Martin_fr, I don't have access to Linux machine ATM, but last time I tried (LAZ 0.9.36, though I may be wrong), I did just this:

- Open package
- Click Install

Then observed in horror that it cannot write, then did same under root and it went fine. And yes, it was most definitely startlazarus as KDE shortcuts are set up this way.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3652
  • I like bugs.
Re: Bundling Indy with Lazarus
« Reply #13 on: February 12, 2014, 08:16:09 am »
... last time I tried (LAZ 0.9.36, though I may be wrong) ...

Can you please try with 1.2RC2.

Rave

  • Full Member
  • ***
  • Posts: 160
Re: Bundling Indy with Lazarus
« Reply #14 on: February 12, 2014, 11:18:56 am »
No, because
I don't have access to Linux machine ATM