Fluent-bit: Mac OS - Unable to build fluent-bit due to math.h library

Created on 26 Jun 2019  路  3Comments  路  Source: fluent/fluent-bit

Bug Report

Describe the bug
Unable to build fluent-bit. Seeing below error when compiling the source code with make

To Reproduce

  • When compiling the project with make. Compilation fail with below error
==== Building LuaJIT 2.1.0-beta3 ====
HOSTCC    host/minilua.o
host/minilua.c:34:10: fatal error: 'math.h' file not found
#include <math.h>
         ^~~~~~~~
1 error generated.
make[4]: *** [host/minilua.o] Error 1
make[3]: *** [default] Error 2
make[2]: *** [luajit-prefix/src/luajit-stamp/luajit-build] Error 2
make[1]: *** [CMakeFiles/luajit.dir/all] Error 2
make: *** [all] Error 2

Expected behavior

Linking C executable ../bin/fluent-bit
[100%] Built target fluent-bit-bin

Your Environment

  • Version used: 10.14.5 (18F132)
  • Configuration: 16GB RAM intel core i7
  • Server type and version: MacOS Laptop
  • Operating System and version: macOS Mojave
  • Filters and plugins: N/A
fixed question

Most helpful comment

@fujimotos , Thank you! I will try and get back..

Note : For people who want to install fluent-bit on mac, brew install fluent-bit works.. This issue is only when compiling the source code.

All 3 comments

Check the following threads:

In short, XCode not provide /usr/include by default anymore since Mojave.
You just need to install the following package manually, and the bug should
be gone.

/Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14. pkg

@fujimotos , Thank you! I will try and get back..

Note : For people who want to install fluent-bit on mac, brew install fluent-bit works.. This issue is only when compiling the source code.

thanks both for reporting and addressing the issue. Closing the ticket.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Barbazoo picture Barbazoo  路  3Comments

arienchen picture arienchen  路  3Comments

UladzimirSemiankou picture UladzimirSemiankou  路  3Comments

Bulat-Gumerov picture Bulat-Gumerov  路  4Comments

edsiper picture edsiper  路  4Comments