Jump to content


Photo

Linux compile blues


  • Please log in to reply
2 replies to this topic

#1 Voltago

Voltago
  • Member
  • 4 posts

Posted 05 November 2004 - 09:36 AM

Hi! I'm trying to build WeiDU on linux. My environment:
gcc-3.4.2
glibc-2.3.3
ocaml-3.0.7
I've uncommented and fixed the environment variables in 'Makefile' according to my environment setup. However, the xdiff build fails with this error messages:
Compiling C file xdiff/xemit.c
+ gcc -Wall -Wno-unused -D_FILE_OFFSET_BITS=64 -D_REENTRANT -O2 -march=pentium3 -msse2 -pipe -s -fomit-frame-pointer -falign-functions=64 -fno-stack-protector -c  '-Iobj/x86_LINUX' '-Izlib' '-Ixdiff' -I'/usr/lib/ocaml' 'xdiff/xemit.c'
In file included from xdiff/xinclude.h:45,
                 from xdiff/xemit.c:23:
xdiff/xmissing.h:38: error: conflicting types for 'memcmp'
xdiff/xmissing.h:38: error: conflicting types for 'memcmp'
xdiff/xmissing.h:42: error: conflicting types for 'memcpy'
xdiff/xmissing.h:42: error: conflicting types for 'memcpy'
xdiff/xmissing.h:46: error: parse error before "__extension__"
xdiff/xmissing.h:46: error: parse error before "__uint8_t"
xdiff/xmissing.h:46: warning: type defaults to `int' in declaration of `__s'
xdiff/xmissing.h:46: warning: data definition has no type or storage class
xdiff/xmissing.h:46: error: parse error before '}' token
xdiff/xmissing.h:46: warning: initialization makes pointer from integer without a cast
xdiff/xmissing.h:46: error: initializer element is not constant
xdiff/xmissing.h:46: error: parse error before "c"
After that, this is repeated ad nauseam:
xdiff/xmissing.h:46: warning: type defaults to `int' in declaration of `__u'
xdiff/xmissing.h:46: error: conflicting types for '__u'
xdiff/xmissing.h:46: error: previous definition of '__u' was here
xdiff/xmissing.h:46: warning: initialization makes integer from pointer without a cast
xdiff/xmissing.h:46: error: initializer element is not constant
xdiff/xmissing.h:46: warning: data definition has no type or storage class
xdiff/xmissing.h:46: error: parse error before "case"
Is this the fault of my build environment (esp. gcc version?)? Has anyone succeded to build WeiDU on a similar setup lately? Thanks!

#2 Voltago

Voltago
  • Member
  • 4 posts

Posted 08 November 2004 - 03:45 PM

Ok, worked it out myself. Just installed libxdiff inside of my system and changed the WeiDU Makefile to use /usr/lib/libxdiff.so. Basically, this is done by adding
-ccopt -L/usr/lib \
-cclib -lxdiff \
to the compiler options, and by making sure the included version of libxdiff will not be compiled.

#3 Scar

Scar
  • Member
  • 22 posts

Posted 20 November 2004 - 10:11 AM

Hiya,

I got the same problem here on OS X. Will this be fixed in future WeiDU?

Armin