Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issues archlinux i686 #12

Closed
archey opened this issue Oct 16, 2014 · 25 comments
Closed

Build issues archlinux i686 #12

archey opened this issue Oct 16, 2014 · 25 comments

Comments

@archey
Copy link

archey commented Oct 16, 2014

I am a developer for the archassault project. We are working on getting haka and hakabana added to our repos for our users. I have been able to build the 0.2.1 version on x86 without an issue, however when I build the i686 version it has some issues. Both x86 and i686 are using the same dep versions.

Deps:
cmake 3.0.2
swig 3.0.2
wireshark-cli(provides tshark) 1.12.1-1
check 0.9.14
rsync 3.1.1
libpcap 1.6.2
gawk 4.1.1
libedit 20140620_3.1
pcre 8.36

Build logs on i686:

  • The C compiler identification is GNU 4.9.1
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Build system: Linux i686
    -- Build version: 0.2.1
    -- Build configuration (BUILD): Release
    -- Could NOT find LCov (missing: LCOV_EXECUTABLE)
    -- Found SWIG: /usr/bin/swig (found suitable version "3.0.2", minimum required is "2")
    -- Installation prefix (CMAKE_INSTALL_PREFIX): /usr
    -- Lua version (LUA): luajit
    -- Looking for include file pthread.h
    -- Looking for include file pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - not found
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE
    -- Check if the system is big endian
    -- Searching 16 bit integer
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of unsigned short
    -- Check size of unsigned short - done
    -- Using unsigned short
    -- Check if the system is big endian - little endian
    -- Check size of short
    -- Check size of short - done
    -- Check size of int
    -- Check size of int - done
    -- Check size of long
    -- Check size of long - done
    -- Check size of long long
    -- Check size of long long - done
    -- Could NOT find Sphinx (missing: SPHINX_EXECUTABLE)
    -- Found Doxygen: /usr/bin/doxygen (found version "1.8.8")
    Skipping documentation target (Sphinx and Doxygen not found)
    -- Found LibGeoIP: /usr/lib/libGeoIP.so
    CMake Warning (dev) at modules/CMakeLists.txt:34 (target_link_libraries):
    Policy CMP0023 is not set: Plain and keyword target_link_libraries
    signatures cannot be mixed. Run "cmake --help-policy CMP0023" for policy
    details. Use the cmake_policy command to set the policy and suppress this
    warning.

    The keyword signature for target_link_libraries has already been used with
    the target "geoip". All uses of target_link_libraries with a target should
    be either all-keyword or all-plain.

    The uses of the keyword signature are here:

    • modules/misc/geoip/CMakeLists.txt:19 (target_link_libraries)

Call Stack (most recent call first):
modules/misc/geoip/CMakeLists.txt:25 (INSTALL_MODULE)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Found Jansson: /usr/lib/libjansson.so
-- Found LibCurl: /usr/lib/libcurl.so
-- Found LibUuid: /usr/lib/libuuid.so
-- Found PCRE: /usr/lib/libpcre.so
-- Found CHECK: /usr/lib/libcheck.so;rt;m
-- Found PCAP: /usr/lib/libpcap.so
-- Found NETFILTERQUEUE: /usr/lib/libnetfilter_queue.so
-- Performing Test NFQ_GET_PAYLOAD_UNSIGNED_CHAR
-- Performing Test NFQ_GET_PAYLOAD_UNSIGNED_CHAR - Success
-- Found DL: /usr/lib/libdl.so
-- Found EDITLINE: /usr/lib/libedit.so
-- Found Cppcheck: /usr/bin/cppcheck (found version "1.66")
-- Configuring done
CMake Warning (dev) in modules/misc/geoip/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.

Target "geoip" has an INTERFACE_LINK_LIBRARIES property which differs from
its LINK_INTERFACE_LIBRARIES properties.

INTERFACE_LINK_LIBRARIES:

libhaka

LINK_INTERFACE_LIBRARIES:

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /build/haka/src/haka_0.2.1_source/make
Scanning dependencies of target luajit-sync
Scanning dependencies of target libiniparser
Scanning dependencies of target libhakactl
[ 0%] [ 1%] [ 1%] Building C object external/iniparser/CMakeFiles/libiniparser.dir/src/src/iniparser.c.o
Building C object external/iniparser/CMakeFiles/libiniparser.dir/src/src/dictionary.c.o
Building C object src/hakactl/CMakeFiles/libhakactl.dir/ctl_comm.c.o
[ 1%] Built target luajit-sync
Linking C static library liblibhakactl.a
Scanning dependencies of target luajit
[ 1%] Generating external/luajit/src/cmake.build
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
[ 1%] Built target libhakactl
Linking C static library liblibiniparser.a
[ 1%] Built target libiniparser
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
==== Building LuaJIT 2.0.3 ====
HOSTCC host/minilua.o
HOSTLINK host/minilua
DYNASM host/buildvm_arch.h
HOSTCC host/buildvm.o
HOSTCC host/buildvm_asm.o
HOSTCC host/buildvm_peobj.o
HOSTCC host/buildvm_lib.o
HOSTCC host/buildvm_fold.o
HOSTLINK host/buildvm
BUILDVM lj_vm.s
ASM lj_vm.o
CC lj_gc.o
BUILDVM lj_ffdef.h
CC lj_err.o
CC lj_char.o
BUILDVM lj_bcdef.h
CC lj_bc.o
CC lj_obj.o
CC lj_str.o
CC lj_tab.o
CC lj_func.o
CC lj_udata.o
CC lj_meta.o
CC lj_debug.o
CC lj_state.o
CC lj_dispatch.o
CC lj_vmevent.o
CC lj_vmmath.o
CC lj_strscan.o
CC lj_api.o
CC lj_lex.o
CC lj_parse.o
CC lj_bcread.o
CC lj_bcwrite.o
CC lj_load.o
CC lj_ir.o
CC lj_opt_mem.o
BUILDVM lj_folddef.h
CC lj_opt_fold.o
CC lj_opt_narrow.o
CC lj_opt_dce.o
CC lj_opt_loop.o
CC lj_opt_split.o
CC lj_opt_sink.o
CC lj_mcode.o
CC lj_snap.o
CC lj_record.o
CC lj_crecord.o
BUILDVM lj_recdef.h
CC lj_ffrecord.o
CC lj_asm.o
CC lj_trace.o
CC lj_gdbjit.o
CC lj_ctype.o
CC lj_cdata.o
CC lj_cconv.o
CC lj_ccall.o
CC lj_ccallback.o
CC lj_carith.o
CC lj_clib.o
CC lj_cparse.o
CC lj_lib.o
CC lj_alloc.o
CC lib_aux.o
BUILDVM lj_libdef.h
CC lib_base.o
CC lib_math.o
CC lib_bit.o
CC lib_string.o
CC lib_table.o
CC lib_io.o
CC lib_os.o
CC lib_package.o
CC lib_debug.o
CC lib_jit.o
CC lib_ffi.o
CC lib_init.o
AR libluajit.a
CC luajit.o
BUILDVM jit/vmdef.lua
LINK luajit
OK Successfully built LuaJIT
==== Successfully built LuaJIT 2.0.3 ====
make[3]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
==== Installing LuaJIT 2.0.3 to /usr/share/haka/lua ====
==== Successfully installed LuaJIT 2.0.3 to /usr/share/haka/lua ====
[ 1%] Built target luajit
Scanning dependencies of target tcp-console
Scanning dependencies of target hakactl-lua
Scanning dependencies of target luaunit
[ 2%] Scanning dependencies of target haka-lua-1
Scanning dependencies of target dns
Scanning dependencies of target tcp_connection
Scanning dependencies of target http
[ 4%] [ 4%] Processing Swig source luadebug/luadebug.i
[ 5%] [ 6%] [ 7%] [ 8%] Building Lua file tcp_console.lua
[ 9%] Building Lua file lua/thread.lua
Building Lua file src/luaunit.lua
Building Lua file dns.lua
Building Lua file lua/interactive.lua
Building Lua file tcp_connection.lua
Building Lua file http.lua
[ 9%] [ 9%] [ 9%] Built target tcp-console
[ 9%] Built target luaunit
[ 9%] Building Lua file lua/event.lua
[ 9%] Built target dns
[ 10%] [ 11%] Built target haka-lua-1
[ 11%] Built target tcp_connection
[ 12%] Processing Swig source lua/hakainit.i
Building Lua file http_utils.lua
Processing Swig source lua/haka.i
[ 13%] Processing Swig source lua/swig.i
Scanning dependencies of target icmp
Building Lua file lua/rule.lua
Scanning dependencies of target udp
[ 13%] [ 14%] Built target http
[ 15%] [ 16%] Building Lua file icmp.lua
Building Lua file udp.lua
Building Lua file lua/misc.lua
Scanning dependencies of target udp-console
[ 16%] Built target icmp
[ 17%] [ 17%] [ 17%] Built target udp
Built target hakactl-lua
Building Lua file udp_console.lua
Scanning dependencies of target udp_connection
Scanning dependencies of target ipv4lua
Scanning dependencies of target libhakalua
[ 18%] [ 18%] [ 18%] Built target udp-console
[ 19%] Building Lua file udp_connection.lua
[ 20%] Building Lua file ipv4lua.lua
Building Lua file lua/lua/color.lua
Building Lua file lua/lua/class.lua
[ 21%] [ 21%] Building Lua file lua/lua/events.lua
Built target udp_connection
[ 21%] [ 21%] [ 22%] Built target ipv4lua
Scanning dependencies of target haka-lua
[ 23%] [ 24%] Building Lua file lua/lua/context.lua
Building Lua file lua/lua/parse.lua
Building Lua file lua/lua/parse_result.lua
Building Lua file lua/lua/grammar.lua
[ 25%] [ 25%] [ 25%] Building Lua file lua/rule.lua
[ 26%] Building Lua file lua/rule_group.lua
[ 27%] [ 28%] Building Lua file lua/lua/grammar_dg.lua
Building Lua file lua/lua/state_machine.lua
Building Lua file lua/lua/state.lua
[ 28%] Building Lua file lua/lua/utils.lua
[ 28%] Built target haka-lua
[ 29%] Building Lua file lua/lua/dissector.lua
[ 30%] Building Lua file lua/lua/list.lua
Building Lua file lua/lua/check.lua
[ 30%] Built target libhakalua
Scanning dependencies of target libhaka
[ 31%] [ 31%] [ 32%] [ 35%] [ 35%] [ 35%] [ 36%] [ 37%] Building C object lib/haka/CMakeFiles/libhaka.dir/packet.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/log.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/alert_module.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/error.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/log_module.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/debug.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/module.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/alert.c.o
[ 37%] Building C object lib/haka/CMakeFiles/libhaka.dir/thread.c.o
[ 38%] [ 39%] Building C object lib/haka/CMakeFiles/libhaka.dir/parameters.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/colors.c.o
[ 40%] Building C object lib/haka/CMakeFiles/libhaka.dir/time.c.o
[ 40%] Building C object lib/haka/CMakeFiles/libhaka.dir/timer.c.o
[ 41%] Building C object lib/haka/CMakeFiles/libhaka.dir/state_machine.c.o
[ 42%] Building C object lib/haka/CMakeFiles/libhaka.dir/vbuffer.c.o
[ 43%] Building C object lib/haka/CMakeFiles/libhaka.dir/vbuffer_data.c.o
[ 43%] Building C object lib/haka/CMakeFiles/libhaka.dir/vbuffer_stream.c.o
[ 44%] Building C object lib/haka/CMakeFiles/libhaka.dir/vbuffer_sub_stream.c.o
[ 45%] [ 46%] Building C object lib/haka/CMakeFiles/libhaka.dir/system.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/regexp_module.c.o
[ 46%] [ 47%] Building C object lib/haka/CMakeFiles/libhaka.dir/engine.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/container/list.c.o
[ 48%] Building C object lib/haka/CMakeFiles/libhaka.dir/container/list2.c.o
[ 49%] Building C object lib/haka/CMakeFiles/libhaka.dir/container/vector.c.o
[ 49%] Building C object lib/haka/CMakeFiles/libhaka.dir/lua/state.c.o
[ 50%] [ 51%] Building C object lib/haka/CMakeFiles/libhaka.dir/lua/ref.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/lua/lua.c.o
[ 52%] Building C object lib/haka/CMakeFiles/libhaka.dir/lua/marshal.c.o
[ 52%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/interactive.c.o
[ 53%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/complete.c.o
[ 54%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/debugger.c.o
[ 55%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/utils.c.o
[ 55%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/user.c.o
[ 56%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/user_readline.c.o
[ 57%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/user_remote.c.o
[ 57%] [ 58%] Building C object lib/haka/CMakeFiles/libhaka.dir/lua/hakainitLUA_wrap.c.o
Building C object lib/haka/CMakeFiles/libhaka.dir/lua/hakaLUA_wrap.c.o
[ 59%] Building C object lib/haka/CMakeFiles/libhaka.dir/lua/swigLUA_wrap.c.o
[ 60%] Building C object lib/haka/CMakeFiles/libhaka.dir/luadebug/luadebugLUA_wrap.c.o
[ 60%] Building C object lib/haka/CMakeFiles/libhaka.dir///external/lmarshal/lmarshal.c.o
Linking C shared library libhaka.so
[ 60%] Built target libhaka
[ 61%] [ 62%] [ 63%] Processing Swig source lua/hakactl.i
[ 64%] Processing Swig source raw.i
[ 64%] Processing Swig source pcre.i
Scanning dependencies of target libelasticsearch
Processing Swig source geoip.i
Scanning dependencies of target packet-pcap
Scanning dependencies of target haka-common
Processing Swig source ipv4.i
[ 65%] [ 65%] [ 67%] Building C object modules/misc/elasticsearch/CMakeFiles/libelasticsearch.dir/elasticsearch.c.o
Building C object modules/packet/pcap/CMakeFiles/packet-pcap.dir/main.c.o
Building C object src/haka/CMakeFiles/haka-common.dir/app.c.o
Scanning dependencies of target hakactl
Scanning dependencies of target pcre
Scanning dependencies of target geoip
Scanning dependencies of target raw
[ 68%] [ 69%] [ 69%] Building C object src/hakactl/CMakeFiles/hakactl.dir/hakactl.c.o
[ 70%] Building C object modules/regexp/pcre/CMakeFiles/pcre.dir/main.c.o
Building C object modules/misc/geoip/CMakeFiles/geoip.dir/main.c.o
Building C object modules/protocol/raw/CMakeFiles/raw.dir/rawLUA_wrap.c.o
[ 71%] Building C object modules/misc/geoip/CMakeFiles/geoip.dir/geoip.c.o
[ 72%] Building C object src/haka/CMakeFiles/haka-common.dir/thread.c.o
Scanning dependencies of target ipv4
[ 73%] Building C object modules/protocol/ipv4/CMakeFiles/ipv4.dir/ipv4LUA_wrap.c.o
[ 74%] Building C object modules/misc/geoip/CMakeFiles/geoip.dir/geoipLUA_wrap.c.o
[ 74%] Building C object src/hakactl/CMakeFiles/hakactl.dir/commands.c.o
[ 74%] Building C object modules/regexp/pcre/CMakeFiles/pcre.dir/pcreLUA_wrap.c.o
[ 75%] Building C object modules/packet/pcap/CMakeFiles/packet-pcap.dir/pcap.c.o
[ 76%] Building C object modules/misc/elasticsearch/CMakeFiles/libelasticsearch.dir/json.c.o
[ 77%] Building C object src/hakactl/CMakeFiles/hakactl.dir/console.c.o
Linking C static library libhaka-common.a
Linking C shared library pcap.so
Linking C shared library libelasticsearch.so
[ 77%] Built target packet-pcap
Scanning dependencies of target packet-nfqueue
[ 78%] Building C object modules/packet/nfqueue/CMakeFiles/packet-nfqueue.dir/main.c.o
[ 78%] Built target libelasticsearch
[ 79%] [ 80%] Building C object modules/protocol/ipv4/CMakeFiles/ipv4.dir/main.c.o
Building C object src/hakactl/CMakeFiles/hakactl.dir/lua/hakactlLUA_wrap.c.o
[ 88%] Built target packet-nfqueue
[ 88%] Built target alert-file
Scanning dependencies of target libhaka-vbuffer
Linking C shared module syslog.so
Scanning dependencies of target libhaka-vbuffer-stream
[ 89%] Scanning dependencies of target haka
Building C object lib/haka/test/CMakeFiles/libhaka-vbuffer.dir/vbuffer.c.o
[ 90%] [ 91%] Building C object lib/haka/test/CMakeFiles/libhaka-vbuffer-stream.dir/vbuffer_stream.c.o
Building C object src/haka/CMakeFiles/haka.dir/haka.c.o
[ 91%] Built target alert-syslog
Linking C executable hakactl
Scanning dependencies of target hakapcap
[ 91%] Building C object src/haka/CMakeFiles/hakapcap.dir/hakapcap.c.o
../../lib/haka/libhaka.so.0.2.1: undefined reference to sinh' ../../lib/haka/libhaka.so.0.2.1: undefined reference totanh'
../../lib/haka/libhaka.so.0.2.1: undefined reference to cosh' collect2: error: ld returned 1 exit status src/hakactl/CMakeFiles/hakactl.dir/build.make:171: recipe for target 'src/hakactl/hakactl' failed make[2]: *** [src/hakactl/hakactl] Error 1 CMakeFiles/Makefile2:761: recipe for target 'src/hakactl/CMakeFiles/hakactl.dir/all' failed make[1]: *** [src/hakactl/CMakeFiles/hakactl.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 91%] Building C object src/haka/CMakeFiles/haka.dir/ctl.c.o Linking C executable hakapcap ../../lib/haka/libhaka.so.0.2.1: undefined reference tosinh'
../../lib/haka/libhaka.so.0.2.1: undefined reference to tanh' ../../lib/haka/libhaka.so.0.2.1: undefined reference tocosh'
collect2: error: ld returned 1 exit status
src/haka/CMakeFiles/hakapcap.dir/build.make:87: recipe for target 'src/haka/hakapcap' failed
make[2]: *** [src/haka/hakapcap] Error 1
CMakeFiles/Makefile2:660: recipe for target 'src/haka/CMakeFiles/hakapcap.dir/all' failed
make[1]: *** [src/haka/CMakeFiles/hakapcap.dir/all] Error 2
Linking C executable libhaka-vbuffer-stream
[ 91%] Built target libhaka-vbuffer-stream
Linking C executable haka
../../lib/haka/libhaka.so.0.2.1: undefined reference to sinh' ../../lib/haka/libhaka.so.0.2.1: undefined reference totanh'
../../lib/haka/libhaka.so.0.2.1: undefined reference to `cosh'
collect2: error: ld returned 1 exit status
src/haka/CMakeFiles/haka.dir/build.make:113: recipe for target 'src/haka/haka' failed
make[2]: *** [src/haka/haka] Error 1
CMakeFiles/Makefile2:518: recipe for target 'src/haka/CMakeFiles/haka.dir/all' failed
make[1]: *** [src/haka/CMakeFiles/haka.dir/all] Error 2
Linking C executable libhaka-regexp-pcre
Linking C executable libhaka-vbuffer
[ 91%] Built target libhaka-regexp-pcre
[ 91%] Built target libhaka-vbuffer
Linking C shared library ipv4.so
[ 91%] Built target ipv4
Makefile:147: recipe for target 'all' failed
make: *** [all] Error 2

I'm going to dig into the code a bit more to see if I can find an issue. I just was curious if you have tried to build it on Archlinux or if you have any insight as to why it might be failing.

@boucman
Copy link

boucman commented Oct 16, 2014

there seems to be something weird in the way libm is linked on i686

I have just checked and libhaka should normaly use libm (moreover it would fail on all architectures if that wasn't the case...)

did you build your compiler yourself ? did you use it to build other software ?

@archey
Copy link
Author

archey commented Oct 16, 2014

Nope, my compiler is the standard archlinux toolchain.

@archey
Copy link
Author

archey commented Oct 16, 2014

Yes I use the same compiler to build all of the software as well as the x86_64 builds.

@archey
Copy link
Author

archey commented Oct 16, 2014

The glibc version is 2.20.

@archey
Copy link
Author

archey commented Oct 16, 2014

It does look like hakactl is linking properly in the build dir:

ldd hakactl

linux-vdso.so.1 (0x00007fff01c00000)
libhaka.so.0 => /home/spirit/packages/haka/src/haka_0.2.1_source/make/lib/haka/libhaka.so.0 (0x00007f5bc9088000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f5bc8e68000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f5bc8ac0000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f5bc88b8000)
librt.so.1 => /usr/lib/librt.so.1 (0x00007f5bc86b0000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007f5bc83a8000)
libedit.so.0 => /usr/lib/libedit.so.0 (0x00007f5bc8168000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f5bc7f50000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5bc9370000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007f5bc7ce8000)

@archey
Copy link
Author

archey commented Oct 16, 2014

I'm going to see about submitting a bugreport upstream about this as well. I will let you know what I find out.

@paulfariello
Copy link
Member

Hi Arch3y,

Glad to see that you are going to package haka{,bana} for archassault. By the way, is the package compatible with a simple arch Linux distribution?

I'm installing an i386 arch Linux to see if I can reproduce your problem. I'll let you know if I found anything.

On 16 octobre 2014 20:14:28 UTC+02:00, arch3y notifications@github.com wrote:

I'm going to see about submitting a bugreport upstream about this as
well. I will let you know what I find out.


Reply to this email directly or view it on GitHub:
#12 (comment)

Envoyé de mon téléphone. Excusez la brièveté.

@archey
Copy link
Author

archey commented Oct 17, 2014

Thanks we are looking into it as well, we dont want to go to the upstream for an issue with glibc if its something we can fix. We build all of our pkgs in a clean chroot per arch standards with flags:

CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=i686 -mtune=generic -O3 -pipe -fstack-protector-all --param=ssp-buffer-size=4"
CXXFLAGS="-march=i686 -mtune=generic -O3 -pipe -fstack-protector-all --param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"

These are standard arch flags except they use -02 and -fstack-protector-strong now it seems to build just fine on x86_64, but it blows up on i686. We have tried tweaking our flags, but we have not looked into it too much. FYI, we started to add haka at 0.1 but it was a pain to get working due to it pulling in all of its deps, however it seems like thats been sorted out in 2.0.1. We will be adding hakabanna as well once we get haka working. As welll as i686 and x86_64 we will be building haka on arm as well if we can.

@archey
Copy link
Author

archey commented Oct 17, 2014

It seems to be quite compatible with the x86_64 builds to answer your question.

@boucman
Copy link

boucman commented Oct 17, 2014

you might want (at least for testing purpose) to let haka pull it's own lua/luajit

these two can be compiled with various options which might change stuff... worth testing

@archey
Copy link
Author

archey commented Oct 17, 2014

We let it pull in its version of luajit and place it under /usr/share/haka/ if you would like I can provide the pkgbuild for you guys. I'd prefer to send that over email if possible.

Our build options are:

mkdir make && cd make
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make
then we run make DESTDIR-installdir install

@paulfariello
Copy link
Member

Hi archey,

I've just built haka successfully on arch linux i386 with the usual :

cmake ../haka
make
make tests

Is archassault really different from an Arch linux ?

@archey
Copy link
Author

archey commented Oct 20, 2014

As I said we are using different build flags, but we are just a layer on top of archlinux. Our build flags are

CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=i686 -mtune=generic -O3 -pipe -fstack-protector-all --param=ssp-buffer-size=4"
CXXFLAGS="-march=i686 -mtune=generic -O3 -pipe -fstack-protector-all --param=ssp-buffer-size=4"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro"

This seems to work fine on x86_64 but it blows up on i686. Let me do some more testing on my end as well. We are also building this in a clean chroot with the latest haka release.

Here's our build options as well:

mkdir make && cd make
cmake -DCMAKE_INSTALL_PREFIX=/usr ..
make

@paulfariello
Copy link
Member

I can't reproduce even with the build flags you are using. Could you provide us the pkgbuild with some instruction on how to use it at haka-security at stormshield dot eu ?

@archey
Copy link
Author

archey commented Oct 20, 2014

yep I can do that, I'll email it to you in a moment.

@archey
Copy link
Author

archey commented Oct 20, 2014

Getting errors that the email addr does not exist and I replaced the dot with period and so forth, does the dash in haka-security exist? I added that as well just double checking.

@paulfariello
Copy link
Member

Strange. I've just tested and it work for me. Can you try with haka-security at arkoon dot net ?

@archey
Copy link
Author

archey commented Oct 20, 2014

yeah it looks like the stormshield domain is not resolving for me

@archey
Copy link
Author

archey commented Oct 20, 2014

Ok arkoon worked sent it out

@paulfariello
Copy link
Member

Ok I've reach a point where I can reproduce. And it seems that the --as-needed option is the one creating the issue.

@archey
Copy link
Author

archey commented Oct 20, 2014

Thanks let us know, what we can do to help out.

@paulfariello
Copy link
Member

I may have a patch. Could you try it with the following commit paulfariello/haka@6398e9f ?

If it works it will be merged into haka/develop and it will be shipped into next release.

@archey
Copy link
Author

archey commented Oct 20, 2014

Sure let me try it out.

@archey
Copy link
Author

archey commented Oct 20, 2014

Ok that has fixed our issue, it builds in a clean chroot and all of the tests pass. Should the tests pass in a fakeroot as they fail on x86_64 in a fakeroot?

@paulfariello
Copy link
Member

Cool. As I said, the patch will be in the next release :)

Concerning the tests, they should pass on every architectures. I'll test on x86_64 to see which ones fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants