{"action":"created","issue":{"url":"https://api.github.com/repos/chrsmith/leveldb/issues/15","labels_url":"https://api.github.com/repos/chrsmith/leveldb/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/chrsmith/leveldb/issues/15/comments","events_url":"https://api.github.com/repos/chrsmith/leveldb/issues/15/events","html_url":"https://github.com/chrsmith/leveldb/issues/15","id":58933201,"number":15,"title":"Fix build on OS X and Linux","user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/chrsmith/leveldb/labels/auto-migrated","name":"auto-migrated","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/leveldb/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/chrsmith/leveldb/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-25T16:58:55Z","updated_at":"2015-02-25T16:58:56Z","closed_at":"2015-02-25T16:58:55Z","body":"```\nThe Makefile refers to PLATFORM_CCFLAGS instead of PLATFORM_CFLAGS. As a \nresult, -DOS_{MACOSX,LINUX} are not defined and the build fails. The output of \nmake on OS X (XCode 4):\n\ng++ -c -I. -I./include -fno-builtin-memcmp -DLEVELDB_PLATFORM_POSIX  -O2 \n-DNDEBUG        -DSNAPPY db/version_set.cc -o db/version_set.o\nIn file included from ./port/port.h:14,\n                 from ./util/coding.h:17,\n                 from ./db/dbformat.h:13,\n                 from ./db/version_set.h:21,\n                 from db/version_set.cc:5:\n./port/port_posix.h:20:22: error: endian.h: No such file or directory\nmake: *** [db/version_set.o] Error 1\n\nOn Linux (at least Ubuntu 11.04), the concatenation operator on shell variables \nis only supported in Bash ≥3.1 (http://tldp.org/LDP/abs/html/bashver3.html). \nThis causes the following error in addition to the above:\n\n./build_detect_platform: 55: PORT_CFLAGS+= -DLEVELDB_PLATFORM_POSIX: not found\n\nThe attached patch corrects the CFLAGS definition to use PLATFORM_CFLAGS, and \navoids the use of the += operator (an alternative would be to run the script \nwith bash instead of sh).\n\nThe patch contains two minor changes for the OS X build:\n* Removes port/port_osx.{h,cc}, which have been fully merged into \nport/port_posix.{h,cc}.\n* Removes -pthread and -lpthread, which are implicit in all OS X builds.\n\n```\n\n-----\nOriginal issue reported on code.google.com by `ashoema...@gmail.com` on 29 Jun 2011 at 10:48\n\nAttachments:\n* [make.patch](https://storage.googleapis.com/google-code-attachments/leveldb/issue-15/comment-0/make.patch)\n"},"comment":{"url":"https://api.github.com/repos/chrsmith/leveldb/issues/comments/76001620","html_url":"https://github.com/chrsmith/leveldb/issues/15#issuecomment-76001620","issue_url":"https://api.github.com/repos/chrsmith/leveldb/issues/15","id":76001620,"user":{"login":"GoogleCodeExporter","id":9614759,"avatar_url":"https://avatars.githubusercontent.com/u/9614759?v=3","gravatar_id":"","url":"https://api.github.com/users/GoogleCodeExporter","html_url":"https://github.com/GoogleCodeExporter","followers_url":"https://api.github.com/users/GoogleCodeExporter/followers","following_url":"https://api.github.com/users/GoogleCodeExporter/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCodeExporter/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCodeExporter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCodeExporter/subscriptions","organizations_url":"https://api.github.com/users/GoogleCodeExporter/orgs","repos_url":"https://api.github.com/users/GoogleCodeExporter/repos","events_url":"https://api.github.com/users/GoogleCodeExporter/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCodeExporter/received_events","type":"User","site_admin":false},"created_at":"2015-02-25T16:58:56Z","updated_at":"2015-02-25T16:58:56Z","body":"```\nFixed in Revision 35\n```\n\n-----\nOriginal comment by `ga...@google.com` on 29 Jun 2011 at 10:59"}}