{"action":"created","issue":{"url":"https://api.github.com/repos/SFTtech/openage/issues/308","labels_url":"https://api.github.com/repos/SFTtech/openage/issues/308/labels{/name}","comments_url":"https://api.github.com/repos/SFTtech/openage/issues/308/comments","events_url":"https://api.github.com/repos/SFTtech/openage/issues/308/events","html_url":"https://github.com/SFTtech/openage/issues/308","id":78717314,"number":308,"title":"Build failing in OSX 10.10.3 due to issue with thread_local declaration","user":{"login":"sreejithr","id":1938876,"avatar_url":"https://avatars.githubusercontent.com/u/1938876?v=3","gravatar_id":"","url":"https://api.github.com/users/sreejithr","html_url":"https://github.com/sreejithr","followers_url":"https://api.github.com/users/sreejithr/followers","following_url":"https://api.github.com/users/sreejithr/following{/other_user}","gists_url":"https://api.github.com/users/sreejithr/gists{/gist_id}","starred_url":"https://api.github.com/users/sreejithr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sreejithr/subscriptions","organizations_url":"https://api.github.com/users/sreejithr/orgs","repos_url":"https://api.github.com/users/sreejithr/repos","events_url":"https://api.github.com/users/sreejithr/events{/privacy}","received_events_url":"https://api.github.com/users/sreejithr/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-05-20T22:04:59Z","updated_at":"2015-05-21T18:59:15Z","closed_at":null,"body":"I did the usual `./configure --mode=debug --compiler=clang` and `make` where it crashes while building `thread_id.cpp`.\r\n\r\nOSX version: `10.10.3`\r\nXcode version: `6.3`\r\nClang version:\r\n```\r\nApple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)\r\nTarget: x86_64-apple-darwin14.3.0\r\nThread model: posix\r\n```\r\nHere's the error from `make`:\r\n```\r\n[ 31%] Building CXX object cpp/CMakeFiles/openage.dir/unit/unit.cpp.o\r\n[ 32%] Building CXX object cpp/CMakeFiles/openage.dir/unit/unit_container.cpp.o\r\n[ 33%] Building CXX object cpp/CMakeFiles/openage.dir/unit/unit_texture.cpp.o\r\n[ 34%] Building CXX object cpp/CMakeFiles/openage.dir/unit/unit_type.cpp.o\r\n[ 34%] Building CXX object cpp/CMakeFiles/openage.dir/util/thread_id.cpp.o\r\n/Users/sreejith/Code/openage/cpp/util/thread_id.cpp:16:37: error: initializer for\r\n      thread-local variable must be a constant expression\r\nthread_local ThreadIdSupplier const current_thread_id\r\n                                    ^~~~~~~~~~~~~~~~~\r\n/Users/sreejith/Code/openage/cpp/util/thread_id.cpp:16:37: note: use 'thread_local' to\r\n      allow this\r\n/Users/sreejith/Code/openage/cpp/util/thread_id.cpp:16:54: error: expected ';' after top\r\n      level declarator\r\nthread_local ThreadIdSupplier const current_thread_id\r\n                                                     ^\r\n                                                     ;\r\n2 errors generated.\r\nmake[3]: *** [cpp/CMakeFiles/openage.dir/util/thread_id.cpp.o] Error 1\r\nmake[2]: *** [cpp/CMakeFiles/openage.dir/all] Error 2\r\nmake[1]: *** [all] Error 2\r\nmake: *** [openage] Error 2\r\n```\r\nI read that this is a Mac bug with the new Xcode 6.3 update. Folks over at ROOT were having [similar issue](https://sft.its.cern.ch/jira/browse/ROOT-7267). Seems they've fixed it ([commit](https://github.com/root-mirror/root/commit/eb8b9597a14e1bf93e55aac73276db668020fe88#diff-7c21c65c67bbc341a44edb339bf9d01e)).\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/16290503-build-failing-in-osx-10-10-3-due-to-issue-with-thread_local-declaration?utm_campaign=plugin&utm_content=tracker%2F371436&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F371436&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/SFTtech/openage/issues/comments/104389101","html_url":"https://github.com/SFTtech/openage/issues/308#issuecomment-104389101","issue_url":"https://api.github.com/repos/SFTtech/openage/issues/308","id":104389101,"user":{"login":"mic-e","id":796624,"avatar_url":"https://avatars.githubusercontent.com/u/796624?v=3","gravatar_id":"","url":"https://api.github.com/users/mic-e","html_url":"https://github.com/mic-e","followers_url":"https://api.github.com/users/mic-e/followers","following_url":"https://api.github.com/users/mic-e/following{/other_user}","gists_url":"https://api.github.com/users/mic-e/gists{/gist_id}","starred_url":"https://api.github.com/users/mic-e/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mic-e/subscriptions","organizations_url":"https://api.github.com/users/mic-e/orgs","repos_url":"https://api.github.com/users/mic-e/repos","events_url":"https://api.github.com/users/mic-e/events{/privacy}","received_events_url":"https://api.github.com/users/mic-e/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T18:59:15Z","updated_at":"2015-05-21T18:59:15Z","body":"The consequence is that thread ids are completely broken, which should mess up thread identification in the logger, and thread handling in the job manager."}}