Shop OBEX P1 Docs P2 Docs Learn Events
OpenSpin build on Raspberry Pi Errors - BOOM! — Parallax Forums

OpenSpin build on Raspberry Pi Errors - BOOM!

mindrobotsmindrobots Posts: 6,506
edited 2013-11-19 10:43 in Propeller 1
Hi,

I'm building OpenSpin on my Raspberry Pi.

I'm on the latest Raspian (9-25-2013) and I grabbed the latest OpenSpin (r53)

After unzipping it into a directory, I do a 'make clean' and then 'make all'

This is my build output:
pi@tornado ~/src/openspin-source-r53 $ make all
make -C PropellerCompiler all
make[1]: Entering directory `/home/pi/src/openspin-source-r53/PropellerCompiler'
g++ -DGCC -Wall -g -static -o BlockNestStackRoutines.o -c BlockNestStackRoutines.cpp
g++ -DGCC -Wall -g -static -o CompileDatBlocks.o -c CompileDatBlocks.cpp
g++ -DGCC -Wall -g -static -o CompileExpression.o -c CompileExpression.cpp
g++ -DGCC -Wall -g -static -o CompileInstruction.o -c CompileInstruction.cpp
g++ -DGCC -Wall -g -static -o CompileUtilities.o -c CompileUtilities.cpp
g++ -DGCC -Wall -g -static -o DistillObjects.o -c DistillObjects.cpp
g++ -DGCC -Wall -g -static -o Elementizer.o -c Elementizer.cpp
g++ -DGCC -Wall -g -static -o ErrorStrings.o -c ErrorStrings.cpp
g++ -DGCC -Wall -g -static -o ExpressionResolver.o -c ExpressionResolver.cpp
g++ -DGCC -Wall -g -static -o InstructionBlockCompiler.o -c InstructionBlockCompiler.cpp
g++ -DGCC -Wall -g -static -o StringConstantRoutines.o -c StringConstantRoutines.cpp
g++ -DGCC -Wall -g -static -o SymbolEngine.o -c SymbolEngine.cpp
g++ -DGCC -Wall -g -static -o Utilities.o -c Utilities.cpp
g++ -DGCC -Wall -g -static -o PropellerCompiler.o -c PropellerCompiler.cpp
ar rs libopenspin.a BlockNestStackRoutines.o CompileDatBlocks.o CompileExpression.o CompileInstruction.o CompileUtilities.o DistillObjects.o Elementizer.o ErrorStrings.o ExpressionResolver.o InstructionBlockCompiler.o StringConstantRoutines.o SymbolEngine.o Utilities.o PropellerCompiler.o
ar: creating libopenspin.a
make[1]: Leaving directory `/home/pi/src/openspin-source-r53/PropellerCompiler'
g++ -o openspin -DGCC -Wall -g -static SpinSource/openspin.cpp SpinSource/flexbuf.c SpinSource/preprocess.c PropellerCompiler/libopenspin.a
SpinSource/openspin.cpp:76:26: error: ‘PATH_MAX’ was not declared in this scope
SpinSource/openspin.cpp:79:38: error: ‘PATH_MAX’ was not declared in this scope
SpinSource/openspin.cpp: In function ‘const char* MakePath(PathEntry*, const char*)’:
SpinSource/openspin.cpp:83:13: error: ‘lastfullpath’ was not declared in this scope
SpinSource/openspin.cpp: In function ‘FILE* OpenFileInPath(const char*, const char*)’:
SpinSource/openspin.cpp:142:28: error: ‘lastfullpath’ was not declared in this scope
SpinSource/openspin.cpp:149:12: error: ‘filesAccessed’ was not declared in this scope
SpinSource/openspin.cpp:149:47: error: ‘lastfullpath’ was not declared in this scope
SpinSource/openspin.cpp: In function ‘int main(int, char**)’:
SpinSource/openspin.cpp:507:28: error: ‘filesAccessed’ was not declared in this scope
SpinSource/openspin.cpp:516:17: error: ‘filesAccessed’ was not declared in this scope
SpinSource/openspin.cpp: In function ‘const char* MakePath(PathEntry*, const char*)’:
SpinSource/openspin.cpp:85:1: warning: control reaches end of non-void function [-Wreturn-type]
make: *** [all] Error 1

About 1/2 way through it starts complaining about things.

Is there anything special I need to do for building on a Linux environment?

Any help would be appreciated.

Thanks!

Comments

  • jazzedjazzed Posts: 11,803
    edited 2013-11-04 13:18
    You're out of date :)

    $ svn update
    sh-3.1$ svn update
    At revision 57.
    

    svn checkout http://open-source-spin-compiler.googlecode.com/svn/ open-source-spin-compiler-read-only
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-11-04 13:32
    HEY! Oh, my code.

    Interesting, I'll grab the new one later tonight. Wonder where I picked the old one up? (Totally rhetorical on that one.)


    Thanks, Steve!
  • jazzedjazzed Posts: 11,803
    edited 2013-11-04 13:41
    mindrobots wrote: »
    Totally rhetorical on that one.
    But, but, but, but ... oh snap! :)
  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2013-11-06 16:31
    This thread probably solved Rick's issues, but may still have left other Raspberry Pi owners scratching their heads...

    Here's a step-by-step method of obtaining and compiling Open Spin on the Raspberry pi.
    wget -r http://open-source-spin-compiler.googlecode.com/svn/
    cd open-source-spin-compiler.googlecode.com
    cd svn
    make clean
    make all
    

    Finally, run the binary with the following...
    ./openspin
    

    Jeff
  • RaymanRayman Posts: 14,662
    edited 2013-11-06 16:47
    OpenSpin huh... Sounds nice. Where did this come from?
  • mindrobotsmindrobots Posts: 6,506
    edited 2013-11-06 17:15
    Jeff, one thread to solve my issues!?!?!? Wow, I've been years developing them!

    @Ray, Roy Eltham took Chip's spin compiler code and ported it to C++ a while back. It gets burried and then dug up every few months. It should be a sticky or better advertised somehow.
  • RaymanRayman Posts: 14,662
    edited 2013-11-06 19:25
    Oh, that's Roy's code. I knew about that, just forgot the name. Thanks.
  • prof_brainoprof_braino Posts: 4,313
    edited 2013-11-07 04:28
    So is openspin ready for public consumption? Can us regular folk use it without hurting ourselves?
  • RsadeikaRsadeika Posts: 3,837
    edited 2013-11-07 05:25
    I guess all you need now is something like a Geany IDE with the correct build instructions, and you are ready to go. I use Geany a lot, and it is a very capable IDE, the only thing that would be missing is the screen functionality of Propeller Tool, indentation control.

    Ray
  • Heater.Heater. Posts: 21,230
    edited 2013-11-07 08:08
    Braino,
    ...is openspin ready for public consumption?
    I would say yes, give it a try. MInd you I would build it from the latest sources. I'm sure any bug reports would be welcome. There may be issues with code that is normally built with BST as I'm not sure all of the BST Spin extensions are in there yet.
    https://code.google.com/p/open-source-spin-compiler/source/checkout


    Ray,
    I guess all you need now is something like a Geany IDE
    Don't let Jazzed hear you say that:)

    Why would you want Geany IDE when you can use Simple IDE?

    SimpleIDE does everything you need for Spin programming: editing, syntax highlighting, compiling, prop loading, terminal screen etc. Also works for C if you want.


  • RsadeikaRsadeika Posts: 3,837
    edited 2013-11-07 08:47
    Why would you want Geany IDE when you can use Simple IDE?
    My suggestion was strictly for POC working with openspin, as soon as they have 'sudo apt-get install simpleide', then there will be no need for Geany.

    Ray
  • jazzedjazzed Posts: 11,803
    edited 2013-11-07 10:47
    We had an openspin mishap today during testing.

    In SimpleIDE, I loaded the Parallax Serial Terminal Demo.spin file, and set the project.
    Compiled and loaded the binary, but nothing happened on Propeller.

    The problem is a build issue which I've seen before with make.
    I recommend always doing make clean after svn update.

    Roy, considering how small openspin is, it would be good to add clean to the build steps in Makefile.
    I.E. change: "all: $(LIBNAME) Makefile" to "all: clean $(LIBNAME) Makefile"

    Heater. wrote: »
    Don't let Jazzed hear you say that:)

    Why would you want Geany IDE when you can use Simple IDE?
    LOL I recommended the Geany IDE for development long ago since it is so easy to configure.
  • RetrobitsRetrobits Posts: 46
    edited 2013-11-19 10:43
    I was just trying to compile openspin on the RasPi today, and lo and behold, this thread.

    Now it's working like a charm.

    Thanks as always folks...

    - Earl
Sign In or Register to comment.