Announcement

Collapse
No announcement yet.

Help installing from source

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help installing from source

    Hi,
    the very nice people at sane-devl have written a new cannon backend and have asked if I will test it and send them the debug log but to do this I will have to install from source over writing the existing canon.c file and compiling. Iv followed the link for compiling from source in the Kubuntu documentation and ended up at-
    https://help.ubuntu.com/community/CompilingSoftware
    but it leaves me with more questions than it answered (most probably stupid ones).
    1. where should I untar it to.
    2. Should I use the normal Kubutu directory structure ie. ect/sane.d or the default sane structure ie. /usr/local/ect/sane.d and will configure let me do this
    3. With a default install with Kubunu there are two directory's created ect/sane.d and usr/share/sane/gt68xx(were the firmware file for my other scanner is located) will the install process create these or should I create them in advance.
    4. Is it possible to just compile the canon.c file he has sent me and simply overwrite the existing canon backend.
    As you may all have guessed by now I am looking for a little hand holding for this as I am new to Linux. While trawling for information I came across apt-build, this would appear to simplyfie the process but I think that in the case it would not work as I need to alter the source code?
    I intend using checkinstall for the installation at least then when it all goes to hell I hopefully can undo the damage.
    I would really like to help sane out with this as they have been so helpfull with a bug work round for the existing backend.

    Thanks in advance John


    #2
    Re: Help installing from source

    Hi,

    Ok, source compiling is easy. First off download your source to your desktop, right-click and select extract here. Then go to your favorite terminal and type:

    Code:
    sudo apt-get install build-essential
    to get a decent supply of devel tools and libs. Next type:
    Code:
    cd /home/yourdir/yourfilesdir
    replacinging yourdir/yourfilesdir with your own info. Next look for a configure file. If there is a configure file, you can type:
    Code:
    sudo ./configure --help
    and you can see various options for you to compile your source with. If there is no configure file, you can look for a shell script. For example, if I'm compiling the program Azureus from source, there is no configure file...there is however a shell script called Azureus. Therefore I'm going to type:
    Code:
    sudo ./Azureus
    instead. After this stage, you will then be notified if you are missing any devel tools or libs. If you are, you can either use Adept or apt-get to download the files you need, then try ./whatever to recheck the dependencies. After that, you will get the blessing of the linux gods to use "make" To do this you'll type:
    Code:
    sudo make install
    and sit back and relax. It may take awhile depending on the source code and the specs of your box.

    Thats about as much as I know about source compiling. I hope someone else will add on to this.

    Will

    Comment


      #3
      Re: Help installing from source

      Hi Will,
      thanks for your reply. I doubt that I will get a chance to try it tonight but with any luck I should be able to tomorrow.

      Regards John

      Comment


        #4
        Re: Help installing from source

        Hi again,
        by default SANE installs its library's to //usr/local/lib/ and its configuration files in //usr/local/ect/sane.d.
        Kubuntu installs the library's to //usr/lib64/sane and its configuration files to //ect/sane.d.
        When I get to make would it be wiser to stick to configuring as the sane default or as Kubuntu.

        Sorry if this is a daft question but this is the first time I have tried installing from source.

        Regards and thanks John

        Comment


          #5
          Re: Help installing from source

          Personally, I'd install it to the same place as Kubuntu, you won't have to worry about config so much, and if it really does break things you just have to re-install the packaged files over the top again. Nothing worse than having a bad 'make unistall' and spending ages purging the thing from the system (well maybe an errant rm -rf * command )

          Comment


            #6
            Re: Help installing from source

            Hi thanks Teppic,
            sorry to be a pain but I am a bit of a novice with Linux and I am not sure that Iv got this correct, Below is an edited copy of the read out from --help,
            from this if I type

            sudo .configure --prefix=ect --exec-prefix=usr/lib64

            Should this give me the same file lay out as Kubuntu?
            I intend to use checkinstall for the install to try and uninstall if it all go's wrong if that fails I just reinstall Kubuntu.
            Also I have unistalled SANE using Adept but both directory's are still there with all the files should I just delete them manually.

            Thanks again John

            Usage: ./configure [OPTION]... [VAR=VALUE]...

            To assign environment variables (e.g., CC, CFLAGS...), specify them as
            VAR=VALUE.  See below for descriptions of some of the useful variables.



            Installation directories:
              --prefix=PREFIX         install architecture-independent files in PREFIX
                                      [/usr/local]
              --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
                                      [PREFIX]

            By default, `make install' will install all the files in
            `/usr/local/bin', `/usr/local/lib' etc.  You can specify
            an installation prefix other than `/usr/local' using `--prefix',
            for instance `--prefix=$HOME'.

            For better control, use the options below.

            Fine tuning of the installation directories:
              --bindir=DIR           user executables [EPREFIX/bin]
              --sbindir=DIR          system admin executables [EPREFIX/sbin]
              --libexecdir=DIR       program executables [EPREFIX/libexec]
              --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
              --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
              --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
              --libdir=DIR           object code libraries [EPREFIX/lib]
              --includedir=DIR       C header files [PREFIX/include]
              --oldincludedir=DIR    C header files for non-gcc [/usr/include]
              --datarootdir=DIR      read-only arch.-independent data root [PREFIX/share]
              --datadir=DIR          read-only architecture-independent data [DATAROOTDIR]
              --infodir=DIR          info documentation [DATAROOTDIR/info]
              --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
              --mandir=DIR           man documentation [DATAROOTDIR/man]
              --docdir=DIR           documentation root [DATAROOTDIR/doc/sane-backends]
              --htmldir=DIR          html documentation [DOCDIR]
              --dvidir=DIR           dvi documentation [DOCDIR]
              --pdfdir=DIR           pdf documentation [DOCDIR]
              --psdir=DIR            ps documentation [DOCDIR]

            Comment


              #7
              Re: Help installing from source

              Right, erm... --prefix=/usr will kill of the use of /usr/local (ie back to 'normal' behaviour) but from the readout you need to loose the /usr off of the 'sysconfdir' so --sysconfdir=/etc will do that, or you'll end up with a /usr/etc directory, recap
              Code:
              ./configure --prefix=/usr --sysconfdir=/etc --execprefix=/usr/lib64
              You may find that the --execprefix is redundant, but as I don't run Kubuntu on X86_64 I can't tell you if /usr/lib and /usr/lib64 are symlinked or not, they are on this system, this is what is looks like
              Code:
              ls -l /usr|grep lib
              lrwxrwxrwx   1 root    root         5 Jun 23 21:45 lib -> lib64
              drwxr-xr-x  12 root    root      2080 Aug 31 10:56 lib32
              drwxr-xr-x 140 root    root    100968 Aug 31 15:55 lib64

              Comment


                #8
                Re: Help installing from source

                Hello,
                no questions just to say thanks again you have been so much help.

                Regards John,

                Comment


                  #9
                  Re: Help installing from source

                  ARGHH the agony continues. The config went so well, but as for the checkinstall well below is the OP from the consul.

                  john@theredqueen:~/sane-backends-1.0.18$


                  *****************************************
                  **** Debian package creation selected ***
                  *****************************************

                  This package will be built according to these values:

                  0 - Maintainer: [ root@theredqueen ]
                  1 - Summary: [ sane ]
                  2 - Name: [ sane-backends ]
                  3 - Version: [ 1.0.18 ]
                  4 - Release: [ 1 ]
                  5 - License: [ GPL ]
                  6 - Group: [ checkinstall ]
                  7 - Architecture: [ amd64 ]
                  8 - Source location: [ sane-backends-1.0.18 ]
                  9 - Alternate source location: [ ]
                  10 - Requires: [ ]

                  Enter a number to change any of them or press ENTER to continue:

                  Installing with make install...

                  ========================= Installation results ===========================
                  making install in include
                  make[1]: Entering directory `/home/john/sane-backends-1.0.18/include'
                  ../mkinstalldirs /usr/include/sane
                  mkdir /usr/include/sane
                  installing sane/sane.h in /usr/include/sane/sane.h...
                  /usr/bin/install: setting permissions for `/usr/include/sane/sane.h': No such file or directory
                  installing sane/saneopts.h in /usr/include/sane/saneopts.h...
                  /usr/bin/install: setting permissions for `/usr/include/sane/saneopts.h': No such file or directory
                  make[1]: Leaving directory `/home/john/sane-backends-1.0.18/include'
                  making install in lib
                  make[1]: Entering directory `/home/john/sane-backends-1.0.18/lib'
                  make[1]: Nothing to be done for `install'.
                  make[1]: Leaving directory `/home/john/sane-backends-1.0.18/lib'
                  making install in sanei
                  make[1]: Entering directory `/home/john/sane-backends-1.0.18/sanei'
                  make[1]: Nothing to be done for `install'.
                  make[1]: Leaving directory `/home/john/sane-backends-1.0.18/sanei'
                  making install in backend
                  make[1]: Entering directory `/home/john/sane-backends-1.0.18/backend'
                  ../mkinstalldirs /usr/lib /usr/lib/sane /etc/sane.d
                  mkdir /usr/lib/sane
                  mkdir /etc/sane.d
                  installing libsane-abaton.la in /usr/lib/sane/libsane-abaton.la...
                  libtool: install: `libsane-abaton.la' is not a valid libtool archive
                  Try `libtool --help --mode=install' for more information.
                  make[1]: *** [install-be] Error 1
                  make[1]: Leaving directory `/home/john/sane-backends-1.0.18/backend'
                  make: *** [install-recursive] Error 1

                  **** Installation failed. Aborting package creation.

                  Cleaning up...OK

                  Bye.

                  From the above I tried running libtool --help --mode=install the OP is below.

                  john@theredqueen:~/sane-backends-1.0.18$ libtool --help --mode=install
                  Usage: libtool [OPTION]... --mode=install INSTALL-COMMAND...

                  Install executables or libraries.

                  INSTALL-COMMAND is the installation command. The first component should be
                  either the `install' or `cp' program.

                  The rest of the components are interpreted as arguments to that command (only
                  BSD-compatible install options are recognized).

                  I'm stuck at this point and would understand if you feel that you can offer no more support. This must be a real pain trying to guide a novice through this. Any help would however be most welcome.

                  Regards John


                  Comment


                    #10
                    Re: Help installing from source

                    Hiya,

                    Is the latest version of libtool installed?
                    Code:
                    sudo apt-get install libtool
                    then rerun checkinstall then make.

                    Worth a shot, libtool contains thes packages too: libtool-doc g77 fortran77-compiler gcj libltdl3-dev



                    Will

                    Comment


                      #11
                      Re: Help installing from source

                      Hi Will I installed the version that is in the Dapper 64bit repros but just prior to posting this reply Adept updater just updated quite a few lib files so tomorrow I will run apt-get install, just to make sure cross my fingers and hope that we are on a winner.

                      Thanks for all this assistance everybody regards John

                      Comment


                        #12
                        Re: Help installing from source

                        Hi again all tried Will's suggestion but I still get the same error mesage.

                        Thanks again everyone any suggestions still welcome John

                        Comment

                        Working...
                        X