Menu

Compiling version 2.0.93

2019-05-14
2020-03-08
  • Hannes Noack

    Hannes Noack - 2019-05-14

    Hi,
    I’m trying to compile moritz on a linux system by using your workspace for code blocks but it fails to build. Is there are any other requirements I have to fulfil?

    System: Linux debian 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1 (2019-04-12) x86_64 GNU/Linux
    Gcc: gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
    Source: Archiev_SVN_2019_05_12.zip
    Procedere:
    - Unzip archive & extract project folder with subversion
    - Open code block
    - Open „Edd.workspace“
    - Select „Linux_Release“
    - Build
    - Build Log:
    -------------- Build: Linux_Release in MuLanPa_TiPa (compiler: GNU GCC Compiler)---------------

    g++ -fexpensive-optimizations -Os -O3 -Winit-self -Wunreachable-code -Wall -std=c++11 -fexceptions -DWITHOUT_TYNI_XML -DTIXML_USE_STL -DDONT_USE_SOURCEBASED_COMMENTPARSER -I../../../sources/MuLanPa_TiPa/h -I../../../sources/xml -I../../../sources/tool_xml -I../../../sources/MuLanPa_TiPa/process/h -I../../../sources/MuLanPa_TiPa/rule/h -I../../../sources/diverse/h -I../../../sources/TxtDiAsm -I../../../sources/TxtDiAsm/Association -I../../../sources/TxtDiAsm/Parser -I../../../sources/TxtDiAsm/Parser/Data -I../../../sources/TxtDiAsm/Parser/Operator -I../../../sources/TxtDiAsm/Parser/Terminal -I../../../sources/TxtDiAsm/Parser/Tool -I../../../sources/TxtDiAsm/Parser/Reaction -I../../../sources/TxtDiAsm/Grammar -I../../../sources/TxtDiAsm/Grammar/Spirit185 -I../../../sources/TxtDiAsm/Grammar/Data -I../../../sources/TxtDiAsm/Notation -c /media/sf_DebianShared/Archiev2/sources/diverse/cpp/app_tool.cpp -o obj/Release/sources/diverse/cpp/app_tool.o
    In file included from ../../../sources/diverse/h/app_tool.h:36:0,
    from /media/sf_DebianShared/Archiev2/sources/diverse/cpp/app_tool.cpp:32:
    ../../../sources/xml/xml_DataModel.h:46:73: error: declaration of ‘typedef class Association<xml_data*, 0u=""> XML_DataModel::Association’ [-fpermissive]
    typedef Association<xml_data*,nullptr> Association;
    ^~~~~~~~~~~
    In file included from ../../../sources/TxtDiAsm/Association/Association.hpp:32:0,
    from ../../../sources/TxtDiAsm/Association/AssociationFellowship.h:39,
    from ../../../sources/TxtDiAsm/Association/AssociationFellowship.hpp:33,
    from ../../../sources/TxtDiAsm/Association/ASS_Model.hpp:32,
    from ../../../sources/xml/xml_DataModel.h:31,
    from ../../../sources/diverse/h/app_tool.h:36,
    from /media/sf_DebianShared/Archiev2/sources/diverse/cpp/app_tool.cpp:32:
    ../../../sources/TxtDiAsm/Association/Association.h:76:55: error: changes meaning of ‘Association’ from ‘class Association<xml_data*, 0u="">’ [-fpermissive]
    template <class datatype="" defaultdata="" datatype,=""> class Association
    ^~~~~~~~~~~
    Process terminated with status 1 (0 minute(s), 4 second(s))
    2 error(s), 0 warning(s) (0 minute(s), 4 second(s))</class></xml_data*,></xml_data*,nullptr></xml_data*,>

    Thanks a lot

    Best regards
    Hannes

     
  • Eckard Klotz

    Eckard Klotz - 2019-05-19

    Hello Hannes.

    First of all please accept my apologize for my late reply.

    Currently I'm on a business trip with limited time to support Moritz.

    Unfortunately my Linux computer is down in the moment and thus I'm doing the development on Windows only.

    Actually no further adjustments or actions should be necessary. But in the last time I have added some new files and changed some configurations in the Code::Blocks projects for Windows without transferring the changes to the Code::Blocks projects for Linux.

    I try to fix the Linux adjustments. But as already mentioned currently I have no possibility to test it with a Linux system. Never the less it is very important for me to provide Moritz for all operation systems. Thus it will be great help if you try it out and respond with your results especially if you recognize more issues.

    I will take a look now and come back once I have a first fix for you.

    Thanks for your patience,
    Eckard.

     
  • Eckard Klotz

    Eckard Klotz - 2019-05-19

    Hello Hannes.

    I have extended temporarily the build platforms of the Linux targets in all projects to build them on Windows. I found some issues which I have solved. But actually this issues should only result in linker errors and not in compiler errors as reported by you.

    Nevertheless after resetting the targets by removing Windows I have published a new archive some minutes ago in the temporarry development folder.

    After downloading and replacing the old archive by the new one please update your sandbox.
    If you still have build problems with MuLanPa_TiPa please try to build the projects Moritz_TiPa and ModXML_TiPa also just to see if you have there similar results.

    In the case that the build is working now, I assume that you have to copy the build results of MuLanPa_TiPa (abc2xml) and Moritz_TiPa (xml2abc) into the distribution folder [SandBox]/trunk/distribution/Moritz/Development/Moritz_Dev/bin manually, since the copy-doc script may not work for you. After that the Moritz_Dev folder should contain everything you need for a new Moritz distribution.

    The build result of the project ModXML_TiPa is currently not needed, since this is still under construction. The project UT_Test_TxtDiAsm is used for software tests but to use this for further experiments you need at least unittest-cpp as build library on your computer (you will find in wiki of codeblocks)more about this. The project CodeTrees is currently not mantained and will not satisfy you.

    In the case that you already have build the moritz binaries successfully in the past by using the SVN archives provided by me, it would be helpful, if you could tell me with which revision you faced the current problem and which was the last revision working for you.

    Best regards,
    Eckard.

     
  • Hannes Noack

    Hannes Noack - 2019-05-20

    Hello Eckard,
    I've tried the new version but unfortunately got the same error again.
    I've now add the complier flag "-fpermissive" and changed the define for the LINUX_RELEASE build to Linux, to prevent these messages. After correct some typos in the includes the project will build successfully.
    It seems that Windows don't care about upper and lowercase filenames, but Linux do. So therefore you need to check the includes "StringC_help.h" (incorrect "StringC_Help.h" ) and "TiPa_Data.h" (incorrect "TiPa_Data.H") in all source and header files (see patch file attached)
    There are also a lot of warnings which should be taken care of. I've attached all messages to help you on this (It's probably faster that you fix this than me).

    I'll try to use the build binaries and let you know if this failes.
    If never used Moritz before, so I can't help you on the old revisions.

    Best Regards
    Hannes

     
  • Eckard Klotz

    Eckard Klotz - 2019-05-21

    Hello Hannes.

    Thanks for your fast response.

    Unfortunately I don't have the time now for a detailed answer, thus please accept again my apologize.

    I will provide some more information on week ened when I'm back at home.

    Thanks again for your patience,
    Eckard.

     
  • Eckard Klotz

    Eckard Klotz - 2019-05-26

    Hello Hannes.

    I hope that my todays archive, published some minutes ago in the temporarry development folder, is solving the issue with the the included files "StringC_help.h" and "TiPa_Data.h". As you already guessed Windows is not case sensitive and thus it is difficult to recognize this type of issue without using Linux.

    Furthermore I activated some more warning outputs to reduce the warnings afterwards. I'm still not ready with this but I hope you are already able to recognise the reduction in your build output.

    Best regards,
    Eckard.

     
  • Eckard Klotz

    Eckard Klotz - 2019-06-30

    Hello Hannes.

    Thanks for providing your results.

    In the last 3 weeks I had the chance to work on a Raspberry Pi under Raspbian to evaluate my sources in a Linux environment. This way I was able to learn why my sources fail. That's the main reason why I have not just imported your patch. I hope this is OK for you.

    Lets come first to your reported observations which could be reduced to 3 issues:

    typedef Association<xml_data*,nullptr> Association;</xml_data*,nullptr>

    error: changes meaning of ‘Association’ from ‘class Association<xml_data*, 0u="">’ [-fpermissive]</xml_data*,>

    As far as I understand it, my failure was that I used in the typedef declaration for the derived type the same name as used for the base type. After modifying the derived name all this failures were solved.

    It seems that Windows don't care about upper and lowercase filenames, but Linux do.

    I think this is something I don't have to explain again, since you already did. Yes you are right since Windows is not case sensitive you will not detect this mistake

    .....if(!(Att_Stack[Destination]->empty()))
    ......(Att_Stack[Destination])->erase(FileName);

    ......FileName = (Att_Stack[Destination])->begin();

    warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]

    Fortunately C/Cpp is not really caring about the indention as Python is doing. But the one who is working with the sources is doing and that's why I think that correcting issues like this is an important task.

    Unfortunately I had to recognize after solving your issues, that the build binaries still had runtime problems. Thus I had to spent some more effort to make it run. Many of the last 50 commits were done to make my binaries run on Linux (Raspbian). All of this fixes are actually logical and thus I wonder why I was able to build and run Moritz on Windows (Win 10).

    May be that the GNU compiler MinGW works a little bit different on Windows compared to Linux.
    One good example for this is the definition of char. On Windows char is defined as signed. Thus I had to define the parser for anychar with the range from -128 to 127 (without 0). But on Linux char is defined as unsigned and thus I had to use the range from 1 to 255. Fortunately this limits are defined in the standard header limits.h and thus I'm using now CHAR_MIN and CHAR_MAX instead of numbers.

    OK it may be still plausible, that the compiler is not complaining, if the lower and upper border is inside the local definition. But for the next example I would actually expect at least a warning.

    const char* String = myStringManipulation(String);

    An other example accepted on Windows is the following thing:

    string StringCpp = "";
    const char StringC = StringCpp.c_str();
    delete;

    After fixing my sources to make the binaries run under Linux (Raspbian) I'm still able to do the same on Windows and I hope the resulting application became more stable for the future.

    How ever it would be nice, if you and/or other Linux users will try the newest archive out to build Moritz and to run it after copying the binaries in the folder [SVN_SandBox]/trunk/distribution/Moritz/Development/Moritz_Dev/bin. I hope that the shell scripts are working for you also.

    Best regards,
    Eckard.

     

    Last edit: Eckard Klotz 2019-06-30
  • Hannes Noack

    Hannes Noack - 2019-07-10

    Hello Eckard,
    thanks for the update. I complie the new version and don't get any runtime errors anymore.
    I don't get any diagramms ether but I think thats because I've to change the configuration or source files.

    Beside this, I've seen some other points:
    -If I'm using the include file "abc2xml_Process_ansi_c_only.xml" - abc2xml crashes with a memory access failure
    -xml2abc is using up to 6,1gb ram during the processing and take about 2h to process my project. It seems that 6,1gb is somehow a limit (could be a limit from the virtual machine, don't know)

    Thanks for your work, I'll try to get me throug the manual

    Best Regards
    Hannes

     
  • Eckard Klotz

    Eckard Klotz - 2019-07-10

    Hello Hannes.

    Thanks for your feedback.

    If you start the creation-process by using the providing shell-script you will get log text-files.
    Is it possible for you to upload them here in the forum?

    Best regards,
    Eckard.

     
  • Marx

    Marx - 2020-03-06

    Hi Eckard,
    Thanks for the Moritz solution its really helping me. While using the tool I found two bugs:

    1) I am trying to use the MRTZ_pointOut comment to change the color of all my blocks using c code comments <>. However it does not work for this special command. Furthermore, all other Moritz commands in the code works by using C code comments but not the MRTZ_pointOut command. Therefore I need to change the comment to C++ commands <> for this to work.
    Could you please may be find a solution for this, so that I can use the C code comments also for this command?

    2) This also only work while placing the MRTZ_pointOut command at a special position within the function (Just after the function declaration ). Placing it before the function declaration does not work.
    Can you please help solving this so that I can write this command at the beginning of the function and change the color of all function blocks?

    I have attached the 2 c-code with Moritz commands presenting the Bugs i described above as well as their resulting flowcharts.

    It will be very nice if you could help

    Best regards

     
  • Marx

    Marx - 2020-03-06

    3) I forgot to mention this one:
    By using the C-style comments (*), flowchart also printout these C-style comment character *.
    Is it possible to supress it from the generated flow chart ? so that only the comments are shown and not the C-style comment

     
  • Eckard Klotz

    Eckard Klotz - 2020-03-08

    Hello Marx.

    Currently I'm moving into an other city. Thus the March is occupied for me by a lot of other activities like renovation, transportation of furniture and so on.

    Thus it may take some time until could take a look. Please accept my apologize.

    Best regards,
    Eckard.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.