{"action":"created","issue":{"url":"https://api.github.com/repos/ellzey/libevhtp/issues/194","labels_url":"https://api.github.com/repos/ellzey/libevhtp/issues/194/labels{/name}","comments_url":"https://api.github.com/repos/ellzey/libevhtp/issues/194/comments","events_url":"https://api.github.com/repos/ellzey/libevhtp/issues/194/events","html_url":"https://github.com/ellzey/libevhtp/issues/194","id":116829464,"number":194,"title":"Various issues building master (1.2.11) on Ubuntu 12.04","user":{"login":"tjk","id":109224,"avatar_url":"https://avatars.githubusercontent.com/u/109224?v=3","gravatar_id":"","url":"https://api.github.com/users/tjk","html_url":"https://github.com/tjk","followers_url":"https://api.github.com/users/tjk/followers","following_url":"https://api.github.com/users/tjk/following{/other_user}","gists_url":"https://api.github.com/users/tjk/gists{/gist_id}","starred_url":"https://api.github.com/users/tjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjk/subscriptions","organizations_url":"https://api.github.com/users/tjk/orgs","repos_url":"https://api.github.com/users/tjk/repos","events_url":"https://api.github.com/users/tjk/events{/privacy}","received_events_url":"https://api.github.com/users/tjk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":28,"created_at":"2015-11-13T18:55:56Z","updated_at":"2015-11-13T22:13:29Z","closed_at":"2015-11-13T22:13:29Z","body":"```bash\r\n% uname -a\r\nLinux tjk 3.8.0-34-generic #49~precise1-Ubuntu SMP Wed Nov 13 18:05:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux\r\n% clang --version\r\nUbuntu clang version 3.4-1ubuntu3~precise2 (tags/RELEASE_34/final) (based on LLVM 3.4)\r\nTarget: x86_64-pc-linux-gnu\r\nThread model: posix\r\n% cmake --version\r\ncmake version 2.8.7\r\n```\r\n\r\n-----\r\n\r\n```bash\r\n~/workspace/libevhtp/build@master % cmake -DCMAKE_C_COMPILER=/usr/bin/clang -DLIBEVENT_INCLUDE_DIR=/home/tj/workspace/libevent/c51b159/include -DLIBEVENT_LIBRARY=/home/tj/workspace/libevent/c51b159/lib/libevent.a -DLIBEVENT_PTHREADS_LIBRARY= ..\r\n-- The C compiler identification is Clang\r\n-- The CXX compiler identification is GNU\r\n-- Check for working C compiler: /usr/bin/clang\r\n-- Check for working C compiler: /usr/bin/clang -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Looking for strndup\r\n-- Looking for strndup - not found\r\n-- Looking for strnlen\r\n-- Looking for strnlen - not found\r\n-- Looking for include files HAVE_STRINGS_H\r\n-- Looking for include files HAVE_STRINGS_H - not found.\r\n-- Looking for include files HAVE_STRING_H\r\n-- Looking for include files HAVE_STRING_H - not found.\r\n-- Looking for include files HAVE_STDLIB_H\r\n-- Looking for include files HAVE_STDLIB_H - not found.\r\n-- Looking for include files HAVE_SYS_TIME_H\r\n-- Looking for include files HAVE_SYS_TIME_H - not found.\r\n-- Looking for include files HAVE_SYS_TIMES_H\r\n-- Looking for include files HAVE_SYS_TIMES_H - not found.\r\n-- Looking for include files HAVE_UNISTD_H\r\n-- Looking for include files HAVE_UNISTD_H - not found.\r\n-- Looking for include files HAVE_STDARG_PROTOTYPES\r\n-- Looking for include files HAVE_STDARG_PROTOTYPES - not found.\r\n-- Looking for include files HAVE_SYS_TREE\r\n-- Looking for include files HAVE_SYS_TREE - not found.\r\n-- Looking for include files HAVE_SYS_QUEUE\r\n-- Looking for include files HAVE_SYS_QUEUE - not found.\r\n-- Looking for include files HAVE_SYS_UN\r\n-- Looking for include files HAVE_SYS_UN - not found.\r\n-- Looking for sys/types.h\r\n-- Looking for sys/types.h - not found\r\n-- Looking for stdint.h\r\n-- Looking for stdint.h - not found\r\n-- Looking for stddef.h\r\n-- Looking for stddef.h - not found\r\n-- Check size of int\r\n-- Check size of int - failed\r\n-- Check size of long\r\n-- Check size of long - failed\r\n-- Check size of short\r\n-- Check size of short - failed\r\n-- Check if the system is big endian\r\n-- Searching 16 bit integer\r\n-- Check size of unsigned short\r\n-- Check size of unsigned short - failed\r\n-- Check size of unsigned int\r\n-- Check size of unsigned int - failed\r\n-- Check size of unsigned long\r\n-- Check size of unsigned long - failed\r\nCMake Error at /usr/share/cmake-2.8/Modules/TestBigEndian.cmake:46 (MESSAGE):\r\n  no suitable type found\r\nCall Stack (most recent call first):\r\n  CMakeLists.txt:84 (TEST_BIG_ENDIAN)\r\n\r\n\r\n-- Configuring incomplete, errors occurred!\r\n```\r\n\r\nNot sure what the cause is of `TestBigEndian.cmake` being broken, but doing something like this (as discovered on Google) circumvents (or possibly just silences) this error:\r\n\r\n```diff\r\n% diff /usr/share/cmake-2.8/Modules/TestBigEndian.cmake /tmp/TestBigEndian.cmake\r\n44,45c44\r\n<           SET(CMAKE_16BIT_TYPE \"unsigned short\")\r\n<           # MESSAGE(FATAL_ERROR \"no suitable type found\")\r\n---\r\n>           MESSAGE(FATAL_ERROR \"no suitable type found\")\r\n```\r\n\r\nNow, the `cmake` command succeeds (however those various \"not found\" are still a problem...).\r\n\r\n```bash\r\n~/workspace/libevhtp/build@master % make\r\nScanning dependencies of target evhtp\r\n[  2%] Building C object CMakeFiles/evhtp.dir/evhtp.c.o\r\n/home/tj/workspace/libevhtp/evhtp.c:282:1: error: static declaration of 'strnlen' follows non-static declaration\r\nstrnlen(const char * s, size_t maxlen) {\r\n^\r\n/usr/include/string.h:406:15: note: previous declaration is here\r\nextern size_t strnlen (__const char *__string, size_t __maxlen)\r\n              ^\r\n/home/tj/workspace/libevhtp/evhtp.c:297:1: error: static declaration of 'strndup' follows non-static declaration\r\nstrndup(const char * s, size_t n) {\r\n^\r\n/usr/include/string.h:183:14: note: previous declaration is here\r\nextern char *strndup (__const char *__string, size_t __n)\r\n             ^\r\n2 errors generated.\r\nmake[2]: *** [CMakeFiles/evhtp.dir/evhtp.c.o] Error 1\r\nmake[1]: *** [CMakeFiles/evhtp.dir/all] Error 2\r\nmake: *** [all] Error 2\r\n```\r\n\r\nTo see if this is the only problem,\r\n\r\n```diff\r\ndiff --git a/CMakeLists.txt b/CMakeLists.txt\r\nindex 93d3b44..0f257cf 100644\r\n--- a/CMakeLists.txt\r\n+++ b/CMakeLists.txt\r\n@@ -104,13 +104,13 @@ if (NOT HAVE_SYS_QUEUE)\r\n                        ${CMAKE_CURRENT_BINARY_DIR}/compat/sys/queue.h)\r\n endif(NOT HAVE_SYS_QUEUE)\r\n \r\n-if (NOT HAVE_STRNDUP)\r\n-       add_definitions(-DNO_STRNDUP)\r\n-endif()\r\n-\r\n-if (NOT HAVE_STRNLEN)\r\n-       add_definitions(-DNO_STRNLEN)\r\n-endif()\r\n+# if (NOT HAVE_STRNDUP)\r\n+#      add_definitions(-DNO_STRNDUP)\r\n+# endif()\r\n+#\r\n+# if (NOT HAVE_STRNLEN)\r\n+#      add_definitions(-DNO_STRNLEN)\r\n+# endif()\r\n```\r\n\r\nThere are still lots of problems related to `HAVE_STDARG_PROTOTYPES` not getting set correctly. I'm really bad with cmake so I'm kind of stuck. If you could help me gather information / let me know what I'm doing wrong, I'd appreciate it -- thanks!"},"comment":{"url":"https://api.github.com/repos/ellzey/libevhtp/issues/comments/156573776","html_url":"https://github.com/ellzey/libevhtp/issues/194#issuecomment-156573776","issue_url":"https://api.github.com/repos/ellzey/libevhtp/issues/194","id":156573776,"user":{"login":"tjk","id":109224,"avatar_url":"https://avatars.githubusercontent.com/u/109224?v=3","gravatar_id":"","url":"https://api.github.com/users/tjk","html_url":"https://github.com/tjk","followers_url":"https://api.github.com/users/tjk/followers","following_url":"https://api.github.com/users/tjk/following{/other_user}","gists_url":"https://api.github.com/users/tjk/gists{/gist_id}","starred_url":"https://api.github.com/users/tjk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tjk/subscriptions","organizations_url":"https://api.github.com/users/tjk/orgs","repos_url":"https://api.github.com/users/tjk/repos","events_url":"https://api.github.com/users/tjk/events{/privacy}","received_events_url":"https://api.github.com/users/tjk/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T22:13:29Z","updated_at":"2015-11-13T22:13:29Z","body":":+1: "}}