Problem Compiling Bricxcc SVN on Fedora 19

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

Problem Compiling Bricxcc SVN on Fedora 19

Post by tcwan »

Hi John,

I'm revisiting this issue as I've recently upgraded to Fedora 19 x86_64:

I'm using SVN rev. 656 (latest that is publicly available), and the following tools:
  • fpc-2.6.2-1.fc19.x86_64
    lazarus-1.0.8-2.fc19.x86_64
    pascalscript-git_20130531-1.fc19.x86_64 (I built this myself from the github repository)
I'm getting a problem compiling any of the subpackages (nbc, fantom library, etc.) due to the following error:

Code: Select all

Compiling /home/rpmbuilder/rpmbuild/BUILD/bricxcc/bricktools/uSerial.pas
uSerial.pas(356,10) Error: function header doesn't match the previous declaration "SerialFlushRead(LongInt,LongInt,var TBytes):Boolean;"
uSerial.pas(35,10) Hint: Found declaration: SerialFlushRead(LongInt,LongInt,var TBytes):Boolean;
uSerial.pas(381,10) Error: function header doesn't match the previous declaration "SerialFlushToChar(LongInt,LongInt,Char,var TBytes):LongInt;"
uSerial.pas(34,10) Hint: Found declaration: SerialFlushToChar(LongInt,LongInt,Char,var TBytes):LongInt;
uSerial.pas(435) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
Any idea why that would be happening?

T. C.
afanofosc_99
Posts: 15
Joined: 26 Sep 2010, 18:18

Re: Problem Compiling Bricxcc SVN on Fedora 19

Post by afanofosc_99 »

This is happening because I declare a TBytes type and use it in my code but newer versions of Free Pascal also declare TBytes in a unit that my code uses and the two types are considered by the compiler to be unique. Depending on the order of includes a unit will use one vs the other. In my code I replaced TBytes with TJCHBytes and it compiles fine now. I can send you my current code base, if you like.

Unfortunately, I am having trouble with sourceforge for the past several weeks where my attempts to commit changes to the repository fail with a "connection refused" error message. I have submitted a ticket to sourceforge to ask their help in fixing this problem and I hope to have it resolved soon.

Make sure you are not using the old http(s) link to the repository. You need to use the new RO svn link.

svn://svn.code.sf.net/p/bricxcc/code/

The old http link is not in-sync with changes I checked in using the new RW link (which is currently causing me grief:

svn+ssh://[email protected]/p/bricxcc/code/

This all started to be a pain when I upgraded BricxCC to the new sourceforge 2.0 project version (allura).

John Hansen
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Problem Compiling Bricxcc SVN on Fedora 19

Post by tcwan »

Hi John,
Thanks for the explanation. I'm probably still using the old HTTP link since I created the SVN repository sometime early last year.
I'll take a look later since Fedora is only installed on my home computer.

Edit: Changed SVN to HTTP
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Problem Compiling Bricxcc SVN on Fedora 19

Post by tcwan »

Hi John,
This is with SVN rev. 644 (using svn co svn://...)
I've made some patches to the Makefiles for my distro.

make -f fantom.mak all

Code: Select all

fantomspiritlib.pas(820,67) Error: Identifier not found "TNXTFileType"
fantomspiritlib.pas(856,78) Error: Identifier not found "TNXTFileType"
fantomspiritlib.pas(1168,42) Error: Identifier not found "NameToNXTFileType"
fantomspiritlib.pas(1179,4) Fatal: There were 3 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode (normal if you did not specify a source file to be compiled)
make: *** [libnxtspirit.so] Error 1
make -f toolsunix64.mak nxttools

Code: Select all

Compiling uEditorUtils.pas
uEditorUtils.pas(23,3) Fatal: Can't find unit uPSComponent used by uEditorUtils
Fatal: Compilation aborted
make: *** [nxttools] Error 1
tcwan
Posts: 186
Joined: 30 Sep 2010, 07:39

Re: Problem Compiling Bricxcc SVN on Fedora 19

Post by tcwan »

Trying some of the other targets:

make -f toolsunix64.mak bricxcc
(The filename for bricxcc.dpr is actually BricxCC.dpr in SVN)

Code: Select all

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/gtk2/ -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~/Desktop/pascalscript//Source/lib/x86_64-linux/ -Fu~/Desktop/pascalscript//Source -Fu/usr/lib64/lazarus/components/lazutils/lib/x86_64-linux/ -dLCL -dLCLgtk2 -dNXT_ONLY -dCAN_DOWNLOAD  BricxCC.dpr -obricxcc
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.2 [2013/04/28] for x86_64
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling BricxCC.dpr
Compiling FastMM4.pas
FastMM4.pas(1197,3) Fatal: Can't find unit Libc used by FastMM4
Fatal: Compilation aborted
make: *** [bricxcc] Error 1
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Problem Compiling Bricxcc SVN on Fedora 19

Post by afanofosc »

You can't make target "bricxcc" so there is not any point in trying.

You need to tell the compiler where to find the PascalScript source code in order to make "nxttools". That's a simple change to the PSROOT, iirc. In any case that file is under your PascalScript folder somewhere. My version says -Fu$(PSROOT)/Source/lib/$(FPC_TARGET)/ -Fu$(PSROOT)/Source \ as part of the LFLAGS.

The file uCompCommon.pas has the type and function you are missing. They have been renamed. TPBRFileType instead of TNXTFileType. NXTNameToPBRFileType instead of NameToNXTFileType. The uCompCommon.pas changes I checked in and the changes to the other files you are trying to build I have not been able to check in due to my problems with sourceforge. PBR is short for PBrick. These file types are now shared between NXT and EV3 and there are now two functions (another called EV3NameToPBRFileType).

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 22 guests