{"action":"closed","issue":{"url":"https://api.github.com/repos/jyypma/nloptr/issues/19","labels_url":"https://api.github.com/repos/jyypma/nloptr/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/jyypma/nloptr/issues/19/comments","events_url":"https://api.github.com/repos/jyypma/nloptr/issues/19/events","html_url":"https://github.com/jyypma/nloptr/issues/19","id":124397032,"number":19,"title":"error building nloptr on mac","user":{"login":"yina","id":16121,"avatar_url":"https://avatars.githubusercontent.com/u/16121?v=3","gravatar_id":"","url":"https://api.github.com/users/yina","html_url":"https://github.com/yina","followers_url":"https://api.github.com/users/yina/followers","following_url":"https://api.github.com/users/yina/following{/other_user}","gists_url":"https://api.github.com/users/yina/gists{/gist_id}","starred_url":"https://api.github.com/users/yina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yina/subscriptions","organizations_url":"https://api.github.com/users/yina/orgs","repos_url":"https://api.github.com/users/yina/repos","events_url":"https://api.github.com/users/yina/events{/privacy}","received_events_url":"https://api.github.com/users/yina/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-30T20:37:24Z","updated_at":"2015-12-30T20:58:06Z","closed_at":"2015-12-30T20:58:06Z","body":"On my mac, I've installed nlopt with homebrew with the line.\r\n\r\n```\r\nbrew install nlopt\r\n```\r\n\r\nThe files are placed in /usr/local/Cellar/nlopt/2.4.2.\r\n\r\nWhen I run\r\n\r\n```\r\ninstall.packages(\"nloptr\")\r\n```\r\n\r\nI get the following errors\r\n\r\n```\r\n...\r\nchecking nlopt.h usability... yes\r\nchecking nlopt.h presence... yes\r\nchecking for nlopt.h... yes\r\nconfigure: Suitable NLopt library found.\r\nconfigure: creating ./config.status\r\nconfig.status: creating src/Makevars\r\n** libs\r\nclang++ -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include  -I/usr/local/include   -fPIC  -g -O2  -c dummy.cpp -o dummy.o\r\nclang -I/usr/local/Cellar/r/3.2.3/R.framework/Resources/include -DNDEBUG -I/usr/local/include  -I/usr/local/opt/gettext/include -I/usr/local/opt/readline/include -I/usr/local/opt/openssl/include -I/usr/local/include  -I/usr/local/include  -I/usr/local/Cellar/nlopt/2.4.2/include -fPIC  -g -O2  -c nloptr.c -o nloptr.o\r\nclang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/Cellar/r/3.2.3/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/openssl/lib -L/usr/local/lib -o nloptr.so dummy.o nloptr.o -L/usr/local/Cellar/nlopt/2.4.2/lib -lnlopt -lm -F/usr/local/Cellar/r/3.2.3/R.framework/.. -framework R -lintl -Wl,-framework -Wl,CoreFoundation\r\nld: library not found for -lnlopt\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nmake: *** [nloptr.so] Error 1\r\nERROR: compilation failed for package ‘nloptr’\r\n* removing ‘/usr/local/lib/R/3.2/site-library/nloptr’\r\n* restoring previous ‘/usr/local/lib/R/3.2/site-library/nloptr’\r\nWarning in install.packages :\r\n  installation of package ‘nloptr’ had non-zero exit status\r\n\r\nThe downloaded source packages are in\r\n\t‘/private/var/folders/x0/y0b_v56j1j79jr55r9yftj580000gn/T/RtmptXK02m/downloaded_packages’\r\n```\r\n\r\nThe clang++ compilation clearly has the include and lib directories linked as per L/usr/local/Cellar/nlopt/2.4.2/lib. Help appreciated."}}