Topic: Error: fpc.cfg is missing (Read 25667 times)
I’ve just uninstalled my old Lazarus, rebooted and installed from lazarus-1.0.4-fpc-2.6.0-win32.exe.
In the Welcome screen I’ve browsed and selected C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.exe, but I get the error message «fpc.cfg is missing» despite the fact that that file is in the same directory as fpc.exe.
The screen tells me I can also use ppc386.exe, but then I’m told I don’t have a proper compiler and that ppc386.exe doesn’t support i386-win32 !!!
So I go back and reselect fpc.exe, but lazarus still isn’t happy.
What AM I supposed to select as the compiler (Windows XP SP3)?
Logged
-Keith Freeman
SunyD
Ignore warning messages and run lazarus.
Then go to settings dialog. Check fpc-folder names. All fpc folders must for you contain:
…\fpc\2.6.0\….
Maybe your new lazarus using settings from old lazaurs.
good luck.
Logged
Just to double check.
— Your old install was in C:\lazarus\
— You did uninstall it
— You installed 1.0.4 to C:\lazarus\ and there where no errors during install (except maybe «target folder not empty», which should be 99% ok)
— You did NOT move/copy,rename this folder at any time.
You did NOT move/copy rename anything in C:\lazarus\fpc\
— The files
C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.exe
C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.cfg
both exist
— If you open C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.cfg
it is a text file, and some lines contain references to folders under C:\lazarus\fpc\
like
-FuC:\lazarus\fpc\$FPCVERSION/units/$fpctarget
Did you ever have any cross compiler installed?
— Attach your C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.cfg
— attach the output of
cd C:\lazarus\fpc\2.6.0\bin\i386-win32\
fpc.exe -i
ppc386.exe -i
Logged
— Your old install was in C:\lazarus\
— You did uninstall it
— You installed 1.0.4 to C:\lazarus\ and there where no errors during install (except maybe «target folder not empty», which should be 99% ok)
— You did NOT move/copy,rename this folder at any time.
You did NOT move/copy rename anything in C:\lazarus\fpc\
— The files
C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.exe
C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.cfg
both exist
— If you open C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.cfg
it is a text file, and some lines contain references to folders under C:\lazarus\fpc\
like
-FuC:\lazarus\fpc\$FPCVERSION/units/$fpctarget
Thanks for looking at this. Yes, that’s all true.
Did you ever have any cross compiler installed?
— Attach your C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.cfg
— attach the output of
cd C:\lazarus\fpc\2.6.0\bin\i386-win32\
fpc.exe -i
ppc386.exe -i
Not to my knowledge, but I’ve run those two commands anyway. When I start L it is still telling me that «ppc386.exe doesn’t support i386-win32» and that fpc doesn’t have a config file.
If I go to View | IDE Internals | About FPC I see this:
*******************************************
Lazarus build date: 2012/11/30
Lazarus was compiled for i386-win32
Lazarus was compiled with fpc 2.6.0
Environment variables:
PATH=C:\Python26\\Scripts;C:\Python26\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Samsung\Samsung PC Studio 3\;C:\Program Files\QuickTime\QTSystem\;%APPDATA%\Python\Scripts
PP=
FPCDIR=
USESVN2REVISIONINC=
USER=
HOME=
PWD=
LANG=
LANGUAGE=
Global IDE options:
LazarusDirectory=C:\lazarus\
Resolved LazarusDirectory=C:\lazarus\
CompilerFilename=C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.exe
Resolved CompilerFilename=C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.exe
CompilerMessagesFilename=
Resolved CompilerMessagesFilename=
Project:
lpi=
Directory=
TargetOS=
TargetCPU=
CompilerFilename=$(CompPath)
Active target:
TargetOS=win32
TargetCPU=i386
FPC executable:
Compiler=C:\lazarus\fpc\2.6.0\bin\i386-win32\fpc.exe
Options=
CompilerDate=30/11/12 18:33:16
RealCompiler=
RealCompilerDate=30/12/99
RealTargetOS=win32
RealTargetCPU=i386
RealCompilerInPath=C:\lazarus\fpc\2.6.0\bin\i386-win32\ppc386.exe
Version=
WARNING: fpc has no config file
Defines:
Undefines:
UnitPaths:
Units:
Sources:
Directory=C:\lazarus\fpc\2.6.0\source
Files.Count=6171
packages\libndsfpc\src\nds\system.inc
packages\libogcfpc\src\ogc\system.inc
rtl\amiga\classes.pp
rtl\amiga\system.pp
rtl\amiga\sysutils.pp
rtl\atari\system.pas
rtl\beos\classes.pp
rtl\beos\system.pp
rtl\bsd\system.pp
rtl\embedded\system.pp
rtl\emx\system.pas
rtl\emx\sysutils.pp
rtl\gba\classes.pp
rtl\gba\system.pp
rtl\gba\sysutils.pp
rtl\go32v2\classes.pp
rtl\go32v2\system.pp
rtl\go32v2\sysutils.pp
rtl\haiku\classes.pp
rtl\haiku\system.pp
rtl\inc\system.inc
rtl\linux\system.pp
rtl\macos\system.pp
rtl\macos\sysutils.pp
rtl\morphos\classes.pp
rtl\morphos\system.pp
rtl\morphos\sysutils.pp
rtl\nativent\classes.pp
rtl\nativent\system.pp
rtl\nativent\sysutils.pp
rtl\nds\classes.pp
rtl\nds\system.pp
rtl\nds\sysutils.pp
rtl\netware\classes.pp
rtl\netware\system.pp
rtl\netware\sysutils.pp
rtl\netwlibc\classes.pp
rtl\netwlibc\system.pp
rtl\netwlibc\sysutils.pp
rtl\objpas\classes\classes.inc
rtl\objpas\sysutils\sysutils.inc
rtl\openbsd\classes.pp
rtl\os2\classes.pp
rtl\os2\system.pas
rtl\os2\sysutils.pp
rtl\palmos\system.pp
rtl\qnx\system.pp
rtl\solaris\system.pp
rtl\symbian\system.pp
rtl\unix\classes.pp
rtl\unix\sysutils.pp
rtl\watcom\classes.pp
rtl\watcom\system.pp
rtl\watcom\sysutils.pp
rtl\wii\classes.pp
rtl\wii\system.pp
rtl\wii\sysutils.pp
rtl\win32\classes.pp
rtl\win32\system.pp
rtl\win64\classes.pp
rtl\win64\system.pp
rtl\win\sysutils.pp
rtl\wince\classes.pp
rtl\wince\system.pp
rtl\wince\sysutils.pp
**********************************
Would it help to fill in those Environment Variables, and if so, where do I do that?
-Keith
Logged
-Keith Freeman
Please, save big text as file, and use attach. It is hard to read inline.
I was still looking for the exact output of «fpc -i» and «ppc386 -i». It must contain version, date, and some other info.
Also run «fpc -va test.pas». This should generate 1000nds of lines!
test.pas should just be «program a; begin end.»
What are the sizes of those 2 files?
You do run them, while you are in that directory?
Logged
I was still looking for the exact output of «fpc -i» and «ppc386 -i». It must contain version, date, and some other info.
See attachment. I did get output from «fpc -i» but I’m afraid I lost it — it’s ages since I did this DOS stuff.
What are the sizes of those 2 files?
fpc.cfg is 6738. After running «ppc386 -i» the size of fpc.exe has been reduced to 0! (which it was not before). That is evidently the reason for Access denied on subsequent calls to «fpc -i».
You do run them, while you are in that directory?
Yes.
Logged
-Keith Freeman
Well it is an empty file that you attached.
you can do in Lazarus:
— New project: simple program
— project options => Other: This tab as a big memo: «Custom options» enter -va in this memo.
— Run => build
— from the messages window «Copy all and hidden messages»
———————
Another approach, so I expect you did already:
— uninstall again. delete all remaining files in C:\lazarus
— install: there is an option to delete user config. Select this option.
What is the file size of the installer? And again, the file size of fpc.exe and ppc386.exe
Logged
— uninstall again. delete all remaining files in C:\lazarus
— install: there is an option to delete user config. Select this option.What is the file size of the installer? And again, the file size of fpc.exe and ppc386.exe
Thanks for your patience! Done that. The installer is 111,597,937, fpc.exe 86,016, fpc.cfg 6,738.
Attached is the output from the three commands.
When I start the IDE it still reports the correct directory but says fpc.cfg is missing.
Will try your other suggestion in the IDE and report back.
Logged
-Keith Freeman
you can do in Lazarus:
— New project: simple program
— project options => Other: This tab as a big memo: «Custom options» enter -va in this memo.
— Run => build
— from the messages window «Copy all and hidden messages»
Done all that. I still get «Compiler … fpc.exe does not support target i386-win32. Output of Messages window attached.
Logged
-Keith Freeman
Hm ok, that does at this point not look like an issue with fpc.cfg. That looks like the fpc.exe can not be executed at all.
The IDE probably reports the fpc.cfg missing, because it it needs to execute fpc.exe, in order to know the fpc.cfg.
Interesting as well the » : 5″ at the end. I don’t thing that should be there. But again not yet the concern. (There would be a different message).
For the previous test (fpc -i) did you use a dosbox (cmd.com) to run fpc.exe?
Did it give (when run from command line, outside lazarus) a message like:
Free Pascal Compiler version 2.6.0 [2012/01/04] for i386
Copyright (c) 1993-2011 by Florian Klaempfl and others
2 possibilities come to mind.
1) the exe is corrupt
2) Your antivirus blocks it. (Several antivirus solutions have *wrongly* reported fpc and fpc generated code as malicious. Same for gdb.
The version on sourceforge was uploaded to virustotal.com and passed all good. (But you can check yourself)
You can try to set your AV to «gamemode» or similar, or «always ask» (though some AV do not ask, even if configured).
Filesizes should be (32 bit lazarus)
86,016 fpc.exe
2,042,368 ppc386.exe
Logged
For the previous test (fpc -i) did you use a dosbox (cmd.com) to run fpc.exe?
Did it give (when run from command line, outside lazarus) a message like:Free Pascal Compiler version 2.6.0 [2012/01/04] for i386
Copyright (c) 1993-2011 by Florian Klaempfl and others
Yes, I ran it in a Dos box. No, it didn’t give that. I’ve attached the output.
Logged
-Keith Freeman
2) Your antivirus blocks it. (Several antivirus solutions have *wrongly* reported fpc and fpc generated code as malicious. Same for gdb.
I’ve tried disabling Avira Free and Comodo Firewall but to no avail.
Logged
-Keith Freeman
This output is correct. So the fpc.exe is ok.
Leaves the question why the IDE can not run it. On 2nd thought, it seems the » : 5″ seems to be the system error code. If so 5 = «Access denied»
So something (User account settings?) forbids the IDE to run fpc.exe
Logged
So something (User account settings?) forbids the IDE to run fpc.exe
I’ve uninstalled the latest version and installed from lazarus-0.9.28.2-fpc-2.2.4-win32.exe. Seems to be working OK now.
Thanks for your help.
Logged
-Keith Freeman
You are missing lots of features and fixes…
But, it’s the first time I saw that error you have. So I have no idea what is wrong.
Logged
При установке deb-пакетов Lazarus 1.6 и FreePascal 3.0 в Linux Mint 18 возможна некорректная установка компилятора fpc. Из-за этого Lazarus не может найти файл fpc.cfg и сам компилятор, о чем сообщает при каждом запуске.
Решение.
Необходимо переустановить компилятор fpc.
1. Заходим на страничку https://sourceforge.net/projects/freepascal/.
2. Скачиваем fpc-3.0.0.x86_64-linux.tar.
3. Распаковываем его.
4. Заходим через терминал (консоль) в каталог fpc-3.0.0.x86_64-linux и запускаем установщик:
sudo ./install.sh
установщик спросит, в какую папку устанавливать?
Install prefix (/usr or /usr/local) [/usr] :
здесь просто нажимаем Enter.
В процессе установки несколько раз будут вопросы об установке дополнительных опций. Нажимаем на клавиатуре клавишу Y.
После такой установки компилятора fpc проблема в Lazarus исчезнет.
I installed Lazarus with this tutorial http://wiki.freepascal.org/Installing_Lazarus
But when i open Lazarus i get the error:
fpc.cfg missing.
I used the alien command to install Lazaris and this is what i think the mistake(Because the site said: Debian users are recommended to use the deb packages, but may use either alien (warning, it doesn’t generate fpc.cfg) or the tarball install.)
How can i create a fpc.cnf file or fix this error?
asked Nov 10, 2015 at 22:25
Its already stated there as to how to do that:
-
Open terminal: Ctrl + Alt + T.
-
Type the following:
THEPREFIX/lib/fpc/3.0.0/samplecfg $THEPREFIX/lib/fpc/3.0.0 $ETCDIR
- Optionally test to see if ppc386 -i (or whatever compiler your architecture uses) gives output, else give a warning that user need to add $PREFIX/bin to his current path. Try to compiler a program with -viwn, and see if that gives errors.
answered Jan 28, 2016 at 9:01
RaphaelRaphael
7,9955 gold badges34 silver badges51 bronze badges
I suggest you to use DEB packages anyway. There are DEB files to download directly on official sites. You need to install FPC, FPC-SRC, and Lazarus packages. fpc.cfg is autogenerated in /etc
.
There is also command from FPC to generate fpc.cfg: fpcmkcfg
.
answered Jan 28, 2016 at 8:52
You must log in to answer this question.
Not the answer you’re looking for? Browse other questions tagged
.
Not the answer you’re looking for? Browse other questions tagged
.
Я установил Lazarus с этим учебным http://wiki.freepascal.org/Installing_Lazarus
Но когда я открываю Lazarus, я получаю ошибку: пропавшие без вести fpc.cfg.
Я использовал постороннюю команду для установки Lazaris, и это — то, что я думаю ошибка (Поскольку сказанный сайт: пользователям Debian рекомендуют использовать deb пакеты, но могут использовать любой посторонний объект (предупреждение, он не генерирует fpc.cfg), или установка tarball.)
Как я могу создать fpc.cnf файл или зафиксировать эту ошибку?
задан
11 November 2015 в 01:25
поделиться
2 ответа
Уже указанный там относительно того, как сделать это:
-
Открытый терминал: Ctrl + Высокий звук + T .
-
Тип следующее:
THEPREFIX/lib/fpc/3.0.0/samplecfg $THEPREFIX/lib/fpc/3.0.0 $ETCDIR
- Дополнительно тест, чтобы видеть, дает ли ppc386-i (или безотносительно компилятора Ваше использование архитектуры) вывод, еще дайте предупреждение, что пользователь должен добавить $PREFIX/bin к своему текущему пути. Попробуйте к компилятору программу с-viwn и посмотрите, дает ли это ошибки.
ответ дан Raphael
30 September 2019 в 04:54
поделиться
Я предлагаю, чтобы Вы использовали пакеты DEB так или иначе. Существуют файлы DEB для загрузки непосредственно на официальных сайтах. Необходимо установить FPC, FPC-SRC и пакеты Lazarus. fpc.cfg автоматически генерируется в /etc
.
существует также команда от FPC для генерации fpc.cfg: fpcmkcfg
.
ответ дан TSr
30 September 2019 в 04:54
поделиться
Другие вопросы по тегам:
Похожие вопросы:
Can’t start Lazarus because of missing fpc.cfg file.
Original Reporter info from Mantis: delphifreak
-
Reporter name: samuel herzog
Description:
Can not start lazarus.
Steps to reproduce:
1.) download snapshot Lazarus-0.9.31-31861-fpc-2.5.1-20110804-win32.exe
2.) install
3.) start lazarus. You will get the error message (see attached screenshot)
I searched the lazarus-folder and all subfolders but there is no file called «fpc.cfg».
Additional information:
The snapshot with fpc-2.4.4 works fine.
Lazarus-0.9.31-31861-fpc-2.4.4-20110804-win32.exe
Mantis conversion info:
- Mantis ID: 19895
- OS: xp/win7
- Build: daily snapshot 04_08_2011
- Platform: windows
- Version: 0.9.31 (SVN)
- Target version: 0.9.31 (SVN)