Hi,

I'd like to use heka on small arm boards (raspberry pi and cubieboard) to
collect and send metrics to centralized heka server, so I was wondering if
somebody had already compiled heka on arm?
I've tried to follow this guide
http://www.cmake.org/Wiki/CMake_Cross_Compiling to configure cmake to do
cross compilation, but it fails with the following error:

[100%] Built target mocks
Scanning dependencies of target hekad
# runtime/cgo
cc1: error: unrecognized command line option '-marm'
make[2]: *** [CMakeFiles/hekad] Error 2
make[1]: *** [CMakeFiles/hekad.dir/all] Error 2
make: *** [all] Error 2

Note that I'm running the following build script:

export CGO_ENABLED=1
export GOARCH=arm
export GOOS=linux
export
CROSS_COMPILE_TOOLCHAIN_ROOT=/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64

rm -rf CMakeCache.txt CMakeFiles/
cmake -G "Unix Makefiles"
-DCMAKE_TOOLCHAIN_FILE=/vagrant/arm.toolchain.cmake \
    -DCMAKE_BUILD_TYPE=release ..
make


Here is my CMAKE_TOOLCHAIN_FILE:

SET(CMAKE_SYSTEM_NAME Linux)
SET(CMAKE_SYSTEM_VERSION 1)

SET(CROSS_COMPILE
$ENV{CROSS_COMPILE_TOOLCHAIN_ROOT}/bin/arm-linux-gnueabihf-)
SET(CMAKE_CXX_COMPILER  ${CROSS_COMPILE}g++)
SET(CMAKE_CC_COMPILER   ${CROSS_COMPILE}gcc)
SET(CMAKE_AS            ${CROSS_COMPILE}as)
SET(CMAKE_AR            ${CROSS_COMPILE}ar)
SET(CMAKE_NM            ${CROSS_COMPILE}nm)
SET(CMAKE_LINKER        ${CROSS_COMPILE}ld)
SET(CMAKE_OBJDUMP       ${CROSS_COMPILE}objdump)
SET(CMAKE_OBJCOPY       ${CROSS_COMPILE}objcopy)
SET(CMAKE_RANLIB        ${CROSS_COMPILE}ranlib)
SET(CMAKE_STRIP         ${CROSS_COMPILE}strip)

SET(CMAKE_FIND_ROOT_PATH  $ENV{CROSS_COMPILE_TOOLCHAIN_ROOT})
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)


And CROSS_COMPILE_TOOLCHAIN_ROOT points to a
https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64git
clone.

Any idea of what is wrong with my setup?
Has anybody already succeeded in cross-compiling heka on arm?

I don't know CMake, so any help would be really appreciated.
I suspect CMake to use the wrong compiler /usr/bin/gcc (not the one from
the cross compilation toolchain
/opt/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc)
because CMake print out these messages:
-- The C compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works

Thanks,
Bruno
_______________________________________________
Heka mailing list
[email protected]
https://mail.mozilla.org/listinfo/heka

Reply via email to