Recent

Author Topic: fpc.cfg is missing  (Read 6036 times)

Hopestation

  • Full Member
  • ***
  • Posts: 181
fpc.cfg is missing
« on: October 21, 2019, 07:40:47 pm »
Hi.

I have just downloaded

fpc-3.0.4-1.x86_64.rpm
fpc-src-3.0.4-1.x86_64.rpm
lazarus-2.0.4-0.x86_64.rpm

and extracted them into .home/myfiles/usr.

I ran /home/myfiles/usr/lib64/lazarus/startlazarus

I got the "Welcome to Lazarus IDE 2.3.4", Configure Lazarus IDE window.

This shows that the file fpc.cfg is missing.

I have searched the  .home/myfiles/usr directory and I can't find this file.

Have I done something wrong?

When I downloaded and ran the Windows 10 version it ran "straight out of the box".

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: fpc.cfg is missing
« Reply #1 on: October 21, 2019, 07:47:25 pm »
look in and point to /etc/fpc.cfg
Specialize a type, not a var.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: fpc.cfg is missing
« Reply #2 on: October 21, 2019, 07:49:21 pm »
@Hopestation

Which Linux distro did you use?

Instead of manually extract the rpm files, have you tried to install the rpm packages by using the rpm command? Maybe this can help you:

https://access.redhat.com/solutions/1189

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: fpc.cfg is missing
« Reply #3 on: October 21, 2019, 09:50:27 pm »
You can also create a new fpc.cfg with fpcmkcfg
« Last Edit: October 21, 2019, 09:55:51 pm by Thaddy »
Specialize a type, not a var.

Hopestation

  • Full Member
  • ***
  • Posts: 181
Re: fpc.cfg is missing
« Reply #4 on: October 21, 2019, 11:24:27 pm »
Thanks Thaddy.
I've got 2 etc directories:
/etc doesn't contain it.
/home/userfiles/etc/lazarus only contains environmentoptions.xml

Handoko, I'm using Mint 18.2. Does that make any difference?

Thaddy. Sorry for a silly question. How do I run fpcmkcfg?

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: fpc.cfg is missing
« Reply #5 on: October 22, 2019, 12:22:10 am »
Hopestation, Linux Mint is a deb based system isn't it ?

You need to download the deb files, not the rpm. Install gdebi first. Hmm, I think Mint may install it by default, check anyway, you MUST use gdebi to install FPC and Lazarus. The built in 'Software Installer' they all get from Gnome does not resolve dependancies if you are installing a package that has been downloaded.

When you have gdebi installed, you can use it from command line or get a pretty and informative GUI if you click an already download deb file. Install in this order -

fpc
fpc-src
lazarus

Good luck !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: fpc.cfg is missing
« Reply #6 on: October 22, 2019, 07:59:41 am »
steps to create a valid fpc.cfg the easy way:
find out where your fpc executable is:
Code: Bash  [Select][+][-]
  1. whereis fpc
Take note of the bin directory path, in my case /usr/local/bin/ (leave out fpc part, that's the binary)
find out where samplecfg is:
Code: Bash  [Select][+][-]
  1. whereis samplecfg
in my case in /usr/local
Now create /etc/fpc.cfg as follows:
Code: Bash  [Select][+][-]
  1. sudo /usr/local/samplecfg /usr/local/bin
Note I used the bin directory!
Now you should be fine. a fpc.cfg in the right place (/etc) and with all the correct paths to the libraries and tools expanded.
Specialize a type, not a var.

Hopestation

  • Full Member
  • ***
  • Posts: 181
Re: fpc.cfg is missing
« Reply #7 on: October 22, 2019, 11:02:34 am »
Thanks for your replies.

I've downloaded:

fpc-laz_3.0.4-1_amd64.deb

fpc-src_3.0.4-2_amd64.deb

lazarus-project_2.0.4-0_amd64.deb

I installed fpc-laz and fpc-src succesfully, using GDebi Package Installer, but when I tried to install lazarus I got a red backed message saying:

Error: Dependency is not satisfiable: fpc-laz(=3.04)

If dbannon is correct that I shouldn't have used the rpm files, can I still generate the fpc.cfg as Thaddy suggested?

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: fpc.cfg is missing
« Reply #8 on: October 22, 2019, 11:04:19 am »
(fpc.cfg is generated by scripts, so if you extract RPMs, manually, probably the scripts won't run and no file will be generated)

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: fpc.cfg is missing
« Reply #9 on: October 22, 2019, 11:19:24 am »
If dbannon is correct that I shouldn't have used the rpm files, can I still generate the fpc.cfg as Thaddy suggested?
Yes, you can. make sure however it ends up in /etc like I explained. samplecfg has a small help that explains it, not very verbose. samplecfg -h
If fpc.cfg is really missing from official rpm's file a bug report against the rpm owner from the linux distribution.
Note: I have only a rusty bit of knowledge about rpm's since I exclusively use Debian based distributions nowadays. But they also should install fpc.cfg in /etc. That should not be changed, unless /home/<user>/etc is available.
« Last Edit: October 22, 2019, 11:25:30 am by Thaddy »
Specialize a type, not a var.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: fpc.cfg is missing
« Reply #10 on: October 22, 2019, 11:43:10 am »
Error: Dependency is not satisfiable: fpc-laz(=3.04)

I had this issue, but it can be easily solved. Not remember correctly but you can try:
- Simply ignore it, continue the installation and everything just works
- Disconnect the internet connection and perform the whole installation process again
- Use Synaptic Package Manager to inspect the cause of the installation problem
- Install Lazarus using the software manager provided by the OS

Certain versions of Ubuntu based distros have issue installing Lazarus. Nothing serious, I always made it works. But each version usually had different issue, I can't remember exactly how I solved them. You can try to search the forum for the answer.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: fpc.cfg is missing
« Reply #11 on: October 22, 2019, 11:50:58 am »
Alternatively do as I do and install FPC from https://www.freepascal.org/download.var then install the sources, get Lazarus from https://www.lazarus-ide.org/index.php?page=downloads and build in situ.

There's a couple of prerequisites that you have to install on Debian, but I did that just a few days ago for an i386 Docker container.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: fpc.cfg is missing
« Reply #12 on: October 22, 2019, 12:00:49 pm »
samplecfg is one option, fpmkcfg is the other.

Thaddy

  • Hero Member
  • *****
  • Posts: 14205
  • Probably until I exterminate Putin.
Re: fpc.cfg is missing
« Reply #13 on: October 22, 2019, 12:05:17 pm »
samplecfg is one option, fpmkcfg is the other.
I explained both. The latter is more complex to handle paths correctly, but has more features. That is true. A beginner is better helped with samplecfg in my opinion.
Specialize a type, not a var.

Hopestation

  • Full Member
  • ***
  • Posts: 181
Re: fpc.cfg is missing
« Reply #14 on: October 22, 2019, 03:00:00 pm »
I've opened a terminal, here is the result:

 ~ $ whereis fpc
fpc:
 ~ $ whereis samplecfg
samplecfg:

I don't get a result, should I be running this in a particular directory?

I know that samplecfg is in /home/roger/usr/lib64/fpc/3.0.4

I  moved to that directory and tried:

 ~ $ cd /home/userfiles/usr/lib64/fpc/3.0.4 ~/usr/lib64/fpc/3.0.4
 ~ $ ls
fpc.cfg  fpmkinst  msg  ppcx64  samplecfg  units

~/usr/lib64/fpc/3.0.4 $ sudo /home/userfiles/usr/lib64/fpc/3.0.4/samplecfg /usr/local/bin
[sudo] password for Hopestation:
Running on linux
/home/userfiles/usr/lib64/fpc/3.0.4/samplecfg: 1: /home/userfiles/usr/lib64/fpc/3.0.4/samplecfg: /usr/local/../../bin/fpc: not found
Write permission in /etc.
Writing sample configuration file to /etc/fpc.cfg
/home/userfiles/usr/lib64/fpc/3.0.4/samplecfg: 77: /home/userfiles/usr/lib64/fpc/3.0.4/samplecfg: fpcmkcfg: not found
 ~/usr/lib64/fpc/3.0.4 $

I've now got fpc.cfg in /home/userfiles/usr/local/bin.

All my lazarus files are in /home/userfiles/usr. Where should I move fpc.cfg to?

 

TinyPortal © 2005-2018