Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Michael Van Canneyt via fpc-devel




On Sun, 8 Jan 2023, Mattias Gaertner via fpc-devel wrote:


On Fri, 6 Jan 2023 18:05:43 +0100 (CET)
Michael Van Canneyt via fpc-devel 
wrote:


[...]
- to create a Unicode RTL, in the rtl directory do a

make clean all SUB_TARGET=unicodertl PP=path/to/the/new/compiler

- if that worked, you can try then a

make install SUB_TARGET=unicodertl


It installed under
/usr/lib/fpc/3.2.2/units/x86_64-linux-unicodertl

Instead of
/usr/lib/fpc/3.3.1/units/x86_64-linux-unicodertl


That is because I gave a wrong command-line :/

Should have been

make install SUB_TARGET=unicodertl PP=path/to/the/new/compiler

Sorry about that.

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Mattias Gaertner via fpc-devel
On Fri, 6 Jan 2023 18:05:43 +0100 (CET)
Michael Van Canneyt via fpc-devel 
wrote:

>[...]
> - to create a Unicode RTL, in the rtl directory do a
> 
> make clean all SUB_TARGET=unicodertl PP=path/to/the/new/compiler
> 
> - if that worked, you can try then a
> 
> make install SUB_TARGET=unicodertl

It installed under
/usr/lib/fpc/3.2.2/units/x86_64-linux-unicodertl

Instead of
/usr/lib/fpc/3.3.1/units/x86_64-linux-unicodertl

Mattias
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Michael Van Canneyt via fpc-devel




On Sat, 7 Jan 2023, Mattias Gaertner via fpc-devel wrote:


On Fri, 6 Jan 2023 18:05:43 +0100 (CET)
Michael Van Canneyt via fpc-devel 
wrote:


[...]
- to create a Unicode RTL, in the rtl directory do a

make clean all SUB_TARGET=unicodertl PP=path/to/the/new/compiler


The "make clean" deletes the new compiler.


You probably executed this in the main directory ?

This command must be executed in the rtl directory (see: "in the rtl directory do a"), 
to create the unicode RTL.


Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Mattias Gaertner via fpc-devel
On Fri, 6 Jan 2023 18:05:43 +0100 (CET)
Michael Van Canneyt via fpc-devel 
wrote:

>[...]
> - to create a Unicode RTL, in the rtl directory do a
> 
> make clean all SUB_TARGET=unicodertl PP=path/to/the/new/compiler

The "make clean" deletes the new compiler.

Storing the compiler/ppcx64 somewhere else and using that gives:

*** The only supported starting compiler version is 3.2.2. You are
trying to build with 3.3.1.

Trying to build using fpc 3.2.2 gives:
Error: Illegal parameter: -tunicodertl

Mattias
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Sven Barth via fpc-devel
Michael Van Canneyt via fpc-devel  schrieb
am Sa., 7. Jan. 2023, 12:46:

>
>
> On Sat, 7 Jan 2023, Mattias Gaertner via fpc-devel wrote:
>
> > On Fri, 6 Jan 2023 18:05:43 +0100 (CET)
> > Michael Van Canneyt via fpc-devel 
> > wrote:
> >
> >> [...]
> >> For those that wish to help in testing:
> >>
> >> - Update your git clone
> >
> > I used a fresh clone.
> >
> >> - switch to branch unicodertl.
> >
> > I used git checkout unicodertl
> >
> >> - in the toplevel FPC directory, do a
> >>
> >> make all
> >
> > I get:
> >
> > Compiling .../packages/fcl-process/src/process.pp
> > Compiling .../packages/fcl-process/src/pipes.pp
> > process.inc(94,23) Error: Incompatible type for arg no. 1: Got "PChar",
> > expected "PWideChar"
>
> Lesson:
> Always run a toplevel "make all" after even the smallest (no matter how
> insignificant) change in RTL.
>

That's my usual modus operandi when working on the RTL or some compiler
feature: first make sure that make inside the rtl directory works and then
ensure that it also works in the top level.
There have often enough been subtle errors further down the line (good
candidate, especially when working with generics, is the rtl-generics
package 🙄).

Regards,
Sven
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Michael Van Canneyt via fpc-devel




On Sat, 7 Jan 2023, Mattias Gaertner via fpc-devel wrote:


On Fri, 6 Jan 2023 18:05:43 +0100 (CET)
Michael Van Canneyt via fpc-devel 
wrote:


[...]
For those that wish to help in testing:

- Update your git clone


I used a fresh clone.


- switch to branch unicodertl.


I used git checkout unicodertl


- in the toplevel FPC directory, do a

make all


I get:

Compiling .../packages/fcl-process/src/process.pp
Compiling .../packages/fcl-process/src/pipes.pp
process.inc(94,23) Error: Incompatible type for arg no. 1: Got "PChar",
expected "PWideChar"


Lesson: 
Always run a toplevel "make all" after even the smallest (no matter how

insignificant) change in RTL.

Fixed. Make all works.

Thanks for testing!

Michael.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Wagner Landgraf via fpc-devel


> Relax, no-one will force you to use UTF16.
> 
> But there are people that do not have the luxury of choice, and we should
> be kind to them too.

I really appreciate this mindset. Thank you.

___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Mattias Gaertner via fpc-devel
On Fri, 6 Jan 2023 18:05:43 +0100 (CET)
Michael Van Canneyt via fpc-devel 
wrote:

>[...]
> For those that wish to help in testing:
> 
> - Update your git clone

I used a fresh clone.

> - switch to branch unicodertl.

I used git checkout unicodertl
 
> - in the toplevel FPC directory, do a
> 
> make all

I get:

Compiling .../packages/fcl-process/src/process.pp
Compiling .../packages/fcl-process/src/pipes.pp
process.inc(94,23) Error: Incompatible type for arg no. 1: Got "PChar",
expected "PWideChar"


Mattias
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Unicode RTL for FPC

2023-01-07 Thread Wagner Landgraf via fpc-devel

> Michael Van Canneyt via fpc-devel wrote:
> 
>> - String = UnicodeString, Char=WideChar
> 
> UnicodeString ? ? I don't know what that is supposed to be. We have UCS-2, 
> UCS-4, UTF-16 and UTF-8 Some marketing people, not understanding anything 
> about computers, talk about "Unicode" to mean "UTF-16-treated-as-UCS-2".
> 
> For me, UTF-16 is the dumbest thing ever invented in computing. So I shiver 
> at the thought of a "Unicode" RTL.
> 
> We really should use UTF-8, as most open source projects do.

That’s what it’s going to be, if I understood correctly.
“Unicode” string (UTF-16) will be an option in addition to UTF-8.


___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel