Kannel and Solaris 10
John Vandenberg
jayvdb at gmail.com
Sat Dec 16 06:08:20 CET 2006
Hi,
On 12/16/06, Stipe Tolj <st at tolj.org> wrote:
> Andrikopoulos Dimitrios wrote:
>
> > Hello,
> >
> > I'm trying to install Kannel on a SPARC Solaris 10 machine. When I try
> > to compile the "start-stop-daemon"
> > program, "configure" goes fine:
> >
> > # ./configure --prefix=/usr/local/gw --enable-start-stop-daemon
> >
> > However, "make" fails with these lines:
> >
> > gcc -D_REENTRANT=1 -I. -Igw -g -O2 -DSunOS=1 -D_FILE_OFFSET_BITS=64
> > -I/usr/local/include/libxml2 -o utils/start-stop-daemon.o -c
> > utils/start-stop-daemon.c
> >
> > In file included from utils/start-stop-daemon.c:127:
> >
> > /usr/include/sys/procfs.h:45:2: #error "Cannot use procfs in the large
> > file compilation environment"
> >
> > make: *** [utils/start-stop-daemon.o] Error 1
> >
> >
> > When I exclude the option "--enable-start-stop-daemon" everything goes
> > fine!
>
> Hi Dimitris,
>
> ok, the start-stop-daemon utility was originated from BSD flavors, which is of
> course NOT the "source" of Solaris. Obviously it's not portable to Solaris.
It looks like using Solaris procfs with LFS requires 64 bit binaries.
/usr/include/sys/procfs.h on Solaris 10 contains:
/*
* This definition is temporary. Structured proc is the preferred API,
* and the older ioctl-based interface will be removed in a future version
* of Solaris. Until then, by default, including <sys/procfs.h> will
* provide the older ioctl-based /proc definitions. To get the structured
* /proc definitions, either include <procfs.h> or define _STRUCTURED_PROC
* to be 1 before including <sys/procfs.h>.
*/
#ifndef _STRUCTURED_PROC
#define _STRUCTURED_PROC 0
#endif
#if !defined(_KERNEL) && _STRUCTURED_PROC == 0
#include <sys/old_procfs.h>
#else
/* ... */
#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
#error "Cannot use procfs in the large file compilation environment"
#endif
/* ... */
#endif
So the quick fix would be to compile that one binary by manually
adding -m64 to the command line:
$ gcc -m64 -D_REENTRANT=1 -I. -Igw -g -O2 -DSunOS=1
-D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -o
utils/start-stop-daemon.o -c utils/start-stop-daemon.c
$ gmake # builds a few objects and then breaks again trying to link:
...
ld: fatal: file utils/start-stop-daemon.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to utils/start-stop-daemon
collect2: ld returned 1 exit status
gmake: *** [utils/start-stop-daemon] Error 1
$ gcc -m64 -D_REENTRANT=1 -I. -Igw -g -O2 -DSunOS=1
-D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -o
utils/start-stop-daemon utils/start-stop-daemon.o libgw.a
libwmlscript.a libwap.a libgwlib.a -lrt -lresolv -lnsl -lsocket -lm
-lpthread -L/usr/lib -R/usr/lib -lxml2 -lz -lpthread -lm -lsocket
-lnsl
--
John
More information about the devel
mailing list