I've compiled tgstation's implementation of an interface to boost::regex on a debian system, but I cannot get Byond to see the library, no matter where I place the .so file.
Detailed info -
repository for interface:https://github.com/optimumtact/byond-regex
Compilation steps for library
g++ -c -m32 -Wall -lstdc++ -lboost_regex -fPIC -o bygex.o main.cpp
g++ bygex.o -m32 -shared -o libbygex.so
I tested this by compiling client.cpp ( a test file )
g++ client.cpp -m32 -lstdc++ -lboost_regex -L. -lbygex
Outputted a.out file executed cleanly as I would expect
file correctly reports an elf32 binary, so the compilation steps seem fine
user@machine:~/byond-regex$ file libbygex.so
libbygex.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=4ab0775c871dc249cfade278951088551fc9e348, not stripped
The calling code uses a define, which I have set as
and the calls look similar too
However, when I place the libbygex.so in /usr/local/byond/bin and run DD with the following command it runtimes with an error about being unable to call it.
DreamDaemon tgstation.dmb 45000 -trusted -logself
Then in the log file
runtime error: Unable to load library bygex.so
proc name: replacetext (/proc/replacetext)
My first thought was to create a softlink to bygex.so from libbygex.so based on earlier threads I saw here about how byond loads .so's, but this approach had no luck, I then also tried to put the library in a local bin and set + export LD_LIBRARY_PATH, however this also met with zero success.
Is anyone able to shed any light on what the heck I'm doing wrong here?
You can grab the .so from here if it will help
Jun 28 2015, 3:07 pm