{"action":"created","issue":{"url":"https://api.github.com/repos/chemfiles/chemfiles/issues/168","repository_url":"https://api.github.com/repos/chemfiles/chemfiles","labels_url":"https://api.github.com/repos/chemfiles/chemfiles/issues/168/labels{/name}","comments_url":"https://api.github.com/repos/chemfiles/chemfiles/issues/168/comments","events_url":"https://api.github.com/repos/chemfiles/chemfiles/issues/168/events","html_url":"https://github.com/chemfiles/chemfiles/issues/168","id":330708896,"node_id":"MDU6SXNzdWUzMzA3MDg4OTY=","number":168,"title":"Error on PDB reading with anaconda 0.8.0 prebuilt library for linux 64 bits","user":{"login":"pgbarletta","id":5693483,"node_id":"MDQ6VXNlcjU2OTM0ODM=","avatar_url":"https://avatars0.githubusercontent.com/u/5693483?v=4","gravatar_id":"","url":"https://api.github.com/users/pgbarletta","html_url":"https://github.com/pgbarletta","followers_url":"https://api.github.com/users/pgbarletta/followers","following_url":"https://api.github.com/users/pgbarletta/following{/other_user}","gists_url":"https://api.github.com/users/pgbarletta/gists{/gist_id}","starred_url":"https://api.github.com/users/pgbarletta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pgbarletta/subscriptions","organizations_url":"https://api.github.com/users/pgbarletta/orgs","repos_url":"https://api.github.com/users/pgbarletta/repos","events_url":"https://api.github.com/users/pgbarletta/events{/privacy}","received_events_url":"https://api.github.com/users/pgbarletta/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-08T15:42:12Z","updated_at":"2018-06-08T15:53:10Z","closed_at":null,"author_association":"MEMBER","body":"Found this issue when traying to read a PDB file with the Julia bindings:\r\n![image](https://user-images.githubusercontent.com/5693483/41166475-ae0873ce-6b16-11e8-8edc-511d4e529783.png)\r\n\r\nI then tried to compile [this](https://gist.github.com/pgbarletta/41fcfc1d8c36640fde3266069a76a69e) using the same pre-built anaconda libraries Julia was using:\r\n```g++ piola.cpp -I/home/german/.julia/v0.6/Chemfiles/deps/usr/include /home/german/.julia/v0.6/Chemfiles/deps/usr/lib/libchemfiles.so -lnetcdf```\r\n\r\nand got this:\r\n```\r\n/tmp/cc7XkS9e.o: In function `main':\r\nas.cpp:(.text+0x90): undefined reference to `chemfiles::Trajectory::Trajectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'\r\ncollect2: error: ld returned 1 exit status\r\n```\r\nSo then, I moved my own library (which is a newer version) to the same location and recompiled and ran successfully:\r\n```g++ piola.cpp -I/home/german/.julia/v0.6/Chemfiles/deps/usr/include /home/german/.julia/v0.6/Chemfiles/deps/usr/lib/libchemfiles.so.0.9.0 -lnetcdf```\r\n\r\nSo, finally, I pointed Julia to the new library by editing `deps.jl`.\r\n```@checked_lib libchemfiles \"/home/german/.julia/v0.6/Chemfiles/deps/usr/lib/libchemfiles.so.0.9.0\"```\r\n\r\nAnd now it works:\r\n```\r\njulia> using Chemfiles\r\n\r\njulia> as = Trajectory(\"99999_4xcp.pdb\")\r\nChemfiles.Trajectory(Ptr{Chemfiles.lib.CHFL_TRAJECTORY} @0x0000000002be6e60)\r\n\r\njulia> nsteps(as)\r\n0x0000000000000001\r\n```\r\nNow I wouldn't know how to take it from here."},"comment":{"url":"https://api.github.com/repos/chemfiles/chemfiles/issues/comments/395805021","html_url":"https://github.com/chemfiles/chemfiles/issues/168#issuecomment-395805021","issue_url":"https://api.github.com/repos/chemfiles/chemfiles/issues/168","id":395805021,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTgwNTAyMQ==","user":{"login":"Luthaf","id":6141587,"node_id":"MDQ6VXNlcjYxNDE1ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/6141587?v=4","gravatar_id":"","url":"https://api.github.com/users/Luthaf","html_url":"https://github.com/Luthaf","followers_url":"https://api.github.com/users/Luthaf/followers","following_url":"https://api.github.com/users/Luthaf/following{/other_user}","gists_url":"https://api.github.com/users/Luthaf/gists{/gist_id}","starred_url":"https://api.github.com/users/Luthaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Luthaf/subscriptions","organizations_url":"https://api.github.com/users/Luthaf/orgs","repos_url":"https://api.github.com/users/Luthaf/repos","events_url":"https://api.github.com/users/Luthaf/events{/privacy}","received_events_url":"https://api.github.com/users/Luthaf/received_events","type":"User","site_admin":false},"created_at":"2018-06-08T15:53:10Z","updated_at":"2018-06-08T15:53:10Z","author_association":"MEMBER","body":">/tmp/cc7XkS9e.o: In function `main':\r\n> as.cpp:(.text+0x90): undefined reference to `chemfiles::Trajectory::Trajectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'\r\n> collect2: error: ld returned 1 exit status\r\n\r\nThis one might be related to a different version of the compiler/standard library. Which one did you use, and which was the command line? You would need at least `-std=c++11` in the command line. I would assume you are on Linux, right ? If so, which distribution?\r\n\r\n\r\n> Now I wouldn't know how to take it from here.\r\n\r\nIt is great that you got it working with your own version of the code! The changes to PDB formats since 0.8.0 does not seems to be the culprit here (only #147 was added), so there might be an issue in the way the precompiled library was built. Could you share the PDB file with me so that I can give it a look?"}}
{"actor":{"display_login":"Luthaf"}}