compiling problem with warc-tools

2 views
Skip to first unread message

Bjarne Andersen

unread,
Oct 10, 2008, 5:17:49 PM10/10/08
to warc-...@googlegroups.com
Hi there.

I upgraded to svn version 203 - now I can't compile the warc-tools project

make goes fine
make install goes:

gcc -I. -Ilib/private -Ilib/public -Ilib/private/plugin/gzip -Ilib/private/plugin/cunit -Ilib/private/pl
b/private/plugin/event -Ilib/private/plugin/event/compat -Ilib/private/plugin/regex -Ilib/private/plugin
rivate/os -Ilib/private/plugin/event/os/linux -Ilib/private/plugin/cunit/os/linux -Wall -W -Wunused -ans
rror -Wno-long-long -Wunused-function -std=gnu89  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FI
c-errors -Wextra -fPIC -DPIC -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -DHAVE_ALLOCA_H=1 -DEBUG=1 -I/usr/includ
lib/private/plugin/python/wrapper_wbloc.c -o lib/private/plugin/python/wrapper_wbloc.o
In file included from /usr/include/python2.5/Python.h:8,
                 from lib/private/plugin/python/wrapper_wbloc.h:43,
                 from lib/private/plugin/python/wrapper_wbloc.c:39:
/usr/include/python2.5/pyconfig.h:942:1: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/assert.h:36,
                 from lib/private/os/wcsafe.h:49,
                 from lib/public/wmisc.h:41,
                 from lib/private/plugin/python/wrapper_wbloc.c:36:
/usr/include/features.h:190:1: this is the location of the previous definition
make[1]: *** [lib/private/plugin/python/wrapper_wbloc.o] Error 1
make[1]: Leaving directory `/home/bja/warc-tools-read-only'
make: *** [python] Error 2

I'm quite sure it's just me doing something wrong - I'm not used to compile and build things my self this way

So hopefully someone can help me out.

best
Bjarne Andersen

Bjarne Andersen

unread,
Oct 10, 2008, 5:22:31 PM10/10/08
to warc-...@googlegroups.com
I forgot to say that I'm using:
Python 2.5.2
gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-10)
swig 1.3.36

best
Bjarne Andersen

WARC

unread,
Oct 11, 2008, 6:02:37 AM10/11/08
to warc-...@googlegroups.com
Hi Bjarne,

The problem seems to be related to "make python".
So, the "make python" if failing. One way to quickly understand
the problem is to get a old version, let say r194 and try to do :

make && make python

Let me know if the problem persist.

cheers
Younès

Le 10 oct. 08 à 23:17, Bjarne Andersen a écrit :

WARC

unread,
Oct 11, 2008, 5:47:00 PM10/11/08
to warc-...@googlegroups.com
Hi Bjarne,

After investigating a bit, the problem is definitly not related to
"warc-tools" at all.
The issue is due to incompatible values for the constant
"_POSIX_C_SOURCE"
in two diffrents C header files on your system.

* The first definition is in file "/usr/include/features.h" (line 190):

# define _POSIX_SOURCE 1
# if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500
# define _POSIX_C_SOURCE 2
# else
# define _POSIX_C_SOURCE 199506L
# endif
#endif

* The second one is in file "/usr/include/python2.4/pyconfig.h" (line
942).
/* Define to activate features from IEEE Stds 1003.1-2001 */
#define _POSIX_C_SOURCE 200112L


So a quick fix is to set "_POSIX_C_SOURCE" in "/usr/include/python2.4/
pyconfig.h"
to be exactly the same as in your "/usr/include/features.h".

Really simple !!!

Anyway, It's Python bug which needs to be reported to the Python's
mailinglist. But It seems
that this affect only some Python versions.

cheers
Younès



Le 10 oct. 08 à 23:17, Bjarne Andersen a écrit :

> Hi there.
>
> I upgraded to svn version 203 - now I can't compile the warc-tools
> project
>
> make goes fine
> make install goes:
>
> gcc -I. -Ilib/private -Ilib/public -Ilib/private/plugin/gzip -Ilib/
> private/plugin/cunit -Ilib/private/pl
> b/private/plugin/event -Ilib/private/plugin/event/compat -Ilib/
> private/plugin/regex -Ilib/private/plugin
> rivate/os -Ilib/private/plugin/event/os/linux -Ilib/private/plugin/
> cunit/os/linux -Wall -W -Wunused -ans
> rror -Wno-long-long -Wunused-function -std=gnu89 -
> D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGE_FI
> c-errors -Wextra -fPIC -DPIC -DSTDC_HEADERS=1 -DHAVE_STRING_H=1 -
> DHAVE_ALLOCA_H=1 -DEBUG=1 -I/usr/includ
> lib/private/plugin/python/wrapper_wbloc.c -o lib/private/plugin/
> python/wrapper_wbloc.o
Reply all
Reply to author
Forward
0 new messages