awslabs / flowgger

A fast data collector in Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[MAC] undefined macro: AC_DEFINE, AC_MSG_FAILURE

ricocai opened this issue · comments

MAC OS X 10.10.5
$ rustc -V
rustc 1.14.0 (e8a012324 2016-12-16)
$ cargo -V
cargo 0.15.0-nightly (298a012 2016-12-20)
in the /flowgger and run "$ sudo cargo build --release -v". Get the following errors.

....
HOST = Some("x86_64-apple-darwin")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
running: "./autogen.sh"
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'

--- stderr
configure.ac:17: installing './compile'
configure.ac:17: installing './config.guess'
configure.ac:17: installing './config.sub'
configure.ac:15: installing './install-sh'
configure.ac:15: installing './missing'
Makefile.am: installing './INSTALL'
/usr/local/share/automake-1.15/am/ltlibrary.am: warning: 'libsnappy.la': linking libtool libraries using a non-POSIX
/usr/local/share/automake-1.15/am/ltlibrary.am: archiver requires 'AM_PROG_AR' in 'configure.ac'
Makefile.am:4: while processing Libtool library 'libsnappy.la'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
configure.ac:43: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:45: error: possibly undefined macro: AC_MSG_FAILURE
thread 'main' panicked at 'failed to run successfully: exit code: 1', /Users//.cargo/registry/src/github.com-1ecc6299db9ec823/snappy-sys-0.1.0/build.rs:102
note: Run with RUST_BACKTRACE=1 for a backtrace.

Hi there,

If you don't need Kafka, you can probably get around this by compiling without Kafka:

cargo build --release --no-default-features

(sudo is not required btw, even for cargo install)

The problem doesn't seem to be in Flowgger itself, but in the Snappy library.

OSX 10.10 is getting really old now, and I don't expect the Snappy developers to support this operating system any more. If my memory serves me correctly, it used to ship with autoconf and automake in the base system, but these were already pretty old.
You may want to install them using Homebrew instead in order to get newer versions.

But still, if you don't need Kafka, the easiest way to go is probably to just not compile Flowgger without Kafka support.