Forum > Other

Error building fpGUI

(1/3) > >>

jules.d:
Hi, I'm new to freepascal although I did program in TP back in the 90s. I'm using Linux 64 (a Debian bullseye based distro), and am gettting an error message when compiling fpGUI 1.4.1 downloaded from sourceforge.

I've installed the prerequisites as per the readme, and this is what I get when running the build script :

Compiling X11 CoreLib
Free Pascal Compiler version 3.2.2+dfsg-9~bpo11+1 [2022/02/21] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling corelib/x11/fpgui_toolkit.pas
Compiling ./corelib/fpg_base.pas
Compiling corelib/x11/fpg_x11.pas
fpg_x11.pas(730,25) Hint: Local variable "AtomPair" does not seem to be initialized
fpg_x11.pas(1042,18) Hint: Local variable "msgp" does not seem to be initialized
fpg_x11.pas(1069,18) Error: Can't determine which overloaded function to call
math.pp(2075,10) Hint: Found declaration: Min(QWord;QWord):QWord;
math.pp(2059,10) Hint: Found declaration: Min(Int64;Int64):Int64;
fpg_x11.pas(1233,24) Hint: Local variable "msgp" does not seem to be initialized
fpg_x11.pas(1253,14) Note: User defined: We need to replace this message with a resouce string
fpg_x11.pas(1292,15) Hint: Local variable "Msg" does not seem to be initialized
fpg_x11.pas(1329,15) Hint: Local variable "Msg" does not seem to be initialized
fpg_x11.pas(1562,39) Hint: Local variable "rw" does not seem to be initialized
fpg_x11.pas(1635,16) Hint: Local variable "s" of a managed type does not seem to be initialized
fpg_x11.pas(1705,16) Hint: Local variable "msgp" does not seem to be initialized
fpg_x11.pas(2323,20) Hint: Local variable "ar1" of a managed type does not seem to be initialized
fpg_x11.pas(2334,18) Hint: Local variable "ar2" of a managed type does not seem to be initialized
fpg_x11.pas(2366,25) Warning: Symbol "RootWindow" is not portable
fpg_x11.pas(2368,16) Hint: Local variable "attr" does not seem to be initialized
fpg_x11.pas(2445,17) Hint: Local variable "hints" does not seem to be initialized
fpg_x11.pas(2842,87) Hint: Local variable "extents" does not seem to be initialized
fpg_x11.pas(2857,87) Hint: Local variable "extents" does not seem to be initialized
fpg_x11.pas(3561,20) Warning: Symbol "RootWindow" is not portable
fpg_x11.pas(3614,33) Hint: Local variable "info" does not seem to be initialized
fpg_x11.pas(3842,17) Hint: Local variable "xev" does not seem to be initialized
fpg_x11.pas(3996,14) Hint: Local variable "ev" does not seem to be initialized
fpg_x11.pas(4046) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

Any help appreciated.

MarkMLl:
Welcome to the forum :-)

I can't help directly, but to get the ball rolling I think the pertinent points are that you've got fpGUI 1.4.1 plus FPC 3.2.2 hence


--- Code: ---fpg_x11.pas(1069,18) Error: Can't determine which overloaded function to call
math.pp(2075,10) Hint: Found declaration: Min(QWord;QWord):QWord;
math.pp(2059,10) Hint: Found declaration: Min(Int64;Int64):Int64;

--- End code ---

Sourceforge puts a date of 2015-09-02 on fpGUI 1.4.1, which was I think was in the reign of FPC 2.6. So what's probably happened is that Min() has gained an overloaded function since then, i.e. originally it only supported 64-bit signed integers and it has since gained 64-bit unsigned (or vice versa).

If nobody else crops up before your patience starts fraying, take a look at the source line with the error and try to work out whether to cast the parameters using either QWord() or Int64(). Otherwise, if you're really hard up, it might be worth downgrading the compiler to 2.6.4... but I'd really not recommend that.

MarkMLl

sketch:
I'm running Ubuntu 22.04 LTS and fpc 3.2.2.  I get the same error using 1.4.1 from Sourceforge, but this worked:

 678  git clone https://github.com/graemeg/fpGUI.git
 679  sudo apt-get install fp-units-i386
 680  sudo apt-get install libx11-dev
 681  sudo apt-get install libxft-dev
 682  cd fpGUI/
 686  cd src/
 687  ./build.sh

MarkMLl:
Yes, that's probably the way to go. I'd forgotten that the author had gittish tendencies... but in any event I think it's fair to criticise him for not documenting the expected compiler version in the release notes, and for leaving an outdated version on SF without warning.

I'd note that a lot of people are wary of the FPC release from Debian, and instead prefer to use Debian to provide the prerequisites (build-essential, gdb and so on) and then use the current/stable compiler provided by the FPC project as a tar archive. Same goes for the Lazarus IDE: most people quite simply build from source (and the last I saw Debian actually had a package versioning problem in what they were shipping).

MarkMLl

jules.d:
Thanks for the input guys. So I've compiled the libraries and also the corelib and gui programs in the examples folder, but the build failed in the apps folder with the following error message :

Doing docedit in ./docedit
./compileall.sh: 9: cd: can't cd to ./docedit
Fatal: Unable to open file extrafpc.cfg
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
Doing hexview in ./hexviewer
Fatal: Unable to open file extrafpc.cfg
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode


How do I build the uidesigner? I assume this is a kind of visual designer which lets you drag and drop gui elements, like lazarus. The documentation is pretty sketchy. There's a tutorial in docs/quick_guide but the file has a strange extension (.ipf) and it's not easy to read.

I notice that some of the files in the uidesigner folder have .lpi and .lpr extensions. Does this mean that I need lazarus to compile it?

Like I said, I'm new to Free pascal and the last time I did any programming was in 1998, in Turbo pascal, so I'm probably getting ahead of myself, although I've written a few terminal programs in the last few days and looked at the documentation, which I'm finding a bit overwhelming.

Sorry to be so clueless.  :-[

Navigation

[0] Message Index

[#] Next page

Go to full version