gvvaughan / lyaml

LibYAML binding for Lua.
gvvaughan.github.io/lyaml
Other
208 stars 34 forks source link

Build Failure on NetBSD 7.1 #18

Closed sparked435 closed 7 years ago

sparked435 commented 7 years ago

On a clean install of NetBSD 7.1/amd64, attempting to install with Luarocks, lyaml 6.1.1 fails to build:

Mar28:0015 @xd-ackdev:/usr/pkg/lib/lua/5.2 $ sudo /usr/pkg/bin/luarocks-5.2 install lyaml YAML_DIR=/usr/pkg
Installing https://luarocks.org/lyaml-6.1.1-4.src.rock
/usr/pkg/bin/lua5.2 build-aux/luke package="lyaml" version="6.1.1-4" PREFIX="/usr/pkg/luarocks/lib/luarocks/rocks-5.2/lyaml/6.1.1-4" CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/usr/pkg/bin/lua5.2" LUA_DIR="/usr/pkg/luarocks/lib/luarocks/rocks-5.2/lyaml/6.1.1-4/lua" LUA_INCDIR="/usr/pkg/include/lua-5.2" 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.

The same failure occurs with Lua 5.3. Lyaml version 6.1 installs fine on the same system with either version; It appears the build tool isn't correctly identifying libyaml's headers despite being given the correct path.

gvvaughan commented 7 years ago

yuck, sorry about that - I can reproduce it, and will work on a fix tonight

gvvaughan commented 7 years ago

Sorry for the delay closing this. After a few weekends of rewriting a chunk of the build system that I'd mis-designed, this works correctly for me now on Mac OS (where previously it had the same bug you found on NetBSD). I've put the latest release on luarocks too now.

Please reopen the issue if you still have the same problem.

abcjjy commented 6 years ago

This failure occurred on Mac today. My libyaml is managed by Macport.

/Users/jjy/exhd/usr/bin/luajit build-aux/luke package="lyaml" version="6.2.2-1" PREFIX="/Users/jjy/exhd/usr/lib/luarocks/rocks/lyaml/6.2.2-1" CFLAGS="-O2 -fPIC" LIBFLAG="-bundle -undefined dynamic_lookup -all_load" LIB_EXTENSION="so" OBJ_EXTENSION="o" LUA="/Users/jjy/exhd/usr/bin/luajit" LUA_DIR="/Users/jjy/exhd/usr/lib/luarocks/rocks/lyaml/6.2.2-1/lua" LUA_INCDIR="/Users/jjy/exhd/usr/include" YAML_DIR="/opt/local" YAML_INCDIR="/opt/local/include" YAML_LIBDIR="/opt/local/lib"

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

duybinh0208 commented 5 years ago

Hi, I have this issue exactly the same. I have installed the latest version of libYAML at: https://pyyaml.org/wiki/LibYAML

After that, I try to install lyaml by using luarocks:
luarocks install lyaml YAML_DIR=$LOCAL_SOFTWARE/libyaml

But the same error was thrown:


Installing https://luarocks.org/lyaml-6.2.3-1.src.rock
/home/bcpe/software/openresty/luajit/bin/luajit build-aux/luke package="lyaml" version="6.2.3" \
    PREFIX="/home/bcpe/software/luarocks/lib/luarocks/rocks/lyaml/6.2.3-1" \
    CFLAGS="-O2 -fPIC" LIBFLAG="-shared" LIB_EXTENSION="so" OBJ_EXTENSION="o" \
    LUA="/home/bcpe/software/openresty/luajit/bin/luajit" \
    LUA_DIR="/home/bcpe/software/luarocks/lib/luarocks/rocks/lyaml/6.2.3-1/lua" \
    LUA_INCDIR="/home/bcpe/software/openresty/luajit/include/luajit-2.1" \
    YAML_DIR="/home/bcpe/software/libyaml" \
    YAML_INCDIR="/home/bcpe/software/libyaml/include" \
    YAML_LIBDIR="/home/bcpe/software/libyaml/lib"

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

Error: Build error: Failed building.

Could you help to check this issue?

Thanks.