{"action":"created","issue":{"url":"https://api.github.com/repos/klamonte/qodem/issues/39","repository_url":"https://api.github.com/repos/klamonte/qodem","labels_url":"https://api.github.com/repos/klamonte/qodem/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/klamonte/qodem/issues/39/comments","events_url":"https://api.github.com/repos/klamonte/qodem/issues/39/events","html_url":"https://github.com/klamonte/qodem/issues/39","id":164614310,"number":39,"title":"Generic build crashes on OS X","user":{"login":"rjmooney","id":4219,"avatar_url":"https://avatars.githubusercontent.com/u/4219?v=3","gravatar_id":"","url":"https://api.github.com/users/rjmooney","html_url":"https://github.com/rjmooney","followers_url":"https://api.github.com/users/rjmooney/followers","following_url":"https://api.github.com/users/rjmooney/following{/other_user}","gists_url":"https://api.github.com/users/rjmooney/gists{/gist_id}","starred_url":"https://api.github.com/users/rjmooney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjmooney/subscriptions","organizations_url":"https://api.github.com/users/rjmooney/orgs","repos_url":"https://api.github.com/users/rjmooney/repos","events_url":"https://api.github.com/users/rjmooney/events{/privacy}","received_events_url":"https://api.github.com/users/rjmooney/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-08T20:53:06Z","updated_at":"2016-10-26T23:46:48Z","closed_at":null,"body":"**tl;dr:** I'm able to build under OS X but the binary crashes:\r\n\r\n```sh\r\n$ bin/qodem \r\nqodem(18810,0x7fff7b18e000) malloc: *** error for object 0x7f976c000000: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\nAbort trap: 6\r\n```\r\n\r\nHere's some information on my setup:\r\n\r\n```sh\r\n$ sw_vers\r\nProductName:\tMac OS X\r\nProductVersion:\t10.11.5\r\nBuildVersion:\t15F34\r\n\r\n$ cc --version\r\nApple LLVM version 7.3.0 (clang-703.0.31)\r\nTarget: x86_64-apple-darwin15.5.0\r\nThread model: posix\r\nInstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\r\n```\r\n\r\nInitially, `configure` was not able to find SDL2 or ncurses. Using the latest homebrew update, I installed them:\r\n\r\n```sh\r\n$ brew install sdl2\r\n$ brew install ncurses\r\n```\r\n\r\nConfigure was then not able to find `Makefile.in` so to resolve that (and for good measure), I ran:\r\n\r\n```sh\r\n$ aclocal\r\n$ autoconf\r\n$ autoheader\r\n$ automake --add-missing\r\n```\r\n\r\nI was then able to configure and build qodem:\r\n\r\n```sh\r\n$ LDFLAGS=\"-L/usr/local/opt/ncurses/lib -L/usr/local/lib\" CPPFLAGS=\"-I/usr/local/opt/ncurses/include\" ./configure\r\n$ make\r\n**lots of warnings here; no errors**\r\n```\r\n\r\nHowever when I run the binary it crashes:\r\n\r\n```sh\r\n$ bin/qodem \r\nqodem(18810,0x7fff7b18e000) malloc: *** error for object 0x7f976c000000: pointer being freed was not allocated\r\n*** set a breakpoint in malloc_error_break to debug\r\nAbort trap: 6\r\n```\r\n\r\nHere are the configure and makefile output:\r\n\r\n[config-log.txt](https://github.com/klamonte/qodem/files/355100/config-log.txt)\r\n[make-log.txt](https://github.com/klamonte/qodem/files/355101/make-log.txt)\r\n\r\nWhat am I missing?"},"comment":{"url":"https://api.github.com/repos/klamonte/qodem/issues/comments/256509025","html_url":"https://github.com/klamonte/qodem/issues/39#issuecomment-256509025","issue_url":"https://api.github.com/repos/klamonte/qodem/issues/39","id":256509025,"user":{"login":"klamonte","id":4357501,"avatar_url":"https://avatars.githubusercontent.com/u/4357501?v=3","gravatar_id":"","url":"https://api.github.com/users/klamonte","html_url":"https://github.com/klamonte","followers_url":"https://api.github.com/users/klamonte/followers","following_url":"https://api.github.com/users/klamonte/following{/other_user}","gists_url":"https://api.github.com/users/klamonte/gists{/gist_id}","starred_url":"https://api.github.com/users/klamonte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klamonte/subscriptions","organizations_url":"https://api.github.com/users/klamonte/orgs","repos_url":"https://api.github.com/users/klamonte/repos","events_url":"https://api.github.com/users/klamonte/events{/privacy}","received_events_url":"https://api.github.com/users/klamonte/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T23:46:48Z","updated_at":"2016-10-26T23:46:48Z","body":"Oh gosh, my apologies for missing this bug report!  I had just started preparing to move out my old house and must have missed the notification in the bustle.\r\n\r\nLooking at the make-log, a few things to try:\r\n\r\n1. --disable-upnp to configure.  miniupnpc is pulling the wrong headers it looks like.\r\n2. 'make -f build/Makefile.generic' and see how the minimal ncurses build compares.\r\n\r\nI am seeing several other errors in the make log that might lead to crashes, around the size arguments to snprintf().  I will have to do a more thorough port on a recent OSX / clang.  Plus all warnings from colors.c.  I'll need to noodle on this one.  gcc accepts -finput-charset, but clang does not, I might need to either suppress the warning for clang or put another block of screens in UTF8 encoding for the non-Windows compilers.\r\n\r\nApologies again for the late response. :("}}
{"actor":{"display_login":"klamonte"}}