[sane-devel] building sane-frontends on OS/2
Franz Bakan
fbakan at gmx.net
Sat May 4 00:36:58 BST 2002
Hi,
On Fri, 3 May 2002 09:29:28 +0200, Henning Meier-Geinitz wrote:
>> To build I have to
>>
>> 1. add '#define HAVE_VSYSLOG 1' to sane-frontends/include/sane/config.h
>> 2. add '-llibsane -lsyslog -lpthreads -lsocket' to 'LIBS =' in sane-frontends/src/Makefile
>
>libsane should be automatically detected (sane-config --libs).
I see, the problem is that I have to use
sh configure --disable-sanetest ...
because configure fails without this for various reasons.
I think it's easier for now If I include -llibsane manually
(details at the end of this mail).
>> -lsocket is needed because of:
>> g:\emx\lib/syslog.a(syslog.o): Undefined symbol _send referenced from text segment
>> g:\emx\lib/syslog.a(syslog.o): Undefined symbol _socket referenced from text segment
>> g:\emx\lib/syslog.a(syslog.o): Undefined symbol _connect referenced from text segment
>
>-lsocket/-lsyslog should work with the same "fix" as in sane-backends.
>This should also fix the #HAVE_VSYSLOG problem. Please try the latest
>sane-frontends CVS, I have just commited the change.
Thanks, this works :-)
>> -lpthreads is needed because of:
>> xcam.o: Undefined symbol _pthread_write referenced from text segment
>> xcam.o: Undefined symbol _pthread_write referenced from text segment
>> xcam.o: Undefined symbol _pthread_read referenced from text segment
>
>Hm, as far as I know, sane-frontends doesn't use libpthred at all. Can
>you try to find out where this comes from? If this is from libgtk, the
>gtk-config script should take care to supply the correct libs.
Thanks for the hint. That's the way of the #includes:
xcam.c
#include "gtkglue.h"
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <gdk/gdktypes.h>
#include <glib.h>
#include <glibconfig.h>
#include <pthread.>
#define read(A,B,C) pthread_read((A),(B),(C))
#define write(A,B,C) pthread_write((A),(B),(C))
So the right fix is to add -lpthreads to the near end of gtk12-config?
Tried this and this works :-)
>
>> 3. Change 'GIMP_LIBS = -lgimp' to 'GIMP_LIBS = -lgimp121' in sane-frontends/src/Makefile
>
>Same here. gimp-config (or gimp-tool) --libs should return the correct
>names. I don't think we can do anything about this in SANE, because
>the name seems to change with every version (1.2.1 = 121, 1.2.2 =
>122?) of gimp.
Maybe the call of sane-config --libs, gtk-config and gimp-config doesn't work with OS/2?
sane-config works partly, but
sane-config --libs
returns
-lsane -lsyslog -lsocket -lm -ljpeg
It should return:
-llibsane ...
But this is perhaps a result of the old version of libtool I have to use ...
But renaming libsane.a to sane.a is not enough :-(
from config.log:
...
configure:2733: checking for SANE - version >= 1.0.0
configure:2813: gcc -o conftest.exe -D__EMX__ -DOS2 -Zmtd -D__ST_MT_ERRNO__ -fstack-check \
-O2 -mprobe -Wall -D_GNU_SOURCE -Zmtd -D__ST_MT_ERRNO__ -O2 -Zsysv-signals \
conftest.c -lsyslog -lsocket -lm 1>&5
configure: In function `main':
configure:2771: warning: implicit declaration of function `system'
configure:2778: parse error before `=='
configure:2779: parse error before `>'
...
The first parse error comes from:
if ( ($sane_config_major_version == major) &&
gtk-config works but there is no 'gimp-config' on OS/2
Regards,
Franz
More information about the sane-devel
mailing list