[Lazarus] Exception=Unable to create file "/etc/fppkg/default"

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Exception=Unable to create file "/etc/fppkg/default"

vojtech.cihak

Hi,

 

Lazarus(SVN) at startup tries to write at /etc/fppkg/ where it has no rights. The same file exists /home/$USERNAME/.fppkg/

 

Revision 59930 works well yet, revisions 59936 and 59940 are affected.

 

[v1@nb-msi lazarus]$ ./startlazarus
is a file
TLazarusManager.Run starting /home/v1/Lazarus_Qt/lazarus/lazarus ...
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/
v1/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc
/lazarus"
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New
=x86_64-linux-gtk2 FPC=True LCL=False
Hint: (lazarus) [TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
Hint: (lazarus) [TMainIDE.Destroy] END
[FORMS.PP] ExceptionOccurred  
 Sender=EFCreateError
 Exception=Unable to create file "/etc/fppkg/default"
 Stack trace:
 $000000000051EBA2
 $000000000051E9F3
 $0000000000E15EFC
 $0000000000FA97CF  INSTANCE,  line 85 of ../packager/fppkghelper.pas
 $0000000000AA7DA4  OPENDEPENDENCY,  line 5838 of ../packager/packagesy
stem.pas
 $0000000000A94277  ADDPACKAGE,  line 2122 of ../packager/packagesystem
.pas
 $0000000000A8F8BE  OPENDEPENDENCYWITHPACKAGELINK,  line 998 of ../pack
ager/packagesystem.pas
 $0000000000AA78A0  OPENDEPENDENCY,  line 5785 of ../packager/packagesy
stem.pas
 $0000000000AA8B2B  OPENINSTALLEDDEPENDENCY,  line 5995 of ../packager/
packagesystem.pas
 $0000000000A949FE  LOADLAZARUSBASEPACKAGE,  line 2213 of ../packager/p
ackagesystem.pas
 $0000000000A9486F  LOADSTATICBASEPACKAGES,  line 2217 of ../packager/p
ackagesystem.pas
 $0000000000AB46C6  LOADINSTALLEDPACKAGES,  line 3086 of ../packager/pk
gmanager.pas
 $00000000004A8683  CREATE,  line 1590 of main.pp
 $000000000041ECE6  main,  line 140 of lazarus.pp
TApplication.HandleException: EFCreateError
Unable to create file "/etc/fppkg/default"
 Stack trace:
 $000000000051EBA2
 $000000000051E9F3
 $0000000000E15EFC
 $0000000000FA97CF  INSTANCE,  line 85 of ../packager/fppkghelper.pas
 $0000000000AA7DA4  OPENDEPENDENCY,  line 5838 of ../packager/packagesy
stem.pas
 $0000000000A94277  ADDPACKAGE,  line 2122 of ../packager/packagesystem
.pas
 $0000000000A8F8BE  OPENDEPENDENCYWITHPACKAGELINK,  line 998 of ../pack
ager/packagesystem.pas
 $0000000000AA78A0  OPENDEPENDENCY,  line 5785 of ../packager/packagesy
stem.pas
 $0000000000AA8B2B  OPENINSTALLEDDEPENDENCY,  line 5995 of ../packager/
packagesystem.pas
 $0000000000A949FE  LOADLAZARUSBASEPACKAGE,  line 2213 of ../packager/p
ackagesystem.pas
 $0000000000A9486F  LOADSTATICBASEPACKAGES,  line 2217 of ../packager/p
ackagesystem.pas
 $0000000000AB46C6  LOADINSTALLEDPACKAGES,  line 3086 of ../packager/pk
gmanager.pas
 $00000000004A8683  CREATE,  line 1590 of main.pp
 $000000000041ECE6  ma
in,  line 140 of lazarus.pp 

[v1@nb-msi lazarus]$

 

V.


--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Exception=Unable to create file "/etc/fppkg/default"

Free Pascal - Lazarus mailing list
On Sun, Dec 30, 2018 at 2:42 PM Vojtěch Čihák via lazarus
<[hidden email]> wrote:

> Lazarus(SVN) at startup tries to write at /etc/fppkg/ where it has no rights. The same file exists /home/$USERNAME/.fppkg/

There are more issues with r59933: see
https://bugs.freepascal.org/view.php?id=34780

Bart
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Exception=Unable to create file "/etc/fppkg/default"

Free Pascal - Lazarus mailing list
Op 30-12-18 om 15:16 schreef Bart via lazarus:
> On Sun, Dec 30, 2018 at 2:42 PM Vojtěch Čihák via lazarus
> <[hidden email]> wrote:
>
>> Lazarus(SVN) at startup tries to write at /etc/fppkg/ where it has no rights. The same file exists /home/$USERNAME/.fppkg/

That ain't good.

> There are more issues with r59933: see
> https://bugs.freepascal.org/view.php?id=34780

This basically means that your fpc is not properly configured. I'll have
to add a check somewhere (startup) for these settings.

And maybe suppress these messages, as long as a user does not use this
functionality.

It could be useful to know the revision that introduced this behavior.
It is probably not r59933, could it be r59934?

Regards,

Joost.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Exception=Unable to create file "/etc/fppkg/default"

vojtech.cihak
In reply to this post by Free Pascal - Lazarus mailing list

What config file?

 

My /etc/fppkg.cfg is:

[Defaults]

ConfigVersion=4

LocalRepository={UserDir}.fppkg/

BuildDir={LocalRepository}build/

ArchivesDir={LocalRepository}archives/

CompilerConfigDir=/etc/fppkg

RemoteMirrors=https://www.freepascal.org/repository/mirrors.xml

RemoteRepository=auto

CompilerConfig=default

FPMakeCompilerConfig=default

Downloader=FPC 

 

so there are both pathes.

 

The only mention of fppkg in /etc/fpc.cfg is:

# searchpath for fppkg user-specific packages

-Fu~/.fppkg/lib/fpc/$fpcversion/units/$FPCTARGET/* 

 

However, it worked before, both configs are date 8-12-2017.

 

V.

______________________________________________________________
> Od: "Joost van der Sluis via lazarus" <[hidden email]>
> Komu: [hidden email]
> Datum: 30.12.2018 17:19
> Předmět: Re: [Lazarus] Exception=Unable to create file "/etc/fppkg/default"
>

Op 30-12-18 om 15:16 schreef Bart via lazarus:
> On Sun, Dec 30, 2018 at 2:42 PM Vojtěch Čihák via lazarus
> <[hidden email]> wrote:
>
>> Lazarus(SVN) at startup tries to write at /etc/fppkg/ where it has no rights. The same file exists /home/$USERNAME/.fppkg/

That ain't good.

> There are more issues with r59933: see
> https://bugs.freepascal.org/view.php?id=34780

This basically means that your fpc is not properly configured. I'll have
to add a check somewhere (startup) for these settings.

And maybe suppress these messages, as long as a user does not use this
functionality.

It could be useful to know the revision that introduced this behavior.
It is probably not r59933, could it be r59934?

Regards,

Joost.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Exception=Unable to create file "/etc/fppkg/default"

Free Pascal - Lazarus mailing list
Op 30-12-18 om 18:17 schreef Vojtěch Čihák via lazarus:

> What config file?
>
> My /etc/fppkg.cfg is:
>
> [Defaults]
> ConfigVersion=4
> LocalRepository={UserDir}.fppkg/
> BuildDir={LocalRepository}build/
> ArchivesDir={LocalRepository}archives/
> CompilerConfigDir=/etc/fppkg
> RemoteMirrors=https://www.freepascal.org/repository/mirrors.xml
> RemoteRepository=auto
> CompilerConfig=default
> FPMakeCompilerConfig=default
> Downloader=FPC

This is really strange, I would like to know how you've got into this
situation.

There are two configuration-files for fppkg, the 'normal'
configuration-file fppkg.cfg and the compiler-configuration file,
normally called 'default'. The fppkf.cfg file has a reference to the
location of the compiler-configuration files.

In your case you do have a fppkg.cfg file in /etc, but you do not have
the corresponding compiler-configuration file /etc/fppkg/default. It
must have been deleted or never been made?

Just remove /etc/fppkg.cfg. In that case a new file will be created
automatically in your user-profile.

It is this automatic creation of those files that bites you. Normally it
only creates files in /etc when you are root. But because there is a
/etc/fppkg.cfg file, you get into trouble. I'll try to fix that.

Regards,

Joost.

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Exception=Unable to create file "/etc/fppkg/default"

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
Op 30-12-18 om 17:19 schreef Joost van der Sluis via lazarus:
>>
>>> Lazarus(SVN) at startup tries to write at /etc/fppkg/ where it has no
>>> rights. The same file exists /home/$USERNAME/.fppkg/
>
> That ain't good.

Has been fixed in fpc r40711.

Regards,

Joost.
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus