Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-02

lazarus as normal user

9 messages · 5 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Pino Zollo

Hi to the list,
I am just a beginner with lazarus....

I have installed it on my Debian 5.01....first fpc an then I have compiled lazarus from sources copied in /usr/src/lazarus.

It happens that all goes fine if I run lazarus as root (deprecated by Debian) from /usr/src/lazarus...I can compile examples and run them. I can even install new components and they appear into the IDE.

The problem rises if I run lazarus as normal user.

Having made "make install" now I have /usr/local/bin/lazarus-ide available to all users .

If I run /usr/local/bin/lazarus-ide I have a hell of problems:

Units are not found anymore when compiling examples: For any subdir I have to add into fpc.cfg a new entry -uF ....

When lazarus rebuilds for a new components it does it to the original /usr/src/lazarus but then it is /usr/local/bin/lazarus-ide that is restarted....so I do not see any change into the IDE.

I have tried to compile lazarus as a normal user having the sources in /home/myuser/lazarus but this does not succeed.

Please some advise....

Regards

Pino

pinozollo at gmail dot com
http://www.qsl.net/zp4kfx/Linux

"In the universe there is no time existing as a physical reality, there is no past, no present and no future" "Time is a mind construction into which one experiences motion" "Time is a flow of irreversible material changes" -Davide Fiscaletti Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net

Reply by email

Unknown author
to Pino Zollo
Pino Zollo wrote 5 lines
Hi to the list, I am just a beginner with lazarus.... I have installed it on my Debian 5.01....first fpc an then I have compiled lazarus from sources copied in /usr/src/lazarus.

Easiest way, but any user on your machine can modify /usr/src/lazarus Run as root:
cd /usr/src/lazarus
find -type d -print0 | xargs -0 chmod 777
find -type d -print0 | xargs -0 chmod 666

or

Only USER and root can work with Lazarus:
cd /usr/src/lazarus
chown USER * -R (USER means your normal login name)

Then do not work with lazarus as root.
/usr/src/lazarus/startlazarus should work.

Show quoted text 31 lines
It happens that all goes fine if I run lazarus as root (deprecated by Debian) from /usr/src/lazarus...I can compile examples and run them. I can even install new components and they appear into the IDE. The problem rises if I run lazarus as normal user. Having made "make install" now I have /usr/local/bin/lazarus-ide available to all users . If I run /usr/local/bin/lazarus-ide I have a hell of problems: Units are not found anymore when compiling examples: For any subdir I have to add into fpc.cfg a new entry -uF .... When lazarus rebuilds for a new components it does it to the original /usr/src/lazarus but then it is /usr/local/bin/lazarus-ide that is restarted....so I do not see any change into the IDE. I have tried to compile lazarus as a normal user having the sources in /home/myuser/lazarus but this does not succeed. Please some advise.... Regards Pino pinozollo at gmail dot com http://www.qsl.net/zp4kfx/Linux
Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email

Mattias Gärtner
to Pino Zollo: I am just a beginner with lazarus.... I have installed it on my Debian 5.01....first fpc…

Zitat von Pino Zollo :

Show quoted text 5 lines
Hi to the list, I am just a beginner with lazarus.... I have installed it on my Debian 5.01....first fpc an then I have compiled lazarus from sources copied in /usr/src/lazarus.

A note in general, not only for lazarus: this is uncommon. You can install software to /usr/... But you compile software as normal user in in your home directory, in any sub directory you like for example /home/username/lazarus.

It happens that all goes fine if I run lazarus as root (deprecated by Debian)

You should not run lazarus as root. Lazarus is a development tool and therefore lets you run buggy/untested software.

from /usr/src/lazarus...I can compile examples and run them.

If you want to compile an example, copy it to your home directory.

I can even install new components and they appear into the IDE.

You can install components as normal user too.

Show quoted text 9 lines
The problem rises if I run lazarus as normal user. Having made "make install" now I have /usr/local/bin/lazarus-ide available to all users . If I run /usr/local/bin/lazarus-ide I have a hell of problems: Units are not found anymore when compiling examples: For any subdir I have to add into fpc.cfg a new entry -uF ....

Please undo these modifications to fpc.cfg. Normally you don't need to edit fpc.cfg. I myself never touch fpc.cfg, except for linker tools/paths.

When lazarus rebuilds for a new components it does it to the original /usr/src/lazarus but then it is /usr/local/bin/lazarus-ide that is restarted....so I do not see any change into the IDE.

The IDE is just a single binary. You can set the lazarus directory under environment / options / files / lazarus directory

I have tried to compile lazarus as a normal user having the sources in /home/myuser/lazarus but this does not succeed.

This is the normal way.
Maybe you copied the directory /usr/share/lazarus to /home/myuser/lazarus? Then the permissions and ownerships were copied too. You can change the ownership with:

chown myuser.myuser -R /home/myuser/lazarus

1. Fix your fpc.cfg
2. Fix the ownership of /home/myuser/lazarus
3. remove the files in /home/myuser/.lazarus/
4. compile lazarus with
cd /home/myuser/lazarus
make clean all
5. start lazarus with
./lazarus

You can setup a desktop item with path
/home/myuser/lazarus/lazarus

Mattias

Reply by email

waldo kitty
to Unknown author: Easiest way, but any user on your machine can modify /usr/src/lazarus Run as root: cd…
Show quoted text 12 lines
On Thu, Feb 18, 2010 at 10:48:17AM -0300, Pino Zollo wrote: > Hi to the list, > I am just a beginner with lazarus.... > > I have installed it on my Debian 5.01....first fpc an then I have compiled > lazarus from sources copied in /usr/src/lazarus. Easiest way, but any user on your machine can modify /usr/src/lazarus Run as root: cd /usr/src/lazarus find -type d -print0 | xargs -0 chmod 777 find -type d -print0 | xargs -0 chmod 666

is the above a typo? first it set mode 777 and then sets the same things to 666?? i think there's a booboo there...

Reply by email

Unknown author
to waldo kitty
waldo kitty wrote 16 lines
On 2/18/2010 09:10, wrote: > On Thu, Feb 18, 2010 at 10:48:17AM -0300, Pino Zollo wrote: >> Hi to the list, >> I am just a beginner with lazarus.... >> >> I have installed it on my Debian 5.01....first fpc an then I have compiled >> lazarus from sources copied in /usr/src/lazarus. > > Easiest way, but any user on your machine can modify /usr/src/lazarus > Run as root: > cd /usr/src/lazarus > find -type d -print0 | xargs -0 chmod 777 > find -type d -print0 | xargs -0 chmod 666 is the above a typo? first it set mode 777 and then sets the same things to 666?? i think there's a booboo there...

Yes, sorry

find -type f -print0 | xargs -0 chmod 666

But Mattias sends better and complex solution.

Petr

Petr Kristan . EPOS PRO s.r.o., Bozeny Nemcove 2625, 530 02 Pardubice tel: +420 466335223 Czech Republic (Eastern Europe) fax: +420 466510709

Reply by email

Pino Zollo

Il gioved? 18 febbraio 2010 11:52:25
ha scritto:

Hi Mattias and Petr,
Thanks for helps.

This is the normal way. Maybe you copied the directory /usr/share/lazarus to ? /home/myuser/lazarus?

No, I made it from the distribution file.

Show quoted text 18 lines
Then the permissions and ownerships were copied ? too. You can change the ownership with: chown myuser.myuser -R /home/myuser/lazarus 1. Fix your fpc.cfg 2. Fix the ownership of /home/myuser/lazarus 3. remove the files in /home/myuser/.lazarus/ 4. compile lazarus with cd /home/myuser/lazarus make clean all 5. start lazarus with ./lazarus You can setup a desktop item with path /home/myuser/lazarus/lazarus Mattias

I made all those steps but I fall in the same error I had when I tried to compile lazarus into my home directory, i.e.

-----------------------
Compiling masks.pas
Fatal: Can't find unit Contnrs used by Masks
Fatal: Compilation aborted
make[1]: *** [alllclunits.ppu] Error 1
make[1]: Leaving directory `/home/pino/lazarus/lcl' make: *** [lcl] Error 2
----------------------

Sure I need to put something into fpc.cfg !

At present it has:

-----------------------
# searchpath for units and other system dependent things -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/* -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/rtl #-Fu~/fpc/packages/base/*/units/;~/fpc/fcl/units/;~/fpc/rtl/units/ -----------------------

It is

/usr/local/lib/fpc/2.4.0/units/i386-linux/fcl-base/

that contains Contnrs, so I imagine that fpc.cfg is not properly interpreted as its second -Fu should include it.

Thanks for you patience

Pino

"In the universe there is no time existing as a physical reality, there is no past, no present and no future" "Time is a mind construction into which one experiences motion" "Time is a flow of irreversible material changes" -Davide Fiscaletti Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net

Reply by email

JoshyFun
to Pino Zollo

Hello Lazarus-List,

Thursday, February 18, 2010, 7:22:50 PM, you wrote:

PZ> that contains Contnrs, so I imagine that fpc.cfg is not properly interpreted PZ> as its second -Fu should include it.

Check if you have a .fpc.cfg (hidden) in you home folder.

Best regards, JoshyFun

Reply by email

Pino Zollo
to JoshyFun

Il gioved? 18 febbraio 2010 17:09:02 JoshyFun ha scritto:

Show quoted text 8 lines
ello Lazarus-List, Thursday, February 18, 2010, 7:22:50 PM, you wrote: PZ> that contains Contnrs, so I imagine that fpc.cfg is not properly interpreted PZ> as its second -Fu should include it. Check if you have a .fpc.cfg (hidden) in you home folder.

Hi Josh,

Yes, I have it and I added in it the following line:

-Fu/usr/local/lib/fpc/2.4.0/units/i386-linux/*

and after that I could compile all lazarus.

....so, maybe, the variables in

-Fu/usr/local/bin/$fpcversion/units/$fpctarget/*

are not set.

Best regards

Pino

"In the universe there is no time existing as a physical reality, there is no past, no present and no future" "Time is a mind construction into which one experiences motion" "Time is a flow of irreversible material changes" -Davide Fiscaletti Key ID: 0xF6768208 Key fingerprint = B16D 0A7C 5B29 A334 CE6A 71F6 EAF8 3D88 F676 8208 Key server: hkp://wwwkeys.eu.pgp.net

Reply by email

JoshyFun
to Pino Zollo

Hello Lazarus-List,

Thursday, February 18, 2010, 9:20:22 PM, you wrote:

PZ> Yes, I have it and I added in it the following line: PZ> -Fu/usr/local/lib/fpc/2.4.0/units/i386-linux/* PZ> and after that I could compile all lazarus.
PZ> ....so, maybe, the variables in
PZ> -Fu/usr/local/bin/$fpcversion/units/$fpctarget/* PZ> are not set.

I'll tell you my "history". :) I setup fpc from rpms and not from repository, so fpc takes the config from my home folder which points to /usr/lib instead the /etc one which points to /usr/local/ so I finally end simply removing the one at home, download SVN of fpc and lazarus in my home/pascal folder and compile both leaving fpc config file in /etc.

As you sure noted I'm not used with Linux ;)

Best regards, JoshyFun

Reply by email