Building propeller-gcc + PropWare
ntosme2
Posts: 38
I've put together a docker that makes deployment easy on any system.
https://gitlab.com/ntosme2/propeller-docker
To use PropWare develop branch (3.0), clone and then checkout the develop branch.
To use PropWare 2.0.1, clone and then checkout master.
Both branches compile propeller-gcc(6) from source.
Install:
Build/Run:
Edit 2: the below issues are resolved
Edit - https://ci.zemon.name/ is accessable now. Troubleshooting building PropWare (develop/3.0) is below:
Using the "GettingStarted" project in PropWare as an example:
It appears to almost work, but something seems to be broken with the way I'm installing/building PropWare
https://gitlab.com/ntosme2/propeller-docker
To use PropWare develop branch (3.0), clone and then checkout the develop branch.
To use PropWare 2.0.1, clone and then checkout master.
Both branches compile propeller-gcc(6) from source.
Install:
# clone the repo: git clone https://gitlab.com/ntosme2/propeller-docker git checkout <either develop or master, see above> # build the docker cd propeller-docker ./build_docker
Build/Run:
# from your project directory make a build directory cd /path/to/project # enter docker environment: note it's currently hard-coded to pass-through /dev/ttyUSB0 as the device to program /path/to/propeller-docker/propeller # build mkdir -p build && cd build cmake .. make # run make run # or debug with interactive serial shell make debug
Edit 2: the below issues are resolved
Edit - https://ci.zemon.name/ is accessable now. Troubleshooting building PropWare (develop/3.0) is below:
Using the "GettingStarted" project in PropWare as an example:
git clone https://gitlab.com/ntosme2/propeller-docker cd propeller-docker ./build_docker cd /path/to/PropWare/Examples/GettingStarted/ ./propeller #runs bash in the docker built above cd /home/<your username>/ mkdir build cd build cmake ..
It appears to almost work, but something seems to be broken with the way I'm installing/building PropWare
# cmake .. -- Found PropWare: /usr/share/PropWare/CMakeModules/PropellerToolchain.cmake (found version "3.0.0") -- The C compiler identification is GNU 6.0.0 -- The CXX compiler identification is GNU 6.0.0 -- Check for working C compiler: /opt/parallax/bin/propeller-elf-gcc -- Check for working C compiler: /opt/parallax/bin/propeller-elf-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /opt/parallax/bin/propeller-elf-gcc -- Check for working CXX compiler: /opt/parallax/bin/propeller-elf-gcc -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- The ASM compiler identification is GNU -- Found assembler: /opt/parallax/bin/propeller-elf-gcc -- Configuring done CMake Error at /usr/share/cmake-3.5/Modules/FindPropWare.cmake:449 (target_link_libraries): Error evaluating generator expression: $<COMPILE_LANGUAGE:DAT> $<COMPILE_LANGUAGE:...> Unknown language. Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPropWare.cmake:475 (_pw_create_executable) CMakeLists.txt:12 (create_simple_executable) CMake Error at /usr/share/cmake-3.5/Modules/FindPropWare.cmake:449 (target_link_libraries): Error evaluating generator expression: $<COMPILE_LANGUAGE:DAT> $<COMPILE_LANGUAGE:...> Unknown language. Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPropWare.cmake:475 (_pw_create_executable) CMakeLists.txt:12 (create_simple_executable) CMake Error at /usr/share/cmake-3.5/Modules/FindPropWare.cmake:449 (target_link_libraries): Error evaluating generator expression: $<COMPILE_LANGUAGE:DAT> $<COMPILE_LANGUAGE:...> Unknown language. Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPropWare.cmake:475 (_pw_create_executable) CMakeLists.txt:12 (create_simple_executable) CMake Error at /usr/share/cmake-3.5/Modules/FindPropWare.cmake:449 (target_link_libraries): Error evaluating generator expression: $<COMPILE_LANGUAGE:DAT> $<COMPILE_LANGUAGE:...> Unknown language. Call Stack (most recent call first): /usr/share/cmake-3.5/Modules/FindPropWare.cmake:475 (_pw_create_executable) CMakeLists.txt:12 (create_simple_executable)
Comments
Any reason why you're compiling PropGCC from source and not using a binary from the same CI server? At first, when I was reading your Dockerfile, I figured you simply preferred compiling from source. But then when I saw you were downloading PropWare in binary form, I got a bit more confused.
Also, PropWare 2.x is quite old at this point. I know there's no official stable release of 3.x yet, but it's probably more stable at this point (and definitely better supported ) than the 2.x branch. I've made a lot of enhancements to PropWare's build system since branching off to v3.
For reference, here's all the work I've been doing (er... did a long time ago) in the v3 tree: https://github.com/parallaxinc/PropWare/milestone/4?closed=1
I intended use PropWare from source, but the develop branch is giving me the errors shown above in the last code block. Can you share your build + install recipe? I don't see a branch for "release-3.0", is that the develop branch?
I tried building/installing like this:
The first two sed lines were because I was getting compile errors in those directories.
Okay, thanks for reporting this. I've discovered two different bugs while investigating this and will get them fixed shortly.
I pushed a working recipe that compiles PropWare develop/3.0 to the develop branch. I decided to remove the system cmake and compile and install 3.14 from source as well as that was easier than using 18.04 and installing an older gcc.
edit: no gcc6 ... hmm there are some nice and shiny language features I'd love to use. That explains the issue compiling a few of the examples. How much functionality is lost? Can I help with workarounds?
Some of the basics do, indeed work. But then other things don't. For instance, the header "cstddef" doesn't exist and I'd have to replace it with "stddef.h" in PropWare/utlity/collection/queue.h. When I fix that, then it fails with a linker error:
I gave up on this quite a while ago. GCC 6 was never finished. I think some really good work went into it, but it's truly an incomplete port at this point