11 Replies Latest reply on Nov 8, 2014 8:47 AM by AlexT_Intel

    Failure to make linux-yocto

    faceplant

      I've been able to build the entire Edison distribution on an Ubuntu 14.04 64 bit machine with no problem, but I'm having problems building it on a Linux Mint 17 machine.  The Min distribution is based on Ubuntu 14.04, so they should be very similar, but on the Mint machine the build fails when building the kernel.

       

      The error is:

       

      Log data follows:

      | DEBUG: Executing shell function do_compile

      | + cd /projects/Edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux-edison-standard-build

      | + do_compile

      | + kernel_do_compile

      | + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE

      | + [  =  ]

      | + [  !=

      |  ]

      | + oe_runmake bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + oe_runmake_call bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + bbnote make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + echo NOTE: make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | NOTE: make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      |

      | make: *** No rule to make target `bzImage'.  Stop.

      |

      | + cd /projects/Edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/linux-edison-standard-build

      | + do_compile

      | + kernel_do_compile

      | + unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE

      | + [  =  ]

      | + [  !=  ]

      | + oe_runmake bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + oe_runmake_call bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + bbnote make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + echo NOTE: make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | NOTE: make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | + make -j 1 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd

      | make: *** No rule to make target `bzImage'.  Stop.

      | ERROR: Function failed: do_compile (log file is located at /projects/Edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17+gitAUTOINC+6ad20f049a_c03195ed6e-r0/temp/log.do_compile.4672)

       

      If i look in the build directory directory that it's running make in, only a .config file exists.  I've run the build through the configure step on both machines, and both machines only have a .config in the directory.  Obviously something is not happening correctly on the Mint machine at the start of the compile step, but I can't see what it could be.  The log outputs look identical up until the error.

       

      There's alot of magic that I don't understand in the Yocto builds, so if someone could just point me to the script that is being run to compile the kernel it would be a great help.

        • 1. Re: Failure to make linux-yocto
          DiegoV_Intel

          Hi faceplant,

           

          I'll suggest you to check this thread: BSP Building Error. There the users are discussing about building the Linux image on Ubuntu 14.04 so it might be interesting for you.

           

          Regards,

          Diego.

          • 2. Re: Failure to make linux-yocto
            faceplant

            Thanks.  I did see that thread, but they're seeing different errors.  I would really like to figure out what the problem is rather than just build a VM, but, like I said, there's alot of "magic" happening in the build, and I can even find the script that being executed when the error happens.  I'm fairly confident that I should be able to actually fix the problem if I could just find the script that's failing.

            • 3. Re: Failure to make linux-yocto
              AlexT_Intel

              There's not a single script here, to be honest. Bitbake runs a set of Python subroutines, which interact with recipes and classes and build the end product (to make it very short and oversimplified ).

               

              You can run bitbake with "-v" and "-D" parameters to get much more stuff on the console, or you can try to run the stages manually to see what's going on.

               

              The most interestng would probably be

              bitbake virtual/kernel -c kernel_configure

              which should result in a fully unpacked, patched and configured for building sources and

              bitbake virtual/kernel -c compile

              which should compile it

               

              and you can check it out manually at the probably the lowest level by going into the devshell

              bitbake virtual/kernel -c devshell

              this one only unpacks and patches the sources, then sets all relevant environment variables and the drops you into the shell with all that set. You can e.g. run "make menuconfig" there should you want to, or "make bzimage".

               

              Try some of these and let's see if you have more clues.

               

              But I'd really just run it on the recommended Ubuntu 12.04 or Debian Wheezy to be honest If you have where to run them, that is.

              • 4. Re: Failure to make linux-yocto
                faceplant

                Thanks for the suggestion.  I haven't tried the -D option.  I'll see if that gives me more of a clue.

                 

                I believe I tried stepping through it as you suggested.  On both the machine that it works on and the machine that it doesn't work on, when I get through the configure step there is just a .config file in the build directory and no Makefile.  Running the compile step somehow produces the Makefile on one machine and not the other, so there's something happening that doesn't appear to be showing up in the logs.

                 

                I will try the devshell idea.  Maybe there's an environment variable that is making the difference and it'll be obvious from the shell.

                 

                As for running on a recommended OS.  I can get it to compile on my server, but that doesn't do me much good if I want to develop on my laptop, and I don't have enough disk space (or likely memory) on the laptop for a VM plus the entire build tree.  I really don't like working that way anyway, and I think this is probably something simple, and I just need to find it.

                • 5. Re: Failure to make linux-yocto
                  faceplant

                  Thanks to your suggestion I'm getting a bit farther.  It turns out that there is a 'cd' missing in the build script.  Unfortunately it is in a temporary file that's somehow created from a bitbake class file that somehow is created by (I assume) the setup.sh script.

                   

                  The file is that the temporary file is created from is: edison-src/poky/meta/classes/kernel.bbclass, which is not in one of the directories in the original tarball.

                   

                  Now I need to figure out how that file is created.  This is a VERY convoluted build system!  It's no wonder it only works on a very limited set of distributions.

                  • 6. Re: Failure to make linux-yocto
                    AlexT_Intel

                    poky dir is just unpacked from a tarball, which is a part of that file you get from the Downloads section, AFAIR. You can double-check by looking at the setup.sh.

                    • 7. Re: Failure to make linux-yocto
                      faceplant

                      I dd get it built by copying the source from the working machine.  The setup.sh script appears to do a bit more that just untar into the poky directory.  At the very least it looks like there's some git patching going on, which might be the problem, but I haven't looked into it any further.

                      • 8. Re: Failure to make linux-yocto
                        Intel_Alvarado

                        Were the previous suggestions helpful? If you still need assistance please reply with your questions.

                        Regards

                        Sergio

                        • 9. Re: Failure to make linux-yocto
                          jku

                          faceplant, could you document how you fixed this? I'm now seeing this on Debian.

                           

                          As a comment on Alexs suggestions, doing "make -j 4 bzImage CC=i586-poky-linux-gcc  LD=i586-poky-linux-ld.bfd" in the devshell works just fine... After this bitbake can continue but of course this is just a bandaid.

                          • 10. Re: Failure to make linux-yocto
                            faceplant

                            Unfortunately, I didn't fix it, I just worked around it.  As I stated earlier, it appears to be an issues on the setup.sh script.  It appears that the kernel source directory isn't getting create correctly.

                             

                            To "fix" it, I just copied the source directory (after running setup.sh) from the machine where it worked to the machine where it didn't work.  This was acceptable to be because I just needed to build on the other machine.  I didn't care if I had to unpack and configure the software on another machine.

                            • 11. Re: Failure to make linux-yocto
                              AlexT_Intel

                              faceplant jku

                               

                              If one of you (or better both) could post the logs referenced in error messages, that may help troubleshooting this.

                               

                              Do you get a warning regarding your distor not validated wher you start bitbaking? What exact OS versions do you have (distro,version, 32 vs 64 bit)?

                              faceplant, you have Mint 17 according to your first post, right? jku, which Debian do you have?

                               

                              And just to add, such errors typically appear when you use one of the distros that Yocto project hasn't validated or when you have newer/older versions of those many building tools bitbake uses behind the scenes (git, wget, tar, the whole autotools chain and so on) on the validated distro and these tools don't behave the recipes expect them to. Sometimes it's easy to fix such problems, sometimes it's just not worth it due to one thing leading to another and taking much more resources than just finding a way to use one of the supported distros.