[cups] cups-filter && Solaris SPARC with non-standard C-functions
Matthias Apitz
guru at unixarea.de
Wed Jan 20 22:03:21 PST 2016
El día Wednesday, January 20, 2016 a las 08:49:55AM +0100, Matthias Apitz escribió:
> El día Wednesday, January 20, 2016 a las 07:02:33AM +0000, Douglas Kosovic escribió:
>
> > Hi Matthias,
>
> Hi Douglas,
>
> Thanks for your reply; ...
>
> >
> > > It turned out that cups-filter (in concrete the version 1.0.62) makes use
> > > of non-Standard (non Posix) C-functions, for example:
> > >
> > > strndup()
> > > mkstemps()
> > > strcasestr()
> >
> > They are POSIX.1-2008 functions and Solaris 11 has them in the Standard C Library. You are using Solaris 10 which was released in 2005, so isn't aware of them.
>
> I have checked the man pages on Linux, they claim that strdup(3) was
> POSIX.1-2001, but strndup(3) a GNU extension:
>
> ...
Just for the record (or if someone else falls into the same problem), at
the end of the story I got it built and running with:
$ gzip -dc cups-filters-1.0.62.tar.gz | tar xf -
$ cd cups-filters-1.0.62
$ GLIB_CFLAGS="-I/usr/local/sisis-pap/include/glib-2.0 -I/usr/local/sisis-pap/lib/glib-2.0/include" export GLIB_CFLAGS
$ GLIB_LIBS="-L/usr/local/sisis-pap/lib -lglib-2.0" export GLIB_LIBS
$ PKG_CONFIG_PATH=/usr/local/sisis-pap/cups2/lib/pkgconfig/ export PKG_CONFIG_PATH
$ LDFLAGS="-m64 -L/usr/local/sisis-pap/cups2/lib -L/usr/local/sisis-pap/lib -L/usr/local/gcc-492/lib/sparcv9 /data/users/guru/head/CUPS2/cups-filters-1.0.62/libiberty.a" export LDFLAGS
$ ./configure --prefix=/usr/local/sisis-pap/cups2 --with-cups-config=/usr/local/sisis-pap/cups2/bin/cups-config --without-jpeg --without-tiff --without-png --disable-dbus --with-gs-path=/usr/local/sisis-pap/ghostscript-9.06/bin/gs
$ gmake
$ sudo gmake install
with some additional notes/changes:
- the static lib
/data/users/guru/head/CUPS2/cups-filters-1.0.62/libiberty.a was fetched
and compiled from https://toolbox-of-eric.googlecode.com/files/libiberty.tar.gz
- strcasestr.o was added to this libiberty.a from the gnulib sources;
- cups-filters-1.0.62/utils/cups-browsed.c must be commented out mostly due to missing
function getifaddrs() in Solaris 10; I will dig later into this and
perhaps rewrite the part using a getaddrinfo() loop;
- cups-filters-1.0.62/filter/pdftoraster.cxx needs a correct C++ declaration of strcasestr()
(maybe this is normaly done from some header file in Solaris 11, like string.h);
HIH
matthias
--
Matthias Apitz, ✉ guru at unixarea.de, ⌂ http://www.unixarea.de/ ☎ +49-176-38902045
UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370)
UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5
More information about the cups
mailing list