Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot compile with clang on macosx. #1

Open
cofyc opened this issue Jan 23, 2013 · 1 comment
Open

Cannot compile with clang on macosx. #1

cofyc opened this issue Jan 23, 2013 · 1 comment

Comments

@cofyc
Copy link

cofyc commented Jan 23, 2013

https://trac.macports.org/ticket/37738 这是 macport 里的 ticket。

output of make CC=clang:

make  all-am
clang -DHAVE_CONFIG_H -I.   -I/usr/local/BerkeleyDB.4.7/include -I/opt/local/include   -I/opt/local/include/db47 -MT memcacheq.o -MD -MP -MF .deps/memcacheq.Tpo -c -o memcacheq.o memcacheq.c
memcacheq.c:2222:15: warning: implicit declaration of function 'daemonize' is invalid in C99
      [-Wimplicit-function-declaration]
        res = daemonize(maxcore, settings.verbose);
              ^
memcacheq.c:2265:5: warning: expression result unused [-Wunused-value]
    thread_init(settings.num_threads, main_base);
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./memcacheq.h:318:39: note: expanded from macro 'thread_init'
# define thread_init(x,y)             0
                                      ^
2 warnings generated.
mv -f .deps/memcacheq.Tpo .deps/memcacheq.Po
clang -DHAVE_CONFIG_H -I.   -I/usr/local/BerkeleyDB.4.7/include -I/opt/local/include   -I/opt/local/include/db47 -MT item.o -MD -MP -MF .deps/item.Tpo -c -o item.o item.c
mv -f .deps/item.Tpo .deps/item.Po
clang -DHAVE_CONFIG_H -I.   -I/usr/local/BerkeleyDB.4.7/include -I/opt/local/include   -I/opt/local/include/db47 -MT thread.o -MD -MP -MF .deps/thread.Tpo -c -o thread.o thread.c
mv -f .deps/thread.Tpo .deps/thread.Po
clang -DHAVE_CONFIG_H -I.   -I/usr/local/BerkeleyDB.4.7/include -I/opt/local/include   -I/opt/local/include/db47 -MT bdb.o -MD -MP -MF .deps/bdb.Tpo -c -o bdb.o bdb.c
mv -f .deps/bdb.Tpo .deps/bdb.Po
clang -DHAVE_CONFIG_H -I.   -I/usr/local/BerkeleyDB.4.7/include -I/opt/local/include   -I/opt/local/include/db47 -MT hashtable.o -MD -MP -MF .deps/hashtable.Tpo -c -o hashtable.o hashtable.c
hashtable.c:276:1: error: redefinition of a 'extern inline' function 'hashtable_iterator_key' is not
      supported in C99 mode
hashtable_iterator_key(struct hashtable_itr *i)
^
./hashtable.h:202:1: note: previous definition is here
hashtable_iterator_key(struct hashtable_itr *i)
^
hashtable.c:280:1: error: redefinition of a 'extern inline' function 'hashtable_iterator_value' is
      not supported in C99 mode
hashtable_iterator_value(struct hashtable_itr *i)
^
./hashtable.h:211:1: note: previous definition is here
hashtable_iterator_value(struct hashtable_itr *i)
^
2 errors generated.
make[1]: *** [hashtable.o] Error 1
make: *** [all] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants