Error during compilation: warning: long unsigned int format.
Brought to you by:
bpc
I was receiving the following error while attemping to
compile cachecc1:
gcc -o obj/cachecc1.o cachecc1.c -c -O -Wall -
Werror -fPIC
gcc -o obj/hash.o hash.c -c -O -Wall -Werror -fPIC
gcc -o obj/followcc1.o followcc1.c -c -O -Wall -Werror -
fPIC
cc1: warnings being treated as errors
followcc1.c: In function `follow_allexec':
followcc1.c:129: warning: long unsigned int format,
different type arg (arg 6)
make: *** [obj/followcc1.o] Error 1
I was running the following:
Redhat Linux 7.2 [Alpha]
gcc (GCC) 3.4.3
GNU Make 3.80
GNU assembler 2.15.91.0.1 20040527
GNU libtool 1.5.8
Logged In: YES
user_id=312992
ANYBODY HOME!?!?
Logged In: YES
user_id=1754361
Originator: NO
This error seems to relay on your version of libc/glibc.
try this patch:
--- cachecc1-0.3/followcc1.c 2004-03-28 22:49:20.000000000 +0200
+++ cachecc1-0.3-new/followcc1.c 2007-03-29 11:13:04.489734299 +0200
@@ -126,7 +126,7 @@
fname = &ifgcc3[strlen(ifgcc3)];
sprintf(fname, "%s/gcc3_%lx_%lx_%lx_%lx",
env_dir,
- st.st_mtime, st.st_size, st.st_ino, (long)st.st_dev);
+ st.st_mtime, st.st_size, (long) st.st_ino, (long) st.st_dev);
if (!access(fname, F_OK)) {
/* gcc-3.x detected */
_argv[j++] = "-no-integrated-cpp";
of if this even will not work, you can switch of the -Werror setting in the GNUmakefile and ignore this warning.
--- cachecc1-0.3/GNUmakefile 2004-03-28 22:49:20.000000000 +0200
+++ cachecc1-0.3-new/GNUmakefile 2007-03-29 11:17:46.916894541 +0200
@@ -8,7 +8,7 @@
bin/cachecc1.so: obj/distcc1.o
bin/distccwrap: obj/distccwrap.o
-CCFLAGS = -O -Wall -Werror $(CFLAGS)
+CCFLAGS = -O -Wall $(CFLAGS)
bin/%.so: LDFLAGS += -nostdlib -shared -ldl
bin/%.so: CCFLAGS += -fPIC