Shop OBEX P1 Docs P2 Docs Learn Events
building propgcc from source — Parallax Forums

building propgcc from source

ersmithersmith Posts: 6,054
edited 2014-03-17 10:58 in Propeller 1
(This will only affect those adventurous individuals who build their own copies of PropGCC, for example to run on other platforms.)

There have been some changes to the way we build PropGCC on the default branch. David Betz contributed a very nice Makefile, which allows us to build individual projects like the loader or binutils. The old jbuild.sh and rebuild.sh scripts have been removed (you can always get them back via Mercurial if you need them).

Cross compilation from Linux to Windows or Raspberry Pi is now supported as well, so you can for example do:
make -j4
make -j4 CROSS=win32
make -j4 CROSS=rpi

to build all 3 platforms using 4 threads.

Comments

  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-11 10:12
    Excellent news.

    Regarding ./configure ... is there a way to cache the result for the sub-projects?

    When I was compiling with jbuild on eight cores, the ./configures were talking a big chunk of the total real time.
  • ersmithersmith Posts: 6,054
    edited 2014-03-11 11:11
    Excellent news.

    Regarding ./configure ... is there a way to cache the result for the sub-projects?

    When I was compiling with jbuild on eight cores, the ./configures were talking a big chunk of the total real time.

    Yes, the configuration is cached (it is only re-run if you clean). Also, you can just build the parts you want, e.g. "make gcc" or "make gdb".
  • DavidZemonDavidZemon Posts: 2,973
    edited 2014-03-11 12:34
    This is fantastic! Can't wait to try this when I get home :)

    Thank you David Betz for the work on the Makefile, and of course anyone/everyone else that's put so much work into PropGCC.
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-16 11:52
    I made some time to get PropGCC installed & running again.

    I had to re-install Ubuntu 13.10 due to the latest nVidia drivers and lxubuntu hosing my previsous installation. This time I left out lxubuntu, and used the 4.03 Nvidia drivers.

    Here is how to build propgcc on Ubuntu 13.10, including what is missing.

    Install Missing packages:

    sudo apt-get install mercurial
    sudo apt-get install autoconf
    sudo apt-get install bison
    sudo apt-get install flex
    sudo apt-get install libncurses-dev
    sudo apt-get install libexpat1-dev

    (From Wiki) Ubuntu 13.10 requires texinfo4.13 using these instructions:

    wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13a.tar.gz
    tar -zxvf texinfo-4.13a.tar.gz
    cd texinfo-4.13
    ./configure
    make
    sudo make install

    Now that we have pre-requsites, follow the Linux build instructions from:

    https://code.google.com/p/propgcc/wiki/PropGccBuild

    Except instead of using (the missing in current version) ./rebuild.sh

    time make -j8

    Build complete.

    real 15m14.718s
    user 27m9.442s
    sys 13m44.044s

    I was watching sysmonitor, almost half of the processor time was used running .configure for different subdirectories on a single core.

    There still seem to be some dependancies on bstc...

    make -C toggle/pasm_toggle
    make[1]: Entering directory `/home/bhenning/propeller/propgcc/demos/toggle/pasm_toggle'
    propeller-elf-gcc -Os -mlmm -mlmm -o toggle.o -c toggle.c
    bstc -Ox -c -o toggle toggle.spin
    make[1]: bstc: Command not found
    make[1]: *** [toggle.dat] Error 127
    make[1]: Leaving directory `/home/bhenning/propeller/propgcc/demos/toggle/pasm_toggle'
    make: *** [all] Error 2

    Demos that don't need bstc compile just fine!
  • ersmithersmith Posts: 6,054
    edited 2014-03-17 10:24
    There still seem to be some dependancies on bstc...

    Demos that don't need bstc compile just fine!

    Thanks for the info. I've checked in some Makefile changes to use spin2cpp instead of bstc; openspin should work fine as well (bstc was only being used to build .dat files, which both openspin -c and spin2cpp --dat can do).

    Eric
  • Bill HenningBill Henning Posts: 6,445
    edited 2014-03-17 10:58
    You are welcome... and I'll have to check out the changes and re-build.

    I plan to add a 128GB SSD as a bcache to the system, that should speed up the system a lot more...
    ersmith wrote: »
    Thanks for the info. I've checked in some Makefile changes to use spin2cpp instead of bstc; openspin should work fine as well (bstc was only being used to build .dat files, which both openspin -c and spin2cpp --dat can do).

    Eric
Sign In or Register to comment.