{"action":"created","issue":{"url":"https://api.github.com/repos/davidmcgrew/joy/issues/1","labels_url":"https://api.github.com/repos/davidmcgrew/joy/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/davidmcgrew/joy/issues/1/comments","events_url":"https://api.github.com/repos/davidmcgrew/joy/issues/1/events","html_url":"https://github.com/davidmcgrew/joy/issues/1","id":125860833,"number":1,"title":"Cannot build cleanly on OS X El Capitan","user":{"login":"oogali","id":232224,"avatar_url":"https://avatars.githubusercontent.com/u/232224?v=3","gravatar_id":"","url":"https://api.github.com/users/oogali","html_url":"https://github.com/oogali","followers_url":"https://api.github.com/users/oogali/followers","following_url":"https://api.github.com/users/oogali/following{/other_user}","gists_url":"https://api.github.com/users/oogali/gists{/gist_id}","starred_url":"https://api.github.com/users/oogali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oogali/subscriptions","organizations_url":"https://api.github.com/users/oogali/orgs","repos_url":"https://api.github.com/users/oogali/repos","events_url":"https://api.github.com/users/oogali/events{/privacy}","received_events_url":"https://api.github.com/users/oogali/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-11T02:00:03Z","updated_at":"2016-01-12T21:20:42Z","closed_at":null,"body":"I'm running OS X El Capitan (10.11.1), and I can't build cleanly.\r\n\r\nMy environment consists of:\r\n- OS X 10.11.1\r\n- Xcode 7.2 (and its command-line tools)\r\n- clang ```Apple LLVM version 7.0.2 (clang-700.1.81)```\r\n\r\nOn the first attempt, I get missing references to OpenSSL include headers and the system endian header. The former is because Apple deprecated the use of OpenSSL [\\[1\\]](https://developer.apple.com/library/mac/documentation/Security/Conceptual/cryptoservices/GeneralPurposeCrypto/GeneralPurposeCrypto.html), and the latter seems to be a platform-specific location thing.\r\n\r\n```\r\n$ make\r\ncd src; /Applications/Xcode.app/Contents/Developer/usr/bin/make\r\nMakefile variables:\r\nsysname=DARWIN\r\nversion=1.0\r\nCWD=src\r\ngcc -Wall -Wno-deprecated-declarations -g -O3   -mmacosx-version-min=10.5 -DDARWIN=1 -DVERSION=\\\"1.0\\\" -o pcap2flow  pcap2flow.c p2f.c config.c osdetect.c anon.c pkt_proc.c nfv9.c tls.c classify.c radix_trie.c hdr_dsc.c procwatch.c addr_attr.c addr.c wht.c -lpcap     -lm       -lcrypto\r\nIn file included from pcap2flow.c:69:\r\n./anon.h:59:10: fatal error: 'openssl/aes.h' file not found\r\n#include <openssl/aes.h>\r\n         ^\r\n1 error generated.\r\nIn file included from p2f.c:54:\r\n./anon.h:59:10: fatal error: 'openssl/aes.h' file not found\r\n#include <openssl/aes.h>\r\n         ^\r\n1 error generated.\r\nIn file included from config.c:42:\r\n./anon.h:59:10: fatal error: 'openssl/aes.h' file not found\r\n#include <openssl/aes.h>\r\n         ^\r\n1 error generated.\r\nanon.c:58:10: fatal error: 'openssl/aes.h' file not found\r\n#include <openssl/aes.h>\r\n         ^\r\n1 error generated.\r\nIn file included from pkt_proc.c:49:\r\n./pkt.h:44:10: fatal error: 'endian.h' file not found\r\n#include <endian.h>\r\n         ^\r\n1 error generated.\r\nprocwatch.c:73:10: fatal error: 'openssl/sha.h' file not found\r\n#include <openssl/sha.h>\r\n         ^\r\n1 error generated.\r\nmake[1]: *** [pcap2flow] Error 1\r\nmake: *** [pcap2flow] Error 2\r\n```\r\n\r\nOn my second attempt, I configured ```CFLAGS``` in ```src/Makefile``` to point to my local OpenSSL installation, but picked up two new errors: first one related to the inlining of ```wht_init``` (I think this might be compiler-specific), and a second one concerning the location of ```endian.h``` (I think this is platform-specific).\r\n\r\n```\r\ncd src; /Applications/Xcode.app/Contents/Developer/usr/bin/make\r\nMakefile variables:\r\nsysname=DARWIN\r\nversion=1.0\r\nCWD=src\r\ngcc -Wall -Wno-deprecated-declarations -g -O3   -I/usr/local/opt/openssl/include -mmacosx-version-min=10.5 -DDARWIN=1 -DVERSION=\\\"1.0\\\" -o pcap2flow  pcap2flow.c p2f.c config.c osdetect.c anon.c pkt_proc.c nfv9.c tls.c classify.c radix_trie.c hdr_dsc.c procwatch.c addr_attr.c addr.c wht.c -lpcap     -lm       -lcrypto\r\np2f.c:1118:66: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat]\r\n  fprintf(output, \"\\t\\t\\t\\\"ts\\\": %ld.%06ld,\\n\", ts_start.tv_sec, ts_start.tv_usec);\r\n                                     ~~~~~                       ^~~~~~~~~~~~~~~~\r\n                                     %06d\r\np2f.c:1119:64: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat]\r\n  fprintf(output, \"\\t\\t\\t\\\"te\\\": %ld.%06ld,\\n\", ts_end.tv_sec, ts_end.tv_usec);\r\n                                     ~~~~~                     ^~~~~~~~~~~~~~\r\n                                     %06d\r\nIn file included from p2f.c:52:\r\nIn file included from ./p2f.h:56:\r\n./wht.h:53:13: warning: inline function 'wht_init' is not defined [-Wundefined-inline]\r\ninline void wht_init(struct wht *wht);\r\n            ^\r\np2f.c:423:3: note: used here\r\n  wht_init(&record->wht);\r\n  ^\r\n3 warnings generated.\r\nIn file included from pkt_proc.c:49:\r\n./pkt.h:44:10: fatal error: 'endian.h' file not found\r\n#include <endian.h>\r\n         ^\r\n1 error generated.\r\nmake[1]: *** [pcap2flow] Error 1\r\nmake: *** [pcap2flow] Error 2\r\n```\r\n\r\nOn my third attempt, I took the inline function from ```src/wht.c```, and replaced the definition in ```src/wht.h``` with the function itself. I changed ```src/pkt.h``` to look for ```machine/endian.h```.\r\n\r\nI ran into a new error regarding ```radix_trie_node_add_flag_to_all_leaves```:\r\n```\r\ncd src; /Applications/Xcode.app/Contents/Developer/usr/bin/make\r\nMakefile variables:\r\nsysname=DARWIN\r\nversion=1.0\r\nCWD=src\r\ngcc -Wall -Wno-deprecated-declarations -g -O3   -I/usr/local/opt/openssl/include -mmacosx-version-min=10.5 -DDARWIN=1 -DVERSION=\\\"1.0\\\" -o pcap2flow  pcap2flow.c p2f.c config.c osdetect.c anon.c pkt_proc.c nfv9.c tls.c classify.c radix_trie.c hdr_dsc.c procwatch.c addr_attr.c addr.c wht.c -lpcap     -lm       -lcrypto\r\np2f.c:1118:66: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat]\r\n  fprintf(output, \"\\t\\t\\t\\\"ts\\\": %ld.%06ld,\\n\", ts_start.tv_sec, ts_start.tv_usec);\r\n                                     ~~~~~                       ^~~~~~~~~~~~~~~~\r\n                                     %06d\r\np2f.c:1119:64: warning: format specifies type 'long' but the argument has type '__darwin_suseconds_t' (aka 'int') [-Wformat]\r\n  fprintf(output, \"\\t\\t\\t\\\"te\\\": %ld.%06ld,\\n\", ts_end.tv_sec, ts_end.tv_usec);\r\n                                     ~~~~~                     ^~~~~~~~~~~~~~\r\n                                     %06d\r\n2 warnings generated.\r\nUndefined symbols for architecture x86_64:\r\n  \"_radix_trie_node_add_flag_to_all_leaves\", referenced from:\r\n      _radix_trie_add_subnet in radix_trie-37d328.o\r\n      _radix_trie_unit_test in radix_trie-37d328.o\r\nld: symbol(s) not found for architecture x86_64\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nmake[1]: *** [pcap2flow] Error 1\r\nmake: *** [pcap2flow] Error 2\r\n```\r\n\r\nIt seemed to be another inlining issue, but not quite. At this point, I'm stumped."},"comment":{"url":"https://api.github.com/repos/davidmcgrew/joy/issues/comments/171058545","html_url":"https://github.com/davidmcgrew/joy/issues/1#issuecomment-171058545","issue_url":"https://api.github.com/repos/davidmcgrew/joy/issues/1","id":171058545,"user":{"login":"davidmcgrew","id":4000559,"avatar_url":"https://avatars.githubusercontent.com/u/4000559?v=3","gravatar_id":"","url":"https://api.github.com/users/davidmcgrew","html_url":"https://github.com/davidmcgrew","followers_url":"https://api.github.com/users/davidmcgrew/followers","following_url":"https://api.github.com/users/davidmcgrew/following{/other_user}","gists_url":"https://api.github.com/users/davidmcgrew/gists{/gist_id}","starred_url":"https://api.github.com/users/davidmcgrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidmcgrew/subscriptions","organizations_url":"https://api.github.com/users/davidmcgrew/orgs","repos_url":"https://api.github.com/users/davidmcgrew/repos","events_url":"https://api.github.com/users/davidmcgrew/events{/privacy}","received_events_url":"https://api.github.com/users/davidmcgrew/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T21:20:42Z","updated_at":"2016-01-12T21:20:42Z","body":"A quick update on this: I fixed all of the issues except for the missing AES files, and I'm upgrading my mac osx system now.   Hopefully there is a compatible version of the AES-128 cipher on that system, so that last fix will just be a matter of finding it and changing the include (and possibly the function invocation) .\r\n\r\nDavid"}}