Re: Compiling Sane Now Infuriating

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Fri Jan 12 2001 - 10:47:14 PST

  • Next message: Plamen Neykov: "AGFA SnapScan e50"

    Hi,

    On Fri, Jan 12, 2001 at 08:44:22AM -0800, Jeffrey W. Baker wrote:
    > Is it actually possible to compile sane?

    Yes, lots of people do it every day. It compiles fine on my Debian 2.2
    and my SuSE 6.something (with lots of local changes), FreeBSD 4.1, AIX
    4, Solaris and Irix (at least).

    > I downloaded both parts of the
    > 1.0.4 package. I tried to build the backends, but sanei_scsi.c has some
    > preprocessor horkage by which it includes /usr/include/scsi/sg.h and
    > /usr/include/linux/../scsi/sg.h,

    Im not an expert in these things so I'm just guessing:

    sanei_scsi.c includes <scsi/sg.h> (if available) and "linux_sg3_err.h" which
    includes <linux/../scsi/sg.h>.

    > which are clearly the same file and gcc
    > gets pissed off by redefinition.

    If they were the same file there wouldn't be a redefinition because of
    the

    #ifndef _SCSI_SG_H
    #define _SCSI_SG_H 1

    in the header. I guess that you have a link from /usr/include/linux to
    /usr/src/linux/include so <scsi/sg.h> is included from
    /usr/include/scsi and <linux/../scsi/sg.h> is included from
    /usr/src/linux/include/scsi. As the latter file has the following macro:

    #ifndef _SCSI_GENERIC_H
    #define _SCSI_GENERIC_H

    both will be included. I don't have this link so the problem hasn't ocurred for
    me. Maybe someone else can point to a solution (if I'm right)?

    > After I fixed this problem (not the
    > right way, I'm sure, but by hard-coding #include <scsi/sg.h>), the package
    > compiled and installed.

    Did you install it in the default location (/usr/local/)?

    > Then I turned to the frontends. They won't even configure, because they
    > can't detect the sane installation. The test program fails because it
    > doesn't understand sane_major_version.

    That's a bug but it's not the source of your problem. The test for
    sane_major_version is done to check why the test program couldn't be
    linked to sane. So there is probably a program with linking to the
    SANE libs in your case.

    sane-config is found but the test for SANE >= 1.0.0 fails?

    Could you please send the output of "sane-config --version" and
    "sane-config --cflags"? Also look for "sane-config" in config.log and
    send all lines up to the end including this line. Did you look at
    INSTALL (concerning libs in /usr/local/lib)?

    > So the bottom line is that I cannot compile sane release 1.0.4 on this
    > system at all. Did I miss a magic step, or should I try the CVS version
    > instead?

    At least the last bug is fixed in CVS but as I said it's not the
    problem.

    Bye,
      Henning

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Fri Jan 12 2001 - 11:55:57 PST