[kde-solaris] procfs/largefile error building 3.3.2 under sol9/gcc3.4

Stefan Teleman steleman at nyc.rr.com
Sat Jan 15 00:40:07 CET 2005


Not to be picky, but the "bulletproof hack" is:

#if (!defined(_LP64)) && (_FILE_OFFSET_BITS - 0 == 64)
#define PROCFS_FILE_OFFSET_BITS_HACK 1
#undef _FILE_OFFSET_BITS
#else
#define PROCFS_FILE_OFFSET_BITS_HACK 0
#endif

#include <sys/procfs.h>

#if (PROCFS_FILE_OFFSET_BITS_HACK - 0 == 1)
#define _FILE_OFFSET_BITS 64
#endif

Same hack applies when including <sys/swap.h>. Otherwise you'll get 
erros when compiling in 64-bit.

:-)

--Stefan

------

On Friday 14 January 2005 16:49, Mats Rojestal wrote:
> Hi,
>
> Apply this patch and it will compile
>
> --- GetPid.c	22 Apr 2004 18:55:47 -0000	1.10
> +++ GetPid.c	14 Jan 2005 21:46:19 -0000
> @@ -243,11 +243,17 @@
>   #include <pwd.h>
>   #include <sys/resource.h>
>   #ifdef OS_Solaris
> -#include <procfs.h>
> +#  if _FILE_OFFSET_BITS==64
> +#    undef _FILE_OFFSET_BITS
> +#    include <procfs.h>
> +#    define _FILE_OFFSET_BITS 64
> +#  else
> +#    include <procfs.h>
> +#  endif
>   #else
>   #include <sys/procfs.h>
>   #include <sys/sysmp.h>
> -#endif
> +#endif
>   #include <sys/sysinfo.h>
>
>   unsigned int kfi_getPid(const char *proc, pid_t ppid)
>
>
>
> Regards Mats R
>
> Chris McCraw wrote:
> > hi.
> >
> > has anyone gotten kde version 3.3.2 to build under solaris 9 with
> > recent gcc?  frankly i don't think this has to do with my
> > compiler but i could be wrong.
> >
> > i get the following error during a make for kdebase:
> >
> > make[4]: Entering directory
> > `/v/filer3/v1q010/fool/Work/build/kde_3.3.2/kdebase-3.3.2/kcontro
> >l/kfontinst/lib' if /bin/bash ../../../libtool --silent
> > --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I. -I. -I../../..
> > -I/lusr/opt/kde-3.3.2/include/freetype2
> > -I/lusr/opt/kde-3.3.2/include  -DOS_Solaris -I./../../fonts
> > -I/lusr/opt/kde-3.3.2/include   -D_LARGEFILE64_SOURCE
> > -DQT_THREAD_SUPPORT  -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS
> > -DUSE_SOLARIS -DSVR4 -D_FILE_OFFSET_BITS=64  -O2  -specs
> > /u/fool/specs -D_GNU_SOURCE -MT GetPid.lo -MD -MP -MF
> > ".deps/GetPid.Tpo" -c -o GetPid.lo GetPid.c; \ then mv -f
> > ".deps/GetPid.Tpo" ".deps/GetPid.Plo"; else rm -f
> > ".deps/GetPid.Tpo"; exit 1; fi In file included from
> > /usr/include/procfs.h:26,
> >                  from GetPid.c:246:
> > /usr/include/sys/procfs.h:44:2: #error "Cannot use procfs in the
> > large file compilation environment" make[4]: *** [GetPid.lo]
> > Error 1
> > make[4]: Leaving directory
> > `/v/filer3/v1q010/fool/Work/build/kde_3.3.2/kdebase-3.3.2/kcontro
> >l/kfontinst/lib' make[3]: *** [all-recursive] Error 1
> > [...]
> >
> > it seems like someone somewhere has probably hacked around this
> > already but google and a glance at the mail archives since the
> > release of 3.3.2 didn't shed any light.
> >
> > not sure if more information is needed so i'll include too much
> > rather than too little, i hope:
> >
> > solaris 2.9 on a sparc
> > gcc 3.4.3 using gnu binutils 2.13.2.1 (newer ones fail to build a
> > working gcc;  gcc without the gnu binutils fails to build complex
> > apps like python 2.3 in our environment).
> > qt-3.3.3, freetype-2.19, glib-2.6.1, jpeg-6b, libxm2-2.6.16,
> > libxslt-1.1.12, pcre-5.0, pkgconfig-0.15.0, kdelibs-3.3.2,
> > arts-1.3.2 all installed ok in the same tree.  using the system
> > headers/libs (/usr/openwin) except for stuff like libz,
> > libaudiofile, and similar
> > configure was just
> > 	./configure --prefix=/lusr/opt/kde-3.3.2
> >
> > any hints?
> >
> > thanks in advance!
>
> ___________________________________________________
> This message is from the kde-solaris mailing list.
> Account management: 
> https://mail.kde.org/mailman/listinfo/kde-solaris. Archives:
> http://lists.kde.org/.
> More info: http://www.kde.org/faq.html.

-- 
Stefan Teleman          'Nobody Expects the Spanish Inquisition'
steleman at nyc.rr.com                          -Monty Python



More information about the kde-solaris mailing list