Sign in Join

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

Mailing lists / lazarus / 2012-11

FPC Source Error: directory not found

16 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

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

Eric Kom

Good day,

after compiled fpc and lazarus from the trunk branch, when I run the command ./lazarus, the configure lazarus IDE appears with the above error:

FPC sources

Directory: /usr/share/fpcsrc/2.7.1/

Error: directory not found

Please I need your help, Thanks

Kind Regards Eric Kom System Administrator - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

Reply by email

Mattias Gaertner
to Eric Kom: after compiled fpc and lazarus from the trunk branch, when I run the command ./lazarus,…
Show quoted text 10 lines
Good day, after compiled fpc and lazarus from the trunk branch, when I run the command ./lazarus, the configure lazarus IDE appears with the above error: FPC sources Directory: /usr/share/fpcsrc/2.7.1/ Error: directory not found

It works here.
Something is different on your system.
Please check
/usr, /usr/share, /usr/share/fpcsrc and /usr/share/fpcsrc/2.7.1

Is any directory a symlink?
On what file system(s) are these directories?

Can you try the following small program:

{$mode objfpc}{$H+}
uses Classes, Sysutils, LazFileUtils;
begin
  writeln(DirectoryExistsUTF8('/usr/share/fpcsrc/2.7.1'));
  writeln(DirPathExists('/usr/share/fpcsrc/2.7.1/'));
end.

You have to compile it with

fpc -Fu/your/lazarus/directory/components/lazutils/lib/yourplatform/ test.pas

Please I need your help, Thanks

Mattias

Reply by email

Eric Kom
to leledumbo: Isn't it clear enough? The dialog expects you to have FPC source directory and it…
leledumbo wrote
Isn't it clear enough? The dialog expects you to have FPC source directory and it defaults to that popped-up value, which you could override with your own.

After changed the path to /usr/local/lib/fpc/2.7.1/

I received a warning:

Directory: /usr/local/lib/fpc/2.7.1/

Warning: directory rtl not found

Show quoted text 12 lines
-- View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-FPC-Source-Error-directory-not-found-tp4027560p4027561.html Sent from the Free Pascal - Lazarus mailing list . -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Kind Regards Eric Kom System Administrator - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

Reply by email

Bernd
to Eric Kom

2012/11/8 Eric Kom :

After changed the path to /usr/local/lib/fpc/2.7.1/

This is not the source directory.

Judging from your previous pots you have compiled fpc from svn and sucessfully installed it. make install will only install the binaries and compiled units where they belong, it will not install the fpc source.

But the good news is you don't actually need to install it into any special place, the svn folder where you checked out fpc trunk is perfectly ok already. Simply point Lazarus to the folder that contains the fpc sources from svn and Lazarus will find what it needs there.

Reply by email

Eric Kom
to Bernd
Bernd wrote 9 lines
2012/11/8 Eric Kom: > After changed the path to /usr/local/lib/fpc/2.7.1/ This is not the source directory. Judging from your previous pots you have compiled fpc from svn and sucessfully installed it. make install will only install the binaries and compiled units where they belong, it will not install the fpc source.

That's make sense.

But the good news is you don't actually need to install it into any special place, the svn folder where you checked out fpc trunk is perfectly ok already. Simply point Lazarus to the folder that contains the fpc sources from svn and Lazarus will find what it needs there.

I pointed directly to the fpc/rtl/ directory, still the warning rtl directory not fund.

Show quoted text 6 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Kind Regards Eric Kom System Administrator - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

Reply by email

Mattias Gaertner
to Eric Kom

Eric Kom hat am 8. November 2012 um 13:11
geschrieben:

Show quoted text 17 lines
On 08/11/2012 13:39, Bernd wrote: > 2012/11/8 Eric Kom: > >> After changed the path to /usr/local/lib/fpc/2.7.1/ > This is not the source directory. > > Judging from your previous pots you have compiled fpc from svn and > sucessfully installed it. make install will only install the binaries > and compiled units where they belong, it will not install the fpc > source. That's make sense. > But the good news is you don't actually need to install it into any > special place, the svn folder where you checked out fpc trunk is > perfectly ok already. Simply point Lazarus to the folder that contains > the fpc sources from svn and Lazarus will find what it needs there. I pointed directly to the fpc/rtl/ directory, still the warning rtl directory not fund.

rtl is just one sub folder of fpc.
Point it to the fpc directory.

Any suggestions how to improve the error message to make this more clear?

Mattias

Reply by email

Eric Kom
to Mattias Gaertner
Mattias Gaertner wrote 23 lines
Eric Kom hat am 8. November 2012 um 13:11 geschrieben: > On 08/11/2012 13:39, Bernd wrote: >> 2012/11/8 Eric Kom: >> >>> After changed the path to /usr/local/lib/fpc/2.7.1/ >> This is not the source directory. >> >> Judging from your previous pots you have compiled fpc from svn and >> sucessfully installed it. make install will only install the binaries >> and compiled units where they belong, it will not install the fpc >> source. > That's make sense. >> But the good news is you don't actually need to install it into any >> special place, the svn folder where you checked out fpc trunk is >> perfectly ok already. Simply point Lazarus to the folder that contains >> the fpc sources from svn and Lazarus will find what it needs there. > I pointed directly to the fpc/rtl/ directory, still the warning rtl > directory not fund. rtl is just one sub folder of fpc. Point it to the fpc directory. Any suggestions how to improve the error message to make this more clear?

Thanks a lot for your help everything is fine now

Show quoted text 9 lines
Mattias -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Kind Regards Eric Kom System Administrator - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner: Eric Kom hat am 8. November 2012 um 13:11 geschrieben: rtl is just one sub folder of fpc.
Mattias Gaertner wrote 7 lines
> I pointed directly to the fpc/rtl/ directory, still the warning rtl > directory not fund. rtl is just one sub folder of fpc. Point it to the fpc directory. Any suggestions how to improve the error message to make this more clear?

Something like "The directory you have selected does not contain subdirectories rtl, packages and so on." (don't use "etc." in this context).

Could ppcXXX return its build directory? Then provided this existed and perhaps subject to other consistency checks the IDE could suggest it as the default.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Bernd
to Mark Morgan Lloyd

2012/11/8 Mark Morgan Lloyd :

Could ppcXXX return its build directory?

This is not a good idea. For example rpm or deb packages would contain a compiler that was compiled in some arbitrary folder and then later the sources will be copied to somewhere else by the installer.

Reply by email

Sven Barth
to Mark Morgan Lloyd: Something like "The directory you have selected does not contain subdirectories rtl,…
Mark Morgan Lloyd wrote 19 lines
Mattias Gaertner wrote: >> I pointed directly to the fpc/rtl/ directory, still the warning rtl >> directory not fund. > > rtl is just one sub folder of fpc. > Point it to the fpc directory. > > Any suggestions how to improve the error message to make this more > clear? Something like "The directory you have selected does not contain subdirectories rtl, packages and so on." (don't use "etc." in this context). Could ppcXXX return its build directory? Then provided this existed and perhaps subject to other consistency checks the IDE could suggest it as the default.

So if I would send you a ppcross68k compiled on my development machine and you would then ask it for it's build directory it would return "/mnt/data/subversion/fpc-build". Would this help you in any way? I think not... (and this is exactly what would happen if you'd use a compiler provided through any package distribution, as you are not normally building from within "/usr/lib" or whatever.

Regards,
Sven

Reply by email

Bernd
to Bernd: 2012/11/8 Mark Morgan Lloyd : This is not a good idea. For example rpm or deb packages…

2012/11/8 Bernd :

Show quoted text 7 lines
2012/11/8 Mark Morgan Lloyd : > Could ppcXXX return its build directory? This is not a good idea. For example rpm or deb packages would contain a compiler that was compiled in some arbitrary folder and then later the sources will be copied to somewhere else by the installer.

Since this problem only ever occurs when fpc is installed manually (with make) it might be a better idea to provide another make target in the fpc makefile that would allow to do

sudo make installsource

that would install the sources into $(PREFIX)/share/fpcsrc/$(VERSION) the same place the installer packages would have installed it and lazarus is already looking for it and then the official instructions for installing fpc from source would contain also the above line and everybody who is following the instructions wold not have to wonder whether there is a separate procedure to install the sources or what exactly to install if installing manually, etc.

Reply by email

leledumbo
to Mattias Gaertner: Eric Kom hat am 8. November 2012 um 13:11 geschrieben: rtl is just one sub folder of fpc.
Any suggestions how to improve the error message to make this more clear?

It would be a bit long, but I hope much clearer:
"Lazarus cannot find the directory in which FPC source code is located (Lazarus assumes it is located in <write the default value here>). The directory should have at least "rtl" and "packages" directory (or more in case of full source code). If you think it's not yet installed, please download one here: <we can give one or more (direct) links here, such as sourceforge or somewhere else>"

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-FPC-Source-Error-directory-not-found-tp4027560p4027576.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Mark Morgan Lloyd
to Bernd: 2012/11/8 Mark Morgan Lloyd : This is not a good idea. For example rpm or deb packages…
Bernd wrote 7 lines
2012/11/8 Mark Morgan Lloyd : > Could ppcXXX return its build directory? This is not a good idea. For example rpm or deb packages would contain a compiler that was compiled in some arbitrary folder and then later the sources will be copied to somewhere else by the installer.

Which is why I said "provided this existed and perhaps subject to other consistency checks", and noting that it's for use as a default if nothing has already been specified.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Sven Barth: So if I would send you a ppcross68k compiled on my development machine and you would then…
Sven Barth wrote 11 lines
> Could ppcXXX return its build directory? Then provided this existed > and perhaps subject to other consistency checks the IDE could suggest > it as the default. > So if I would send you a ppcross68k compiled on my development machine and you would then ask it for it's build directory it would return "/mnt/data/subversion/fpc-build". Would this help you in any way? I think not... (and this is exactly what would happen if you'd use a compiler provided through any package distribution, as you are not normally building from within "/usr/lib" or whatever.

Exactly: that's a case where it wouldn't help so could fall back to something hardcoded. But for people who'd built locally from svn, from a numbered release or from a daily snapshot it would get it right most of the time. Of course, it wouldn't help weirdos like me who copy the sources to /usr/lib/fpc/x.x.x/fpcsrc, but I expect that I'm a minority in that.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Eric Kom
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 21 lines
Sven Barth wrote: >> Could ppcXXX return its build directory? Then provided this existed >> and perhaps subject to other consistency checks the IDE could >> suggest it as the default. >> > > So if I would send you a ppcross68k compiled on my development > machine and you would then ask it for it's build directory it would > return "/mnt/data/subversion/fpc-build". Would this help you in any > way? I think not... (and this is exactly what would happen if you'd > use a compiler provided through any package distribution, as you are > not normally building from within "/usr/lib" or whatever. Exactly: that's a case where it wouldn't help so could fall back to something hardcoded. But for people who'd built locally from svn, from a numbered release or from a daily snapshot it would get it right most of the time. Of course, it wouldn't help weirdos like me who copy the sources to /usr/lib/fpc/x.x.x/fpcsrc, but I expect that I'm a minority in that.

Thanks a lot for your support

Kind Regards Eric Kom System Administrator - Metropolitan College _________________________________________ / You are scrupulously honest, frank, and \ | straightforward. Therefore you have few | \ friends. / ----------------------------------------- \ \ .--. |o_o | |:_/ | // \ \ (| Kom | ) /'\_ _/`\ \___)=(___/ 2 Hennie Van Till, White River, 1240 Tel: 013 750 2255 | Fax: 013 750 0105 | Cell: 078 879 1334 | www.kom.za.net | www.kom.za.org | www.erickom.co.za Key fingerprint: 513E E91A C243 3020 8735 09BB 2DBC 5AD7 A9DA 1EF5

Reply by email