Menu

#1 Error during compilation: warning: long unsigned int format.

v1.0_(example)
open
nobody
None
9
2014-08-18
2004-11-25
Will L G
No

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

Discussion

  • Will L G

    Will L G - 2005-01-27
    • priority: 5 --> 9
     
  • Will L G

    Will L G - 2005-01-27

    Logged In: YES
    user_id=312992

    ANYBODY HOME!?!?

     
  • Peter Steinfeld

    Peter Steinfeld - 2007-03-29

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.