Module woes….

About Monkey 2 Forums Monkey 2 Programming Help Module woes….

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by  jondecker76 2 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1543

    jondecker76
    Participant

    I’ve been beating my face against the wall all night just trying to get a very simple module working.

    Here is what I have:

    monkey2/modules/sequence/sequence.monkey2:

    monkey2/modules/sequence/module.json:

    I’ve run ‘mx2cc makemods sequence’ and the module build properly

    Now, in

    monkey2/projects/test/sequenceTest/sequenceTest.monkey2:

    When I build, i get the following error:

    mx2cc version 1.0.0

    ***** Building app ‘/home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.monkey2’ *****

    Parsing…
    Semanting…
    Translating…
    Compiling….
    Build error: System command ‘g++ -std=c++11 -O3 -DNDEBUG -I”/home/jondecker76/Downloads/monkey2-1.0.0/modules/monkey/native” -c -o “/home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/build_cache/desktop_release_linux/sequenceTest_0sequenceTest.cpp.o” “/home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/build_cache/desktop_release_linux/sequenceTest_sequenceTest.cpp”‘ failed.

    g++ -std=c++11 -O3 -DNDEBUG -I”/home/jondecker76/Downloads/monkey2-1.0.0/modules/monkey/native” -c -o “/home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/build_cache/desktop_release_linux/sequenceTest_0sequenceTest.cpp.o” “/home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/build_cache/desktop_release_linux/sequenceTest_sequenceTest.cpp”

    /home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/build_cache/desktop_release_linux/sequenceTest_sequenceTest.cpp:6:109: fatal error: ../../../../../../modules/sequence/sequence.buildv1.0.0/desktop_release_linux/sequence_sequence.h: No such file or directory
    compilation terminated.
    ***** Fatal mx2cc error *****

    Build error.

     

    However, if I build it manually with mx2cc it works!:

    jondecker76@jondecker76-Inspiron-3520:~/Downloads/monkey2-1.0.0/bin$ ./mx2cc_linux makeapp ../projects/test/sequenceTest/sequenceTest.monkey2
    mx2cc version 1.0.0

    ***** Building app ‘/home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.monkey2’ *****

    Parsing…
    Semanting…
    Translating…
    Compiling….
    Linking /home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/desktop_debug_linux/sequenceTest
    Running /home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/desktop_debug_linux/sequenceTest
    Count: 3
    Current: 1
    New count: 2
    New current: 2

     

     

    So what is the problem?  Is this a bug with Ted2?

    #1546

    therevills
    Participant

    I’ve had these strange issues and I think its down to sometimes when building the mods mx2cc only does debug or release, not both.

    Notice in your outputs, the first is for release:

    ../../../../../../modules/sequence/sequence.buildv1.0.0/desktop_release_linux/sequence_sequence.h: No such file or directory

    The second is for debug:

    Linking /home/jondecker76/Downloads/monkey2-1.0.0/projects/test/sequenceTest/sequenceTest.buildv1.0.0/desktop_debug_linux/sequenceTest

    When I’ve reported this and tried to repeat on demand it magically fixes itself!

    #1552

    jondecker76
    Participant

    So why would it work in debug and not release?

    I see what you were saying – I added –config release and tried from the cli again, and it fails just the same as when invoked from Ted2

    I guess I’ll report a bug on the issue, as I can reproduce it 100% of the time

    #1555

    jondecker76
    Participant

    aah, I get it

    when I used mx2cc_linux without a -config parameter, it defalts to debug only, so release versions aren’t created

    now that I’ve run mx2cc with both -config=release and -config=debug, everything works as it should

    it makes sense now, looking at scripts/rebuildmods.sh it supplies commands with -config for both release and debug, so running mx2cc makemods will only do the debug version.

    I would think that this behavior should be changed, and if no -config parameter is supplied it should build both debug and release versions.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.