Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2013-11

Cross Compile : treefilteredit.pas(60, 60) Error: Illegal expression

14 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Osvaldo Filho

Environment:
Ubuntu 13.10 64bits
FPC 2.6.3 - Rev 26119
Lazarus 1.2RC - Rev 43472

When i try compile for i386, i get this:

Free Pascal Compiler version 2.6.3 [2013/11/23] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Linux for i386
Compiling lazcontrols.pas
Compiling dividerbevel.pas
dividerbevel.pas(52,31) Hint: Parameter "WithThemeSpace" not used Compiling extendednotebook.pas
Compiling listfilteredit.pas

*Compiling treefilteredit.pastreefilteredit.pas(60,60) Error: Illegal expressiontreefilteredit.pas(60,60) Error: Error in type definitiontreefilteredit.pas(60,60) Fatal: Syntax error, ">" expected but "" foundFatal: Compilation aborted*
Error: /home/deskx/Aplicativos/fpclaz/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled) make[1]: ** [lazcontrols.ppu] Erro 1
make[1]: Saindo do diretório
`/home/deskx/Documentos/Desenvolvimento/pascal/svn/ex/laz1.2rc32/components/lazcontrols' make: ** [lazbuild] Erro 2

Any help?

Osvaldo Filho
to leledumbo
    procedure Clear;
  end;

* TBranchList = specialize TFPGObjectList<TTreeFilterBranch>;* // line 60

{ TTreeFilterEdit }

  TTreeFilterEdit = class(TCustomControlFilterEdit)
  private

2013/11/24 leledumbo

Show quoted text 15 lines
Please include the respective line. In my trunk source, it's a valid generic specialization. That point has > as closing bracket of generic type name. Either your compiler is buggy or you accidentally change the source. -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Cross-Compile-treefilteredit-pas-60-60-Error-Illegal-expression-tp5717560p5717564.html Sent from the Free Pascal - General mailing list . _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Juha Manninen
to Osvaldo Filho
Osvaldo Filho wrote
TBranchList = specialize TFPGObjectList<TTreeFilterBranch>; // line 60

The syntax is perfectly valid and compiles fine here with FPC 2.6.2.

Juha

Osvaldo Filho
to Juha Manninen

Well, sorry, but my enviroment, and my problem, is with this:

Environment:
Ubuntu 13.10 64bits
FPC 2.6.3 - Rev 26119
Lazarus 1.2RC - Rev 43472

Compiling from Linux 64 bits for Linux 32 bits.
I really thank you for participating, but I seek information in the scenario that I posted.

2013/11/24 Juha Manninen

Show quoted text 11 lines
On Sun, Nov 24, 2013 at 1:00 PM, Osvaldo Filho wrote: > TBranchList = specialize TFPGObjectList<TTreeFilterBranch>; // line 60 The syntax is perfectly valid and compiles fine here with FPC 2.6.2. Juha _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
waldo kitty
to leledumbo
leledumbo wrote
Seems like your compiler is buggy, my trunk compiler has no problem there though so you might want to try updating your compiler.

is that the trunk *crosscompiler* for linux 64bit -> linux 32bit?

just trying to point out the OP's specifics...

1. perhaps their system is finding the wrong sources?
2. i wonder what their command line is?
3. i wonder what the version output of their
/home/deskx/Aplicativos/fpclaz/bin/ppc386 is?
4. is the compiler in #3 their 64bit->32bit crosscompiler, their 64bit compiler or their 32bit compiler?

NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted.
Osvaldo Filho
to waldo kitty: is that the trunk *crosscompiler* for linux 64bit -> linux 32bit? just trying to point…

1. perhaps their system is finding the wrong sources? No.

2. i wonder what their command line is?
make clean all CPU_TARGET=i386

3. i wonder what the version output of their /home/deskx/Aplicativos/fpclaz /bin/ppc386 is?
FPC 2.6.3 - Rev 26119

4. is the compiler in #3 their 64bit->32bit crosscompiler, their 64bit compiler or their 32bit compiler?
On crosscompile the ppc386 is used to compile lazarus on Linux 64 to 32 bits

2013/11/24 waldo kitty

Show quoted text 26 lines
On 11/24/2013 9:27 AM, leledumbo wrote: > Seems like your compiler is buggy, my trunk compiler has no problem there > though so you might want to try updating your compiler. > is that the trunk *crosscompiler* for linux 64bit -> linux 32bit? just trying to point out the OP's specifics... 1. perhaps their system is finding the wrong sources? 2. i wonder what their command line is? 3. i wonder what the version output of their /home/deskx/Aplicativos/fpclaz/bin/ppc386 is? 4. is the compiler in #3 their 64bit->32bit crosscompiler, their 64bit compiler or their 32bit compiler? -- NOTE: No off-list assistance is given without prior approval. Please keep mailing list traffic on the list unless private contact is specifically requested and granted. _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Luca Olivetti
to Osvaldo Filho: Environment: Ubuntu 13.10 64bits FPC 2.6.3 - Rev 26119 Lazarus 1.2RC - Rev 43472 When i…

El 23/11/13 16:50, Osvaldo Filho ha escrit:

Show quoted text 26 lines
Environment: Ubuntu 13.10 64bits FPC 2.6.3 - Rev 26119 Lazarus 1.2RC - Rev 43472 When i try compile for i386, i get this: Free Pascal Compiler version 2.6.3 [2013/11/23] for i386 Copyright (c) 1993-2012 by Florian Klaempfl and others Target OS: Linux for i386 Compiling lazcontrols.pas Compiling dividerbevel.pas dividerbevel.pas(52,31) Hint: Parameter "WithThemeSpace" not used Compiling extendednotebook.pas Compiling listfilteredit.pas *Compiling treefilteredit.pas treefilteredit.pas(60,60) Error: Illegal expression treefilteredit.pas(60,60) Error: Error in type definition treefilteredit.pas(60,60) Fatal: Syntax error, ">" expected but "" found Fatal: Compilation aborted* Error: /home/deskx/Aplicativos/fpclaz/bin/ppc386 returned an error exitcode (normal if you did not specify a source file to be compiled) make[1]: ** [lazcontrols.ppu] Erro 1 make[1]: Saindo do diretório `/home/deskx/Documentos/Desenvolvimento/pascal/svn/ex/laz1.2rc32/components/lazcontrols' make: ** [lazbuild] Erro 2

I have the same error, but with fpc 2.6.4, Lazarus 1.2.2. I didn't see a solution in this (old) thread.
I installed fpc from the rpm and buili the cross compiler x86_64->i386 following the instructions here:

http://wiki.lazarus.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386

The source line where it gives the (same) error is:

type
  TEvents = specialize TFPGList<TEvent>;

If I try lazbuild (to see the command line used), I get this:

$ ~/lazarus_1_2/lazbuild --pcp=/home/luca/lazarus_1_2/config climaserver.lpiSetPrimaryConfigPath
NewValue="/home/luca/lazarus_1_2/config" -> "/home/luca/lazarus_1_2/config" primary config path: /home/luca/lazarus_1_2/config/ TLazPackageGraph.CheckIfCurPkgOutDirNeedsCompile Compile was incomplete for openldv 0.0
State
file="/home/luca/Datos/0000_estandares_varios/lonworks/openldv/lib/i386-linux/openldv.compiled" [TExternalToolList.Run] CmdLine="/usr/bin/fpc -MObjFPC -Scghi -O1 -Pi386 -g -gl -vewnhi
-Fu/home/luca/lazarus_1_2/packager/units/i386-linux -Fu/home/luca/lazarus_1_2/components/lazutils/lib/i386-linux -Fu/home/luca/lazarus_1_2/lcl/units/i386-linux
-Fu/home/luca/Datos/0000_estandares_varios/lonworks/openldv/ -FU/home/luca/Datos/0000_estandares_varios/lonworks/openldv/lib/i386-linux/ -l openldv.pas"
WorkDir="/home/luca/Datos/0000_estandares_varios/lonworks/openldv/" Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.4 [2014/04/01] for i386 Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Linux for i386
Compiling openldv.pas
Compiling openldvapi.pas
openldvapi.pas(11,39) Error: Illegal expression
openldvapi.pas(11,39) Error: Error in type definition openldvapi.pas(11,39) Fatal: Syntax error, ">" expected but "" found TExternalToolList.Run Exception:
/home/luca/Datos/0000_estandares_varios/lonworks/openldv/openldvapi.pas(11,39) Fatal: Syntax error, ">" expected but "" found
ERROR: tool reported error

Bye

Luca
Jonas Maebe
to Luca Olivetti
Luca Olivetti wrote 6 lines
> treefilteredit.pas(60,60) Error: Illegal expression > treefilteredit.pas(60,60) Error: Error in type definition > treefilteredit.pas(60,60) Fatal: Syntax error, ">" expected but "" > found I have the same error, but with fpc 2.6.4, Lazarus 1.2.2.

This happens if the RTL is built with a cross-compiler and a program is then built with a native compiler, or if the RTL is built with a native compiler and the program is built with a native compiler. This bug is present in FPC 2.6.x, but not in 2.7.x. I don't know in which revision it was fixed.

Show quoted text 5 lines
I didn't see a solution in this (old) thread. I installed fpc from the rpm and buili the cross compiler x86_64->i386 following the instructions here: http://wiki.lazarus.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386

The problem is that the "make install" does not force a cross installation, and therefore it will install a native ppc386 compiler as opposed to a ppcross386 cross-compiler (and it will overwrite all FPC utilities in /usr/bin with i386 versions). You have to use "make crossinstall" instead of "make install" to force a cross-installation. This is generally not required when going from one architecture to another, but with x86 machines capable of running both x86-64 and i386, it is (and it's always a good idea to use it when performing a cross-installation, as it makes your intention clear rather than relying on auto-detection features of the makefile to determine what you mean).

To solve your problem:
a) reinstall FPC 2.6.4 for x86-64 (to get the x86-64 versions of the utilities in /usr/bin back)
b) delete /usr/lib/fpc/2.6.4/ppc386
c) rebuild the cross-compiler, but this time use "make crossinstall" instead of "make install" at the end (I've updated the wiki article)

Jonas

Luca Olivetti
to Jonas Maebe

El 19/05/14 13:43, Jonas Maebe ha escrit:

To solve your problem: a) reinstall FPC 2.6.4 for x86-64 (to get the x86-64 versions of the utilities in /usr/bin back)

I already did it when I noticed that the make install replaced all x86_64 files

b) delete /usr/lib/fpc/2.6.4/ppc386 c) rebuild the cross-compiler, but this time use "make crossinstall" instead of "make install" at the end (I've updated the wiki article)

I had to adapt the instructions:

sudo make all CPU_TARGET=i386 -> I dropped the sudo

sudo make crossinstall CPU_TARGET=i386 -> installed everything in /usr/local/lib[*], I then manually moved that to /usr/lib64, so now I have:

in /usr/lib64/fpc/2.6.4
ppcross386
ppcx64

in /usr/lib64/fpc/2.6.4/units
i386-linux
x86_64-linux

Then I symlinked /usr/lib64/fpc/2.6.4/ppcross386 in /usr/bin (and removed the stray ppc386 that I put there before) and this way it worked, thank you.

[*]I tried playing with DESTDIR but it didn't change the installation directory.

Bye

Luca
Jonas Maebe
to Luca Olivetti
Luca Olivetti wrote 9 lines
El 19/05/14 13:43, Jonas Maebe ha escrit: > b) delete /usr/lib/fpc/2.6.4/ppc386 > c) rebuild the cross-compiler, but this time use "make crossinstall" > instead of "make install" at the end (I've updated the wiki article) I had to adapt the instructions: sudo make all CPU_TARGET=i386 -> I dropped the sudo

If that worked, then the permissions on your system are broken (at least if you literally followed the instructions on that wiki page). Nothing under /usr should be writable for regular users.

sudo make crossinstall CPU_TARGET=i386 -> installed everything in /usr/local/lib[*], I then manually moved that to /usr/lib64, so now I have:

You should not move anything to /usr, that directory belongs to your package manager (I thought we still wrongly put things there by default under Linux, but apparently that has been fixed; that's also why I, erroneously, mentioned /usr above). /usr/local is the correct destination for user-installed software and files.

Since an FPC-cross install is not complete on its own, you will actually also have to install a full x86-64 FPC installation under / usr/local. We do not and will not support mixing and matching installations spread over multiple installation prefixes (nor installations whereby you add files to directories that are reserved for the system/package manager).

[*]I tried playing with DESTDIR but it didn't change the installation directory.

There is no DESTDIR parameter in our makefiles, I'm not sure where you got that from. You can change the installation directory by setting INSTALL_PREFIX (but again, you should never change it to /usr).

Jonas

Luca Olivetti
to Jonas Maebe

El 19/05/14 16:01, Jonas Maebe ha escrit:

Show quoted text 5 lines
> sudo make all CPU_TARGET=i386 -> I dropped the sudo If that worked, then the permissions on your system are broken (at least if you literally followed the instructions on that wiki page). Nothing under /usr should be writable for regular users.

No, I have the fpc sources in my home directory

Show quoted text 10 lines
> sudo make crossinstall CPU_TARGET=i386 -> installed everything in > /usr/local/lib[*], I then manually moved that to /usr/lib64, so now I > have: You should not move anything to /usr, that directory belongs to your package manager (I thought we still wrongly put things there by default under Linux, but apparently that has been fixed; that's also why I, erroneously, mentioned /usr above). /usr/local is the correct destination for user-installed software and files.

Yes I know that but...

Show quoted text 6 lines
Since an FPC-cross install is not complete on its own, you will actually also have to install a full x86-64 FPC installation under /usr/local. We do not and will not support mixing and matching installations spread over multiple installation prefixes (nor installations whereby you add files to directories that are reserved for the system/package manager).

..since I already had fpc installed via rpm, I didn't want to add another installation in /usr/local.

Bye

Luca