Recent

Author Topic: Problem installing TAGraph component  (Read 14575 times)

rturney

  • New Member
  • *
  • Posts: 48
Problem installing TAGraph component
« on: November 21, 2006, 05:26:59 am »
I am really having a lot of trouble installing the graphing component for Lazarus called TAChart http://wiki.lazarus.freepascal.org/TAChart#Installation.  Probably because I am new to Lazarus and not familiar with installing components.  But it seems to me the installation instructions are more geared to Windows than Linux.  (I'm using SuSE 10.1)  The instructions are:
    *  Create the directory lazarus\components\tagraph
        * On this directory, unzip the files from tagraph\lazarus\component of the zip file
        * Open lazarus
        * Open the package ta.lpk with Component/Open package file (.lpk)
        * (Click on Compile only if you don't want to install the component into the IDE)
        * Click on Install

The use of backslashes indicates Windows to me.  Since my Lazarus is installed in /usr/lib/lazarus, I created /usr/lib/lazarus/components/tagraph and put the contents of the zip file there.  I followed the instructions in http://wiki.lazarus.freepascal.org/Install_Packages and got the result:
Quote
unable to write file "usr/lib/lazarus/components/tagraph/TAGraph/Component/ta.pas"!

It seems like Lazarus might need root permission here. And it is adding TAGraph/Component to the path??? I have tried many variations of this and searched the forum for clues but am getting nowhere.
Any assistance would be greatly appreciated!  :oops:  :?

matthijs

  • Hero Member
  • *****
  • Posts: 537
RE: Problem installing TAGraph component
« Reply #1 on: November 21, 2006, 04:48:58 pm »
Yes, it usually is a rights problem in Lazarus on Linux. As I am the only one using lazarus on my PC, I chown-ed the lazarus directory to myself and all problems were over.
Code: [Select]

# chown matthijs.matthijs /usr/lib/lazarus -R
What's in a sig? Would my posting look less if it didnot have a sig? (Free after William S.) :)

:( Why cannot I upload my own Avatar? :(

rturney

  • New Member
  • *
  • Posts: 48
Problem installing TAGraph component
« Reply #2 on: November 22, 2006, 12:36:19 am »
Well I appreciate the suggestion, which I performed, but the component did not install.  After I ran the install on it I got the following message:
Quote
Installation failed.  The package "ta 1.1" failed to compile.  Remove it from the installation list?

I answered "yes" and don't know what is going on. :shock:

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Problem installing TAGraph component
« Reply #3 on: November 22, 2006, 09:40:19 am »
If you have installed lazarus system-wide, for example using a RPM, it is best to put the source of that component somewhere in your home directory (with full access for you).

Then install the component.

Lazarus will be re-linked to include the component. The new lazarus executable can be found at ~/.lazarus/bin.

If you start lazarus by running startlazarus (/usr/bin/startlazarus) it will load the new executable from ~/.lazarus/bin.

rturney

  • New Member
  • *
  • Posts: 48
Problem installing TAGraph component
« Reply #4 on: November 22, 2006, 02:09:35 pm »
Yes, I did install system-wide with an RPM.  So I moved the tagraph directory over to my /home/rat directory.  Now the tagraph component resides in /home/rat/tagraph.  Upon attempting to install this component I get the same "The package ta 1.1 failed to compile".  The message dialog shows:
Quote
"Compile IDE (without linking)" completed
/home/rat/tagraph/TAGraph/Component/ta.pas(10,3) Fatal: Can't find unit tagraph

I downloaded the component again, just in case the first was corrupted, but got the same results.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Problem installing TAGraph component
« Reply #5 on: November 22, 2006, 08:13:07 pm »
Did you remove all the remnants (source, .ppu, .o)  of the previous install?

rturney

  • New Member
  • *
  • Posts: 48
Problem installing TAGraph component
« Reply #6 on: November 23, 2006, 03:56:06 am »
I checked for remnants (source, *.ppu, .o) of the previous installation attempts but found nothing.  Probably because I had removed the entire directory after the failed installs.  I tried again and created the directory /home/rat/programs/lazarus/components.  I placed the contents of TAGraph.zip into this directory. This included a new directory TAGraph which has two subdirectories: Component and Example.  

In the TAGraph directory was a readme.txt file. To my surprise the readme.txt had different instructions than those specified on the TAGraph website (see my first post), which I had been following.  The new instructions were the same except that now, after opening the ta.lpk file, you are told to "Click on Compile" then "Click on Install".  The website instructions said
Quote
(Click on Compile only if you don't want to install the component into the IDE)

I was not clicking on "Compile" because I did want to install the component into the IDE.

Following the new instructions, I encountered a new problem after clicking on "Compile".  The compiler couldn't find tagraph.pas !  Examining the Component directory I found TAGraph.pas, that was using some uppercase characters.  So I renamed this file using all lowercase to "tagraph.pas" and started over.  This time everything worked and the IDE now contains the icon for tagraph :!:  Whew, this was exhausting.  But I enjoyed the challenge.  I especially appreciate the thoughtful replies to my questions which helped me look at all the possible angles.  Thanks again!

rturney

  • New Member
  • *
  • Posts: 48
Class TTAChart has disappeared!
« Reply #7 on: November 26, 2006, 07:24:01 pm »
This has been a real struggle!  After rebooting and going back to Lazarus, the TAGraph component has disappeared.  When opening the project I was using this component with, I get the error message:
Quote
Error reading form: Form: TForm1, Class "TTAChart" not found.
I am without a clue :?

Zorba

  • Jr. Member
  • **
  • Posts: 77
RE: Class TTAChart has disappeared!
« Reply #8 on: November 26, 2006, 09:06:35 pm »
only a struggle when you don't know how to do it.
personally, I do it differently....I install components into lazarus as root, so I follow what the wiki said....no problem to be root to install a component?

After that I run lazarus as user and an error will come up saying it can't find whatever files for that new component.
Hit ignore and after Lazarus started, I open the lpk file and don't do anything (no compile or install). and then quit Lazarus, and restart again....now no more complaints.

Easy but just a few steps.

rturney

  • New Member
  • *
  • Posts: 48
Problem installing TAGraph component
« Reply #9 on: November 27, 2006, 03:15:22 am »
Thanks for your help.

After realizing that the IDE was recompiled into the user directory instead of the orginal root directory, I redirected the desktop icon to point to the lazarus binary in the user directory.  The component is back and working.

I am curious though as to the advantages or disadvantages of choosing one component installation approach over the other?

Zorba

  • Jr. Member
  • **
  • Posts: 77
Problem installing TAGraph component
« Reply #10 on: November 27, 2006, 03:45:52 am »
Glad you got it sorted out.

I do it this way simply because when I first started with lazarus that's how I found out how to install components. It was trial and error till I figured it out.

I read how to do it differently here in this thread but I can see why I'll stick to what I'm already doing. Here is why:
1. Only one binary is present not two or more (one for each user plus the main one).
2. Only one component folder with all my components.
3. fpc.cfg easier to work with from one installation to the next (if you need to work with fpc directly without lazarus).
4. No need to edit menu (or desktop icon) to point to different binaries.

These are my reasons but I'm sure the other method might work better for someone else depending on their situation (for example multiuser environment where one user wants only a certain set of components). This would be a major advantage for that method under such circumstance.

rturney

  • New Member
  • *
  • Posts: 48
Problem installing TAGraph component
« Reply #11 on: November 27, 2006, 04:56:58 am »
Thank you!  This information is very helpful.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Problem installing TAGraph component
« Reply #12 on: November 27, 2006, 09:11:07 am »
Quote from: "rturney"
Thanks for your help.

After realizing that the IDE was recompiled into the user directory instead of the orginal root directory, I redirected the desktop icon to point to the lazarus binary in the user directory.


Did the desktop icon point to /usr/bin/startlazarus?

rturney

  • New Member
  • *
  • Posts: 48
Problem installing TAGraph component
« Reply #13 on: November 29, 2006, 09:14:07 pm »
Quote
Did the desktop icon point to /usr/bin/startlazarus?


I had to make the icon point to /usr/lib/lazarus/lazarus-start or /usr/lib/lazarus/startlazarus (I'm going from memory because I'm away from the computer I did this on).  There was a "lazarus" binary in /usr/bin but when the icon was pointed at it, the new components did not show up in the IDE components tab.  Since I'm using SuSE, most all of the files were installed in /usr/lib/lazarus.  There wasn't a "startlazarus" in my /usr/bin, only a "lazarus" binary.  It may be different on other distros.  In /usr/lib/lazarus there was the "startlazarus" (or "lazarus-start") and also a "lazarus" binary. But when the icon was pointed at /usr/lib/lazarus/startlazarus, all the new components showed up.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Problem installing TAGraph component
« Reply #14 on: November 29, 2006, 09:24:58 pm »
ok.

I will check that startlazarus will be installed in /usr/bin too.

 

TinyPortal © 2005-2018