{"action":"created","issue":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/148","repository_url":"https://api.github.com/repos/pysam-developers/pysam","labels_url":"https://api.github.com/repos/pysam-developers/pysam/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/pysam-developers/pysam/issues/148/comments","events_url":"https://api.github.com/repos/pysam-developers/pysam/issues/148/events","html_url":"https://github.com/pysam-developers/pysam/issues/148","id":96848710,"number":148,"title":"ImportError: Undefined symbol 'bam_aux_get' (Or, how to using pysam's cython interface properly)","user":{"login":"NoSeatbelts","id":6412885,"avatar_url":"https://avatars.githubusercontent.com/u/6412885?v=3","gravatar_id":"","url":"https://api.github.com/users/NoSeatbelts","html_url":"https://github.com/NoSeatbelts","followers_url":"https://api.github.com/users/NoSeatbelts/followers","following_url":"https://api.github.com/users/NoSeatbelts/following{/other_user}","gists_url":"https://api.github.com/users/NoSeatbelts/gists{/gist_id}","starred_url":"https://api.github.com/users/NoSeatbelts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NoSeatbelts/subscriptions","organizations_url":"https://api.github.com/users/NoSeatbelts/orgs","repos_url":"https://api.github.com/users/NoSeatbelts/repos","events_url":"https://api.github.com/users/NoSeatbelts/events{/privacy}","received_events_url":"https://api.github.com/users/NoSeatbelts/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-23T16:09:10Z","updated_at":"2016-02-21T20:09:16Z","closed_at":"2016-02-21T20:09:16Z","body":"This isn't a bug with the python functionality of pysam. However, it is making it difficult for me to take advantage of pysam's wrapping of htslib.\r\n\r\nCurrently, the portion of my setup.py for my project looks like this:\r\n```python\r\next = list(chain.from_iterable(map(cythonize, ['*/*.pyx', '*/*.py'])))\r\nfor x in ext:\r\n    x.extra_link_args += pysam.get_libraries()\r\n    x.define_macros += pysam.get_defines()\r\nincludes = [np.get_include(), os.path.abspath(\"include\"), os.path.abspath(\"include/cephes\")] + pysam.get_include()\r\n```\r\nI then pass ext as 'ext_modules' to setup, and includes to setup as 'include_dirs'.\r\n\r\nThis compiles correctly, but when I attempt to import my module, I get this error:\r\n\r\n$AbsPath/anaconda/lib/python2.7/site-packages/$PACKAGE/ModuleName.so: undefined symbol: bam_aux_get\r\n\r\nStrangely enough, it looks like I'm able to use bam_aux2Z, bam_hdr_t, bam_get_seq, and bam_get_aux.\r\n\r\nMy aim was to use bam_aux_get to write more nogil/faster code, rather than interacting with the python objects, but I can't get it to work properly. Have you run into such an issue with linking?"},"comment":{"url":"https://api.github.com/repos/pysam-developers/pysam/issues/comments/186902632","html_url":"https://github.com/pysam-developers/pysam/issues/148#issuecomment-186902632","issue_url":"https://api.github.com/repos/pysam-developers/pysam/issues/148","id":186902632,"user":{"login":"AndreasHeger","id":4426336,"avatar_url":"https://avatars.githubusercontent.com/u/4426336?v=3","gravatar_id":"","url":"https://api.github.com/users/AndreasHeger","html_url":"https://github.com/AndreasHeger","followers_url":"https://api.github.com/users/AndreasHeger/followers","following_url":"https://api.github.com/users/AndreasHeger/following{/other_user}","gists_url":"https://api.github.com/users/AndreasHeger/gists{/gist_id}","starred_url":"https://api.github.com/users/AndreasHeger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndreasHeger/subscriptions","organizations_url":"https://api.github.com/users/AndreasHeger/orgs","repos_url":"https://api.github.com/users/AndreasHeger/repos","events_url":"https://api.github.com/users/AndreasHeger/events{/privacy}","received_events_url":"https://api.github.com/users/AndreasHeger/received_events","type":"User","site_admin":false},"created_at":"2016-02-21T20:09:16Z","updated_at":"2016-02-21T20:09:16Z","body":"Closing for now, please reopen if problem persist."}}