LLVM Input module is broken












0















I am busy to test a Pascal LLMV compiler:
https://gitlab.com/mseide-msegui/mselang



All went OK, the MSElang compiler produce a Bitcode File (helloworld.bc).



But when trying to compile that bc file with opt there is that error message
afer +- 900 lines of messages of the opt compiler.



/usr/bin/opt: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


Where is the problem, do you have a idea what appends?










share|improve this question





























    0















    I am busy to test a Pascal LLMV compiler:
    https://gitlab.com/mseide-msegui/mselang



    All went OK, the MSElang compiler produce a Bitcode File (helloworld.bc).



    But when trying to compile that bc file with opt there is that error message
    afer +- 900 lines of messages of the opt compiler.



    /usr/bin/opt: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


    Where is the problem, do you have a idea what appends?










    share|improve this question



























      0












      0








      0








      I am busy to test a Pascal LLMV compiler:
      https://gitlab.com/mseide-msegui/mselang



      All went OK, the MSElang compiler produce a Bitcode File (helloworld.bc).



      But when trying to compile that bc file with opt there is that error message
      afer +- 900 lines of messages of the opt compiler.



      /usr/bin/opt: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


      Where is the problem, do you have a idea what appends?










      share|improve this question
















      I am busy to test a Pascal LLMV compiler:
      https://gitlab.com/mseide-msegui/mselang



      All went OK, the MSElang compiler produce a Bitcode File (helloworld.bc).



      But when trying to compile that bc file with opt there is that error message
      afer +- 900 lines of messages of the opt compiler.



      /usr/bin/opt: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


      Where is the problem, do you have a idea what appends?







      llvm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 29 '18 at 16:02









      double-beep

      1,7132724




      1,7132724










      asked Dec 29 '18 at 13:02









      fredvsfredvs

      11




      11
























          2 Answers
          2






          active

          oldest

          votes


















          0














          Re-hello.



          Some more infos...



          The .bc (Bit-Code) file produced by MSElang is perfectly recognized by lli (llvm interpreter & dynamic compiler).



          See picture:
          bc file interpreted by lli



          But it I try to compile it with llc with this:



          llc /home/fred/mlctest/hellomlc.bc


          there is that error message after lot of messages:



          llc: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


          What is wrong?






          share|improve this answer

































            0














            The error, whatever it is, is usually easily located by calling verifyFunction() and/or verifyModule() before writing the module. Those functions report actionable details.



            VerifyModule() calls verifyFunction(), so you don't strictly need verifyFunction(), but you may find convenient to call verifyFunction() as soon as you have generated a function and assert that it returns false. That way you get one or a few helpful messages instead of the flood verifyModule() may give you.






            share|improve this answer
























            • Thanks for the tip, I will use those verify...() methods. The problem came from the debug infos. Without enabling debug info the compilation is ok.

              – fredvs
              Jan 5 at 17:00













            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53969776%2fllvm-input-module-is-broken%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Re-hello.



            Some more infos...



            The .bc (Bit-Code) file produced by MSElang is perfectly recognized by lli (llvm interpreter & dynamic compiler).



            See picture:
            bc file interpreted by lli



            But it I try to compile it with llc with this:



            llc /home/fred/mlctest/hellomlc.bc


            there is that error message after lot of messages:



            llc: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


            What is wrong?






            share|improve this answer






























              0














              Re-hello.



              Some more infos...



              The .bc (Bit-Code) file produced by MSElang is perfectly recognized by lli (llvm interpreter & dynamic compiler).



              See picture:
              bc file interpreted by lli



              But it I try to compile it with llc with this:



              llc /home/fred/mlctest/hellomlc.bc


              there is that error message after lot of messages:



              llc: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


              What is wrong?






              share|improve this answer




























                0












                0








                0







                Re-hello.



                Some more infos...



                The .bc (Bit-Code) file produced by MSElang is perfectly recognized by lli (llvm interpreter & dynamic compiler).



                See picture:
                bc file interpreted by lli



                But it I try to compile it with llc with this:



                llc /home/fred/mlctest/hellomlc.bc


                there is that error message after lot of messages:



                llc: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


                What is wrong?






                share|improve this answer















                Re-hello.



                Some more infos...



                The .bc (Bit-Code) file produced by MSElang is perfectly recognized by lli (llvm interpreter & dynamic compiler).



                See picture:
                bc file interpreted by lli



                But it I try to compile it with llc with this:



                llc /home/fred/mlctest/hellomlc.bc


                there is that error message after lot of messages:



                llc: /home/fred/mlctest/hellomlc.bc: error: input module is broken!


                What is wrong?







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Dec 30 '18 at 15:20

























                answered Dec 30 '18 at 14:56









                fredvsfredvs

                11




                11

























                    0














                    The error, whatever it is, is usually easily located by calling verifyFunction() and/or verifyModule() before writing the module. Those functions report actionable details.



                    VerifyModule() calls verifyFunction(), so you don't strictly need verifyFunction(), but you may find convenient to call verifyFunction() as soon as you have generated a function and assert that it returns false. That way you get one or a few helpful messages instead of the flood verifyModule() may give you.






                    share|improve this answer
























                    • Thanks for the tip, I will use those verify...() methods. The problem came from the debug infos. Without enabling debug info the compilation is ok.

                      – fredvs
                      Jan 5 at 17:00


















                    0














                    The error, whatever it is, is usually easily located by calling verifyFunction() and/or verifyModule() before writing the module. Those functions report actionable details.



                    VerifyModule() calls verifyFunction(), so you don't strictly need verifyFunction(), but you may find convenient to call verifyFunction() as soon as you have generated a function and assert that it returns false. That way you get one or a few helpful messages instead of the flood verifyModule() may give you.






                    share|improve this answer
























                    • Thanks for the tip, I will use those verify...() methods. The problem came from the debug infos. Without enabling debug info the compilation is ok.

                      – fredvs
                      Jan 5 at 17:00
















                    0












                    0








                    0







                    The error, whatever it is, is usually easily located by calling verifyFunction() and/or verifyModule() before writing the module. Those functions report actionable details.



                    VerifyModule() calls verifyFunction(), so you don't strictly need verifyFunction(), but you may find convenient to call verifyFunction() as soon as you have generated a function and assert that it returns false. That way you get one or a few helpful messages instead of the flood verifyModule() may give you.






                    share|improve this answer













                    The error, whatever it is, is usually easily located by calling verifyFunction() and/or verifyModule() before writing the module. Those functions report actionable details.



                    VerifyModule() calls verifyFunction(), so you don't strictly need verifyFunction(), but you may find convenient to call verifyFunction() as soon as you have generated a function and assert that it returns false. That way you get one or a few helpful messages instead of the flood verifyModule() may give you.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jan 4 at 11:42









                    arntarnt

                    5,02931728




                    5,02931728













                    • Thanks for the tip, I will use those verify...() methods. The problem came from the debug infos. Without enabling debug info the compilation is ok.

                      – fredvs
                      Jan 5 at 17:00





















                    • Thanks for the tip, I will use those verify...() methods. The problem came from the debug infos. Without enabling debug info the compilation is ok.

                      – fredvs
                      Jan 5 at 17:00



















                    Thanks for the tip, I will use those verify...() methods. The problem came from the debug infos. Without enabling debug info the compilation is ok.

                    – fredvs
                    Jan 5 at 17:00







                    Thanks for the tip, I will use those verify...() methods. The problem came from the debug infos. Without enabling debug info the compilation is ok.

                    – fredvs
                    Jan 5 at 17:00




















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53969776%2fllvm-input-module-is-broken%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Mossoró

                    Can't read property showImagePicker of undefined in react native iOS

                    Pushsharp Apns notification error: 'InvalidToken'