{"action":"created","issue":{"url":"https://api.github.com/repos/beardsvibe/buildfox/issues/139","repository_url":"https://api.github.com/repos/beardsvibe/buildfox","labels_url":"https://api.github.com/repos/beardsvibe/buildfox/issues/139/labels{/name}","comments_url":"https://api.github.com/repos/beardsvibe/buildfox/issues/139/comments","events_url":"https://api.github.com/repos/beardsvibe/buildfox/issues/139/events","html_url":"https://github.com/beardsvibe/buildfox/issues/139","id":140380925,"number":139,"title":"OS X shared libs install name","user":{"login":"jimon","id":1333661,"avatar_url":"https://avatars.githubusercontent.com/u/1333661?v=3","gravatar_id":"","url":"https://api.github.com/users/jimon","html_url":"https://github.com/jimon","followers_url":"https://api.github.com/users/jimon/followers","following_url":"https://api.github.com/users/jimon/following{/other_user}","gists_url":"https://api.github.com/users/jimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimon/subscriptions","organizations_url":"https://api.github.com/users/jimon/orgs","repos_url":"https://api.github.com/users/jimon/repos","events_url":"https://api.github.com/users/jimon/events{/privacy}","received_events_url":"https://api.github.com/users/jimon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/beardsvibe/buildfox/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/beardsvibe/buildfox/milestones/2","html_url":"https://github.com/beardsvibe/buildfox/milestones/v0.3%20release","labels_url":"https://api.github.com/repos/beardsvibe/buildfox/milestones/2/labels","id":1371875,"number":2,"title":"v0.3 release","description":"","creator":{"login":"jimon","id":1333661,"avatar_url":"https://avatars.githubusercontent.com/u/1333661?v=3","gravatar_id":"","url":"https://api.github.com/users/jimon","html_url":"https://github.com/jimon","followers_url":"https://api.github.com/users/jimon/followers","following_url":"https://api.github.com/users/jimon/following{/other_user}","gists_url":"https://api.github.com/users/jimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimon/subscriptions","organizations_url":"https://api.github.com/users/jimon/orgs","repos_url":"https://api.github.com/users/jimon/repos","events_url":"https://api.github.com/users/jimon/events{/privacy}","received_events_url":"https://api.github.com/users/jimon/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":1,"state":"open","created_at":"2015-10-23T07:26:26Z","updated_at":"2016-03-12T12:48:27Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-03-12T12:48:13Z","updated_at":"2016-03-12T12:51:32Z","closed_at":null,"body":"While working on #93 I figured out that on OS X we are building shared libs somewhat incorrect. If we don't specify install name while building the shared libs, so by default ld will take the name provided in ```-o``` as install_name (wtf srsly). It makes it to set whole ```build/bin_debug/libname.so```as install_name, which limits where executable can look for libs, because executable will look into ```$cwd/$install_name```, which in the end makes an executable which can only be started from specific cwd (facepalm).\r\n\r\nTo fix it we need to set install_name with @rpath prefix, and than set rpath in executable to be something like @executable_path, so dyld will actually look in the place where executable is located regardless of cwd. See https://github.com/beardsvibe/buildfox/commit/9591e3a17add2d928430599f551936c2d714fc91\r\n\r\nPS. On windows PE loader always look for dlls in executable folder, regardless of cwd, why OS X is that different? :("},"comment":{"url":"https://api.github.com/repos/beardsvibe/buildfox/issues/comments/195735077","html_url":"https://github.com/beardsvibe/buildfox/issues/139#issuecomment-195735077","issue_url":"https://api.github.com/repos/beardsvibe/buildfox/issues/139","id":195735077,"user":{"login":"jimon","id":1333661,"avatar_url":"https://avatars.githubusercontent.com/u/1333661?v=3","gravatar_id":"","url":"https://api.github.com/users/jimon","html_url":"https://github.com/jimon","followers_url":"https://api.github.com/users/jimon/followers","following_url":"https://api.github.com/users/jimon/following{/other_user}","gists_url":"https://api.github.com/users/jimon/gists{/gist_id}","starred_url":"https://api.github.com/users/jimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimon/subscriptions","organizations_url":"https://api.github.com/users/jimon/orgs","repos_url":"https://api.github.com/users/jimon/repos","events_url":"https://api.github.com/users/jimon/events{/privacy}","received_events_url":"https://api.github.com/users/jimon/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T12:51:32Z","updated_at":"2016-03-12T12:51:32Z","body":"The main problem here IMHO that buildfox currently doesn't have tools to extract filename and set install_name by it's own. Otherwise we could just fix core definitions and done :)"}}