bernd / fpm-recipes

My collection of fpm-cookery recipes.
145 stars 44 forks source link

unable build haproxy pacakge in centos 7 #46

Closed ozbillwang closed 7 years ago

ozbillwang commented 8 years ago

When build haproxy package in centos 7, got below errors:

===> Building in /root/fpm-recipes/haproxy/tmp-build/haproxy-1.6.5
gcc -Iinclude -Iebtree -Wall  -O2 -march=native -g -fno-strict-aliasing -Wdeclaration-after-statement       -DCONFIG_HAP_LINUX_SPLICE -DTPROXY -DCONFIG_HAP_LINUX_TPROXY -DCONFIG_HAP_CRYPT -DUSE_ZLIB  -DENABLE_POLL -DENABLE_EPOLL -DUSE_CPU_AFFINITY -DASSUME_SPLICE_WORKS -DUSE_ACCEPT4 -DNETFILTER -DUSE_GETSOCKNAME -DUSE_OPENSSL  -DUSE_SYSCALL_FUTEX -DUSE_LUA  -DUSE_PCRE -I/usr/include -DUSE_PCRE_JIT  -DCONFIG_HAPROXY_VERSION=\"1.6.5\" -DCONFIG_HAPROXY_DATE=\"2016/05/10\" -c -o src/hlua.o src/hlua.c
src/hlua.c:11:2: error: #error "Requires Lua 5.3 or later."
 #error "Requires Lua 5.3 or later."

and the system only have lua v5.1.4


I don't have this issue when directly `make` and `make install` 
[root@b7d6433f8d23 haproxy]# yum install lua
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: centos.mirror.digitalpacific.com.au
 * extras: centos.uberglobalmirror.com
 * updates: mirror.ventraip.net.au
Package lua-5.1.4-14.el7.x86_64 already installed and latest version
Nothing to do
[root@b7d6433f8d23 haproxy]#

I don't have the same issue, when directly make and make install

ozbillwang commented 8 years ago

manually install the latest lua version (need dependency: yum install readline-devel)

get new error:

/root/fpm-recipes/haproxy/tmp-build/haproxy-1.6.5/src/hlua.c:898: undefined reference to `lua_yieldk'
collect2: error: ld returned 1 exit status
make: *** [haproxy] Error 1
/usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/utils.rb:12:in `safesystem': 'system(["make", "TARGET=linux2628", "CPU=native", "USE_PCRE=1", "USE_PCRE_JIT=1", "USE_OPENSSL=1", "USE_ZLIB=1", "USE_LIBCRYPT=1", "USE_LUA=1"])' failed with error code: 2 (RuntimeError)
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/utils.rb:60:in `make'
    from /root/fpm-recipes/haproxy/recipe.rb:27:in `build'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/packager.rb:149:in `block (2 levels) in dispense'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/packager.rb:138:in `chdir'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/packager.rb:138:in `block in dispense'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/packager.rb:115:in `chdir'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/packager.rb:115:in `dispense'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/cli.rb:113:in `exec'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/cli.rb:77:in `block in execute'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/book.rb:16:in `call'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/book.rb:16:in `load_recipe'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/lib/fpm/cookery/cli.rb:73:in `execute'
    from /usr/local/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    from /usr/local/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
    from /usr/local/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
    from /usr/local/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
    from /usr/local/share/gems/gems/fpm-cookery-0.31.0/bin/fpm-cook:7:in `<top (required)>'
    from /usr/local/bin/fpm-cook:23:in `load'
    from /usr/local/bin/fpm-cook:23:in `<main>'
[root@b7d6433f8d23 haproxy]#
jl2035 commented 4 years ago

Why is this issue closed? I have the same problem, so this has never been fixed :(