{"action":"created","issue":{"url":"https://api.github.com/repos/stevengj/nlopt/issues/10","labels_url":"https://api.github.com/repos/stevengj/nlopt/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/stevengj/nlopt/issues/10/comments","events_url":"https://api.github.com/repos/stevengj/nlopt/issues/10/events","html_url":"https://github.com/stevengj/nlopt/issues/10","id":27383227,"number":10,"title":"Compiling under mac os x 10.9","user":{"login":"giagkiozis","id":1363855,"avatar_url":"https://avatars.githubusercontent.com/u/1363855?v=3","gravatar_id":"","url":"https://api.github.com/users/giagkiozis","html_url":"https://github.com/giagkiozis","followers_url":"https://api.github.com/users/giagkiozis/followers","following_url":"https://api.github.com/users/giagkiozis/following{/other_user}","gists_url":"https://api.github.com/users/giagkiozis/gists{/gist_id}","starred_url":"https://api.github.com/users/giagkiozis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giagkiozis/subscriptions","organizations_url":"https://api.github.com/users/giagkiozis/orgs","repos_url":"https://api.github.com/users/giagkiozis/repos","events_url":"https://api.github.com/users/giagkiozis/events{/privacy}","received_events_url":"https://api.github.com/users/giagkiozis/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-02-11T20:32:01Z","updated_at":"2015-03-10T04:43:45Z","closed_at":"2014-05-20T18:27:24Z","body":"I had an issue compiling the matlab plugin for NLopt under mac os x 10.9. The error I was getting is:\r\n\"Undefined symbols for architecture x86_64:\r\n \"___emutls_get_address\", referenced from:\r\n     _nlopt_srand in libnlopt.a(general.o)\r\n     _nlopt_srand_time in libnlopt.a(general.o)\r\n     _nlopt_srand_time_default in libnlopt.a(general.o)\r\n     _nlopt_seconds in libnlopt.a(timer.o)\r\n     _nlopt_init_genrand in libnlopt.a(mt19937ar.o)\r\n     _nlopt_genrand_int32 in libnlopt.a(mt19937ar.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\n\r\n   mex: link of ' \"nlopt_optimize-mex.mexmaci64\"' failed.\"\r\n\r\nAll that was necessary to resolve this was to add the following in timer.c (after line 34: #endif):\r\n#ifdef __MACH__\r\n#include <mach/clock.h>\r\n#include <mach/mach.h>\r\n#endif"},"comment":{"url":"https://api.github.com/repos/stevengj/nlopt/issues/comments/77995151","html_url":"https://github.com/stevengj/nlopt/issues/10#issuecomment-77995151","issue_url":"https://api.github.com/repos/stevengj/nlopt/issues/10","id":77995151,"user":{"login":"bdiazdeastarloa","id":11171876,"avatar_url":"https://avatars.githubusercontent.com/u/11171876?v=3","gravatar_id":"","url":"https://api.github.com/users/bdiazdeastarloa","html_url":"https://github.com/bdiazdeastarloa","followers_url":"https://api.github.com/users/bdiazdeastarloa/followers","following_url":"https://api.github.com/users/bdiazdeastarloa/following{/other_user}","gists_url":"https://api.github.com/users/bdiazdeastarloa/gists{/gist_id}","starred_url":"https://api.github.com/users/bdiazdeastarloa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdiazdeastarloa/subscriptions","organizations_url":"https://api.github.com/users/bdiazdeastarloa/orgs","repos_url":"https://api.github.com/users/bdiazdeastarloa/repos","events_url":"https://api.github.com/users/bdiazdeastarloa/events{/privacy}","received_events_url":"https://api.github.com/users/bdiazdeastarloa/received_events","type":"User","site_admin":false},"created_at":"2015-03-10T04:43:45Z","updated_at":"2015-03-10T04:43:45Z","body":"Hi I am having the same problem when trying to compile in MATLAB R2014a in OS X 10.10:\r\nError using mex\r\nUndefined symbols for architecture x86_64:\r\n  \"___emutls_get_address\", referenced from:\r\n      _nlopt_srand in libnlopt.a(general.o)\r\n      _nlopt_srand_time in libnlopt.a(general.o)\r\n      _nlopt_srand_time_default in libnlopt.a(general.o)\r\n      _nlopt_seconds in libnlopt.a(timer.o)\r\n      _nlopt_init_genrand in libnlopt.a(mt19937ar.o)\r\n      _nlopt_genrand_int32 in libnlopt.a(mt19937ar.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\n\r\nI have indicated the mex path, but this persists. Where do I find the timer.c to try the edit suggested above?\r\n\r\nThanks a lot. \r\n"}}