{"action":"opened","issue":{"url":"https://api.github.com/repos/wolkykim/qlibc/issues/10","labels_url":"https://api.github.com/repos/wolkykim/qlibc/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/wolkykim/qlibc/issues/10/comments","events_url":"https://api.github.com/repos/wolkykim/qlibc/issues/10/events","html_url":"https://github.com/wolkykim/qlibc/issues/10","id":55383993,"number":10,"title":"make error on Darwin, -soname flag is uknown option to linker","user":{"login":"netpoetica","id":1972316,"avatar_url":"https://avatars.githubusercontent.com/u/1972316?v=3","gravatar_id":"","url":"https://api.github.com/users/netpoetica","html_url":"https://github.com/netpoetica","followers_url":"https://api.github.com/users/netpoetica/followers","following_url":"https://api.github.com/users/netpoetica/following{/other_user}","gists_url":"https://api.github.com/users/netpoetica/gists{/gist_id}","starred_url":"https://api.github.com/users/netpoetica/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netpoetica/subscriptions","organizations_url":"https://api.github.com/users/netpoetica/orgs","repos_url":"https://api.github.com/users/netpoetica/repos","events_url":"https://api.github.com/users/netpoetica/events{/privacy}","received_events_url":"https://api.github.com/users/netpoetica/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-24T20:38:01Z","updated_at":"2015-01-24T20:38:01Z","closed_at":null,"body":"Firstly, I apologize if this is something on my own side (it probably is) - I am not super familiar with CMake, as I normally utilize plain old make.\r\n\r\nWhen attempting to run `make` on Mac OSX/Darwin, I receive an error about -soname flag. I do have gcc installed, and it appears that the generated Makefiles are properly instructed to use gcc (not clang) - however, this error does appear to be clang related (see below). My system info:\r\n\r\n```\r\n➜  qlibc git:(master) ✗ uname -a\r\nDarwin MacBook-Air.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64\r\n\r\n➜  qlibc git:(master) ✗ cmake --version\r\ncmake version 3.1.1\r\n\r\n➜  qlibc git:(master) ✗ gcc -v\r\nConfigured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1\r\nApple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)\r\nTarget: x86_64-apple-darwin12.5.0\r\nThread model: posix\r\n```\r\n\r\n`./configure` was run succesfully, but [here](http://pastebin.com/YPaGku7r) is the config.log if it's any help.\r\n\r\nThe specific output of `make` is below, with the error at the very bottom:\r\n```\r\n➜  qlibc git:(master) ✗ make\r\n===> src\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o containers/qlist.o containers/qlist.c\r\ncontainers/qlist.c:873:5: warning: if statement has empty body [-Wempty-body]\r\n    Q_MUTEX_DESTROY(list->qmutex);\r\n    ^\r\n./internal/qinternal.h:121:68: note: expanded from macro 'Q_MUTEX_DESTROY'\r\n        if(x->count != 0) DEBUG(\"Q_MUTEX: mutex counter is not 0.\");    \\\r\n                                                                   ^\r\ncontainers/qlist.c:873:5: note: put the semicolon on a separate line to silence this warning\r\n./internal/qinternal.h:121:68: note: expanded from macro 'Q_MUTEX_DESTROY'\r\n        if(x->count != 0) DEBUG(\"Q_MUTEX: mutex counter is not 0.\");    \\\r\n                                                                   ^\r\n1 warning generated.\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o containers/qlisttbl.o containers/qlisttbl.c\r\ncontainers/qlisttbl.c:1072:5: warning: if statement has empty body [-Wempty-body]\r\n    Q_MUTEX_DESTROY(tbl->qmutex);\r\n    ^\r\n./internal/qinternal.h:121:68: note: expanded from macro 'Q_MUTEX_DESTROY'\r\n        if(x->count != 0) DEBUG(\"Q_MUTEX: mutex counter is not 0.\");    \\\r\n                                                                   ^\r\ncontainers/qlisttbl.c:1072:5: note: put the semicolon on a separate line to silence this warning\r\n./internal/qinternal.h:121:68: note: expanded from macro 'Q_MUTEX_DESTROY'\r\n        if(x->count != 0) DEBUG(\"Q_MUTEX: mutex counter is not 0.\");    \\\r\n                                                                   ^\r\n1 warning generated.\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o containers/qhashtbl.o containers/qhashtbl.c\r\ncontainers/qhashtbl.c:757:5: warning: if statement has empty body [-Wempty-body]\r\n    Q_MUTEX_DESTROY(tbl->qmutex);\r\n    ^\r\n./internal/qinternal.h:121:68: note: expanded from macro 'Q_MUTEX_DESTROY'\r\n        if(x->count != 0) DEBUG(\"Q_MUTEX: mutex counter is not 0.\");    \\\r\n                                                                   ^\r\ncontainers/qhashtbl.c:757:5: note: put the semicolon on a separate line to silence this warning\r\n./internal/qinternal.h:121:68: note: expanded from macro 'Q_MUTEX_DESTROY'\r\n        if(x->count != 0) DEBUG(\"Q_MUTEX: mutex counter is not 0.\");    \\\r\n                                                                   ^\r\n1 warning generated.\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o containers/qhasharr.o containers/qhasharr.c\r\ncontainers/qhasharr.c:758:22: warning: unused variable 'data' [-Wunused-variable]\r\n    qhasharr_data_t *data = tbl->data;\r\n                     ^\r\ncontainers/qhasharr.c:911:22: warning: unused variable 'data' [-Wunused-variable]\r\n    qhasharr_data_t *data = tbl->data;\r\n                     ^\r\n2 warnings generated.\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o containers/qvector.o containers/qvector.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o containers/qqueue.o containers/qqueue.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o containers/qstack.o containers/qstack.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qcount.o utilities/qcount.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qencode.o utilities/qencode.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qfile.o utilities/qfile.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qhash.o utilities/qhash.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qio.o utilities/qio.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qsocket.o utilities/qsocket.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qstring.o utilities/qstring.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qsystem.o utilities/qsystem.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o utilities/qtime.o utilities/qtime.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o ipc/qsem.o ipc/qsem.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o ipc/qshm.o ipc/qshm.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o internal/qinternal.o internal/qinternal.c\r\ngcc -Wall -Wstrict-prototypes -fPIC -g -O2 -I/usr/include -I/usr/local/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I../include/qlibc -I./internal -c -o internal/md5/md5c.o internal/md5/md5c.c\r\n/usr/bin/ar -rc ../lib/libqlibc.a containers/qlist.o containers/qlisttbl.o containers/qhashtbl.o containers/qhasharr.o containers/qvector.o containers/qqueue.o containers/qstack.o utilities/qcount.o utilities/qencode.o utilities/qfile.o utilities/qhash.o utilities/qio.o utilities/qsocket.o utilities/qstring.o utilities/qsystem.o utilities/qtime.o ipc/qsem.o ipc/qshm.o internal/qinternal.o internal/md5/md5c.o\r\nranlib ../lib/libqlibc.a\r\ngcc -shared -Wl,-soname,libqlibc.so.2 -o ../lib/libqlibc.so.2 containers/qlist.o containers/qlisttbl.o containers/qhashtbl.o containers/qhasharr.o containers/qvector.o containers/qqueue.o containers/qstack.o utilities/qcount.o utilities/qencode.o utilities/qfile.o utilities/qhash.o utilities/qio.o utilities/qsocket.o utilities/qstring.o utilities/qsystem.o utilities/qtime.o ipc/qsem.o ipc/qshm.o internal/qinternal.o internal/md5/md5c.o\r\nld: unknown option: -soname\r\nclang: error: linker command failed with exit code 1 (use -v to see invocation)\r\nmake[1]: *** [qlibc] Error 1\r\n<=== src\r\n```\r\n\r\nAn issue reported on StackOverflow suggests that Mac OSX should [use -install_name instead of -soname](http://stackoverflow.com/a/8424297/802397), but I am not sure how to instruct CMake of this.\r\n\r\nAny ideas about this one? Thanks!"}}