Recent

Author Topic: aarch64-linux: Identifier not found "TPopupMenu"  (Read 958 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
aarch64-linux: Identifier not found "TPopupMenu"
« on: December 26, 2020, 02:11:40 pm »
Hello.

I did install aarch64 fpc 3.2.0 and 3.3.1 trunk on a Raspberry 3 with Raspbian OS aarch64 64 bit.
OK, nice, installer of fpc 3.2.0 did work and compilation + install of fpc 3.3.1 too.
I can compile + run console, fpGUI and MSEgui applications.

Note that on the Rpi 3 with aarch64 64 bit OS, all applications + system run much slower than with the arm 32 bit OS .
But this is not the question.

Now trying to compile a LCL application (LazPaint), with fp 3.2.0 and 3.3.1 I have a compilation error at controls.pp
   
Quote
/home/pi/lazarus/lcl/controls.pp(1186,17) Error: (5000) Identifier not found "TPopupMenu"
    /home/pi/lazarus/lcl/controls.pp(1186,27) Error: (5007) Error in type definition
    /home/pi/lazarus/lcl/controls.pp(1267,45) Error: (5000) Identifier not found "TPopupMenu"
    /home/pi/lazarus/lcl/controls.pp(1454,38) Error: (5000) Identifier not found "TPopupMenu"
    /home/pi/lazarus/lcl/controls.pp(1731,36) Error: (5000) Identifier not found "TPopupmenu"
    /home/pi/lazarus/lcl/controls.pp(2791,1) Fatal: (10026) There were 5 errors compiling module, stopping
    Fatal: (1018) Compilation aborted
    Error: /usr/bin/ppca64 returned an error exitcode

I did try with Lazarus source 2.0.10 and trunk too but same error.

I really dont understand why because I checked code of controls.pp and in uses section "menus" is present and in menus.pp TPopupMenu is declared.

Do you have a idea why Identifier not found "TPopupMenu" ?

Thanks.

Fre;D
« Last Edit: December 27, 2020, 02:08:11 am by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

jamie

  • Hero Member
  • *****
  • Posts: 4210
Re: Identifier not found "TPopupMenu"
« Reply #1 on: December 26, 2020, 02:46:32 pm »
Does the IDE itself build ok ?
The only true wisdom is knowing you know nothing

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #2 on: December 26, 2020, 02:54:16 pm »
Does the IDE itself build ok ?

Hello Jamie.

I did not try (because I was not able to build Lazarus on the Raspbian 32 OS too).
To build LazPaint on Raspbian 32 bit, I use a command line and it works perfectly.

So I try the same on Raspbian 64 bit but there is that Identifier not found "TPopupMenu"

Fre;D

[EDIT] Here the command line:

Quote
fpc -olazpaint -Fu./buttons -Fi./buttons -Fl./buttons -Fo./buttons -Fu./image -Fi./image -Fl./image -Fo./image -Fu./tools -Fi./tools -Fl./tools -Fo./tools -Fu../resources -Fi../resources -Fl../resources -Fo../resources -Fu./dialog -Fi./dialog -Fl./dialog -Fo./dialog -Fu./tablet -Fi./tablet -Fl./tablet -Fo./tablet -Fu./dialog/color -Fi./dialog/color -Fl./dialog/color -Fo./dialog/color -Fu./dialog/filter -Fi./dialog/filter -Fl./dialog/filter -Fo./dialog/filter -Fu./* -Fi./* -Fl./* -Fo./* -Fu../lazpaintcontrols -Fi../lazpaintcontrols -Fl../lazpaintcontrols -Fo../lazpaintcontrols -Fu/home/pi/bgrabitmap-master/bgrabitmap -Fi/home/pi/bgrabitmap-master/bgrabitmap -Fl/home/pi/bgrabitmap-master/bgrabitmap -Fo/home/pi/bgrabitmap-master/bgrabitmap -Fu/home/pi/bgrabitmap-master -Fi/home/pi/bgrabitmap-master -Fl/home/pi/bgrabitmap-master -Fo/home/pi/bgrabitmap-master -Fu/home/pi/lazarus/2.0.10/* -Fi/home/pi/lazarus/2.0.10/* -Fl/home/pi/lazarus/2.0.10/* -Fo/home/pi/lazarus/2.0.10/* -Fu/home/pi/lazarus/2.0.10/components/printers/unix -Fi/home/pi/lazarus/2.0.10/components/printers/unix -Fl/home/pi/lazarus/2.0.10/components/printers/unix -Fo/home/pi/lazarus/2.0.10/components/printers/unix -Fu/home/pi/lazarus/2.0.10/packager/registration -Fi/home/pi/lazarus/2.0.10/packager/registration -Fl/home/pi/lazarus/2.0.10/packager/registration -Fo/home/pi/lazarus/2.0.10/packager/registration -Fu/home/pi/lazarus/2.0.10/components/* -Fi/home/pi/lazarus/2.0.10/components/* -Fl/home/pi/lazarus/2.0.10/components/* -Fo/home/pi/lazarus/2.0.10/components/* -Fu/home/pi/bgracontrols-master -Fi/home/pi/bgracontrols-master -Fl/home/pi/bgracontrols-master -Fo/home/pi/bgracontrols-master -Fu/home/pi/lazarus/2.0.10/lcl/forms -Fi/home/pi/lazarus/2.0.10/lcl/forms -Fl/home/pi/lazarus/2.0.10/lcl/forms -Fo/home/pi/lazarus/2.0.10/lcl/forms -Fu/home/pi/lazarus/2.0.10/lcl/widgetset -Fi/home/pi/lazarus/2.0.10/lcl/widgetset -Fl/home/pi/lazarus/2.0.10/lcl/widgetset -Fo/home/pi/lazarus/2.0.10/lcl/widgetset -Fu/home/pi/lazarus/2.0.10/interfaces/* -Fi/home/pi/lazarus/2.0.10/interfaces/* -Fl/home/pi/lazarus/2.0.10/interfaces/* -Fo/home/pi/lazarus/2.0.10/interfaces/* -Fu/home/pi/lazarus/2.0.10/lcl/nonwin32 -Fi/home/pi/lazarus/2.0.10/lcl/nonwin32 -Fl/home/pi/lazarus/2.0.10/lcl/nonwin32 -Fo/home/pi/lazarus/2.0.10/lcl/nonwin32 -Fu/home/pi/lazarus/2.0.10/lcl/interfaces/gtk2 -Fi/home/pi/lazarus/2.0.10/lcl/interfaces/gtk2 -Fl/home/pi/lazarus/2.0.10/lcl/interfaces/gtk2 -Fo/home/pi/lazarus/2.0.10/lcl/interfaces/gtk2 -Fu/home/pi/lazarus/2.0.10/lcl/components/* -Fi/home/pi/lazarus/2.0.10/lcl/components/* -Fl/home/pi/lazarus/2.0.10/lcl/components/* -Fo/home/pi/lazarus/2.0.10/lcl/components/* -Fu/home/pi/lazarus/2.0.10/lcl/include -Fi/home/pi/lazarus/2.0.10/lcl/include -Fl/home/pi/lazarus/2.0.10/lcl/include -Fo/home/pi/lazarus/2.0.10/lcl/include -Fu/home/pi/lazarus/2.0.10/lcl -Fi/home/pi/lazarus/2.0.10/lcl -Fl/home/pi/lazarus/2.0.10/lcl -Fo/home/pi/lazarus/2.0.10/lcl  -MObjFPC -Scgi -Cg -OoREGVAR -Xs -XX -l -vewnhibq -B -O2 -XX -CX -Xs -vi -FUunits/ -dLCL -dLCLgtk2 lazpaint.lpr
« Last Edit: December 26, 2020, 03:03:35 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

jamie

  • Hero Member
  • *****
  • Posts: 4210
Re: Identifier not found "TPopupMenu"
« Reply #3 on: December 26, 2020, 03:04:20 pm »
well if the IDE can't build then something is wrong obviously !

Have you tried doing this via sudo ?

that will raise your permissions, maybe that will work since you can get it to work command line.
The only true wisdom is knowing you know nothing

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #4 on: December 26, 2020, 03:14:29 pm »
Quote
> well if the IDE can't build then something is wrong obviously !

Yes, sure, but I dont really need to install Lazarus at the moment on the Rpi.

I do all the job on my laptop and only use the source to compile on the Rpi with a command line (see the [EDIT] of my previous post).

Quote
> Have you tried doing this via sudo ?

I just tried now but sadly, same error.
« Last Edit: December 26, 2020, 03:36:11 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #5 on: December 26, 2020, 03:23:10 pm »
Here picture of LazPaint compiled and run on a Rpi-3 Raspbian arm 32 bit using the command line:
And screenshot of a MSEgui app compiled and run on Rpi-3 Raspbian aarch64 64 bit:
« Last Edit: December 26, 2020, 03:51:27 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

jamie

  • Hero Member
  • *****
  • Posts: 4210
Re: Identifier not found "TPopupMenu"
« Reply #6 on: December 26, 2020, 06:22:13 pm »
maybe you need to do a  CLEAN and BUILD ALL...

it could be that not all of the units are actually compiled to their object state and the current compiler settings is not doing the compile of the lib units on the fly..
The only true wisdom is knowing you know nothing

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #7 on: December 26, 2020, 06:57:20 pm »
maybe you need to do a  CLEAN and BUILD ALL...

it could be that not all of the units are actually compiled to their object state and the current compiler settings is not doing the compile of the lib units on the fly..

Hello Jamie.

Yes, of course, before each build, I remove manually all the files in /units (to be sure) and use the -B parameter.

But how is it possible that controls.pp does not find a Identifier  ("TPopupMenu") if the identifier was declared in menus.pp unit (that is in the uses section).

I dont know well LCL, but maybe TPopupMenu is inherited from GTK2 widget?

Very strange.

« Last Edit: December 26, 2020, 06:59:10 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #8 on: December 26, 2020, 09:27:53 pm »
maybe you need to do a  CLEAN and BUILD ALL...

OK, I did try to first compile Lazarus IDE with:

Code: Pascal  [Select][+][-]
  1. $ make clean all

But there is exactly the same error as LazPaint:

Quote
/home/pi/lazarus/lcl/controls.pp(1186,17) Error: (5000) Identifier not found "TPopupMenu"
    /home/pi/lazarus/lcl/controls.pp(1186,27) Error: (5007) Error in type definition
    /home/pi/lazarus/lcl/controls.pp(1267,45) Error: (5000) Identifier not found "TPopupMenu"
    /home/pi/lazarus/lcl/controls.pp(1454,38) Error: (5000) Identifier not found "TPopupMenu"
    /home/pi/lazarus/lcl/controls.pp(1731,36) Error: (5000) Identifier not found "TPopupmenu"
    /home/pi/lazarus/lcl/controls.pp(2791,1) Fatal: (10026) There were 5 errors compiling module, stopping
    Fatal: (1018) Compilation aborted
    Error: /usr/bin/ppca64 returned an error exitcode

 :-\


I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

howardpc

  • Hero Member
  • *****
  • Posts: 3646
Re: Identifier not found "TPopupMenu"
« Reply #9 on: December 26, 2020, 09:33:51 pm »
It is possible that this is caused by the identically named menus.pp in both Lazarus/LCL and Free Pascal packages.
FPC has a FreeVision package in a directory called fv which provides a menus.ppu for use in FreeVision apps.
Lazarus as it gets compiled produces a menus.ppu based on its menus.pp, where TPopupMenu is declared.
Perhaps the compiler first finds the fv menus.ppu which has no TPopupMenu declaration and then gives up?

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #10 on: December 26, 2020, 09:47:14 pm »
It is possible that this is caused by the identically named menus.pp in both Lazarus/LCL and Free Pascal packages.
FPC has a FreeVision package in a directory called fv which provides a menus.ppu for use in FreeVision apps.
Lazarus as it gets compiled produces a menus.ppu based on its menus.pp, where TPopupMenu is declared.
Perhaps the compiler first finds the fv menus.ppu which has no TPopupMenu declaration and then gives up?

Hello Howardpc.

Hum, maybe but why the compilation with same code is oK on arm 32 bit and not with aarch64 64 bit?
Could it be that some signal are not ok with fpc aarch64-linux?

Does somebody have success to build Lazarus or a LCL application on a aarch64-linux machine (like a rpi3)?
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #11 on: December 26, 2020, 10:00:05 pm »
It is possible that this is caused by the identically named menus.pp in both Lazarus/LCL and Free Pascal packages.
FPC has a FreeVision package in a directory called fv which provides a menus.ppu for use in FreeVision apps.
Lazarus as it gets compiled produces a menus.ppu based on its menus.pp, where TPopupMenu is declared.
Perhaps the compiler first finds the fv menus.ppu which has no TPopupMenu declaration and then gives up?

OK, I did try this:

remove /usr/lib/fpc/3.2.0/units/aarch64-linux/fv directory but still have the same error.
« Last Edit: December 26, 2020, 10:15:21 pm by Fred vS »
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #12 on: December 27, 2020, 01:05:41 am »
Yeeep I get it  ;D

The trick was to place "Menus" unit as first place in uses section of /lcl/controls.pp:

Here original code that makes problems:

Code: Pascal  [Select][+][-]
  1. uses
  2.   Classes, SysUtils, TypInfo, Types, Laz_AVL_Tree,
  3.   // LCL
  4.   LCLStrConsts, LCLType, LCLProc, GraphType, Graphics, LMessages, LCLIntf,
  5.   InterfaceBase, ImgList, PropertyStorage, Menus, ActnList, LCLClasses,
  6.   LResources, LCLPlatformDef,
  7.   // LazUtils
  8.   LazMethodList, LazLoggerBase, LazUtilities, UITypes;

And here fixed code that makes all ok (see Menus as first position):

Code: Pascal  [Select][+][-]
  1. uses
  2.  Menus, Classes, SysUtils, TypInfo, Types, Laz_AVL_Tree,
  3.   // LCL
  4.   LCLStrConsts, LCLType, LCLProc, GraphType, Graphics, LMessages, LCLIntf,
  5.   InterfaceBase, ImgList, PropertyStorage, ActnList, LCLClasses,
  6.   LResources, LCLPlatformDef,
  7.   // LazUtils
  8.   LazMethodList, LazLoggerBase, LazUtilities, UITypes;


I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

Fred vS

  • Hero Member
  • *****
  • Posts: 2089
    • StrumPract is the musicians best friend
Re: Identifier not found "TPopupMenu"
« Reply #13 on: December 27, 2020, 01:43:34 am »
Sorry, it is still me.

To be complete, first change code like previous post and, like howardpc noted, remove usr/lib/fpc/3.2.0/units/aarch64-linux/fv directory (it makes conflict).

Voila, I let you in peace.

Fre;D
I use Lazarus 2.0.6 32/64 and FPC 3.2.0 32/64 on Debian 10.2 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64 and Mac OS X Snow Leopard 32.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt, Carbon.

https://github.com/fredvs
https://gitlab.com/fredvs

PascalDragon

  • Hero Member
  • *****
  • Posts: 2759
  • Compiler Developer
Re: aarch64-linux: Identifier not found "TPopupMenu"
« Reply #14 on: December 27, 2020, 10:15:58 am »
The removal of the fv directory should be enough. You probably didn't succeed at first, because it wasn't recompiled correctly.

 

TinyPortal © 2005-2018