sane-project-website/old-archive/2001-05/0458.html

276 wiersze
8.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>
<TITLE>sane-devel: Re: Compiling on OS/2</TITLE>
<META NAME="Author" CONTENT="Franz Bakan (fbakan@gmx.net)">
<META NAME="Subject" CONTENT="Re: Compiling on OS/2">
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
<H1>Re: Compiling on OS/2</H1>
<!-- received="Thu May 31 16:08:35 2001" -->
<!-- isoreceived="20010531230835" -->
<!-- sent="Fri, 01 Jun 2001 01:01:58 +0200 (CDT)" -->
<!-- isosent="20010531230158" -->
<!-- name="Franz Bakan" -->
<!-- email="fbakan@gmx.net" -->
<!-- subject="Re: Compiling on OS/2" -->
<!-- id="200105312308.f4VN8XP04764@panda.mostang.com" -->
<!-- inreplyto="20010531190616.B9347@vortex.swb.de" -->
<STRONG>From:</STRONG> Franz Bakan (<A HREF="mailto:fbakan@gmx.net?Subject=Re:%20Compiling%20on%20OS/2&In-Reply-To=&lt;200105312308.f4VN8XP04764@panda.mostang.com&gt;"><EM>fbakan@gmx.net</EM></A>)<BR>
<STRONG>Date:</STRONG> Thu May 31 2001 - 16:01:58 PDT
<P>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0459.html">Phil Cummins: "portable scanner - Canoscan N1220U"</A>
<UL>
<LI><STRONG>Previous message:</STRONG> <A HREF="0457.html">Oliver Schwartz: "Re: [PATCH] Re: SANE CVS snapshot (2001-05-30) available"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0449.html">Henning Meier-Geinitz: "Re: Compiling on OS/2"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#458">[ date ]</A>
<A HREF="index.html#458">[ thread ]</A>
<A HREF="subject.html#458">[ subject ]</A>
<A HREF="author.html#458">[ author ]</A>
</UL>
<HR NOSHADE><P>
<!-- body="start" -->
<P>
Hi,
<BR>
<P>On Thu, 31 May 2001 19:06:16 +0200, Henning Meier-Geinitz wrote:
<BR>
<P><EM>&gt;&gt; &gt;&gt; sanei_scsi.c:line: initializer element for `param[0].u' is not
</EM><BR>
<EM>&gt;&gt; &gt;&gt; computable at load time
</EM><BR>
<EM>&gt;&gt; &gt;
</EM><BR>
<EM>&gt;&gt; &gt;At which line is this error? I would think it's on 2432-2439,
</EM><BR>
<EM>&gt;&gt;
</EM><BR>
<EM>&gt;&gt; no its at line 3369ff
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Ah, that's the special case for OS/2. Looks like a bug.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;&gt; btw. in version 1.03 (line 2133) these variables were static.
</EM><BR>
<EM>&gt;&gt; (So I got the idea to make them static to get it compiled and
</EM><BR>
<EM>&gt;&gt; it worked)
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;I think the correct fix is to don't use an initializer but to set the
</EM><BR>
<EM>&gt;values manually as in the non-os/2 version. This was changed by Abel
</EM><BR>
<EM>&gt;Deuring on 2001-01-07 but only for the non-os/2 version. I will change
</EM><BR>
<EM>&gt;that, please try when the change has been commited to cvs.
</EM><BR>
<P>Thanks I will try
<BR>
<P><EM>&gt;&gt; &gt;&gt; 2. sane/sane-backends/backend/qcam.c
</EM><BR>
<EM>&gt;&gt; &gt;&gt;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; I have to change
</EM><BR>
<EM>&gt;&gt; &gt;&gt;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; struct flock sfl;
</EM><BR>
<EM>&gt;&gt; &gt;&gt;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; to
</EM><BR>
<EM>&gt;&gt; &gt;&gt;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; struct
</EM><BR>
<EM>&gt;&gt; &gt;&gt; { off_t l_start;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; off_t l_len;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; pid_t l_pid;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; short l_type;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; short l_whence;
</EM><BR>
<EM>&gt;&gt; &gt;&gt; } sfl;
</EM><BR>
<EM>&gt;&gt; &gt;
</EM><BR>
<EM>&gt;&gt; &gt;Could you check if this struct is defined in any of your system
</EM><BR>
<EM>&gt;&gt; &gt;headers? If it isn't, we can probably do some kind of configure magic
</EM><BR>
<EM>&gt;&gt; &gt;to define it if it isn't.
</EM><BR>
<EM>&gt;&gt;
</EM><BR>
<EM>&gt;&gt; No it's not defined in the system-headers /emx/include/...
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Ok. I will think about how to fix it. Would it help if it's defined in
</EM><BR>
<EM>&gt;config.h.in?
</EM><BR>
<P>I think this should work.
<BR>
<P><P><EM>&gt;&gt; After this I had to change the makefiles.
</EM><BR>
<EM>&gt;&gt; I had to change
</EM><BR>
<EM>&gt;&gt; sh LIBTOOL = ../libtool
</EM><BR>
<EM>&gt;&gt; to
</EM><BR>
<EM>&gt;&gt; LIBTOOL = ../libtool
</EM><BR>
<EM>&gt;&gt; in some makefiles
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Could you explain where this is located exactly? I don't understand
</EM><BR>
<EM>&gt;what &quot;sh LIBTOOL = ../libtool&quot; should do and how the line was
</EM><BR>
<EM>&gt;generated.
</EM><BR>
<P>It must be a bug in os2unix (the 'configure' replacement)
<BR>
I will report this to the autor.
<BR>
<P><EM>&gt;&gt; I used
</EM><BR>
<EM>&gt;&gt;
</EM><BR>
<EM>&gt;&gt; GCC -Zexe -Zcrtdll -Zsysv-signals -o scanimage scanimage.o
</EM><BR>
<EM>&gt;&gt; stiff.o -lbsd -lsocket -lm /emx/lib/iberty.a ../backend/.libs/libsane.a
</EM><BR>
<EM>&gt;&gt; ../lib/liblib.a /XFree86/lib/shm.a /emx/lib/syslog.a /emx/lib/socket.a
</EM><BR>
<EM>&gt;&gt;
</EM><BR>
<EM>&gt;&gt; to get the static linked executable.
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;Ok, looks a bit complicated :-) Could you write down this procedure
</EM><BR>
<EM>&gt;and put it on a webpage for other OS/2 users? So we could add a link
</EM><BR>
<EM>&gt;on the SANE web page to it. If you can't, I could put it somewhere on
</EM><BR>
<EM>&gt;my website.
</EM><BR>
<P>Yes I will do this and place this info on my web-site and let you know
<BR>
when and where it is available.
<BR>
<P><EM>&gt;forking is such an essential programming technique that I don't think
</EM><BR>
<EM>&gt;we should change anything in this part of the code. However, there
</EM><BR>
<EM>&gt;seem to exist a way to use it with OS/2 because Mustek-Scanners seem
</EM><BR>
<EM>&gt;to work and the mustek backend uses fork for the reader process.
</EM><BR>
<P>Yes I know, also when 'forking' is not recommended on OS/2
<BR>
(the emx-gcc library-docs say 'inefficient') the forking backends
<BR>
could be probably made working correctly whith changes to the
<BR>
OS/2 specific code in sanei_scsi.c.
<BR>
I managed to compile a 1.03 version that worked for my old
<BR>
Mustek-Scanner, but it was not perfect, worked only with one
<BR>
specific version of aspirout.sys and stopped working
<BR>
when I upgraded to OS/2 Fixpack 15.
<BR>
So there has to be done some further investigation and
<BR>
bugfixing.
<BR>
<P><EM>&gt;&gt; USB-Scanners will also not work...
</EM><BR>
<EM>&gt;maybe we can support them when we write a sanei_usb.c provided that
</EM><BR>
<EM>&gt;there is USB support in OS/2.
</EM><BR>
<P>Yes but someone has to implement an OS/2-USB support devicedriver
<BR>
like aspirout.sys which does this part for SCSI
<BR>
<P><EM>&gt;&gt; I did not try yet to compile any of the frontends
</EM><BR>
<EM>&gt;&gt; (xscanimage or xcam)
</EM><BR>
<EM>&gt;&gt; I am not shure, but I thought this frontends depend on
</EM><BR>
<EM>&gt;&gt; libsane.dll which I do not know how to compile...
</EM><BR>
<EM>&gt;
</EM><BR>
<EM>&gt;You can also link the X frontends statically against libsane.a (at
</EM><BR>
<EM>&gt;least on Unix. I don't know howver about the requirements concerning
</EM><BR>
<EM>&gt;gtk and X (does they even exist on OS/2?).
</EM><BR>
<P>They exist and I will perhaps try to build a statical version of
<BR>
xscanimage.
<BR>
<P>Thanks for your answers.
<BR>
<P>So long
<BR>
<P>Franz
<BR>
<P><P><P><PRE>
--
Source code, list archive, and docs: <A HREF="http://www.mostang.com/sane/">http://www.mostang.com/sane/</A>
To unsubscribe: echo unsubscribe sane-devel | mail <A HREF="mailto:majordomo@mostang.com?Subject=Re:%20Compiling%20on%20OS/2&In-Reply-To=&lt;200105312308.f4VN8XP04764@panda.mostang.com&gt;">majordomo@mostang.com</A>
</PRE>
<P><!-- body="end" -->
<HR NOSHADE>
<UL>
<!-- next="start" -->
<LI><STRONG>Next message:</STRONG> <A HREF="0459.html">Phil Cummins: "portable scanner - Canoscan N1220U"</A>
<LI><STRONG>Previous message:</STRONG> <A HREF="0457.html">Oliver Schwartz: "Re: [PATCH] Re: SANE CVS snapshot (2001-05-30) available"</A>
<LI><STRONG>In reply to:</STRONG> <A HREF="0449.html">Henning Meier-Geinitz: "Re: Compiling on OS/2"</A>
<!-- nextthread="start" -->
<!-- reply="end" -->
<LI><STRONG>Messages sorted by:</STRONG>
<A HREF="date.html#458">[ date ]</A>
<A HREF="index.html#458">[ thread ]</A>
<A HREF="subject.html#458">[ subject ]</A>
<A HREF="author.html#458">[ author ]</A>
</UL>
<!-- trailer="footer" -->
<HR NOSHADE>
<P>
<SMALL>
<EM>
This archive was generated by <A HREF="http://www.hypermail.org/">hypermail 2b29</A>
: <EM>Thu May 31 2001 - 16:09:12 PDT</EM>
</EM>
</SMALL>
</BODY>
</HTML>