lyaml icon indicating copy to clipboard operation
lyaml copied to clipboard

luke: fatal: required symbol 'yaml_document_initialize' not found in any of libc, libyaml

Open vsock opened this issue 5 years ago • 7 comments

I have installed luarocks for a customised lua version based on 5.1. and now trying to install specl which depends on lyaml. and getting this error. I thought this was fixed in latest version.

`root@b8b290eb659a:/opt/luarocks5_1/bin# ./luarocks install specl Installing https://luarocks.org/specl-14.1.7-1.src.rock Missing dependencies for specl 14.1.7-1: lyaml >= 5 (not installed) optparse (not installed) stdlib >= 41.2.0, < 42.0 (not installed)

specl 14.1.7-1 depends on luamacro >= 2.0 (2.5.1-1 installed) specl 14.1.7-1 depends on lua >= 5.1, < 5.5 (5.1-1 provided by VM) specl 14.1.7-1 depends on lyaml >= 5 (not installed) Installing https://luarocks.org/lyaml-6.2.5-1.src.rock

lyaml 6.2.5-1 depends on lua >= 5.1, < 5.5 (5.1-1 provided by VM) /<>j/bin/lua build-aux/luke package="lyaml" version="6.2.5" PREFIX="/opt/luarocks5_1/lib/luarocks/rocks-5.1/lyaml/6.2.5-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/opt/<>j/bin/lua" LUA_DIR="/opt/luarocks5_1/lib/luarocks/rocks-5.1/lyaml/6.2.5-1/lua" LUA_INCDIR="/opt/<>/include/lua" YAML_DIR="/usr" YAML_INCDIR="/usr/include" YAML_LIBDIR="/usr/lib/x86_64-linux-gnu" luke: fatal: required symbol 'yaml_document_initialize' not found in any of libc, libyaml

Error: Failed installing dependency: https://luarocks.org/lyaml-6.2.5-1.src.rock - Build error: Failed building. root@b8b290eb659a:/opt/luarocks5_1/bin# ls `

vsock avatar Sep 22 '20 13:09 vsock

This isn't an issue in lua version 5.1.5 but not working with customized 5.1.2

vsock avatar Sep 22 '20 15:09 vsock

please paste the entire output from running: /<>j/bin/lua build-aux/luke package="lyaml" version="6.2.5" PREFIX="/opt/luarocks5_1/lib/luarocks/rocks-5.1/lyaml/6.2.5-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/opt/<>j/bin/lua" LUA_DIR="/opt/luarocks5_1/lib/luarocks/rocks-5.1/lyaml/6.2.5-1/lua" LUA_INCDIR="/opt/<>/include/lua" YAML_DIR="/usr" YAML_INCDIR="/usr/include" YAML_LIBDIR="/usr/lib/x86_64-linux-gnu" --verbose --debug

gvvaughan avatar Sep 23 '20 00:09 gvvaughan

`65830:~/luarocks5_1/bin$ ./luarocks install specl --verbose > lyaml_error.log luke: fatal: required symbol 'yaml_document_initialize' not found in any of libc, libyaml

Error: Failed installing dependency: https://luarocks.org/lyaml-6.2.5-1.src.rock - Build error: Failed building. ` lyaml_error.log

vsock avatar Sep 23 '20 16:09 vsock

The above log obtained when trying to install specl with a fixed version of lua interpreter 5.1.2.

Later, successfully installed specl by replacing 5.1.2 with 5.1.5 interpreter. then switched back to 5.1.2,but not sure about the risk of using older version of lua with latest specl for a project

Also there is no "--debug" option for luarocks, hence only verbose output log attached.

vsock avatar Sep 23 '20 16:09 vsock

But the command I pasted is an invocation of build-aux/luke from inside an lyaml rock using your Lua interpreter and with the addition of —debug and —verbose flags... nothing to do with luarocks. You will need to fetch and unpack the lyaml rock or download the matching release tarball from github first (e.g. https://github.com/gvvaughan/lyaml/archive/v6.2.5.tar.gz ), and from the top level directory of that run the command I pasted above to get enough debug output to help me understand why you’re experiencing an error :-)

gvvaughan avatar Sep 23 '20 17:09 gvvaughan

/opt/lyaml/lyaml-6.2.5# /opt/sbengine/linux-x86_64-opengles_2.0-x11-obj/bin/lua build-aux/luke package="lyaml" version="6.2.5" PREFIX="/opt/luarocks5_1/lib/luarocks/rocks-5.1/lyaml/6.2.5-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/opt/sbengine/linux-x86_64-opengles_2.0-x11-obj/bin/lua" LUA_DIR="/opt/luarocks5_1/lib/luarocks/rocks-5.1/lyaml/6.2.5-1/lua" LUA_INCDIR="/opt/sbengine/linux-x86_64-opengles_2.0-x11-obj/inclde/lua" YAML_DIR="/usr" YAML_INCDIR="/usr/include" YAML_LIBDIR="/usr/lib/x86_64-linux-gnu" --verbose --debug DEBUG: ldoc not found checking for ldoc... no DEBUG: found /bin/true checking for true... yes DEBUG: found /usr/bin/cc checking for cc... yes checking whether cc works... yes DEBUG: cc -O2 -fPIC -I/usr/include -o /tmp/lua_orN4hM /tmp/lua_H3Xafi.c -L/usr/lib/x86_64-linux-gnu
DEBUG: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function _start': DEBUG: (.text+0x20): undefined reference to main' DEBUG: collect2: error: ld returned 1 exit status DEBUG: DEBUG: cc -O2 -fPIC -I/usr/include -o /tmp/lua_4pFrGI /tmp/lua_lLfhxe.c -L/usr/lib/x86_64-linux-gnu -lyaml
DEBUG: /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o: In function _start': DEBUG: (.text+0x20): undefined reference to main' DEBUG: collect2: error: ld returned 1 exit status DEBUG: checking for library containing yaml_document_initialize... luke: fatal: required symbol 'yaml_document_initialize' not found in any of libc, libyaml

root@clade-shell:/opt/lyaml/lyaml-6.2.5# objdump -T /usr/lib/x86_64-linux-gnu/libyaml-0.so.2 | grep document_init 0000000000006c00 g DF .text 00000000000003ae Base yaml_document_initialize

vsock avatar Sep 25 '20 11:09 vsock

Huh, interesting... seems like your compiler is sad about the lack of main in the test program. I need to tweak the link test source generator... please give me a few days to find time, and thanks for the report!

gvvaughan avatar Sep 25 '20 15:09 gvvaughan