monkey icon indicating copy to clipboard operation
monkey copied to clipboard

Compile failed on OS X 10.11.5

Open J-Siu opened this issue 8 years ago • 4 comments

OS: OS X 10.11.5 Monkey: git checkout 1.6 output.txt

J-Siu avatar Jun 17 '16 16:06 J-Siu

Same for me on Mac OS 10.14.3

pwall@PivotalPete:~/test/monkey/monkey-1.6.9/build $ cmake ../
-- Plugin auth enabled
-- Plugin cgi enabled
-- Plugin cheetah enabled
-- Plugin dirlisting enabled
-- Plugin fastcgi enabled
-- Plugin liana enabled [== static ==]
-- Plugin logger enabled
-- Plugin mandril enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/pwall/test/monkey/monkey-1.6.9
pwall@PivotalPete:~/test/monkey/monkey-1.6.9/build $ make
[ 15%] Built target mk_core
Scanning dependencies of target monkey-auth-shared
[ 16%] Building C object plugins/auth/CMakeFiles/monkey-auth-shared.dir/auth.c.o
[ 18%] Building C object plugins/auth/CMakeFiles/monkey-auth-shared.dir/base64.c.o
[ 20%] Building C object plugins/auth/CMakeFiles/monkey-auth-shared.dir/conf.c.o
[ 21%] Linking C shared module ../../lib/monkey/monkey-auth.so
[ 23%] Built target monkey-auth-shared
Scanning dependencies of target mk_passwd
[ 25%] Building C object plugins/auth/tools/CMakeFiles/mk_passwd.dir/__/base64.c.o
[ 26%] Building C object plugins/auth/tools/CMakeFiles/mk_passwd.dir/mk_passwd.c.o
[ 28%] Linking C executable ../../../mk_passwd
[ 30%] Built target mk_passwd
Scanning dependencies of target monkey-cgi-shared
[ 31%] Building C object plugins/cgi/CMakeFiles/monkey-cgi-shared.dir/cgi.c.o
[ 33%] Building C object plugins/cgi/CMakeFiles/monkey-cgi-shared.dir/event.c.o
[ 35%] Building C object plugins/cgi/CMakeFiles/monkey-cgi-shared.dir/request.c.o
[ 36%] Linking C shared module ../../lib/monkey/monkey-cgi.so
Undefined symbols for architecture x86_64:
  "_EGID", referenced from:
      _do_cgi in cgi.c.o
  "_EUID", referenced from:
      _do_cgi in cgi.c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/monkey/monkey-cgi.so] Error 1
make[1]: *** [plugins/cgi/CMakeFiles/monkey-cgi-shared.dir/all] Error 2
make: *** [all] Error 2
pwall@PivotalPete:~/test/monkey/monkey-1.6.9/build $

petewall avatar Feb 13 '19 23:02 petewall

I have got the same error!

GOUYONGCHAO avatar Aug 31 '19 12:08 GOUYONGCHAO

This is a very old thread and 1.6.9 is > 3yrs. Following is output when compiling the current master branch.

╰─$ ./configure --static-plugins=tls --enable-plugins=tls --local --debug --trace
********************************************
*           Monkey HTTP Server             *
*           monkey-project.com             *
* ---------------------------------------- *
*      Monkey is the next generation       *
*  Web Server for Linux and Unix variants  *
*                                          *
*        Feel free to reach us at:         *
*                                          *
*        irc.freenode.net #monkey          *
*                                          *
*        Thanks for using Monkey!!!        *
*                                          *
********************************************
Build: Darwin
-- The C compiler identification is AppleClang 10.0.1.10010046
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Looking for accept4
-- Looking for accept4 - not found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Performing Test HAVE_C_TLS
-- Performing Test HAVE_C_TLS - Failed
-- Performing Test MK_HAVE_VALGRIND
-- Performing Test MK_HAVE_VALGRIND - Failed
-- Performing Test HAVE_STAT_H
-- Performing Test HAVE_STAT_H - Success
-- Performing Test HAVE_SYS_UIO_H
-- Performing Test HAVE_SYS_UIO_H - Success
-- Performing Test HAVE_UNISTD_H
-- Performing Test HAVE_UNISTD_H - Success
-- Performing Test HAVE_EPOLL
-- Performing Test HAVE_EPOLL - Failed
-- Performing Test HAVE_KQUEUE
-- Performing Test HAVE_KQUEUE - Success
-- Performing Test HAVE_TIMERFD_CREATE
-- Performing Test HAVE_TIMERFD_CREATE - Failed
-- Performing Test HAVE_EVENTFD
-- Performing Test HAVE_EVENTFD - Failed
-- Performing Test MK_HAVE_MEMRCHR
-- Performing Test MK_HAVE_MEMRCHR - Failed
-- Plugin auth enabled 
-- Plugin cgi enabled 
-- Plugin cheetah enabled 
-- Plugin dirlisting enabled 
-- Plugin fastcgi enabled 
-- Plugin liana enabled [== static ==]
-- Performing Test HAVE_SPLICE
-- Performing Test HAVE_SPLICE - Failed
-- Plugin logger enabled 
-- Plugin mandril enabled 
-- LINKING monkey-liana-static;
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    STATIC_PLUGINS
    WITH_DEBUG
    WITH_PLUGINS
    WITH_TRACE


-- Build files have been written to: /Users/js/code/public/monkey/build
╭─js@imacpro [13:34:54] ~/code/public/monkey  ‹master*› 
╰─$ make               
Scanning dependencies of target rbtree
[  1%] Building C object deps/rbtree/CMakeFiles/rbtree.dir/rbtree.c.o
/Users/js/code/public/monkey/deps/rbtree/rbtree.c:170:22: warning: unused function '__helper_get_sibling' [-Wunused-function]
struct rb_tree_node *__helper_get_sibling(struct rb_tree_node *node)
                     ^
/Users/js/code/public/monkey/deps/rbtree/rbtree.c:200:22: warning: unused function '__helper_get_uncle' [-Wunused-function]
struct rb_tree_node *__helper_get_uncle(struct rb_tree_node *node)
                     ^
2 warnings generated.
[  2%] Linking C static library librbtree.a
[  2%] Built target rbtree
Scanning dependencies of target co
[  4%] Building C object deps/flb_libco/CMakeFiles/co.dir/libco.c.o
[  5%] Linking C static library libco.a
[  5%] Built target co
Scanning dependencies of target mk_core
[  7%] Building C object mk_core/CMakeFiles/mk_core.dir/mk_rconf.c.o
[  8%] Building C object mk_core/CMakeFiles/mk_core.dir/mk_string.c.o
[  9%] Building C object mk_core/CMakeFiles/mk_core.dir/mk_memory.c.o
[ 11%] Building C object mk_core/CMakeFiles/mk_core.dir/mk_event.c.o
In file included from /Users/js/code/public/monkey/mk_core/mk_event.c:38:
/Users/js/code/public/monkey/mk_core/mk_event_kqueue.c:162:61: warning: unused parameter 'nsec' [-Wunused-parameter]
                                           time_t sec, long nsec, void *data)
                                                            ^
1 warning generated.
[ 12%] Building C object mk_core/CMakeFiles/mk_core.dir/mk_utils.c.o
[ 14%] Building C object mk_core/CMakeFiles/mk_core.dir/mk_file.c.o
[ 15%] Building C object mk_core/CMakeFiles/mk_core.dir/mk_iov.c.o
[ 16%] Linking C static library libmk_core.a
[ 16%] Built target mk_core
Scanning dependencies of target monkey-auth-shared
[ 18%] Building C object plugins/auth/CMakeFiles/monkey-auth-shared.dir/auth.c.o
[ 19%] Building C object plugins/auth/CMakeFiles/monkey-auth-shared.dir/base64.c.o
[ 21%] Building C object plugins/auth/CMakeFiles/monkey-auth-shared.dir/conf.c.o
/Users/js/code/public/monkey/plugins/auth/conf.c:149:44: error: incomplete definition of type 'struct mk_server_config'
    struct mk_list *hosts = &mk_api->config->hosts;
                             ~~~~~~~~~~~~~~^
/Users/js/code/public/monkey/include/monkey/mk_config.h:177:8: note: forward declaration of 'struct mk_server_config'
struct mk_server_config *mk_config_init();
       ^
1 error generated.
make[3]: *** [plugins/auth/CMakeFiles/monkey-auth-shared.dir/conf.c.o] Error 1
make[2]: *** [plugins/auth/CMakeFiles/monkey-auth-shared.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2
╭─js@imacpro [13:35:10] ~/code/public/monkey  ‹master*› 
╰─$                                                                                                                                                                                                                                                                                      

J-Siu avatar Sep 12 '19 17:09 J-Siu

It is not specific to OSX...

This will get the latest commit and build the server (tested, works on mac OS and Linux):

git clone https://github.com/monkey/monkey && cd monkey && cd build && cmake .. && make depend && make monkey-bin && mv mk_bin/monkey /tmp/monkey && chmod u+x /tmp/monkey

denysvitali avatar Nov 18 '19 13:11 denysvitali