Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#1 [0.24] Does not compile

closed-fixed
µwm (6)
5
2010-10-25
2010-10-24
Anonymous
No

gcc -U_FORTIFY_SOURCE -D__OPTIMIZE__ -O0 -Os -fomit-frame-pointer -W -Wall -Wextra -g -pipe -I. -DVERSION='"0.24"' -Wl,--sort-common,--gc-sections,--as-needed -c -o client.o client.c
client.c: In function 'ClientDelStrut':
client.c:404:5: warning: implicit declaration of function 'LIST_FOREACH_SAFE'
client.c:404:39: error: 'Node' undeclared (first use in this function)
client.c:404:39: note: each undeclared identifier is reported only once for each function it appears in
client.c:404:51: error: expected ';' before '{' token
client.c:399:36: warning: unused parameter 'client'
client.c: In function 'ClientRaise':
client.c:1454:2: warning: implicit declaration of function 'TAILQ_FOREACH_SAFE'
client.c:1454:54: error: 'LayerQueue' undeclared (first use in this function)
client.c:1454:72: error: expected ';' before '{' token
client.c: In function 'ClientSetLayer':
client.c:1761:49: error: 'LayerQueue' undeclared (first use in this function)
client.c:1761:67: error: expected ';' before '{' token
make: *** [client.o] Error 1

root [/tmp/uwm] gcc --version
gcc (GCC) 4.5.1

Discussion

  • Lutz Sammer

    Lutz Sammer - 2010-10-24
    • status: open --> open-works-for-me
     
  • Lutz Sammer

    Lutz Sammer - 2010-10-24

    LIST_FOREACH_SAFE is in /usr/include/sys/queue.h which is included by client.c
    sys/queue.h belongs to glibc, my version sys-libs/glibc-2.12.1 contains the macro
    There are more modules which use the macros.

    Update glibc or use an uptodate queue.h or add the macros to uwm.h

    #define LIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = LIST_FIRST((head)); \ (var) && ((tvar) = LIST_NEXT((var), field), 1); \ (var) = (tvar))

    #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = SLIST_FIRST((head)); \ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ (var) = (tvar))

    #define STAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = STAILQ_FIRST((head)); \ (var) && ((tvar) = STAILQ_NEXT((var), field), 1); \ (var) = (tvar))

    #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST((head)); \ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ (var) = (tvar))

     
  • Lutz Sammer

    Lutz Sammer - 2010-10-25

    The bug is that GNU glibc is using a stone age queue.h.
    This was fixed in my distribution: http://bugs.gentoo.org/201979
    (You can try to report an glibc bug).

    I add a work around to µwm.

    Thanks for reporting.

     
  • Lutz Sammer

    Lutz Sammer - 2010-10-25
    • labels: --> µwm
    • assigned_to: nobody --> johns
    • status: open-works-for-me --> closed-fixed
     

Log in to post a comment.