Discussion:
[fpc-pascal] FP IDE: Error: Illegal parameter: -Cp386
Bart
2012-01-03 18:10:22 UTC
Permalink
I recently updated to fpc 2.6.0
Now I cannot compile anything in the FP IDE (Version 1.0.12 2011/12/25).

Program test;

{$mode objfpc}
{$h+}

begin
end.

I try to build/make:
Error: Illegal parameter: -Cp386

This is the auto-generated fp.cfg file:

# Automatically created file, don't edit.
#IFDEF NORMAL
-TWin32
-Mfpc
-Sg
-Ci
-O1
-Cp80386
-OpPENTIUM3
-Ratt
-FuC:\devel\fpc\units\i386-Win32
-FuC:\devel\fpc\units\i386-Win32\*
-FuC:\devel\fpc\units\i386-Win32\rtl
-XS
-g-
-p-
-b-

-Cp386 <<<<----------------------
#ENDIF
[snip]

Should probably be -Cp80386?

Bart
Pierre Free Pascal
2012-01-04 13:24:40 UTC
Permalink
Did you try to "manually" (meaning with some other text editor, or sed
script)
remove the offending line -Cp386 from fp.cfg?

The problem might come from a fp.cfg that was created by an earlier
version
of Free Pascal for which -Cp386 was allowed.
To complicate things further, once you tried to compile
with those wrong options, the compiler exits with fp.cfg file open,
which leads to an opening failure on a second compilation try...

I still need to figure out how to correctly fix these
possible open files...

Pierre Muller
Free Pascal core team member
-----Message d'origine-----
Envoyé : mardi 3 janvier 2012 19:10
À : FPC-Pascal users discussions
Objet : [fpc-pascal] FP IDE: Error: Illegal parameter: -Cp386
I recently updated to fpc 2.6.0
Now I cannot compile anything in the FP IDE (Version 1.0.12 2011/12/25).
Program test;
{$mode objfpc}
{$h+}
begin
end.
Error: Illegal parameter: -Cp386
# Automatically created file, don't edit.
#IFDEF NORMAL
-TWin32
-Mfpc
-Sg
-Ci
-O1
-Cp80386
-OpPENTIUM3
-Ratt
-FuC:\devel\fpc\units\i386-Win32
-FuC:\devel\fpc\units\i386-Win32\*
-FuC:\devel\fpc\units\i386-Win32\rtl
-XS
-g-
-p-
-b-
-Cp386 <<<<----------------------
#ENDIF
[snip]
Should probably be -Cp80386?
Bart
_______________________________________________
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Bart
2012-01-04 17:27:31 UTC
Permalink
Post by Pierre Free Pascal
Did you try to "manually" (meaning with some other text editor, or sed
script)
remove the offending line -Cp386 from fp.cfg?
Yes, and that works.
Post by Pierre Free Pascal
The problem might come from a fp.cfg that was created by an earlier
version
of Free Pascal for which -Cp386 was allowed.
That might be true, I had fp from 2.4.4 earlier and possibly the
config file was already there.
I deleted all config file and let fp recreate them from scratch (not
using a previous it found elsewhere) and all seems to work.

So, it probably was all my fault to begin with.

A remark.
Why doesn't fp use only one (per user that is) fp.cgf/fp.ini file
stored in the default location for users (like Lazarus does), and
possibly configurable by commandline option
(--pcp=/path/to/my-fp-config) or environmentvariable?

Bart

Loading...