|
3 / 3 / 6 Регистрация: 16.12.2013 Сообщений: 44 |
|
|
1 |
|
|
02.10.2014, 19:16. Показов 12424. Ответов 3
При выборе компилятора пишет ошибку. Где должен быть fpc.cfg? Проект не линкуется — неверные параметры для линкера
0 |
|
Супер-модератор 32592 / 21061 / 8134 Регистрация: 22.10.2011 Сообщений: 36,332 Записей в блоге: 8 |
|
|
02.10.2014, 19:32 |
2 |
|
Решение/etc/fpc.cfg, но файл должен быть корректным, не испорченным. Читай: Missing or corrupt fpc.cfg file
1 |
|
Daneels 3 / 3 / 6 Регистрация: 16.12.2013 Сообщений: 44 |
||||
|
02.10.2014, 20:56 [ТС] |
3 |
|||
Не помогло. Раньше 2.7.1 работало, но я что-то с версиями намутил. Добавлено через 22 минуты Добавлено через 35 минут
0 |
|
Daneels 3 / 3 / 6 Регистрация: 16.12.2013 Сообщений: 44 |
||||||||
|
04.10.2014, 21:30 [ТС] |
4 |
|||||||
|
Всё решение нашлось, теперь все идеально. Для будущего поколения:
Строчка
собственно и покажет, откуда читается файл.
0 |
Topic: Error: fpc.cfg is missing (Read 25266 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:lazarusfpc2.6.0bini386-win32fpc.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:
…fpc2.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:lazarusfpc
— The files
C:lazarusfpc2.6.0bini386-win32fpc.exe
C:lazarusfpc2.6.0bini386-win32fpc.cfg
both exist
— If you open C:lazarusfpc2.6.0bini386-win32fpc.cfg
it is a text file, and some lines contain references to folders under C:lazarusfpc
like
-FuC:lazarusfpc$FPCVERSION/units/$fpctarget
Did you ever have any cross compiler installed?
— Attach your C:lazarusfpc2.6.0bini386-win32fpc.cfg
— attach the output of
cd C:lazarusfpc2.6.0bini386-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:lazarusfpc
— The files
C:lazarusfpc2.6.0bini386-win32fpc.exe
C:lazarusfpc2.6.0bini386-win32fpc.cfg
both exist
— If you open C:lazarusfpc2.6.0bini386-win32fpc.cfg
it is a text file, and some lines contain references to folders under C:lazarusfpc
like
-FuC:lazarusfpc$FPCVERSION/units/$fpctarget
Thanks for looking at this. Yes, that’s all true.
Did you ever have any cross compiler installed?
— Attach your C:lazarusfpc2.6.0bini386-win32fpc.cfg
— attach the output of
cd C:lazarusfpc2.6.0bini386-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:WINDOWSsystem32;C:WINDOWS;C:WINDOWSSystem32Wbem;C:Program FilesSamsungSamsung PC Studio 3;C:Program FilesQuickTimeQTSystem;%APPDATA%PythonScripts
PP=
FPCDIR=
USESVN2REVISIONINC=
USER=
HOME=
PWD=
LANG=
LANGUAGE=
Global IDE options:
LazarusDirectory=C:lazarus
Resolved LazarusDirectory=C:lazarus
CompilerFilename=C:lazarusfpc2.6.0bini386-win32fpc.exe
Resolved CompilerFilename=C:lazarusfpc2.6.0bini386-win32fpc.exe
CompilerMessagesFilename=
Resolved CompilerMessagesFilename=
Project:
lpi=
Directory=
TargetOS=
TargetCPU=
CompilerFilename=$(CompPath)
Active target:
TargetOS=win32
TargetCPU=i386
FPC executable:
Compiler=C:lazarusfpc2.6.0bini386-win32fpc.exe
Options=
CompilerDate=30/11/12 18:33:16
RealCompiler=
RealCompilerDate=30/12/99
RealTargetOS=win32
RealTargetCPU=i386
RealCompilerInPath=C:lazarusfpc2.6.0bini386-win32ppc386.exe
Version=
WARNING: fpc has no config file
Defines:
Undefines:
UnitPaths:
Units:
Sources:
Directory=C:lazarusfpc2.6.0source
Files.Count=6171
packageslibndsfpcsrcndssystem.inc
packageslibogcfpcsrcogcsystem.inc
rtlamigaclasses.pp
rtlamigasystem.pp
rtlamigasysutils.pp
rtlatarisystem.pas
rtlbeosclasses.pp
rtlbeossystem.pp
rtlbsdsystem.pp
rtlembeddedsystem.pp
rtlemxsystem.pas
rtlemxsysutils.pp
rtlgbaclasses.pp
rtlgbasystem.pp
rtlgbasysutils.pp
rtlgo32v2classes.pp
rtlgo32v2system.pp
rtlgo32v2sysutils.pp
rtlhaikuclasses.pp
rtlhaikusystem.pp
rtlincsystem.inc
rtllinuxsystem.pp
rtlmacossystem.pp
rtlmacossysutils.pp
rtlmorphosclasses.pp
rtlmorphossystem.pp
rtlmorphossysutils.pp
rtlnativentclasses.pp
rtlnativentsystem.pp
rtlnativentsysutils.pp
rtlndsclasses.pp
rtlndssystem.pp
rtlndssysutils.pp
rtlnetwareclasses.pp
rtlnetwaresystem.pp
rtlnetwaresysutils.pp
rtlnetwlibcclasses.pp
rtlnetwlibcsystem.pp
rtlnetwlibcsysutils.pp
rtlobjpasclassesclasses.inc
rtlobjpassysutilssysutils.inc
rtlopenbsdclasses.pp
rtlos2classes.pp
rtlos2system.pas
rtlos2sysutils.pp
rtlpalmossystem.pp
rtlqnxsystem.pp
rtlsolarissystem.pp
rtlsymbiansystem.pp
rtlunixclasses.pp
rtlunixsysutils.pp
rtlwatcomclasses.pp
rtlwatcomsystem.pp
rtlwatcomsysutils.pp
rtlwiiclasses.pp
rtlwiisystem.pp
rtlwiisysutils.pp
rtlwin32classes.pp
rtlwin32system.pp
rtlwin64classes.pp
rtlwin64system.pp
rtlwinsysutils.pp
rtlwinceclasses.pp
rtlwincesystem.pp
rtlwincesysutils.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
Я установил 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
поделиться
Другие вопросы по тегам:
Похожие вопросы:
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,9455 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
Я установил Lazarus с этим руководством http://wiki.freepascal.org/Installing_Lazarus
Но когда я открываю Lazarus, я получаю сообщение об ошибке: отсутствует fpc.cfg.
Я использовал инопланетную команду для установки Lazaris, и в этом я считаю ошибку (поскольку на сайте сказано: пользователям Debian рекомендуется использовать пакеты deb, но они могут использовать либо инопланетянин (предупреждение, оно не генерирует fpc.cfg), либо тарбол установить.)
Как я могу создать файл fpc.cnf или исправить эту ошибку?
2015-11-10 22:25
2
ответа
Решение
Там уже указано, как это сделать:
-
Открыть терминал: Ctrl + Alt + T.
-
Введите следующее:
THEPREFIX/lib/fpc/3.0.0/samplecfg $THEPREFIX/lib/fpc/3.0.0 $ETCDIR- При желании проверьте, выводит ли ppc386 -i (или какой-либо другой компилятор, используемый вашей архитектурой) вывод, иначе выдает предупреждение о том, что пользователю необходимо добавить $PREFIX/bin в свой текущий путь. Попробуйте скомпилировать программу с -viwn и посмотрите, не выдаст ли это ошибки.
Raphael
28 янв ’16 в 09:01
2016-01-28 09:01
2016-01-28 09:01
Я предлагаю вам использовать пакеты DEB в любом случае. Есть файлы DEB для скачивания прямо на официальных сайтах. Вам необходимо установить пакеты FPC, FPC-SRC и Lazarus. fpc.cfg автоматически генерируется в /etc,
Также есть команда от FPC для генерации fpc.cfg: fpcmkcfg,
TSr
28 янв ’16 в 08:52
2016-01-28 08:52
2016-01-28 08:52

Сообщение было отмечено Daneels как решение
