Menu

Build issues

2013-03-01
2013-03-04
  • David Clymer

    David Clymer - 2013-03-01

    I was able to build btier 0.9.9.9 on Debian 7.0 (Wheezy) w/customer 3.2.28 kernel, but the install failed because it was assuming that btier_setup was in the current directory rather than in cli/:

    root@zapazoid:/usr/src/btier-0.9.9.9# make
    cd kernel/btier; make
    make[1]: Entering directory `/usr/src/btier-0.9.9.9/kernel/btier'
    make -Wall -C /lib/modules/3.7.0+/build SUBDIRS=/usr/src/btier-0.9.9.9/kernel/btier M=/usr/src/btier-0.9.9.9/kernel/btier modules
    make[2]: Entering directory `/usr/src/linux-bcache'
      Building modules, stage 2.
      MODPOST 1 modules
    make[2]: Leaving directory `/usr/src/linux-bcache'
    make[1]: Leaving directory `/usr/src/btier-0.9.9.9/kernel/btier'
    gcc -O2 -D_FILE_OFFSET_BITS=64 cli/btier_setup.c -o cli/btier_setup 
    gcc -O2 tools/writetest.c -o tools/writetest
    root@zapazoid:/usr/src/btier-0.9.9.9# make install
    cd kernel/btier; make install
    make[1]: Entering directory `/usr/src/btier-0.9.9.9/kernel/btier'
    install -D -m 755 btier.ko /lib/modules/`uname -r`/kernel/drivers/block/btier.ko
    depmod -a
    make[1]: Leaving directory `/usr/src/btier-0.9.9.9/kernel/btier'
    cd ../..
    install -D -m 755 btier_setup /sbin/btier_setup
    install: cannot stat `btier_setup': No such file or directory
    make: *** [install] Error 1
    

    I was NOT able to build btier 0.9.9.9 on Debian 6.0.7 (Squeeze) w/its standard 2.6.32 kernel. Running make didn't produce any errors, but it didn't build the kernel module.

    hydra:/usr/local/src/btier-0.9.9.9# make
    cd kernel/btier; make
    make[1]: Entering directory `/usr/local/src/btier-0.9.9.9/kernel/btier'
    make -Wall -C /lib/modules/2.6.32-5-amd64/build SUBDIRS=/usr/local/src/btier-0.9.9.9/kernel/btier M=/usr/local/src/btier-0.9.9.9/kernel/btier modules
    make[2]: Entering directory `/usr/src/linux-headers-2.6.32-5-amd64'
    make[2]: Leaving directory `/usr/src/linux-headers-2.6.32-5-amd64'
    make[1]: Leaving directory `/usr/local/src/btier-0.9.9.9/kernel/btier'
    gcc -O2 -D_FILE_OFFSET_BITS=64 cli/btier_setup.c -o cli/btier_setup 
    gcc -O2 tools/writetest.c -o tools/writetest
    hydra:/usr/local/src/btier-0.9.9.9# make install
    cd kernel/btier; make install
    make[1]: Entering directory `/usr/local/src/btier-0.9.9.9/kernel/btier'
    install -D -m 755 btier.ko /lib/modules/`uname -r`/kernel/drivers/block/btier.ko
    install: cannot stat `btier.ko': No such file or directory
    make[1]: *** [install] Error 1
    make[1]: Leaving directory `/usr/local/src/btier-0.9.9.9/kernel/btier'
    make: *** [install] Error 2
    

    Both machines are using make v3.81, if that matters. Any idea what the difference may be? Does it just not work with the older kernel build system?

    -davidc

     

    Last edit: David Clymer 2013-03-01
    • Mark Ruijter

      Mark Ruijter - 2013-03-01

      Hi David,

      Comment inline.

      Op 1 mrt. 2013 om 20:57 heeft "David Clymer" vezult@users.sf.net het volgende geschreven:

      I was able to build btier 0.9.9.9 on Debian 7.0 (Wheezy) w/customer 3.2.28 kernel, but the install failed because it was assuming that btier_setup was in the current directory rather than in cli/:

      You are not the first to report this.
      I simply forgot to change this.

      root@zapazoid:/usr/src/btier-0.9.9.9# make
      cd kernel/btier; make
      make[1]: Entering directory /usr/src/btier-0.9.9.9/kernel/btier' make -Wall -C /lib/modules/3.7.0+/build SUBDIRS=/usr/src/btier-0.9.9.9/kernel/btier M=/usr/src/btier-0.9.9.9/kernel/btier modules make[2]: Entering directory/usr/src/linux-bcache'
      Building modules, stage 2.
      MODPOST 1 modules
      make[2]: Leaving directory /usr/src/linux-bcache' make[1]: Leaving directory/usr/src/btier-0.9.9.9/kernel/btier'
      gcc -O2 -D_FILE_OFFSET_BITS=64 cli/btier_setup.c -o cli/btier_setup
      gcc -O2 tools/writetest.c -o tools/writetest
      root@zapazoid:/usr/src/btier-0.9.9.9# make install
      cd kernel/btier; make install
      make[1]: Entering directory /usr/src/btier-0.9.9.9/kernel/btier' install -D -m 755 btier.ko /lib/modules/uname -r/kernel/drivers/block/btier.ko depmod -a make[1]: Leaving directory/usr/src/btier-0.9.9.9/kernel/btier'
      cd ../..
      install -D -m 755 btier_setup /sbin/btier_setup
      install: cannot stat `btier_setup': No such file or directory
      make: *** [install] Error 1
      I was NOT able to build btier 0.9.9.9 on Debian 6.0.7 (Squeeze) w/its standard 2.6.32 kernel. Running make didn't produce any errors, but it didn't build the kernel module.

      Strange, I am able to compile on Ubuntu with 2.6.32
      So it really should work with this kernel.

      It looks like the kernel sources are not installed or not used?
      Instead it uses kernel-headers?

      hydra:/usr/local/src/btier-0.9.9.9# make
      cd kernel/btier; make
      make[1]: Entering directory /usr/local/src/btier-0.9.9.9/kernel/btier' make -Wall -C /lib/modules/2.6.32-5-amd64/build SUBDIRS=/usr/local/src/btier-0.9.9.9/kernel/btier M=/usr/local/src/btier-0.9.9.9/kernel/btier modules make[2]: Entering directory/usr/src/linux-headers-2.6.32-5-amd64'
      make[2]: Leaving directory /usr/src/linux-headers-2.6.32-5-amd64' make[1]: Leaving directory/usr/local/src/btier-0.9.9.9/kernel/btier'
      gcc -O2 -D_FILE_OFFSET_BITS=64 cli/btier_setup.c -o cli/btier_setup
      gcc -O2 tools/writetest.c -o tools/writetest
      hydra:/usr/local/src/btier-0.9.9.9# make install
      cd kernel/btier; make install
      make[1]: Entering directory /usr/local/src/btier-0.9.9.9/kernel/btier' install -D -m 755 btier.ko /lib/modules/uname -r/kernel/drivers/block/btier.ko install: cannot statbtier.ko': No such file or directory
      make[1]: [install] Error 1
      make[1]: Leaving directory `/usr/local/src/btier-0.9.9.9/kernel/btier'
      make: [install] Error 2

      Both machines are using make v3.81, if that matters. Any idea what the difference may be? Does it just not work with the older kernel build system?

      -davidc

      Build issues

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/tier/discussion/general/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/prefs/

       
  • David Clymer

    David Clymer - 2013-03-02

    Right. linux-headers-* are installed, but the sources are not. In fact, installing linux-source-* does not allow the sources to build.

    Is there some reason linux-headers would be insufficient?

     

    Last edit: David Clymer 2013-03-02
    • David Clymer

      David Clymer - 2013-03-02

      The changes below allow btier to build properly for me on debian 6.0.7. This also includes fixes for the install, so that btier_setup is copied properly, and the btier_setup man page is viewable by anyone:

      diff -u btier-0.9.9.9/Makefile btier-0.9.9.9-mod//Makefile
      --- btier-0.9.9.9/Makefile      2013-03-02 13:13:39.000000000 -0500
      +++ btier-0.9.9.9-mod//Makefile 2013-03-02 13:13:54.000000000 -0500
      @@ -10,6 +10,7 @@
      
       default:
              cd kernel/btier; make
      +       $(MAKE) -C $(KDIR) M=$(PWD)/kernel/btier modules
              $(CC) -D_FILE_OFFSET_BITS=64 cli/btier_setup.c -o cli/btier_setup 
              $(CC) tools/writetest.c -o tools/writetest
       clionly:
      @@ -31,10 +32,10 @@
       install:
              cd kernel/btier; make install
              cd ../..
      -       install -D -m 755 btier_setup $(DEST)/sbin/btier_setup
      +       install -D -m 755 cli/btier_setup $(DEST)/sbin/btier_setup
              install -D -m 755 rc/btier $(DEST)/etc/init.d/btier
              install -D -m 600 rc/bttab $(DEST)/etc/bttab
      -       install -D -m 600 man/btier_setup.1 $(DEST)/usr/share/man/man1/btier_setup.1
      +       install -D -m 644 man/btier_setup.1 $(DEST)/usr/share/man/man1/btier_setup.1
       uninstall:
              rm /sbin/btier_setup
              cd kernel/btier; make uninstall
      
       

      Last edit: David Clymer 2013-03-02
      • Mark Ruijter

        Mark Ruijter - 2013-03-03

        Hi David,

        Thanks for the patch.
        Can you confirm the the attached code works/builds on all your systems?

        Thanks in advance,

        Mark

        On 03/02/2013 05:55 AM, David Clymer wrote:

        The following changes allows btier to build properly for me on debian
        6.0.7:

        diff -u btier-0.9.9.9/Makefile btier-0.9.9.9-mod//Makefile
        --- btier-0.9.9.9/Makefile 2013-02-27 06:31:28.000000000 -0500
        +++ btier-0.9.9.9-mod//Makefile 2013-03-01 23:49:20.000000000 -0500
        @@ -10,6 +10,7 @@

        default:
        cd kernel/btier; make
        + $(MAKE) -C $(KDIR) M=$(PWD)/kernel/btier modules
        $(CC) -D_FILE_OFFSET_BITS=64 cli/btier_setup.c -o cli/btier_setup
        $(CC) tools/writetest.c -o tools/writetest
        clionly:
        @@ -31,7 +32,7 @@
        install:
        cd kernel/btier; make install
        cd ../..
        - install -D -m 755 btier_setup $(DEST)/sbin/btier_setup
        + install -D -m 755 cli/btier_setup $(DEST)/sbin/btier_setup
        install -D -m 755 rc/btier $(DEST)/etc/init.d/btier
        install -D -m 600 rc/bttab $(DEST)/etc/bttab
        install -D -m 600 man/btier_setup.1 $(DEST)/usr/share/man/man1/btier_setup.1


        Build issues
        https://sourceforge.net/p/tier/discussion/general/thread/2cfecb24/?limit=25#d232/1d8b


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/tier/discussion/general/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/prefs/

         
        • David Clymer

          David Clymer - 2013-03-04

          Apparently my reply didn't make it to the list, so here it is again:

          Yes. This patch allows me to successfully build and install btier 0.9.9.9 on Debian versions 6.0.7 (default kernel 2.6.32-5-amd64 w/kernel-headers), and Debian 7.0 using a custom 3.2 kernel & source, as well as with the standard 3.2.0-4-amd64 kernel (w/ kernel-headers).

          I'm actually using btier on Debian 6.0.7, but on the other two systems I have only built and installed it.

          The patch I've used in each case is:

          --- btier-0.9.9.9/Makefile  2013-02-27 06:31:28.000000000 -0500
          +++ btier-0.9.9.9-mod/Makefile  2013-03-03 15:17:29.456759234 -0500
          @@ -10,6 +10,7 @@
          
           default:
            cd kernel/btier; make
          + $(MAKE) -C $(KDIR) M=$(PWD)/kernel/btier modules
            $(CC) -D_FILE_OFFSET_BITS=64 cli/btier_setup.c -o cli/btier_setup 
            $(CC) tools/writetest.c -o tools/writetest
           clionly:
          @@ -31,10 +32,10 @@
           install:
            cd kernel/btier; make install
            cd ../..
          - install -D -m 755 btier_setup $(DEST)/sbin/btier_setup
          + install -D -m 755 cli/btier_setup $(DEST)/sbin/btier_setup
            install -D -m 755 rc/btier $(DEST)/etc/init.d/btier
            install -D -m 600 rc/bttab $(DEST)/etc/bttab
          - install -D -m 600 man/btier_setup.1 $(DEST)/usr/share/man/man1/btier_setup.1
          + install -D -m 644 man/btier_setup.1 $(DEST)/usr/share/man/man1/btier_setup.1
           uninstall:
            rm /sbin/btier_setup
            cd kernel/btier; make uninstall
          

          This includes changes to successfully install btier_setup, and to ensure that the btier_setup man page can be read by any user.

          -davidc

           

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.