Shop OBEX P1 Docs P2 Docs Learn Events
propgcc: Issue with libpropeller's serial.PutFormatted — Parallax Forums

propgcc: Issue with libpropeller's serial.PutFormatted

trancefreaktrancefreak Posts: 186
edited 2015-03-19 00:49 in Propeller 1
I just started to use some of the cool objects of libpropeller. I'm not really a C/C++ Expert so maybe someone could help me with the following error message I get when compiling the project:
propeller-elf-c++.exe -L..\lib -o bin\Release\AddamsFamilyPinballMaster.elf obj\Release\lib\Domain\AutonomousKicker.o obj\Release\lib\Domain\ModelBase.o obj\Release\lib\Domain\OneTimeHitCounter.o obj\Release\lib\Domain\OutputActivator.o obj\Release\lib\Domain\Scheduler.o obj\Release\lib\Domain\SchedulerRegistry.o obj\Release\lib\Game\EventMessage.o obj\Release\lib\Game\InOperationState.o obj\Release\lib\Game\PinballHSM.o obj\Release\lib\Game\StateBase.o obj\Release\lib\Lamps\LampShow.o obj\Release\lib\Lamps\LampShowWorker.o obj\Release\lib\Lamps\MultiballLampShowWorker.o obj\Release\lib\libpropeller\serial\serial.o obj\Release\lib\Timer\CounterSpan.o obj\Release\lib\Timer\PauseTimer.o obj\Release\lib\Util\c++-alloc.o obj\Release\Master\main.o  -Os -Wall -mcmm -m32bit-doubles -fno-exceptions -fno-rtti -s -ffunction-sections -fdata-sections -Wl,--gc-sections  CogC_Drivers\IODriver\bin\Release\IODriver.cog
obj\Release\Master\main.o: In function `libpropeller::Numbers::Dec(int, char*)':
(.text._ZN12libpropeller7Numbers3DecEiPc+0x3): undefined reference to `libpropeller::Numbers::internalBuffer'
obj\Release\Master\main.o: In function `libpropeller::PrintStream<libpropeller::Serial>::Format(char const*, void*)':
(.text._ZN12libpropeller11PrintStreamINS_6SerialEE6FormatEPKcPv+0x2e0): undefined reference to `libpropeller::Numbers::internalBuffer'
obj\Release\Master\main.o: In function `libpropeller::PrintStream<libpropeller::Serial>::Format(char const*, void*)':
(.text._ZN12libpropeller11PrintStreamINS_6SerialEE6FormatEPKcPv+0x2e7): undefined reference to `libpropeller::Numbers::internalBuffer'
obj\Release\Master\main.o: In function `libpropeller::PrintStream<libpropeller::Serial>::Format(char const*, void*)':
(.text._ZN12libpropeller11PrintStreamINS_6SerialEE6FormatEPKcPv+0x2fb): undefined reference to `libpropeller::Numbers::internalBuffer'

If I use the serial.PutFormatted function of the serial object, compilation fails. If I just use serial.Put it works. The serial object includes the "Numbers.h" file, so I don't have a clue, why compilation fails.

I appreciate any help :-)


Thanks,
Christian
«1

Comments

  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-12 13:10
    You've found an excellent library!

    The numbers module also contains a source file, `numbers.cpp`. Simply copy that file into your project and you'll be good-to-go.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-12 13:12
    That compilation line is interesting. You certainly didn't write that by hand. Are you using Eclipse?
    (Completely unrelated to your problem, I'm just curious)
  • SRLMSRLM Posts: 5,045
    edited 2015-03-12 13:21
    Adding in the numbers.cpp file sounds like a good idea.

    Doing everything using inline classes is great for maximum compilation efficiency, but it makes it a pain when you need to use class variables. Then you have to toss it into a .cpp file and pull that in, which is pretty ridiculous. I haven't figured out a better way to do it, though.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-12 13:26
    SRLM wrote: »
    Adding in the numbers.cpp file sounds like a good idea.

    Doing everything using inline classes is great for maximum compilation efficiency, but it makes it a pain when you need to use class variables. Then you have to toss it into a .cpp file and pull that in, which is pretty ridiculous. I haven't figured out a better way to do it, though.

    I played around with the idea of a preprocessor macro named "WHOLE_PROGRAM". At the bottom of my header, I had the following:
    #ifdef WHOLE_PROGRAM
    #include <myFile.cpp>
    #endif
    

    I had a CMake option named WHOLE_PROGRAM, which would define the "WHOLE_PROGRAM" macro and add the -fwhole-program flag. I was really happy with this idea!!! Until... I tried using with a program that had an assembly driver :(:(:(
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-12 13:58
    Hi Guys,

    Thanks very much for the quick help!! I added the numbers.cpp file to the project and it compiles and works, now.
    Hmm... Shouldn't the compiler find the numbers.cpp because the numbers.h is included in the serial.h file and I thought the compiler will look in the same directory for the matching .cpp file.

    <snip>
    That compilation line is interesting. You certainly didn't write that by hand. Are you using Eclipse?
    (Completely unrelated to your problem, I'm just curious)
    </snip>

    No, I didn't write that by hand ;-)
    I'm using Code::Blocks to compile the main code and the cogc drivers.


    Thanks again!
    Christian
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-12 14:03
    Shouldn't the compiler find the numbers.cpp because the numbers.h is included in the serial.h file

    Wishful thinking. The short story: no. No C/C++ compiler works that way. Think about the case where you have a static library and header files... what *.cpp file are you going to look for?
    No, I didn't write that by hand ;-)
    I'm using Code::Blocks to compile the main code and the cogc drivers.


    Thanks again!
    Christian

    If that's the case, PropWare was made for you. You and I are two of a handful of folks on these forums that prefer a full-blown IDE over SimpleIDE or vim/emacs. PropWare uses CMake for its build system, and CMake fully supports Code::Blocks. You might also like CLion - it supports CMake natively. And since I like libpropeller as much as you do, it's already included in PropWare and is automatically built and linked into your program (aka, no need to include numbers.cpp in your project).
    http://david.zemon.name/PropWare/
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-12 14:22
    Wishful thinking. The short story: no. No C/C++ compiler works that way. Think about the case where you have a static library and header files... what *.cpp file are you going to look for?
    You are right, in that context it makes sense that it doesn't work that way. I have to learn still so much when using C/C++!

    If that's the case, PropWare was made for you. You and I are two of a handful of folks on these forums that prefer a full-blown IDE over SimpleIDE or vim/emacs. PropWare uses CMake for its build system, and CMake fully supports Code::Blocks. You might also like CLion - it supports CMake natively. And since I like libpropeller as much as you do, it's already included in PropWare and is automatically built and linked into your program (aka, no need to include numbers.cpp in your project).
    http://david.zemon.name/PropWare/
    Yes, I used SimpleIDE in the beginning but the lack of having a structured project view and really "simple" IDE features I started looking for another IDE where I struggled over Code::Blocks. You have to configure so much by hand when using cogc files, i.e. add a post-build step so that objcopy can rename the text section and so on.

    When using CMake with Code::Blocks, do I have to edit the Makefile by hand or does this Code::Blocks? I'm not very familiar with Makefiles, so I tried to not use Propware because I don't have a clue how to set it up with my IDE ;-)
    Do you have a document describing the necessary steps for propware?

    I really would like to try it out :-)
  • DavidZemonDavidZemon Posts: 2,973
    edited 2016-01-01 15:02
    Start by attempting the following steps in order, and if you run into any problems, let me know. I've never used Code::Blocks before, but I'm certainly not above giving it a shot to help you. (However, if you aren't biased toward Code::Blocks, give CLion a try - native CMake support is quite handy.)
    • Follow PropWare's installation instructions
    • While it's installing, read up on Make and CMake here
    • Attempt to build your project at the command line first, by following the instructions here and using this as reference.
    • Import your project into Code::Blocks or CLion or Eclipse or whatever as directed at the bottom of the same page (it was written for Eclipse originally, so I'll try to update that tonight and you can yell at me wherever it's unhelpful)

    You have to write your own CMakeLists.txt files, but they're extremely simple. For instance, yours will probably look like this:
    ###################################################################################
    ### Template code. Do not modify                                                  #
                                                                                      #
    cmake_minimum_required (VERSION 3.0.0)                                            #
    # Aside from cmake_minimum_required, this must be the first two lines of the file #
    file(TO_CMAKE_PATH $ENV{PROPWARE_PATH} PROPWARE_PATH)                             #
    include(${PROPWARE_PATH}/CMakePropellerHeader.cmake)                              #
    ###################################################################################
    
    set(BOARD QUICKSTART)
    set(MODEL lmm)
    set(COMMON_FLAGS "-Os")
    
    project(MyProject)
    
    create_simple_executable(${PROJECT_NAME}
        main.cpp)
    
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-12 14:59
    I will definitely give it a try! I'm not really biased toward Code::Blocks. I just used it because it was easier to configure than VisualStudio ;-)
    You have to write your own CMakeLists.txt files, but they're extremely simple. For instance, yours will probably look like this:
    Hmm... That was the reason why I used an IDE where I don't have to manage Makefiles. In Code::Blocks I just click on Add file, select the appropirate .cpp or .h file and that's it. The IDE includes the file into the command line build call and handles the linking of the generated object and so on.

    When using CMake, do I have to add each file I use in the IDE additionally to the CMakeLists.txt file?

    Many, many years ago I used Eclipse to program in JAVA. We used Maven back then. I remember, we could create an Eclipse project with Maven. And if the initial project was set up, I just had to add the new reference packages and files in Eclipse and that updated the Makefiles automatically so it was possible again to create a new Eclipse project with Maven.

    Or maybe I'm completely wrong. This was 10 years ago :-)
  • SRLMSRLM Posts: 5,045
    edited 2015-03-12 15:17
    The way that C++ is "supposed" to work is that the meat of a program is in the .cpp files, and the .h files are a lightweight "index" of the content in the .cpp files. When you compile a program, you're compiling .cpp files. libpropeller pushes as much code to the .h files, since the downsides (trivially longer compilation) is overwhelmed by the better optimization the compiler can run.

    numbers.cpp does have that `#ifdef` business (under "SINGLE_TRANSLATION_UNIT").

    And I agree: CLion and CMake are the way to go.
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-12 16:38
    All I can say is WOW! Just watched the Quick Tour video over at JetBrains introducing CLion and CMake. That really looks awesome!!!
    I think I'll start using it this weekend. It's half past twelve now, so I'm going to get some sleep, but the combo CLion and CMake look really cool especially because CLion completely includes/supports CMake and can update the Makefile automatically :-)

    Thanks for pointing that out!
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-12 16:48
    SRLM wrote: »
    numbers.cpp does have that `#ifdef` business (under "SINGLE_TRANSLATION_UNIT").

    Oh yea... that's where I got the idea lol. Did you find a way to make that work when including assembly or cog modules? Or do you just have a mental note not to use that option sometimes?
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-12 16:51
    All I can say is WOW! Just watched the Quick Tour video over at JetBrains introducing CLion and CMake. That really looks awesome!!!
    I think I'll start using it this weekend. It's half past twelve now, so I'm going to get some sleep, but the combo CLion and CMake look really cool especially because CLion completely includes/supports CMake and can update the Makefile automatically :-)

    Thanks for pointing that out!

    When I first heard that JetBrains was announcing their own C++ idea, these were the exact same thoughts that went through my head.
    Hmm... That was the reason why I used an IDE where I don't have to manage Makefiles. In Code::Blocks I just click on Add file, select the appropirate .cpp or .h file and that's it. The IDE includes the file into the command line build call and handles the linking of the generated object and so on.

    When using CMake, do I have to add each file I use in the IDE additionally to the CMakeLists.txt file?

    I assume you have this all figured out, now that you've watched the video?
    Many, many years ago I used Eclipse to program in JAVA. We used Maven back then. I remember, we could create an Eclipse project with Maven. And if the initial project was set up, I just had to add the new reference packages and files in Eclipse and that updated the Makefiles automatically so it was possible again to create a new Eclipse project with Maven.

    Or maybe I'm completely wrong. This was 10 years ago :-)

    I use maven every day at my job. It is, by far, the best build system I've ever seen. When I first started, I was sickened by how painfully slow it was (and still is). Then I learned what it does.... :O Every time I ran into a problem with CMake in PropWare, I'd say to myself "why can't I just use Maven!?!?!"
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-13 01:49
    Today I surfed a bit on the CLion Pages over at JetBrains and found out, that CLion has the EAP where one can try a CLion EAP build for 30 days. You need a license to use it longer or maybe the next EAP build can be used again for 30 days.

    I fear, that when the EAP is over a single user license is so expensive, that I can't afford one just for a hobby project.

    How do you guys handle that? Are you working with the EAP builds for 30 days or have you bought a license? If so, how much is one? I was not able to find a price on the JetBrains page.

    I don't want to start CLion and get used to it and 30 days later I can't work on the project anymore because I don't wanna spend 3000$ on a single user license ;-)
  • SRLMSRLM Posts: 5,045
    edited 2015-03-13 02:03
    Nope, haven't found a nice and clean way to handle .S files. They're a pain.

    re CLion: you can just keep renewing. I've done it three or four times so far. And when it's eventually a product I anticipate it won't be too much. I paid $49 for Webstorm. PhpStorm, PyCharm, and RubyMine are $99, and renewals are less. For me it's worth it. And tax deductible, so that's like cutting off 25% right there.
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-13 02:22
    That sounds really good. $99 for a CLion license would be absolutely affordable. Everything above $300 - x maybe not really.
    Definitely I'll give it a try.

    Do you know if within the libpropeller project or PropWare there is an example how cogc files are handled with CMake (with regards to use objcopy to be able to use the _load_start... stuff in the main program)?
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-13 06:02
    Do you know if within the libpropeller project or PropWare there is an example how cogc files are handled with CMake (with regards to use objcopy to be able to use the _load_start... stuff in the main program)?

    I'm afraid that's been a thorn in my side for a while. If you're writing your own cogc file, yes it can be done. I am not yet able to include cogc files from the Learn folder. I've created an issue for it here which links to this thread.
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-13 06:11
    I'm afraid that's been a thorn in my side for a while. If you're writing your own cogc file, yes it can be done. I am not yet able to include cogc files from the Learn folder. I've created an issue for it here which links to this thread.

    If you're willing, you can copy/paste the cogc file out of the Learn folder, into your project, and make the necessary change as described in the above linked thread. Then it would be functional.

    I'm also working on creating an example cogc project, but it ended up getting shoved pretty far down the priority list. If it's something you need, let me know and I could bump it back up.
  • Alex.StanfieldAlex.Stanfield Posts: 198
    edited 2015-03-14 21:10
    I have code::blocks installed for use with SDCC. What would be the steps for using it with PropGCC (which was installed by simpleIDE)

    Can anyone give me some pointers.

    Thanks
    Alex
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-15 06:31
    Are you willing to use PropWare? If so, you just need to create yourself a CMakeLists.txt file (see example above) and then let cmake generate your code::blocks project. Once generated, you can import it into code::blocks
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-15 08:31
    Okay - I just installed Code::Blocks and briefly gave it a go - basically just enough to ensure the cmake generator works correctly. As others have mentioned, you'll enjoy CLion a lot more if you're willing to give it a go.

    But, anyway, once you've installed PropWare and created your CMakeLists.txt file, simply start a terminal in the folder of your project and run the following:
    cmake -G "CodeBlocks - Unix Makefiles" .
    

    That command will create a Code::Blocks project file in the same directory as your project, at which point you can use Code::Blocks to "Open existing project" and start programming. I tested the build, rebuild and run buttons in Code::Blocks. Build and rebuild worked great, run was a bad idea and I had to exit Code::Blocks and kill propeller-load in top (linux version of Task Manager). This is mostly expected, and you'll see similar results in other IDEs. Running/debugging PropWare applications is best done through the command line - I haven't found a good way to hook propeller-load into any IDE yet.
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-15 14:50
    Hi David,

    Today I had time to try to install propware but the installer didn't succeed. I have added the errors below.
    Currently I'm downloading CLion and will play with it a bit :-)
    After that I will go over the thread you linked with regards to cogc file with CMake.

    Regards,
    Christian
    C:\Users\Christian\PropWare\util>INSTALL.py
    CMake will be installed to C:\Users\Christian. Press enter to continue or type a
    nother path to download to a new directory.
    >>>
    Cloning into 'libpropeller'...
    remote: Counting objects: 505, done.
    remote: Total 505 (delta 0), reused 0 (delta 0), pack-reused 505R
    Receiving objects:  93% (470/505), 436.01 KiB | 383.00 KiB/s
    Receiving objects: 100% (505/505), 442.93 KiB | 383.00 KiB/s, done.
    Resolving deltas: 100% (230/230), done.
    Checking connectivity... done.
    Downloading: Learn-current.zip - Bytes: 3967702
       3967702  [100.00%]
    cmake -G Unix Makefiles C:\Users\Christian\PropWare
    CMake Error: CMake was unable to find a build program corresponding to "Unix Mak
    efiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a differen
    t build tool.
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_C_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_C_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeCCompiler.cmake
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_CXX_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_CXX_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeCXXCompiler.cmake
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_ASM_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_ASM_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeASMCompiler.cmake
    CMake Error: Could not find cmake module file: CMakeDetermineCOGCCompiler.cmake
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_COGC_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_COGC_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeCOGCCompiler.cmake
    CMake Error: Could not find cmake module file: CMakeDetermineCOGCXXCompiler.cmak
    e
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_COGCXX_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_COGCXX_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeCOGCXXCompiler.cmake
    CMake Error: Could not find cmake module file: CMakeDetermineECOGCCompiler.cmake
    
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_ECOGC_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_ECOGC_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeECOGCCompiler.cmake
    CMake Error: Could not find cmake module file: CMakeDetermineECOGCXXCompiler.cma
    ke
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_ECOGCXX_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_ECOGCXX_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeECOGCXXCompiler.cmake
    CMake Error: Could not find cmake module file: CMakeDetermineDATCompiler.cmake
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_DAT_COMPILER_ENV_VAR
    CMake Error: Error required internal CMake variable not set, cmake may be not be
     built correctly.
    Missing variable is:
    CMAKE_DAT_COMPILER
    CMake Error: Could not find cmake module file: C:/Users/Christian/PropWare/bin/C
    MakeFiles/3.1.1/CMakeDATCompiler.cmake
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_C_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_C_COMPILER to the full path to the compiler, or to the compiler name
      if it is in the PATH.
    
    
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_CXX_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler
      name if it is in the PATH.
    
    
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_ASM_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_ASM_COMPILER to the full path to the compiler, or to the compiler
      name if it is in the PATH.
    
    
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_COGC_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_COGC_COMPILER to the full path to the compiler, or to the compiler
      name if it is in the PATH.
    
    
    CMake Error: Could not find cmake module file: CMakeCOGCInformation.cmake
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_COGCXX_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_COGCXX_COMPILER to the full path to the compiler, or to the compiler
      name if it is in the PATH.
    
    
    CMake Error: Could not find cmake module file: CMakeCOGCXXInformation.cmake
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_ECOGC_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_ECOGC_COMPILER to the full path to the compiler, or to the compiler
      name if it is in the PATH.
    
    
    CMake Error: Could not find cmake module file: CMakeECOGCInformation.cmake
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_ECOGCXX_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_ECOGCXX_COMPILER to the full path to the compiler, or to the compiler
      name if it is in the PATH.
    
    
    CMake Error: Could not find cmake module file: CMakeECOGCXXInformation.cmake
    CMake Error at CMakeLists.txt:13 (project):
      No CMAKE_DAT_COMPILER could be found.
    
      Tell CMake where to find the compiler by setting the CMake cache entry
      CMAKE_DAT_COMPILER to the full path to the compiler, or to the compiler
      name if it is in the PATH.
    
    
    CMake Error: Could not find cmake module file: CMakeDATInformation.cmake
    CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_COGC_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_COGCXX_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_ECOGC_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_ECOGCXX_COMPILER not set, after EnableLanguage
    CMake Error: CMAKE_DAT_COMPILER not set, after EnableLanguage
    -- Configuring incomplete, errors occurred!
    Traceback (most recent call last):
      File "C:\Users\Christian\PropWare\util\INSTALL.py", line 589, in <module>
        installer.install()
      File "C:\Users\Christian\PropWare\util\INSTALL.py", line 119, in install
        self._build_binaries()
      File "C:\Users\Christian\PropWare\util\INSTALL.py", line 177, in _build_binari
    es
        raise CMakeFailedException()
    __main__.CMakeFailedException
    
    C:\Users\Christian\PropWare\util>
    
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-15 15:12
    Thanks for posting the full build log. You can run "where propeller-elf-gcc" to find the path that propgcc is installed in. Once you have that path, can you tell me if there's a file named "make.exe" in it?
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-15 15:31
    No, there is no make.exe within the bin directory of propgcc. Do I have to install a make utility?
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-15 15:43
    Ugh! That's aggravating! It used to come with. Go ahead and download and install gnu make. It's ancient and the website looks like Smile - the file is from 2006 - but that's what you want. I'll get the installer patched to also install make
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-15 16:00
    Thanks for helping me out! I will do this tomorrow. It's now late at night here in Austria ;-) I will keep you posted!

    Thanks,
    Christian
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-17 14:55
    Hi David,

    Ok, I think I'm one step further. After adding the path to the make utility the installer did some more steps than before, but now it hangs while scanning for dependencies of target Simple_lmm.
    What I also notice is, that COGC, COGCXX, ... compiler identification is unknown. But the cogc compiler is also propeller-elf-gcc.exe. Why does the installer doesn't recognize the cogc compiler identification?

    Here is the full output:
    C:\Users\Christian\PropWare\util>INSTALL.py
    CMake will be installed to C:\Users\Christian. Press enter to continue or type a
    nother path to download to a new directory.
    >>>
    Cloning into 'libpropeller'...
    remote: Counting objects: 505, done.
    remote: Total 505 (delta 0), reused 0 (delta 0), pack-reused 505
    Receiving objects: 100% (505/505), 442.93 KiB | 338.00 KiB/s, done.
    Resolving deltas: 100% (230/230), done.
    Checking connectivity... done.
    Downloading: Learn-current.zip - Bytes: 3967702
       3967702  [100.00%]
    cmake -G Unix Makefiles C:\Users\Christian\PropWare
    -- The C compiler identification is GNU 4.6.1
    -- The CXX compiler identification is GNU 4.6.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/Program Files (x86)/SimpleIDE/propeller-gcc/bin/propeller
    -elf-gcc.exe
    -- The COGC compiler identification is unknown
    -- The COGCXX compiler identification is unknown
    -- The ECOGC compiler identification is unknown
    -- The ECOGCXX compiler identification is unknown
    -- LOADED: Generic-gcc-Propeller.cmake
    -- Check for working C compiler: C:/Program Files (x86)/SimpleIDE/propeller-gcc/
    bin/propeller-elf-gcc.exe
    -- Check for working C compiler: C:/Program Files (x86)/SimpleIDE/propeller-gcc/
    bin/propeller-elf-gcc.exe -- 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: C:/Program Files (x86)/SimpleIDE/propeller-gc
    c/bin/propeller-elf-gcc.exe
    -- Check for working CXX compiler: C:/Program Files (x86)/SimpleIDE/propeller-gc
    c/bin/propeller-elf-gcc.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - failed
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/Christian/PropWare/bin
    make -j4
    Scanning dependencies of target Simple_cmm
    ScanSncianngn idnegp ednedpeenncdieensc ioefs  toafr gteatr gSeitm pSliem_pxlmem
    _cc
    g
    Scanning dependencies of target Simple_lmm    <=== Here the installer hangs for about half an hour, now and doesn't continue.
    


    Christian
  • DavidZemonDavidZemon Posts: 2,973
    edited 2015-03-17 15:02
    Why does the installer doesn't recognize the cogc compiler identification?

    Because I didn't bother with all the CMake crud required for it to understand that it is using GCC. It doesn't matter though - it's superfluous.
    now it hangs while scanning for dependencies of target Simple_lmm

    That is not so normal :(. I don't know what could be causing it. My only guess is something very weird happened in the build directory and CMake has confused itself. Try deleting C:\Users\Christian\PropWare\bin and rerunning the installer.




    As a side note, the above issue is why it's important to use "out-of-source" builds with CMake. CMake creates lots of extra files (metadata, Makefiles, caches, etc) when you run "cmake .." and sometimes it gets broken. When it's broken, you want CMake to start over from scratch, and that is by far most easily done when you can just delete an entire directory instead of picking through your source code and trying to remember what is auto-generated by CMake and what actually matters for your project.
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-17 15:15
    Try deleting C:\Users\Christian\PropWare\bin and rerunning the installer.
    It helped going over the _lmm directory, but now it hangs again.
    Now it hangs here:
    C:\Users\Christian\PropWare\util>INSTALL.py
    CMake will be installed to C:\Users\Christian. Press enter to continue or type a
    nother path to download to a new directory.
    >>>
    cmake -G Unix Makefiles C:\Users\Christian\PropWare
    -- The C compiler identification is GNU 4.6.1
    -- The CXX compiler identification is GNU 4.6.1
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/Program Files (x86)/SimpleIDE/propeller-gcc/bin/propeller
    -elf-gcc.exe
    -- The COGC compiler identification is unknown
    -- The COGCXX compiler identification is unknown
    -- The ECOGC compiler identification is unknown
    -- The ECOGCXX compiler identification is unknown
    -- LOADED: Generic-gcc-Propeller.cmake
    -- Check for working C compiler: C:/Program Files (x86)/SimpleIDE/propeller-gcc/
    bin/propeller-elf-gcc.exe
    -- Check for working C compiler: C:/Program Files (x86)/SimpleIDE/propeller-gcc/
    bin/propeller-elf-gcc.exe -- 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: C:/Program Files (x86)/SimpleIDE/propeller-gc
    c/bin/propeller-elf-gcc.exe
    -- Check for working CXX compiler: C:/Program Files (x86)/SimpleIDE/propeller-gc
    c/bin/propeller-elf-gcc.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - failed
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/Christian/PropWare/bin
    make -j4
    Scanning dependencies of target Simple_cog
    Scanning dependencies of target Simple_lmm
    Scanning dependencies of target Simple_xmmc
    Scanning dependencies of target Simple_cmm
    

    Hmmm... Do you have any idea what I could do or try?
    Is there some parameter where I can switch on a more verbose mode to provide you more input?

    Christian
  • trancefreaktrancefreak Posts: 186
    edited 2015-03-17 15:23
    What I noticed after running the installer a third time is that the output looks sometimes scrambled:
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: C:/Program Files (x86)/SimpleIDE/propeller-gc
    c/bin/propeller-elf-gcc.exe
    -- Check for working CXX compiler: C:/Program Files (x86)/SimpleIDE/propeller-gc
    c/bin/propeller-elf-gcc.exe -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - failed
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/Christian/PropWare/bin
    make -j4
    Scanning dependencies of target Simple_cog
    Scanning dependencies of target Simple_lmm
    SSccananing depnenndienncgi esd eopf etanrdgeetn Sciimepsl eo_fc mtma
    get Simple_xmmc                 <== scrambled output??
    

    Could there be an issue with python?
Sign In or Register to comment.