hyperscan library cause load shared libraries error
- Dominant language
- C++
- Stars
- 5.5k
- Forks
- 816
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 2
Description
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`:
```
[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]
#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
[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]
#./a.out
./a.out: error while loading shared libraries: unexpected PLT reloc type 0x25
[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]
#ldd a.out
not a dynamic executable
```
Here is my environment:
```
[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]
#gcc --version
gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]
#ld --version
GNU ld (GNU Binutils) 2.28
Copyright (C) 2017 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
[root@05c8ec243f3d /home/yiwei.liyw/test/hyperscan-4.5.2/examples]
#rpm -qf /lib64/libc.so.6
glibc-2.5-81.2
```
I 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.
Contributor guide
Assessment
This issue has not been assessed yet.