Re: Compiling on OS/2

From: Franz Bakan (fbakan@gmx.net)
Date: Thu May 31 2001 - 16:01:58 PDT

  • Next message: Phil Cummins: "portable scanner - Canoscan N1220U"

    Hi,

    On Thu, 31 May 2001 19:06:16 +0200, Henning Meier-Geinitz wrote:

    >> >> 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
    >
    >Ah, that's the special case for OS/2. Looks like a bug.
    >
    >> 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)
    >
    >I think the correct fix is to don't use an initializer but to set the
    >values manually as in the non-os/2 version. This was changed by Abel
    >Deuring on 2001-01-07 but only for the non-os/2 version. I will change
    >that, please try when the change has been commited to cvs.

    Thanks I will try

    >> >> 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/...
    >
    >Ok. I will think about how to fix it. Would it help if it's defined in
    >config.h.in?

    I think this should work.

    >> After this I had to change the makefiles.
    >> I had to change
    >> sh LIBTOOL = ../libtool
    >> to
    >> LIBTOOL = ../libtool
    >> in some makefiles
    >
    >Could you explain where this is located exactly? I don't understand
    >what "sh LIBTOOL = ../libtool" should do and how the line was
    >generated.

    It must be a bug in os2unix (the 'configure' replacement)
    I will report this to the autor.

    >> 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.
    >
    >Ok, looks a bit complicated :-) Could you write down this procedure
    >and put it on a webpage for other OS/2 users? So we could add a link
    >on the SANE web page to it. If you can't, I could put it somewhere on
    >my website.

    Yes I will do this and place this info on my web-site and let you know
    when and where it is available.

    >forking is such an essential programming technique that I don't think
    >we should change anything in this part of the code. However, there
    >seem to exist a way to use it with OS/2 because Mustek-Scanners seem
    >to work and the mustek backend uses fork for the reader process.

    Yes I know, also when 'forking' is not recommended on OS/2
    (the emx-gcc library-docs say 'inefficient') the forking backends
    could be probably made working correctly whith changes to the
    OS/2 specific code in sanei_scsi.c.
    I managed to compile a 1.03 version that worked for my old
    Mustek-Scanner, but it was not perfect, worked only with one
    specific version of aspirout.sys and stopped working
    when I upgraded to OS/2 Fixpack 15.
    So there has to be done some further investigation and
    bugfixing.

    >> USB-Scanners will also not work...
    >maybe we can support them when we write a sanei_usb.c provided that
    >there is USB support in OS/2.

    Yes but someone has to implement an OS/2-USB support devicedriver
    like aspirout.sys which does this part for SCSI

    >> 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...
    >
    >You can also link the X frontends statically against libsane.a (at
    >least on Unix. I don't know howver about the requirements concerning
    >gtk and X (does they even exist on OS/2?).

    They exist and I will perhaps try to build a statical version of
    xscanimage.

    Thanks for your answers.

    So long

    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 : Thu May 31 2001 - 16:09:12 PDT