Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by tcwan »

afanofosc wrote:
I pulled the PS code from the remobjects SVN repository which they have now moved to github:

https://github.com/remobjects/pascalscript
I'll give that a try, hopefully I can create a SPEC file for that.
afanofosc wrote:
I have checked in revisions to fix the compiler error you mentioned. I made a change to the LoadLSBlock signature in uSpirit.pas and forgot to update the Linux-specific files that referred to that function.

John Hansen
I managed to compile the fantom libraries with Rev. 618.

Thanks!

T. C.
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by tcwan »

pascalscript-f17.tgz
Patches and SPEC file for building pascalscript from Git repository on Fedora 17.
(4.41 KiB) Downloaded 315 times
Hi,
I made some progress. I managed to compile pascalscript for 64-bit Linux, after some Googling for patches.
However, I ran into a new problem when compiling nxttools and nxtcc.
Both of these failed compilation with an "Fatal: Can't find unit Windows used by uVTConfig" error.

bricxcc fails to compile because there seems to be a missing bricxcc.dpr file.

Code: Select all

$ make -f toolsunix64.mak nxttools
ppcx64 -S2cdghi -dRELEASE -vewnhi -Fu. -Fubricktools -FuNXT -Fupng -Fusyn -Fusamplerate -Fugrep -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/ -Fu/usr/lib64/lazarus/components/synedit/units/x86_64-linux/ -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/ -Fu/usr/lib64/lazarus/lcl/units/x86_64-linux/gtk2/ -Fu/usr/lib64/lazarus/packager/units/x86_64-linux/ -Fu/usr/lib64/lazarus/components/pascalscript//Source/lib/x86_64-linux/ -dLCL -dLCLgtk2 -dNXT_ONLY -dCAN_DOWNLOAD  nxttools.dpr -onxttools
Hint: Start of reading config file /etc/fpc.cfg
Compiling Release Version
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.0 [2012/05/14] for x86_64
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling nxttools.dpr
Compiling bricktools/brick_common.pas
Compiling bricktools/brick_common.pas
brick_common.pas(35,27) Hint: Unit "SProSpirit" not used in brick_common
Compiling uToolPalette.pas
Compiling Watch.pas
Compiling uVTConfig.pas
Fatal: Can't find unit Windows used by uVTConfig
Fatal: Compilation aborted
slavkozn
Posts: 24
Joined: 04 Oct 2010, 19:35
Contact:

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by slavkozn »

afanofosc wrote:I have checked in a few revisions which should fix the build errors you were encountering with r611.
Hi,

another problems with r619 on Debian Wheeze amd64:

Code: Select all

fantomfpc.pas(1700,40) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(2504,40) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(2602,33) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(2678,40) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(2761,42) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(2813,34) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(3059,38) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(3060,38) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(3061,38) Error: Identifier not found "BytesToCardinal"
fantomfpc.pas(3317) Fatal: There were 9 errors compiling module, stopping
regards
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by afanofosc »

I have checked in updates that should fix the uVTConfig.pas error as well as the BytesToCardinal error. I will try to do a better job of testing on Linux more frequently.

There will be a number of issues with Linux GUI forms not matching the current Windows versions due to my having made changes in Delphi on Windows and not making sure to copy all of those same changes over to the Lazarus .lfm file(s). I will work toward remedying that situation over the next week or so.

For Linux I have not recently tried to build bricxcc.dpr as it currently exists in SVN. Instead I just build nxtcc.dpr which is the same as nxttools.dpr but with a code editor with integrated compiler added to the project. I don't think that the full bricxcc project will compile on Linux any time soon.

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by tcwan »

afanofosc wrote:I have checked in updates that should fix the uVTConfig.pas error as well as the BytesToCardinal error. I will try to do a better job of testing on Linux more frequently.
Hmm. Looks like this is a moving target. I tried building Rev. 621 and am getting various unknown identifier errors for fantom.mak and nexttool.mak.
One new error is the "APPTYPE not supported" error.

Code: Select all

$ make -f fantom.mak all
/usr/bin/fpc -S2cdghi -dRELEASE -fPIC -vewnhi -l -Fu. -Fubricktools -FuNXT -dNXT_ONLY spirittest.dpr -ospirittest
Hint: Start of reading config file /etc/fpc.cfg
Compiling Release Version
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.0 [2012/05/14] for x86_64
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling spirittest.dpr
spirittest.dpr(19,2) Note: APPTYPE is not supported by the target OS
Compiling NXT/uNXTConstants.pas
Compiling bricktools/libspirit.pas
Compiling bricktools/FantomDefs.pas
libspirit.pas(26,2) Warning: Misplaced global compiler switch
spirittest.dpr(528,25) Error: Identifier not found "GetByte"
spirittest.dpr(528,44) Error: Identifier not found "GetByte"
spirittest.dpr(528,63) Error: Identifier not found "GetByte"
spirittest.dpr(528,82) Error: Identifier not found "GetByte"
spirittest.dpr(588,34) Hint: Variable "LSBlock" does not seem to be initialized
spirittest.dpr(604,80) Hint: Variable "lsstate" does not seem to be initialized
spirittest.dpr(777,61) Hint: Variable "pc" does not seem to be initialized
spirittest.dpr(777,57) Hint: Variable "clump" does not seem to be initialized
spirittest.dpr(777,50) Hint: Variable "state" does not seem to be initialized
spirittest.dpr(794) Fatal: There were 4 errors compiling module, stopping
Fatal: Compilation aborted

In the meantime, can you please apply the following two fixes to the Makefiles? The linker complains otherwise. I think it should be benign for other platforms.
For Linux I have not recently tried to build bricxcc.dpr as it currently exists in SVN. Instead I just build nxtcc.dpr which is the same as nxttools.dpr but with a code editor with integrated compiler added to the project. I don't think that the full bricxcc project will compile on Linux any time soon.

John Hansen
Ok. Thanks for the info.
Attachments
bricxcc-patches.tgz
Compile with -fPIC to avoid linker errors
(531 Bytes) Downloaded 294 times
slavkozn
Posts: 24
Joined: 04 Oct 2010, 19:35
Contact:

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by slavkozn »

afanofosc wrote:I have checked in updates that should fix the uVTConfig.pas error as well as the BytesToCardinal error. I will try to do a better job of testing on Linux more frequently.
Another problems in r621:

Code: Select all

NeXTTool.dpr(575,21) Error: Identifier not found "GetByte"
NeXTTool.dpr(575,40) Error: Identifier not found "GetByte"
NeXTTool.dpr(575,59) Error: Identifier not found "GetByte"
NeXTTool.dpr(575,78) Error: Identifier not found "GetByte"
...
NeXTTool.dpr(860) Fatal: There were 4 errors compiling module, stopping
Fatal: Compilation aborted
afanofosc wrote:There will be a number of issues with Linux GUI forms ... For Linux I have not recently tried to build bricxcc.dpr as it currently exists in SVN. Instead I just build nxtcc.dpr which is the same as nxttools.dpr but with a code editor with integrated compiler added to the project.
I do not build the GUI tools. I tried this some months ago without success and i decide let it to future... I am using only the unix.mak, nexttool.mak and wavrsocvtlinux.mak makefiles to build the nbc, nexttool and wavrsocvt tools and i share them as the Debian package in my personal repositary.

regards
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by afanofosc »

Sorry about all the messed up check-ins. I still haven't had a chance, due to a crazy few days of travel and health issues, to bring up my Linux box and make sure everything builds. Hopefully I've caught the last few bits that I broke when I moved some functions from uCommonUtils to uUtilities (don't ask why I thought that was a good idea).

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
slavkozn
Posts: 24
Joined: 04 Oct 2010, 19:35
Contact:

Re: Problem compiling Bricxcc SVN in Fedora Linux 64-bit

Post by slavkozn »

all seems to be solved in svn r623, new version published for debian users, thanks.

regards
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests