1 2 Previous Next 17 Replies Latest reply on Oct 27, 2011 9:00 AM by radudavid

    Installing programs on the scc cores running linux

    radudavid

      Hello,

       

      I was trying to run a linux application (strace) on one of the scc cores after booting linux, but I am not sure how to install it. There is no package manager and I couldn't install one, since I couldn't run make. And to obtain make, I would need a packet manager. It seems to be a chicken and egg problem.

      I was wondering if anyone else tried to run other linux programs on the cores, or if there are any suggestion as to how to go about this.

       

      Thanks,

       

      Radu

        • 1. Re: Installing programs on the scc cores running linux
          tedk

          SCC Linux is not a persistent system. What I mean by that is that if you install a utility on the cores, then the next time you boot SCC Linux, that utility is no longer there.

           

          So what people usually do is make the utility part of the Linux build itself. They build a custom SCC Linux.

           

          Alternatively, you can build strace on your MCPC using the cross compilers. Then copy it onto the cores, knowing that you have to recopy it when you reboot the cores.

          • 2. Re: Installing programs on the scc cores running linux
            radudavid

            Thanks for the reply Ted, that makes sense. I knew I would have to reinstall it everytime I would reboot Linux, but couldn't think of anyway to get it to run. I will try to build it on the MCPC using the crosscompilers, since that seems the easiest way to go.

            • 3. Re: Installing programs on the scc cores running linux
              mwvantol

              Actually if you use the new Buildroot way of building your own SCC Linux distribution  (also see: http://communities.intel.com/thread/24988 ), then you can select strace to be built into it. After running configure and the "make sccDemo_defconfig" command, run "make menuconfig", go to "Package Selection for the target", then to "Debugging, profiling and benchmark", and then select strace there. Exit and save the configuration, then proceed to build normally as described in the referred post.

              • 4. Re: Installing programs on the scc cores running linux
                tedk

                Thanks, Michiel. That'll work for other utilities as well. The buildroot environment was new to me but it is a big step upward ... as long as kernel.org stays up. I think the variablility I see in the build time may be due to downloads peeds and connectivity. My bulds are between 90 min and 6 hours.

                • 5. Re: Installing programs on the scc cores running linux
                  radudavid

                  Hi Michiel,

                   

                  Thanks for your suggestion, I tried to do that, but got stuck when trying to run "make menuconfig", with the following error:

                   

                  *** Unable to find the ncurses libraries or the
                  *** required header files.
                  *** 'make menuconfig' requires the ncurses libraries.
                  ***
                  *** Install ncurses (ncurses-devel) and try again.
                  ***

                   

                  I am trying to do this on an MCPC (marc009). I am not sure if that is an error on my end, or I need a new package installed.

                  • 6. Re: Installing programs on the scc cores running linux
                    tedk

                    I can bring up the menu without a problem but my MCPC does have ncurses. I attached a PDF with some screenshots. It shows the MCPC Ubuntu Package Manager with ncurses installed ... actually called libncursesw5-dev.

                     

                    I got the menu by

                     

                    svn co http://marcbug.scc-dc.com/svn/repository/trunk/sccLinux/
                    cd sccLinux/
                    ./configure.sh
                    cd buildroot-2011.05
                    make sccDemo_defconfig
                    make menuconfig

                    Then when the menu comes up choose "Package selection for target" ==> "Debugging, profiling, and benchmark"

                    The select strace.

                    • 7. Re: Installing programs on the scc cores running linux
                      tedk

                      Actually to be complete .... from the build doc.

                      Your MCPC must contain the packages: bison, flex, texinfo, libncurses5-dev,  libncursesw5-dev, intltool, and gpm libXt-dev

                      If your MCPC doesn't have those and you work on a data center machine, please file a "Marc Administration Needed" Bug

                      • 8. Re: Installing programs on the scc cores running linux
                        mwvantol

                        radudavid wrote:

                         

                        Hi Michiel,

                         

                        Thanks for your suggestion, I tried to do that, but got stuck when trying to run "make menuconfig", with the following error:

                         

                         

                        *** Unable to find the ncurses libraries or the
                        *** required header files.
                        *** 'make menuconfig' requires the ncurses libraries.
                        ***
                        *** Install ncurses (ncurses-devel) and try again.
                        ***

                         

                         

                        I am trying to do this on an MCPC (marc009). I am not sure if that is an error on my end, or I need a new package installed.

                         

                        The development files for the Ncurses library (needed to compile/run the menuconfig program) are missing. The correct package needs to be installed on your MCPC, it is called "libncurses5-dev". I suppose Intel has to install this for you on datacenter machines? Otherwise you could do something like "sudo apt-get install libncurses5-dev" if you have the rights to do it yourself.

                        • 9. Re: Installing programs on the scc cores running linux
                          darence

                          radudavid wrote:

                           

                          Hi Michiel,

                           

                          Thanks for your suggestion, I tried to do that, but got stuck when trying to run "make menuconfig", with the following error:

                           

                           

                          *** Unable to find the ncurses libraries or the
                          *** required header files.
                          *** 'make menuconfig' requires the ncurses libraries.
                          ***
                          *** Install ncurses (ncurses-devel) and try again.
                          ***

                           

                          I am trying to do this on an MCPC (marc009). I am not sure if that is an error on my end, or I need a new package installed.

                           

                          I am facing the same problem now, although the corresponding library has been installed. Any known solutions?

                          • 10. Re: Installing programs on the scc cores running linux
                            mwvantol

                            darence wrote:

                             

                            I am facing the same problem now, although the corresponding library has been installed. Any known solutions?

                             

                            This is while you go through all the steps, i.e. you run "make sccDemo_defconfig" first, and the after that the "make menuconfig" fails? It sounds to me as if it is looking for the library in the wrong place, i.e. in the cross-compile environment instead of the host system. Do you have your paths set for the SCC version of gcc?

                            • 11. Re: Installing programs on the scc cores running linux
                              mwvantol

                              Michiel van Tol wrote:

                               

                              darence wrote:

                               

                              I am facing the same problem now, although the corresponding library has been installed. Any known solutions?

                               

                              This is while you go through all the steps, i.e. you run "make sccDemo_defconfig" first, and the after that the "make menuconfig" fails? It sounds to me as if it is looking for the library in the wrong place, i.e. in the cross-compile environment instead of the host system. Do you have your paths set for the SCC version of gcc?

                               

                              I just run a quick test, and indeed this is probably the case. When the cross compilation GCC or ICC are in your paths, ($PATH and $LD_LIBRARY_PATH variables), then the build can not find libncurses indeed. However, when you remove them, i.e. do;

                               

                              # export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

                              # export LD_LIBRARY_PATH=

                               

                              Then your build should work and you should be presented the menuconfig screen.

                              • 12. Re: Installing programs on the scc cores running linux
                                darence
                                I just run a quick test, and indeed this is probably the case. When the cross compilation GCC or ICC are in your paths, ($PATH and $LD_LIBRARY_PATH variables), then the build can not find libncurses indeed. However, when you remove them, i.e. do;

                                 

                                # export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

                                # export LD_LIBRARY_PATH=

                                 

                                Then your build should work and you should be presented the menuconfig screen.

                                 

                                True, that works. I had removed LD_LIBRARY_PATH, but PATH still contained some cross-compiler paths. Thanks a million!

                                • 13. Re: Installing programs on the scc cores running linux
                                  radudavid

                                  Hi Michiel,

                                   

                                  So with Ted's help I managed to get all the packages installed and was able to run "make menuconfig" and even start the Linux build. However I got stuck again, this time with this error during the build:

                                  [INFO ]  Performing some trivial sanity checks

                                  [INFO ]  Build started 20111025.154845
                                  [INFO ]  Building environment variables
                                  [INFO ]  =================================================================
                                  [INFO ]  Retrieving needed toolchain components' tarballs
                                  [ERROR]    Could not retrieve 'gdb-7.2'.
                                  [06:41] / make[2]: *** [build] Error 1
                                  make[1]: *** [build.4] Error 2
                                  make: *** [/home/radud/sccLinux_1025/sccLinux/buildroot-2011.05/output/stamps/ct-ng-toolchain-built] Error 2

                                   

                                  I tried to do this on the MCPC and just to make sure I installed all the packages on my Ubuntu machine, did all the steps and got to the same error. I'm hoping someone here has an idea about this, I couldn't find any info online, and I am not sure if I am doing something wrong.

                                   

                                  Thanks a lot.

                                  • 14. Re: Installing programs on the scc cores running linux
                                    tedk

                                    Ah yes, the old gdb problem. The GNU folks renamed the file and our build script uses the old name. One way to fix this is to chose with the menu not to build gdb. This is what I think Michiel does. Another way is just to grab the old gdb from a previous build (I saved a copy in http://marcbug.scc-dc.com/svn/repository/tarballs/sccLinux/ Then, put it in buildroot-2011.05/dl just before you issue the make.

                                    1 2 Previous Next