{"action":"created","issue":{"url":"https://api.github.com/repos/01org/hyperscan/issues/67","repository_url":"https://api.github.com/repos/01org/hyperscan","labels_url":"https://api.github.com/repos/01org/hyperscan/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/01org/hyperscan/issues/67/comments","events_url":"https://api.github.com/repos/01org/hyperscan/issues/67/events","html_url":"https://github.com/01org/hyperscan/issues/67","id":254211209,"number":67,"title":"hyperscan library cause load shared libraries error","user":{"login":"leeyiw","id":3157740,"avatar_url":"https://avatars2.githubusercontent.com/u/3157740?v=4","gravatar_id":"","url":"https://api.github.com/users/leeyiw","html_url":"https://github.com/leeyiw","followers_url":"https://api.github.com/users/leeyiw/followers","following_url":"https://api.github.com/users/leeyiw/following{/other_user}","gists_url":"https://api.github.com/users/leeyiw/gists{/gist_id}","starred_url":"https://api.github.com/users/leeyiw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leeyiw/subscriptions","organizations_url":"https://api.github.com/users/leeyiw/orgs","repos_url":"https://api.github.com/users/leeyiw/repos","events_url":"https://api.github.com/users/leeyiw/events{/privacy}","received_events_url":"https://api.github.com/users/leeyiw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-31T05:01:43Z","updated_at":"2017-08-31T05:38:49Z","closed_at":null,"author_association":"NONE","body":"When I compile my project with hyperscan 4.5.1, there is no error. But when I try to execute the binary, there is a critical error, same critical error when I compile `samples/simplegrep.c`:\r\n\r\n```\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#gcc -I/home/deps/dest/usr/local/include/hs  simplegrep.c /home/deps/dest/usr/local/lib64/libhs.a /usr/local/gcc-4.9.2/lib64/libstdc++.a -lm\r\n\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#./a.out\r\n./a.out: error while loading shared libraries: unexpected PLT reloc type 0x25\r\n\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#ldd a.out\r\n        not a dynamic executable\r\n```\r\n\r\nHere is my environment:\r\n\r\n```\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#gcc --version\r\ngcc (GCC) 4.9.2\r\nCopyright (C) 2014 Free Software Foundation, Inc.\r\nThis is free software; see the source for copying conditions.  There is NO\r\nwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r\n\r\n\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#ld --version\r\nGNU ld (GNU Binutils) 2.28\r\nCopyright (C) 2017 Free Software Foundation, Inc.\r\nThis program is free software; you may redistribute it under the terms of\r\nthe GNU General Public License version 3 or (at your option) a later version.\r\nThis program has absolutely no warranty.\r\n\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#rpm -qf /lib64/libc.so.6\r\nglibc-2.5-81.2\r\n```\r\n\r\nI think the problem is hyperscan use some relocation type that old glibc doesn't support. When I remove the static link to hyperscan from my project, the binary works well. So I'm pretty sure the problem is from hyperscan."},"comment":{"url":"https://api.github.com/repos/01org/hyperscan/issues/comments/326194936","html_url":"https://github.com/01org/hyperscan/issues/67#issuecomment-326194936","issue_url":"https://api.github.com/repos/01org/hyperscan/issues/67","id":326194936,"user":{"login":"leeyiw","id":3157740,"avatar_url":"https://avatars2.githubusercontent.com/u/3157740?v=4","gravatar_id":"","url":"https://api.github.com/users/leeyiw","html_url":"https://github.com/leeyiw","followers_url":"https://api.github.com/users/leeyiw/followers","following_url":"https://api.github.com/users/leeyiw/following{/other_user}","gists_url":"https://api.github.com/users/leeyiw/gists{/gist_id}","starred_url":"https://api.github.com/users/leeyiw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leeyiw/subscriptions","organizations_url":"https://api.github.com/users/leeyiw/orgs","repos_url":"https://api.github.com/users/leeyiw/repos","events_url":"https://api.github.com/users/leeyiw/events{/privacy}","received_events_url":"https://api.github.com/users/leeyiw/received_events","type":"User","site_admin":false},"created_at":"2017-08-31T05:38:49Z","updated_at":"2017-08-31T05:38:49Z","author_association":"NONE","body":"@jviiret Thanks for quick reply. With `-lstdc++`, still error:\r\n\r\n```\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#gcc -I/home/deps/dest/usr/local/include/hs  simplegrep.c /home/deps/dest/usr/local/lib64/libhs.a -lstdc++ -lm\r\n\r\n[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]\r\n#./a.out\r\n./a.out: error while loading shared libraries: unexpected PLT reloc type 0x25\r\n```\r\n\r\n> Are you building libhs.a on the same machine with the same toolchain?\r\n\r\nYes! I'm using exactly the same gcc/binutils/glibc to compile simplegrep.c."}}
{"actor":{"display_login":"leeyiw"}}