Closed sparked435 closed 4 years ago
Hi,
Thanks for the report. I don’t have access to a NetBSD machine to debug this. Can you please tell me:
do you have libyaml headers installed at /usr/pkg/include?
does /usr/pkg/lib/libyaml.so export the yaml_document_initialize symbol?
Thank you!
1: Headers are present.
Apr09:0614 @kinetic:~ $ ls -l /usr/pkg/include/yaml.h -rw-r--r-- 1 root wheel 54296 Dec 23 09:45 /usr/pkg/include/yaml.h
2: The symbol appears to exist, as far as I understand how to check.
Apr09:0614 @kinetic:~ $ objdump -t /usr/pkg/lib/libyaml.so | grep yaml_document_initialize 0000000000003f00 g F .text 000000000000040d yaml_document_initialize
Version 6.1.3 installs and functions without complaint, so I'm sure the YAML library itself is functioning correctly.
I need to improve the logging from luke to help identify the differences between compiler/linker calls from the old autoconf based Makefile and luke. luke is way too terse right now... could you paste the entirety of output from a successful build of 6.1.3 on your host here to give me a leg up, please?
Full command was: luarocks-5.2 --tree . install lyaml 6.1.3 YAML_DIR=/usr/pkg 2>&1 | tee ./install-output.txt
creating build-aux/config.ld cc -O2 -fPIC -shared -fPIC -D_BSD_SOURCE -DPACKAGE='"lyaml"' -DVERSION='"6.1.3-1"' -DNDEBUG -D_FORTIFY_SOURCE=2 -Iext/include -I/usr/pkg/include/lua-5.2 -I/usr/pkg/include ext/yaml/yaml.c ext/yaml/emitter.c ext/yaml/parser.c ext/yaml/scanner.c -o netbsd/yaml.so -L/usr/pkg/lib -lyaml true -c build-aux/config.ld . Installing https://luarocks.org/lyaml-6.1.3-1.src.rock /usr/pkg/bin/lua5.2 build-aux/luke package="lyaml" version="6.1.3-1" PREFIX="/home/aaron/devel/area51/lyaml/./lib/luarocks/rocks-5.2/lyaml/6.1.3-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/usr/pkg/bin/lua5.2" LUA_DIR="/home/aaron/devel/area51/lyaml/./lib/luarocks/rocks-5.2/lyaml/6.1.3-1/lua" LUA_INCDIR="/usr/pkg/include/lua-5.2" YAML_DIR="/usr/pkg" YAML_INCDIR="/usr/pkg/include" YAML_LIBDIR="/usr/pkg/lib" /usr/pkg/bin/lua5.2 build-aux/luke install --quiet INST_LIBDIR="/home/aaron/devel/area51/lyaml/./lib/luarocks/rocks-5.2/lyaml/6.1.3-1/lib" INST_LUADIR="/home/aaron/devel/area51/lyaml/./lib/luarocks/rocks-5.2/lyaml/6.1.3-1/lua" WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf WARNING: can't open config file: /etc/openssl/openssl.cnf No existing manifest. Attempting to rebuild... lyaml 6.1.3-1 is now installed in /home/aaron/devel/area51/lyaml/. (license: MIT/X11)
I am getting the same error for versions 6.2.x, but my settings are a bit different: CentOS 7, no sudo permission so I installed libyaml at a custom path, and I am passing that path as YAML_DIR. I confirm that I can install 6.1.x, but I need 6.2.3 for Kong 1.2.1.
can you paste the verbose output from luke here, please?
do you have or know of a network accessible machine I could debug on?
This is kind of solved by following the instructions to edit the luke file mentioned on https://github.com/gvvaughan/lyaml/issues/30, but then when I try to run Kong (for which lyaml is a dependency), another similar error appears for another required yaml symbol not found:
luarocks install lyaml 6.2.3-1 YAML_DIR=/home/heckur/packages/libyaml
Installing https://luarocks.org/lyaml-6.2.3-1.src.rock
/home/heckur/packages/openresty/luajit/bin/luajit build-aux/luke package="lyaml" version="6.2.3" PREFIX="/home/heckur/packages/luarocks/lib/luarocks/rocks-5.1/lyaml/6.2.3-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/home/heckur/packages/openresty/luajit/bin/luajit" LUA_DIR="/home/heckur/packages/luarocks/lib/luarocks/rocks-5.1/lyaml/6.2.3-1/lua" LUA_INCDIR="/home/heckur/packages/openresty/luajit/include/luajit-2.1" YAML_DIR="/home/heckur/packages/libyaml" YAML_INCDIR="/home/heckur/packages/libyaml/include" YAML_LIBDIR="/home/heckur/packages/libyaml/lib"
luke: fatal: required symbol 'yaml_document_initialize' not found in any of libc, libyaml
I am also getting same problem
luarocks install lyaml YAML_DIR=$HOME/yaml
/home/ec2-user/lua/bin/lua build-aux/luke package="lyaml" version="6.2.4" PREFIX="/home/ec2-user/luarocks/lib/luarocks/rocks-5.1/lyaml/6.2.4-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/home/ec2-user/lua/bin/lua" LUA_DIR="/home/ec2-user/luarocks/lib/luarocks/rocks-5.1/lyaml/6.2.4-1/lua" LUA_INCDIR="/home/ec2-user/lua/include" YAML_DIR="/home/ec2-user/yaml" YAML_INCDIR="/home/ec2-user/yaml/include" YAML_LIBDIR="/home/ec2-user/yaml/lib" luke: fatal: required symbol 'yaml_document_initialize' not found in any of libc, libyaml
Error: Build error: Failed building.
[ec2-user@ip-10-0-0-117 ~]$ objdump -t $HOME/yaml/lib/libyaml.so | grep yaml_document_initialize 0000000000003b60 g F .text 0000000000000341 yaml_document_initialize
Builds fail on NetBSD 7.1.2 using either Lua 5.3 or 5.2. The entire output is:
Apr07:1535 @kinetic:~/devel/servicecrate $ sudo luarocks-5.3 install lyaml YAML_DIR=/usr/pkg Installing https://luarocks.org/lyaml-6.2.3-1.src.rock /usr/pkg/bin/lua5.3 build-aux/luke package="lyaml" version="6.2.3" PREFIX="/usr/pkg/luarocks/lib/luarocks/rocks-5.3/lyaml/6.2.3-1" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/usr/pkg/bin/lua5.3" LUA_DIR="/usr/pkg/luarocks/lib/luarocks/rocks-5.3/lyaml/6.2.3-1/lua" LUA_INCDIR="/usr/pkg/include/lua-5.3" YAML_DIR="/usr/pkg" YAML_INCDIR="/usr/pkg/include" YAML_LIBDIR="/usr/pkg/lib" luke: fatal: required symbol 'yaml_document_initialize' not found in any of libc, libyaml
Error: Build error: Failed building.
This seems to be introduced in 6.2. Version 6.1.3 installs fine without trouble.