Hi, there are several issues that I have run into which prevent me from building from source. I am using FreeBSD 11 with clang 3.8. I also tried using gcc6 but ran into similar issues.
[ 1%] Built target xpp
Scanning dependencies of target polybar
[ 2%] Building CXX object bin/CMakeFiles/polybar.dir/adapters/alsa.cpp.o
In file included from <built-in>:350:
<command line>:1:9: error: macro name must be an identifier
#define -I/usr/local/include 1
^
In file included from /usr/home/tim/polybar/src/adapters/alsa.cpp:1:
/usr/home/tim/polybar/include/adapters/alsa.hpp:4:10: fatal error: 'endian.h' file not found
#include <endian.h>
^
2 errors generated.
*** Error code 1
Stop.
make[2]: stopped in /usr/home/tim/polybar/build
*** Error code 1
Stop.
make[1]: stopped in /usr/home/tim/polybar/build
*** Error code 1
Stop.
make: stopped in /usr/home/tim/polybar/build
I don't know how to fix the first error, but to fix the second, I change #include <endian.h> to #include <sys/endian.h> in include/adapters/alsa.hpp
After making that change, the build output becomes:
[ 1%] Built target xpp
Scanning dependencies of target polybar
[ 2%] Building CXX object bin/CMakeFiles/polybar.dir/adapters/alsa.cpp.o
In file included from <built-in>:350:
<command line>:1:9: error: macro name must be an identifier
#define -I/usr/local/include 1
^
In file included from /usr/home/tim/polybar/src/adapters/alsa.cpp:1:
In file included from /usr/home/tim/polybar/include/adapters/alsa.hpp:26:
/usr/local/include/alsa/pcm.h:597:19: error: zero size arrays are an extension
[-Werror,-Wzero-length-array]
unsigned int pos[0]; /**< channel position array */
^
/usr/home/tim/polybar/src/adapters/alsa.cpp:247:16: error: use of undeclared identifier 'pow10'
normalized = pow10((vol_total / chan_n - vol_max) / 6000.0);
^
/usr/home/tim/polybar/src/adapters/alsa.cpp:249:16: error: use of undeclared identifier 'pow10'
min_norm = pow10((vol_min - vol_max) / 6000.0);
^
/usr/home/tim/polybar/src/adapters/alsa.cpp:296:16: error: use of undeclared identifier 'pow10'
min_norm = pow10((vol_min - vol_max) / 6000.0);
^
5 errors generated.
*** Error code 1
Stop.
make[2]: stopped in /usr/home/tim/polybar/build
*** Error code 1
Stop.
make[1]: stopped in /usr/home/tim/polybar/build
*** Error code 1
Stop.
make: stopped in /usr/home/tim/polybar/build
Hi, there are several issues that I have run into which prevent me from building from source. I am using FreeBSD 11 with clang 3.8. I also tried using gcc6 but ran into similar issues.
I don't know how to fix the first error, but to fix the second, I change
#include <endian.h>to#include <sys/endian.h>ininclude/adapters/alsa.hppAfter making that change, the build output becomes: