Re: Compiling on OS/2

From: Franz Bakan (fbakan@gmx.net)
Date: Wed May 30 2001 - 16:54:57 PDT

  • Next message: Mick Barry: "Re: Compiling on OS/2"

    Hi,
    thanks for responding

    On Wed, 30 May 2001 22:52:22 +0200, Henning Meier-Geinitz wrote:

    >> there are some problems:
    >>
    >> 1. sane-backends/sanei/sanei_scsi.c
    >>
    >> I get an error in sane-backends\sanei\sanei_scsi.c
    >>
    >> sanei_scsi.c:line: initializer element for `param[0].u' is not
    >> computable at load time
    >
    >At which line is this error? I would think it's on 2432-2439,

    no its at line 3369ff
    btw. in version 1.03 (line 2133) these variables were static.
    (So I got the idea to make them static to get it compiled and
    it worked)

    >So I just don't understand this. By the way: Does it work if you use
    >"configure --disable-warnigs"? The warnings will be disabled for
    >release.
    I did not try, I will try when I have time.
    It's not a warning, it's an error.
    does --disable-warnings change what is treated as error?

    >
    >> 2. sane/sane-backends/backend/qcam.c
    >>
    >> I have to change
    >>
    >> struct flock sfl;
    >>
    >> to
    >>
    >> struct
    >> { off_t l_start;
    >> off_t l_len;
    >> pid_t l_pid;
    >> short l_type;
    >> short l_whence;
    >> } sfl;
    >
    >Could you check if this struct is defined in any of your system
    >headers? If it isn't, we can probably do some kind of configure magic
    >to define it if it isn't.

    No it's not defined in the system-headers /emx/include/...

    >
    >> 3. in sane/sane-backends/lib/*.c
    >>
    >> I have to change
    >> #include "config.h"
    >> to
    >> #include <config.h>
    >
    >In principle, this should work with "config.h" because the include
    >dirs are -I$(top_builddir)/include/sane -I$(top_srcdir)/include and
    >config.h is in include/sane. Could you have a look into the Makefile
    >and check, if these entries are the same (INCLUDES)?
    >
    >But usually we use "../include/sane/config.h" or at least
    >"sane/config.h". I don't know why it doesn't work for you and why it
    >does with <config.h>.

    I think it should be "../include/sane/config.h"
    I think <config.h> is searched in the include-path
    and "config.h" is treated as absolute path

    >
    >If nobody objects, I will change this in CVS. David left out lib/
    >when he changed config.h to sane/config.h but I don' know, why.
    >
    >> Perhaps these problems could be solved in the sources.
    >
    >We will try.
    >
    >Some questions: Did you compile sane-backends without any other
    >changes than mentioned above just by using ./configure ; make ; make
    >install? Whic version of OS/2 and which compiler + version are you
    >using? SANE is statically linked to scanimage? Is it possible to use
    >the X frontends xscanimage and xcam?

    Additionally I had to add
    #define HAVE_VSYSLOG
    to config.h

    I did not use ./configure but a tool called os2unix.cmd
    version 1.5 by Jun SAWATAISHI <jsawa@attglobal.net>
    which is available from
    http://www2s.biglobe.ne.jp/~vtgf3mpr/indxos2.htm

    After this I had to change the makefiles.
    I had to change
    sh LIBTOOL = ../libtool
    to
    LIBTOOL = ../libtool
    in some makefiles

    Then it compiled but did not link
    I had to remove the umax_pp backend because of undefined references
    '_outb' and such things...

    and I had to add manually some libs to the link-command which I executed in
    sane-backends/frontend/

    I used

    GCC -Zexe -Zcrtdll -Zsysv-signals -o scanimage scanimage.o
     stiff.o -lbsd -lsocket -lm /emx/lib/iberty.a ../backend/.libs/libsane.a
     ../lib/liblib.a /XFree86/lib/shm.a /emx/lib/syslog.a /emx/lib/socket.a

    to get the static linked executable.

    It works with my EPSON GT-9500 scanner.
    But this version will not work with any of the 'fork()' backends
    without further changes to sanei_scsi.c - or 'unforking' the
    backends ;-)
    USB-Scanners will also not work...

    I did not get a dll because I don't know how to manage this
    I am only an amateur programmer ;-)

    I am using OS/2 version 4 Fixpack 15 and the gcc version of
    emx (version 'emxfix04')

    I did not try yet to compile any of the frontends
    (xscanimage or xcam)
    I am not shure, but I thought this frontends depend on
    libsane.dll which I do not know how to compile...

    Franz

    --
    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 : Wed May 30 2001 - 17:00:59 PDT