Topic: [SOLVED] Multiple Lazarus Install => «Error system.ppu not found. Check fpc.cfg» (Read 9493 times)
On a Windows 7 system (32 bit) I have 3 Lazarus Installations in the folders:
— h:ProgsLazarus144 (which is Lazarus 1.4.4 with FPC 2.6.4)
— h:ProgsLazarus162 (which is Lazarus 1.6.2 with FPC 3.0.0)
— h:ProgsLazarus180 (which is Lazarus 1.8.0 RC5 with FPC 3.0.4)
Their config folders are:
— c:UsersAdminAppDataLocallazarus144
— c:UsersAdminAppDataLocallazarus162
— c:UsersAdminAppDataLocallazarus180
Lazarus 1.8.0 and 1.6.2 start. But Lazarus 1.4.4 shows on start an Error «system.ppu not found. Check your fpc.cfg»
The shown path to the compiler = H:ProgsLazarus144fpc2.6.4bini386-win32fpc.exe (seems correct for me).
The installation of Lazarus 1.8.0 RC5 and 1.6.2 have been made with the «secondary installation» option.
Lazarus 1.4.4 menu «View / IDE Internals / About FPC» shows:
FPC executable:
Compiler=H:ProgsLazarus144fpc2.6.4bini386-win32fpc.exe
…
CfgFilename=h:ProgsLazarus162fpc3.0.0bini386-win32fpc.cfg
…
Undefines:
UnitPaths:
H:ProgsLazarus162fpc3.0.0bini386-win32
Both bold marked paths seem to be incorrect for me.
My question is: how can I solve the Error «system.ppu not found. Check your fpc.cfg» at start of Lazarus 1.4.4 ?
I attached the output of Lazarus 1.4.4 menus «View / IDE Internals / About FPC + About IDE» and the config folder of Lazarus 1.4.4 and file h:ProgsLazarus144fpc2.6.4bini386-win32fpc.cfg
Thanks a lot in advance.
« Last Edit: October 22, 2017, 09:07:53 pm by Hartmut »

Logged
I think the fpc.cfg which you posted for your Laz 1.4.4 installation is missing the «144» in the paths:
Example
current config:
# searchpath for units and other system dependent things
-FuH:ProgsLazarusfpc$FPCVERSION/units/$fpctarget
-FuH:ProgsLazarusfpc$FPCVERSION/units/$fpctarget/*
-FuH:ProgsLazarusfpc$FPCVERSION/units/$fpctarget/rtl
should be
# searchpath for units and other system dependent things
-FuH:ProgsLazarus144fpc$FPCVERSION/units/$fpctarget
-FuH:ProgsLazarus144fpc$FPCVERSION/units/$fpctarget/*
-FuH:ProgsLazarus144fpc$FPCVERSION/units/$fpctarget/rtl

Logged
I think the fpc.cfg which you posted for your Laz 1.4.4 installation is missing the «144» in the paths:
You’re right, the ‘144’ seems to be missing (although my Lazarus 1.4.4 installation worked, before I installed 1.8.0 RC5). I had seen this issue before and had tried with ‘144’ in the pathnames, but that had made no difference. Tried it now again with same result.
I’m afraid that the file h:ProgsLazarus144fpc2.6.4bini386-win32fpc.cfg is not used and that file h:ProgsLazarus162fpc3.0.0bini386-win32fpc.cfg is used instead (see bold path above in my 1st post).
Any idea about that? Thanks for your help!

Logged
I’m afraid that the file h:ProgsLazarus144fpc2.6.4bini386-win32fpc.cfg is not used and that file h:ProgsLazarus162fpc3.0.0bini386-win32fpc.cfg is used instead (see bold path above in my 1st post).
Any idea about that? Thanks for your help!
Compile with -va and read the compiler output. FPC is then able to tell you which fpc.cfg it is using (from what location).

Logged
Having several Lazarus installations on my disk I’ve seen such issues occasionally. Unfortunately paths are used at various locations. Since you are on Windows and you use only release versions it is the quickest way to erase the defective version and its config folder and to install it anew.

Logged
And make sure that you don’t put any fpc directory etc in the Windows PATH, this is calling for trouble with multiple installations.

Logged
@wp:
I would not be happy if I must erase and install Laz 1.4.4 again, because I think I would loose all the many configuration settings I made there and because this would be again a «secondary installation» I am afraid, that after this Laz 1.6.2 or 1.8.0 could have a problem.
@molly:
If I understood your request right, I started h:ProgsLazarus144fpc2.6.4bini386-win32fpc.exe with -va option from the command line. The output shows:
…
[0.000] Reading options from file fpc.cfg
[0.000] Start of reading config file fpc.cfg
[0.000] interpreting file option «#»
[0.000] interpreting file option «# Config file generated by fpcmkcfg on 14.11.2015 — 11:49:40»
[0.000] interpreting file option «# Example fpc.cfg for Free Pascal Compiler»
…
which is the beginning of the fpc.cfg file in the h:ProgsLazarus144fpc2.6.4bini386-win32 folder and not in the 162fpc3.0.0 folder.
I attached the whole output.
Thanks to both for your help.

Logged
Referring to «secondary installation»: You did a «primary» install for 1.4.4? The primary installation usually puts its config files in c:users<your name>appdatalocallazarus (without version number appended!). To take the config from a different location there is a file «lazarus.cfg» next to «lazarus.exe» which must have the content «—primary-config-path=c:UsersAdminAppDataLocallazarus144», or you must start lazarus with this as command line parameter. Please check if Laz 1.4.4 really gets its config data from the correct folder.

Logged
@Hartmut:
You understood correctly 🙂
except for one minor detail: start from lazarus compilation, project options -> verbosity all (sorry as i assumed you knew).
But, also my mistake (sorry about that) you already had all your relevant output in your attachment and already showed the wrong path for fpc.cfg.
As wp mentioned you need to add the pcp option to your shortcut to lazarus. In fact i do that for every lazarus install (even my primary one). The fact that lazarus (by default) stores its config files somewhere i do not have control over, is plain confusing to me.
In case the removal of fpc path for commandline compilation is problematic for you then please let know, as there are other solutions to ‘fix’ that f.e. with some script stored somewhere else on your path).

Logged
For 1.4.4 I did a «primary install» to h:ProgsLazarus with the config folder c:UsersAdminAppDataLocallazarus
When I later added 1.6.2 I changed both locations and set
— file h:ProgsLazarus144lazarus.cfg to contain —primary-config-path=c:UsersAdminAppDataLocallazarus144
— file h:ProgsLazarus162lazarus.cfg to contain —primary-config-path=c:UsersAdminAppDataLocallazarus162
I did this 10 month ago and both installations worked fine.
I changed my shortcut to Laz 1.4.4 already to have the option —primary-config-path=c:UsersAdminAppDataLocallazarus144 but that made no difference.
I think the removal of fpc PATH for commandline compilation is no problem for me, because I use Lazarus or the old Text Mode IDE.
If I understood molly correctly, you found the infos you requested already. Otherwise please let me know.

Logged
If I understood molly correctly, you found the infos you requested already. Otherwise please let me know.
That is correct. Thank you for the feedback.
The only other thing that seems out of the ordinary to me is inside your FPC iDE Internals log.
FPCDIR=h:ProgsLazarus180fpc3.0.4bini386-win32
That does not seem right, see also here.
The compiler adds several paths to the unit search path:
1 The contents of the environment variable XXUNITS, where XX must be replaced with one of the supported targets: GO32V2, LINUX,WIN32, OS2, BEOS, FREEBSD, SUNOS, DARWIN (the actual list depends on the available targets).
2 The standard unit directory. This directory is determined from the FPCDIR environment variable. If this variable is not set, then it is defaulted to the following:
Where your fpc directory is located here:
Global IDE options:
LazarusDirectory=H:ProgsLazarus144
Resolved LazarusDirectory=H:ProgsLazarus144
Project’s CompilerFilename=$(CompPath)
Resolved Project’s CompilerFilename=H:ProgsLazarus144fpc2.6.4bini386-win32fpc.exe
Default CompilerFilename=H:ProgsLazarus144fpc2.6.4bini386-win32fpc.exe
Resolved default compilerFilename=H:ProgsLazarus144fpc2.6.4bini386-win32fpc.exe
CompilerMessagesFilename=
Resolved CompilerMessagesFilename=H:ProgsLazarus144componentscodetoolsfpc.errore.msg
and
FPC executable:
Compiler=H:ProgsLazarus144fpc2.6.4bini386-win32fpc.exe
Options=
CompilerDate=03.10.2015 20:27:28
RealCompiler=H:ProgsLazarus144fpc2.6.4bini386-win32ppc386.exe
RealCompilerDate=03.10.2015 20:27:30
RealTargetOS=win32
RealTargetCPU=i386
RealCompilerInPath=H:ProgsLazarus144fpc2.6.4bini386-win32ppc386.exe
Version=2.6.4
CfgFilename=h:ProgsLazarus162fpc3.0.0bini386-win32fpc.cfg
Which seem to indicate that the units directory (FPCDIR) does not match your fpc location (you might perhaps have a different setup which makes it match, but i doubt that here).
Is that FPCDIR environment variable set by yourself ? If,m so then try to remove that and see if that influences your setup.
i am plain confused about the last line on the latest quote:
Version=2.6.4
CfgFilename=h:ProgsLazarus162fpc3.0.0bini386-win32fpc.cfg
Are you sure you have a fpc 2.6.4 fpc.cfg file ?
« Last Edit: October 22, 2017, 06:46:32 pm by molly »

Logged
Maybe I have a solution: starting with the suggestion from wp, not to put any fpc directory etc in the Windows PATH, and molly’s recommendation to check for environment variables, I did the following:
— deleted the PATH entry
— deleted the Environment variables PPC_ERROR_FILE + PPC_EXEC_PATH (with them it did not work)
— deleted file c:UsersAdminAppDataLocallazarus144fpcdefines.xml (because it contained a lot of paths to 1.6.2 and 1.8.0)
After this Laz 1.4.4 starts!
Give me some time for testing if every install uses the correct compiler. I will report a.s.a.p.
@molly:
yes, I have a fpc 2.6.4 fpc.cfg file. It’s included in the attachment of my 1st post.

Logged
yes, I have a fpc 2.6.4 fpc.cfg file. It’s included in the attachment of my 1st post.
Ah yes of course, my bad.
— deleted file c:UsersAdminAppDataLocallazarus144fpcdefines.xml (because it contained a lot of paths to 1.6.2 and 1.8.0)
That might be the smartest move yet because that was very ‘dirty’. even generic unit directory located completely somewhere else: UnitPaths BaseDir=»D:FPC»
Give me some time for testing if every install uses the correct compiler. I will report a.s.a.p.
If no confusion left for fpc/lazarus with regards to generic OS paths and environment variables then you should be good to go. But please let know if you were successful or not.

Logged
As far as I can see, the solution described in reply #11 works.
The operative point was to delete the PATH entry and the 2 Environment variables. Without this, deleting c:UsersAdminAppDataLocallazarus144fpcdefines.xml did not help.
Again a great «Thank you very much» to wp and molly, who helped me frequently.
For today my head smokes. Next days I will do some research about the Environment variables FPCDIR, PPC_CONFIG_PATH, PPC_ERROR_FILE and PPC_EXEC_PATH. Probably I will add them again now, where the problem of creating a valid c:UsersAdminAppDataLocallazarus144fpcdefines.xml is done. But in this case I will delete them before the next multiple Lazarus installation to avoid problems.

Logged
My Windows does not contain any environment variables related to FPC and Lazarus.
The path is polluted with entries for Delphi, though — it’s a shame that this expensive commercial program is not able to find itself and its tools. And this is the reason why the usual make files do not work because always Delphi’s make is called. Therefore, I do all console work using a batch file which sets the path temporarily.

Logged
#
# Config file generated by fpcmkcfg on 20.02.2012 - 21:03:40
# Example fpc.cfg for Free Pascal Compiler
#
# ----------------------
# Defines (preprocessor)
# ----------------------
#
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
#
# -d is the same as #DEFINE
# -u is the same as #UNDEF
#
#
# Some examples (for switches see below, and the -? helppages)
#
# Try compiling with the -dRELEASE or -dDEBUG on the commandline
#
# For a release compile with optimizes and strip debuginfo
#IFDEF RELEASE
-O2
-Xs
#WRITE Compiling Release Version
#ENDIF
# For a debug version compile with debuginfo and all codegeneration checks on
#IFDEF DEBUG
-glh
-Crtoi
#WRITE Compiling Debug Version
#ENDIF
# ----------------
# Parsing switches
# ----------------
# Pascal language mode
# -Mfpc free pascal dialect (default)
# -Mobjfpc switch some Delphi 2 extensions on
# -Mdelphi tries to be Delphi compatible
# -Mtp tries to be TP/BP 7.0 compatible
# -Mgpc tries to be gpc compatible
# -Mmacpas tries to be compatible to the macintosh pascal dialects
#
# Turn on Object Pascal extensions by default
#-Mobjfpc
# Assembler reader mode
# -Rdefault use default assembler
# -Ratt read AT&T style assembler
# -Rintel read Intel style assembler
#
# All assembler blocks are AT&T styled by default
#-Ratt
# Semantic checking
# -S2 same as -Mobjfpc
# -Sc supports operators like C (*=,+=,/= and -=)
# -Sa include assertion code.
# -Sd same as -Mdelphi
# -Se<x> compiler stops after the <x> errors (default is 1)
# -Sg allow LABEL and GOTO
# -Sh Use ansistrings
# -Si support C++ styled INLINE
# -SI<x> set interface style to <x>
# -SIcomCOM compatible interface (default)
# -SIcorbaCORBA compatible interface
# -Sm support macros like C (global)
# -So same as -Mtp
# -Sp same as -Mgpc
# -Ss constructor name must be init (destructor must be done)
#
# Allow goto, inline, C-operators, C-vars
-Sgic
# ---------------
# Code generation
# ---------------
# Uncomment the next line if you always want static/dynamic units by default
# (can be overruled with -CD, -CS at the commandline)
#-CS
#-CD
# Set the default heapsize to 8Mb
#-Ch8000000
# Set default codegeneration checks (iocheck, overflow, range, stack)
#-Ci
#-Co
#-Cr
#-Ct
# Optimizer switches for i386 compiler
# -Os generate smaller code
# -O1 level 1 optimizations (quick optimizations)
# -O2 level 2 optimizations (-O1 + slower optimizations)
# -O3 level 3 optimizations (same as -O2u)
# -Oa=N set alignment to N
# -OoX switch on optimalization X.
# -OoNOX switch off optimalization X.
# X is one of REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASMCSE LOOPUNROLL
# -OpCPU set target processor.
# CPU is one of 386, PENTIUM, PENTIUM2, PENTIUM3, PENTIUM4, PENTIUMM
# -----------------------
# Set Filenames and Paths
# -----------------------
# Both slashes and backslashes are allowed in paths
# path to the messagefile, not necessary anymore but can be used to override
# the default language
#-Frd:lazarusfpc2.4.4/msg/errore.msg
#-Frd:lazarusfpc2.4.4/msg/errorn.msg
#-Frd:lazarusfpc2.4.4/msg/errores.msg
#-Frd:lazarusfpc2.4.4/msg/errord.msg
#-Frd:lazarusfpc2.4.4/msg/errorr.msg
# searchpath for units and other system dependent things
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/*
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/rtl
#IFDEF FPCAPACHE_1_13
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/httpd20
#ELSE
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/httpd22
#ENDIF
#ENDIF
# path to the gcclib
# searchpath for libraries
#-Fld:lazarusfpc2.4.4/lib
#-Fl/lib;/usr/lib
# searchpath for tools
-FDd:lazarusfpc2.4.4/bin/$FPCTARGET
#IFNDEF CPUI386
#IFNDEF CPUAMD64
#DEFINE NEEDCROSSBINUTILS
#ENDIF
#ENDIF
#IFNDEF Win32
#DEFINE NEEDCROSSBINUTILS
#ENDIF
# binutils prefix for cross compiling
#IFDEF FPC_CROSSCOMPILING
#IFDEF NEEDCROSSBINUTILS
-XP$FPCTARGET-
#ENDIF
#ENDIF
# -------------
# Linking
# -------------
# generate always debugging information for GDB (slows down the compiling
# process)
# -gc generate checks for pointers
# -gd use dbx
# -gg use gsym
# -gh use heap trace unit (for memory leak debugging)
# -gl use line info unit to show more info for backtraces
# -gv generates programs tracable with valgrind
# -gw generate dwarf debugging info
#
# Enable debuginfo and use the line info unit by default
#-gl
# always pass an option to the linker
#-k-s
# Always strip debuginfo from the executable
-Xs
# -------------
# Miscellaneous
# -------------
# Write always a nice FPC logo ;)
-l
# Verbosity
# e : Show errors (default) d : Show debug info
# w : Show warnings u : Show unit info
# n : Show notes t : Show tried/used files
# h : Show hints m : Show defined macros
# i : Show general info p : Show compiled procedures
# l : Show linenumbers c : Show conditionals
# a : Show everything 0 : Show nothing (except errors)
# b : Show all procedure r : Rhide/GCC compatibility mode
# declarations if an error x : Executable info (Win32 only)
# occurs
#
# Display Info, Warnings, Notes and Hints
-viwn
# If you don't want so much verbosity use
#-vw
|
3 / 3 / 6 Регистрация: 16.12.2013 Сообщений: 44 |
|
|
1 |
|
|
02.10.2014, 19:16. Показов 11958. Ответов 3
При выборе компилятора пишет ошибку. Где должен быть fpc.cfg? Проект не линкуется — неверные параметры для линкера
__________________
0 |
|
Супер-модератор
32445 / 20940 / 8104 Регистрация: 22.10.2011 Сообщений: 36,203 Записей в блоге: 7 |
|
|
02.10.2014, 19:32 |
2 |
|
Решение/etc/fpc.cfg, но файл должен быть корректным, не испорченным. Читай: Missing or corrupt fpc.cfg file
0 |
|
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 |
I’m trying to use Lazarus for OS X to complete a PASCAL programming assignment, and for some reason, I keep getting the following debugger error.
Debugger Error Ooops, the debugger
entered the error state. Save your
work now!Hit Stop, and hope the best, we’re
pulling the plug.
Even though it tells me «Project successfully built :)» after compiling, it will always give me that debugger error.
When I rescan the FPC source directory, I get another error as well, even though I installed the FPC package from http://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/2.2.4/.
The error I get for that is:
Error
The project uses target OS=darwin and
CPU=i386. The system.ppu for this
target was not found in the FPC binary
directories. Make sure fpc is
installed correctly for this target
and the fpc.cfg contains the right
directories.
then I’ll click «ok» and get this error after:
FPC Source Directory
error Please
check the freepascal source directory.
I’m pretty sure all these errors are somehow related.
Any help for this Lazarus/PASCAL noob would be much appreciated.
I’m trying to use Lazarus for OS X to complete a PASCAL programming assignment, and for some reason, I keep getting the following debugger error.
Debugger Error Ooops, the debugger
entered the error state. Save your
work now!Hit Stop, and hope the best, we’re
pulling the plug.
Even though it tells me «Project successfully built :)» after compiling, it will always give me that debugger error.
When I rescan the FPC source directory, I get another error as well, even though I installed the FPC package from http://sourceforge.net/projects/freepascal/files/Mac%20OS%20X/2.2.4/.
The error I get for that is:
Error
The project uses target OS=darwin and
CPU=i386. The system.ppu for this
target was not found in the FPC binary
directories. Make sure fpc is
installed correctly for this target
and the fpc.cfg contains the right
directories.
then I’ll click «ok» and get this error after:
FPC Source Directory
error Please
check the freepascal source directory.
I’m pretty sure all these errors are somehow related.
Any help for this Lazarus/PASCAL noob would be much appreciated.
Помогите пожалуйста. У меня перестали компилироваться программы даже когда новую создал мне пишет эту ошибку. Программы создаю в приложение windows и приложение exe
Везде пишет эту ошибку даже тогда когда я еще ни одно компетентна не вставил.
Компилятор стандартный где скачать компилятор делфи я не знаю.
Что делать подскажите.
Подготовка к сборке проекта.
Генерация кода целевого языка
Компоновка проекта.
Command line: fpc.exe ‘»C:Program Files (x86)HiAsmElementsdelphicodeProject1.pas»‘ -Sd -Mdelphi ‘»-FEC:Program Files (x86)HiAsm»‘ ‘»-FUC:Program Files (x86)HiAsmElementsdelphicodeunits»‘ -FDtools -CX -dF_P
Free Pascal Compiler version 1.9.6 [2004/12/31] for i386
Copyright (c) 1993-2004 by Florian Klaempfl
Target OS: Win32 for i386
Compiling C:Program Files (x86)HiAsmElementsdelphicodeProject1.pas
Compiling C:Program Files (x86)HiAsmElementsdelphicodehiSimpleForm_2028870.pas
Compiling resource C:Program Files (x86)HiAsmElementsdelphicodeallres.res
Linking C:Program Files (x86)HiAsmProject1.exe
Project1.pas(19,1) Error: Error while linking
Closing script C:Program Files (x86)HiAsmppas.bat
Error: C:Program Files (x86)HiAsmcompilerfpcppc386.exe returned an error exitcode (normal if you did not specifiy a source file to be compiled)
ld.exe: cannot open output file C:Program Files (x86)HiAsmProject1.exe: Permission denied
Сборка завершена.
Это типа ты нас хочешь убедить, что в режиме «НЕ Отладка» unit Debug — find
Не верится как-то.
Вроде ж бы: умерла, так — умерла
И НИКОГДА больше не называй свои проекты под FPC магическими словами из папки Elementsdelphicode
Типа TCP, Debug, и т.п..
Источник
Ppc386 exe returned an error exitcode
начал изучать нажатие клавиш. заскочил в хелп и скопировал программку
code_29418.txt
при запуске в win7 она выдала вот такое сообщение в отладке
Подготовка к сборке проекта.
Генерация кода целевого языка
Компоновка проекта.
Command line: fpc.exe ‘»C:Program Files (x86)HiAsmElementsdelphicodeProject21.pas»‘ -Sd -Mdelphi ‘»-FEC:Program Files (x86)HiAsm»‘ ‘»-FUC:Program Files (x86)HiAsmElementsdelphicodeunits»‘ -FDtools -CX -dF_P
Free Pascal Compiler version 1.9.6 [2004/12/31] for i386
Copyright (c) 1993-2004 by Florian Klaempfl
Target OS: Win32 for i386
Compiling C:Program Files (x86)HiAsmElementsdelphicodeProject21.pas
Compiling C:Program Files (x86)HiAsmElementsdelphicodehiMainForm_2D3C450.pas
Compiling resource C:Program Files (x86)HiAsmElementsdelphicodeallres.res
Linking C:Program Files (x86)HiAsmProject21.exe
Project21.pas(19,1) Error: Error while linking
Closing script C:Program Files (x86)HiAsmppas.bat
Error: C:Program Files (x86)HiAsmcompilerfpcppc386.exe returned an error exitcode (normal if you did not specifiy a source file to be compiled)
ld.exe: cannot open output file C:Program Files (x86)HiAsmProject21.exe: Permission denied
Сжатие кода.
Сборка завершена.
выходит значит в вин7 не запустить из за-> Error: C:Program Files (x86)HiAsmcompilerfpcppc386.exe returned an error exitcode (normal if you did not specifiy a source file to be compiled)
Источник
Ppc386 exe returned an error exitcode
bigmike » 20.02.2012 18:25:36
Установил релиз lazarus-0.9.30-fpc-2.4.2-win32.exe
Сохранил проект с пустой формой.
При попытке сборки или быстрой компиляции
появляется окно-сообщение windows
«ppc386.exe — обнаружена ошибка. Приложение будет закрыто. «
В IDE сообщение об ошибке —
Error: D:lazarusfpc2.4.2bini386-win32ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
Re: Не компилируется пустая форма
Little_Roo » 20.02.2012 18:34:12
Re: Не компилируется пустая форма
bigmike » 20.02.2012 18:44:58
Re: Не компилируется пустая форма
Padre_Mortius » 20.02.2012 18:48:53
Re: Не компилируется пустая форма
Little_Roo » 20.02.2012 19:00:49
Действительно, забыл напомнить про это. сорри.
А судя по экзешнику — виндуза 32 бит
Re: Не компилируется пустая форма
bigmike » 20.02.2012 19:43:04
d:lasarusproj
Никаких пробелов или кирилицы
Добавлено спустя 35 секунд:
Win XP
Re: Не компилируется пустая форма
Little_Roo » 20.02.2012 19:49:42
Re: Не компилируется пустая форма
bigmike » 20.02.2012 20:03:37
Re: Не компилируется пустая форма
Padre_Mortius » 20.02.2012 20:04:47
Это по экзешнику, а система может быть и 64 бита
ну и конфиг fpc.cfg покажите.
Добавлено спустя 5 минут 17 секунд:
хм. судя по старинному fpc может быть еще косяк с компиляцией ресурсов. Попробуйте этот вариант вместо вашего
Re: Не компилируется пустая форма
bigmike » 20.02.2012 20:22:28
Еще сообщение при запуске lazarus-
Проект спользует целевую ОС win32 и процессор i386
System.ppu для этой цели не был найден в каталогах
двоичных данных FPC.
Убедитесь, что FPC был установлен корректно и в файле
fpc.cfg вписаны верные каталоги.
Код: Выделить всё #
# Config file generated by fpcmkcfg on 20.02.2012 — 14:31:22
# Example fpc.cfg for Free Pascal Compiler
#
#
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
#
# -d is the same as #DEFINE
# -u is the same as #UNDEF
#
#
# Some examples (for switches see below, and the -? helppages)
#
# Try compiling with the -dRELEASE or -dDEBUG on the commandline
#
# For a release compile with optimizes and strip debuginfo
#IFDEF RELEASE
-O2
-Xs
#WRITE Compiling Release Version
#ENDIF
# For a debug version compile with debuginfo and all codegeneration checks on
#IFDEF DEBUG
-glh
-Crtoi
#WRITE Compiling Debug Version
#ENDIF
# Pascal language mode
# -Mfpc free pascal dialect (default)
# -Mobjfpc switch some Delphi 2 extensions on
# -Mdelphi tries to be Delphi compatible
# -Mtp tries to be TP/BP 7.0 compatible
# -Mgpc tries to be gpc compatible
# -Mmacpas tries to be compatible to the macintosh pascal dialects
#
# Turn on Object Pascal extensions by default
#-Mobjfpc
# Assembler reader mode
# -Rdefault use default assembler
# -Ratt read AT&T style assembler
# -Rintel read Intel style assembler
#
# All assembler blocks are AT&T styled by default
#-Ratt
# Semantic checking
# -S2 same as -Mobjfpc
# -Sc supports operators like C (*=,+=,/= and -=)
# -Sa include assertion code.
# -Sd same as -Mdelphi
# -Se compiler stops after the errors (default is 1)
# -Sg allow LABEL and GOTO
# -Sh Use ansistrings
# -Si support C++ styled INLINE
# -SI set interface style to
# -SIcomCOM compatible interface (default)
# -SIcorbaCORBA compatible interface
# -Sm support macros like C (global)
# -So same as -Mtp
# -Sp same as -Mgpc
# -Ss constructor name must be init (destructor must be done)
# -St allow static keyword in objects
#
# Allow goto, inline, C-operators, C-vars
-Sgic
# Uncomment the next line if you always want static/dynamic units by default
# (can be overruled with -CD, -CS at the commandline)
#-CS
#-CD
# Set the default heapsize to 8Mb
#-Ch8000000
# Set default codegeneration checks (iocheck, overflow, range, stack)
#-Ci
#-Co
#-Cr
#-Ct
# Optimizer switches for i386 compiler
# -Os generate smaller code
# -O1 level 1 optimizations (quick optimizations)
# -O2 level 2 optimizations (-O1 + slower optimizations)
# -O3 level 3 optimizations (same as -O2u)
# -Oa=N set alignment to N
# -OoX switch on optimalization X.
# -OoNOX switch off optimalization X.
# X is one of REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASMCSE LOOPUNROLL
# -OpCPU set target processor.
# CPU is one of 386, PENTIUM, PENTIUM2, PENTIUM3, PENTIUM4, PENTIUMM
# Both slashes and backslashes are allowed in paths
# path to the messagefile, not necessary anymore but can be used to override
# the default language
#-Frd:lazarusfpc2.4.2/msg/errore.msg
#-Frd:lazarusfpc2.4.2/msg/errorn.msg
#-Frd:lazarusfpc2.4.2/msg/errores.msg
#-Frd:lazarusfpc2.4.2/msg/errord.msg
#-Frd:lazarusfpc2.4.2/msg/errorr.msg
# path to the gcclib
#-Fld:lazarusfpc2.4.2/lib
#IFDEF FPCAPACHE_1_13
-Fud:lazarusfpc2.4.2/units/$FPCTARGET/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
-Fud:lazarusfpc2.4.2/units/$FPCTARGET/httpd20
#ELSE
-Fud:lazarusfpc2.4.2/units/$FPCTARGET/httpd22
#ENDIF
#ENDIF
# searchpath for units and other system dependent things
-Fud:lazarusfpc2.4.2/units/$FPCTARGET/
-Fud:lazarusfpc2.4.2/units/$FPCTARGET/*
-Fud:lazarusfpc2.4.2/units/$FPCTARGET/rtl
# searchpath for libraries
#-Fld:lazarusfpc2.4.2/lib
#-Fl/lib;/usr/lib
# searchpath for tools
-FDd:lazarusfpc2.4.2/bin/$FPCTARGET
# binutils prefix for cross compiling
#IFDEF FPC_CROSSCOMPILING
-XP$FPCTARGET-
#ENDIF
# generate always debugging information for GDB (slows down the compiling
# process)
# -gc generate checks for pointers
# -gd use dbx
# -gg use gsym
# -gh use heap trace unit (for memory leak debugging)
# -gl use line info unit to show more info for backtraces
# -gv generates programs tracable with valgrind
# -gw generate dwarf debugging info
#
# Enable debuginfo and use the line info unit by default
#-gl
# always pass an option to the linker
#-k-s
# Always strip debuginfo from the executable
-Xs
# Write always a nice FPC logo 😉
-l
# Verbosity
# e : Show errors (default) d : Show debug info
# w : Show warnings u : Show unit info
# n : Show notes t : Show tried/used files
# h : Show hints m : Show defined macros
# i : Show general info p : Show compiled procedures
# l : Show linenumbers c : Show conditionals
# a : Show everything 0 : Show nothing (except errors)
# b : Show all procedure r : Rhide/GCC compatibility mode
# declarations if an error x : Executable info (Win32 only)
# occurs
#
# Display Info, Warnings, Notes and Hints
-viwn
# If you don’t want so much verbosity use
#-vw
Добавлено спустя 36 минут 1 секунду:
Поставил
lazarus-0.9.30.2-fpc-2.4.4-win32.exe
ничего не изменилось
Код: Выделить всё #
# Config file generated by fpcmkcfg on 20.02.2012 — 21:03:40
# Example fpc.cfg for Free Pascal Compiler
#
#
# nested #IFNDEF, #IFDEF, #ENDIF, #ELSE, #DEFINE, #UNDEF are allowed
#
# -d is the same as #DEFINE
# -u is the same as #UNDEF
#
#
# Some examples (for switches see below, and the -? helppages)
#
# Try compiling with the -dRELEASE or -dDEBUG on the commandline
#
# For a release compile with optimizes and strip debuginfo
#IFDEF RELEASE
-O2
-Xs
#WRITE Compiling Release Version
#ENDIF
# For a debug version compile with debuginfo and all codegeneration checks on
#IFDEF DEBUG
-glh
-Crtoi
#WRITE Compiling Debug Version
#ENDIF
# Pascal language mode
# -Mfpc free pascal dialect (default)
# -Mobjfpc switch some Delphi 2 extensions on
# -Mdelphi tries to be Delphi compatible
# -Mtp tries to be TP/BP 7.0 compatible
# -Mgpc tries to be gpc compatible
# -Mmacpas tries to be compatible to the macintosh pascal dialects
#
# Turn on Object Pascal extensions by default
#-Mobjfpc
# Assembler reader mode
# -Rdefault use default assembler
# -Ratt read AT&T style assembler
# -Rintel read Intel style assembler
#
# All assembler blocks are AT&T styled by default
#-Ratt
# Semantic checking
# -S2 same as -Mobjfpc
# -Sc supports operators like C (*=,+=,/= and -=)
# -Sa include assertion code.
# -Sd same as -Mdelphi
# -Se compiler stops after the errors (default is 1)
# -Sg allow LABEL and GOTO
# -Sh Use ansistrings
# -Si support C++ styled INLINE
# -SI set interface style to
# -SIcomCOM compatible interface (default)
# -SIcorbaCORBA compatible interface
# -Sm support macros like C (global)
# -So same as -Mtp
# -Sp same as -Mgpc
# -Ss constructor name must be init (destructor must be done)
#
# Allow goto, inline, C-operators, C-vars
-Sgic
# Uncomment the next line if you always want static/dynamic units by default
# (can be overruled with -CD, -CS at the commandline)
#-CS
#-CD
# Set the default heapsize to 8Mb
#-Ch8000000
# Set default codegeneration checks (iocheck, overflow, range, stack)
#-Ci
#-Co
#-Cr
#-Ct
# Optimizer switches for i386 compiler
# -Os generate smaller code
# -O1 level 1 optimizations (quick optimizations)
# -O2 level 2 optimizations (-O1 + slower optimizations)
# -O3 level 3 optimizations (same as -O2u)
# -Oa=N set alignment to N
# -OoX switch on optimalization X.
# -OoNOX switch off optimalization X.
# X is one of REGVAR UNCERTAIN STACKFRAME PEEPHOLE ASMCSE LOOPUNROLL
# -OpCPU set target processor.
# CPU is one of 386, PENTIUM, PENTIUM2, PENTIUM3, PENTIUM4, PENTIUMM
# Both slashes and backslashes are allowed in paths
# path to the messagefile, not necessary anymore but can be used to override
# the default language
#-Frd:lazarusfpc2.4.4/msg/errore.msg
#-Frd:lazarusfpc2.4.4/msg/errorn.msg
#-Frd:lazarusfpc2.4.4/msg/errores.msg
#-Frd:lazarusfpc2.4.4/msg/errord.msg
#-Frd:lazarusfpc2.4.4/msg/errorr.msg
# searchpath for units and other system dependent things
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/*
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/rtl
#IFDEF FPCAPACHE_1_13
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/httpd20
#ELSE
-Fud:lazarusfpc2.4.4/units/$FPCTARGET/httpd22
#ENDIF
#ENDIF
# path to the gcclib
# searchpath for libraries
#-Fld:lazarusfpc2.4.4/lib
#-Fl/lib;/usr/lib
# searchpath for tools
-FDd:lazarusfpc2.4.4/bin/$FPCTARGET
#IFNDEF CPUI386
#IFNDEF CPUAMD64
#DEFINE NEEDCROSSBINUTILS
#ENDIF
#ENDIF
#IFNDEF Win32
#DEFINE NEEDCROSSBINUTILS
#ENDIF
# binutils prefix for cross compiling
#IFDEF FPC_CROSSCOMPILING
#IFDEF NEEDCROSSBINUTILS
-XP$FPCTARGET-
#ENDIF
#ENDIF
# generate always debugging information for GDB (slows down the compiling
# process)
# -gc generate checks for pointers
# -gd use dbx
# -gg use gsym
# -gh use heap trace unit (for memory leak debugging)
# -gl use line info unit to show more info for backtraces
# -gv generates programs tracable with valgrind
# -gw generate dwarf debugging info
#
# Enable debuginfo and use the line info unit by default
#-gl
# always pass an option to the linker
#-k-s
# Always strip debuginfo from the executable
-Xs
# Write always a nice FPC logo 😉
-l
# Verbosity
# e : Show errors (default) d : Show debug info
# w : Show warnings u : Show unit info
# n : Show notes t : Show tried/used files
# h : Show hints m : Show defined macros
# i : Show general info p : Show compiled procedures
# l : Show linenumbers c : Show conditionals
# a : Show everything 0 : Show nothing (except errors)
# b : Show all procedure r : Rhide/GCC compatibility mode
# declarations if an error x : Executable info (Win32 only)
# occurs
#
# Display Info, Warnings, Notes and Hints
-viwn
# If you don’t want so much verbosity use
#-vw
Re: Не компилируется пустая форма
Padre_Mortius » 20.02.2012 22:24:16
в первом случае были неправильно прописаны каталоги у параметра -Fu
Пример: -Fud:lazarusfpc2.4.2/units/$FPCTARGET/httpd13/ (у вас потеряны слеши) и путь к папке unit почему-то потерялся
Во втором случае нужна полная ошибка, которую выдает IDE.
Re: Не компилируется пустая форма
Little_Roo » 21.02.2012 00:50:06
А прежнюю версию удалили полностью ? И ВСЕ хвосты удалили?
Из (для примера) C:Documents and SettingsUSERLocal SettingsApplication DataLazarus — СНЕСТИ ВСЕ .
И только после этого ставить новую версию.
И все ж — почему 2.4.4 ? — прошлый. ну, не век, ну уж месяц то точно
fpc Релиз 2.6.0 и лучше lazarus 0.9.31 — и из SVN
Re: Не компилируется пустая форма
bigmike » 21.02.2012 11:08:12
Все повторил с чисткой Application DataLazarus — все остается без изменений
Все сообщения полностью совпадают — до буквы.
Эпопея началась с установки Lazarus-0.9.31-35470-fpc-2.6.1-20120219-win32.exe
там сообщение было — Отсутствует файл fpc.cfg.
Выбрал вариант стабильный — судя по имени версии и по количеству загрузок.
А релиза 0.9.31 вообще еще не существует.
Добавлено спустя 30 минут 46 секунд:
Может быть пришлете правильный fpc.cfg и проблема решится?
Re: Не компилируется пустая форма
Little_Roo » 21.02.2012 12:43:54
И с 2.6.1 и с 2.7.1 были такие же проблемы на некоторых версиях — поставил 2.6.0 — полет нормальный
Re: Не компилируется пустая форма
bigmike » 21.02.2012 13:37:33
сообщение при запуске lazarus-
Проект спользует целевую ОС win32 и процессор i386
System.ppu для этой цели не был найден в каталогах
двоичных данных FPC.
Убедитесь, что FPC был установлен корректно и в файле
fpc.cfg вписаны верные каталоги.
При попытке сборки или быстрой компиляции
появляется окно-сообщение windows
«ppc386.exe — обнаружена ошибка. Приложение будет закрыто. «
В IDE сообщение об ошибке —
Error: D:lazarusfpc2.4.2bini386-win32ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
Источник
Главная » Lazarus » Как подключить к Lazarus новую версию компилятора FPC
Как известно, разработка FPC и Lazarus идёт параллельно, и далеко не всегда тестовые сборки Lazarus используют последнюю версию FPC. Так, в данный момент в SVN-релизах Lazarus используется FPC 2.4.3, тогда как на официальном сайте Free Pascal доступна тестовая версия нового компилятора FPC 2.5.1. Если вы хотите подключить к Lazarus последнюю версию FPC, сделайте следующее:
1. Скачайте по ссылкам [один] и [два] сборку последней версии FPC и её исходный код соответственно (файлы fpc-2.5.1.i386-win32.zip и fpc.zip).
2. В папке C:lazarusfpc создайте новый каталог 2.5.1.
3. Посмотрите внимательное, какие подкаталоги у вас лежат в каталоге C:lazarusfpc2.4.3 и положите точно такие же подкаталоги из скачанных архивов в новый каталог C:lazarusfpc2.5.1.
4. Скопируйте в каталог c:lazarusfpc2.5.1bini386-win32 недостающие файлы из соответствующего каталога от старой версии компилятора (в частности gcc и т.п. — около 20-30 файлов). Обязательно скопируйте файл fpc.cfg.
Таким образом вы получите папку с новой версией компилятора, готовой к работе. Далее правим fpc.cfg, заменяя во всех путях название папки с версией компилятора (2.4.3 на 2.5.1).
И последний штрих — идём в настройки Lazarus: Сервис->Параметры->Файлы и в нужных полях меняем пути к компилятору и исходным кодам (опять-таки 2.4.3 на 2.5.1).
Чтобы убедиться, что вы всё сделали правильно, попробуйте откомпилировать пустой проект. Если всё прошло успешно, можете пересобрать Lazarus с новой версией FPC.
Понравилась статья? Поделись с друзьями!
уважаемые посетители блога, если Вам понравилась, то, пожалуйста, помогите автору с лечением. Подробности тут.
Буквально на днях разработчики Lazarus сообщили о том, что мы все-таки доживем до момента, когда версия Lazarus 1.0 выйдет в свет. Судя по всему – это событие состоится через месяц-полтора. А пока, в доступе есть версии 0.9.28 — 0.9.29. И, думаю, что практически каждый, кто впервые сталкивался с IDE Lazarus и устанавливал его, например, под Windows так же сталкивался хоть и с мелкими, но достаточно неприятными моментами в работе, например, отладчик с чего-то начинал “портачить” и проскакивать мимо точек останова или Lazarus с чего-то при пересборке переставал находить исходники с FPC. В принципе большинство из таких проблем решаются достаточно быстро, но все-таки подведем небольшой итог по решению микро-проблем в Lazarus 0.9.xx.
И самая первая проблема с которой я столкнулся была под Windows. Проблема заключалась как раз в работе отладчика – точнее в отсутствии работы как таковой. Отладчик просто никак не реагировал на мои просьбы и мольбы о помощи. Решений может быть несколько:
1. Проверить настройки компилятора FPC, которые представлены на рисунке:
2. Проверить путь к отладчику. Маловероятно, но может быть проблема в этом:
![]()
3. Найти более свежую версию gdb.exe. Сам этим советом не пользовался, т.к. моя проблема решилась по п.1., но встречал высказывания на форумах, что такое действие может помочь.
Следующая проблема – Lazarus не видит исходный код FPC и в результате этого ругается по чём зря. Например, мне Lazarus выдавал ошибку о том, что модуль Dialogs.pas не найден, у других – ругался на другие модули. Обычно такая проблема может возникнуть в случае, если Вы обновляли IDE и при этом обновляли не правильно, например, не удалили предыдущую версию. В этом случае достаточно зайти в настройки Lazarus’a и указать правильные пути к fpc.exe, make.exe и директории source с исходниками той версии Free Pascal которая Вам необходима. Например, на рисунке ниже показаны настройки Lazarus для работы с FPC 2.4.3:
![]()
Логическим продолжением той проблемы может быть следующая – пути в настройках указаны верно, но Lazarus всё равно упорно продолжает ругаться на то, что не может найти какие-либо модули.
Шагом для решения этой проблемы может быть следующее действие: заходите в директорию:
[path_to_lazarus]fpcx.x.xbini386-win32
Это в том случае, если вы используете FPC, поставляемый вместе с Лазарем для Windows, открываете файл fpc.cfg и внимательнейшим образом просматриваете все пути к файлам. Они обязательно должны соответсвовать той версии Free Pascal, которую вы используете. Если же Вам лень копаться в файле, можно сделать по другому – удаляете и выполняете в командной строке следующую команду:
fpcmkcfg.exe -d basepath=C:lazarusfpcx.x.xbini386-win32 -o fpc.cfg
То есть создаете новый файл конфигурации для FPC. Утилита fpcmkcfg.exe находится в той же директории bin, что и файл конфигурации.
В 99% случаев, если правильно выставлены настройки IDE и сформирован верный fpc.cfg проблема решается и Lazarus, работает шустро и всё просто супер, НО остается 1% случаев, когда и такие действия не помогают(!).
Проблема может сохраниться в том случае, если Вы используете версию Lazarus 0.9.29. С такой ситуацией я столкнулся сегодня, когда решил обновить своего Лазаря. Причём ситуация довольно интересная: пустое приложение компилируется, exe-шник запускается, компоненты на форму укладываются, но как только пробуешь создать какое-нибудь событие у любого компонента Lazarus ругается на отсутствие модуля. При этом обычно указывает на последний либо предпоследний модуль в списке uses.
Оказывается решение проблемы опять же кроется в путях, а именно – в их написании. Вот так выглядит путь к исходникам, выставленный по умолчанию при установке Лазаруса:
![]()
Вроде бы всё верно, а ошибка есть. Теперь попробуйте изменить букву диска с “с” на “С” и сохранить настройки – ничего не выйдет и ошибка так и останется :). Не знаю почему и с чем это связано, но именно из-за этой вот маленькой буковки и возникает непонятная проблема с поиском исходников.
Чтобы изменить написание пути идем (в Windows XP) в директорию:
C:Documents and Settings[User_name]Local SettingsApplication Datalazarus
открываем в обычном блокноте файл environmentoptions.xml ищем в нем “неправильный” путь к source и изменяем первый первый символ. Мне после такого “наглого” вмешательства в настройки IDE даже не пришлось ничего перезапускать – все заработало как швейцарские часы.
Вот пожалуй те мелкие, но довольно неприятные недочёты в Lazarus, которые портят нервы новым пользователям. Естественно такие проблемы обнаруживаются максимально быстро и так же быстро решаются. Так что будем надеяться, что версия Lazarus 1.0. будет избавлена от них и будет работать намного лучше и быстрее. Ксти, может и компилятор обновят до 2.5., но это только мои предположения и ничего более.
уважаемые посетители блога, если Вам понравилась, то, пожалуйста, помогите автору с лечением. Подробности тут.
Сообщение было отмечено Daneels как решение