I'm trying to build cc-tool debugger as described here https://www.zigbee2mqtt.io/information/flashing_the_cc2531.html
But at configure step got this error
checking for the Boost regex library... no
configure: error: cannot find the flags to link with Boost regex
Same issue described here https://github.com/dashesy/cc-tool/issues/25 and suggested solution is to downgrade boost to 1.60. But it does not work anymore because 1.60 deleted from brew.
I've tried to use clang compiler instead of gcc but it does not work too.
MacOS: Big sur 11.5.2 (20G95)
This convention distinguishes the static version of a Boost library from the import library for an identically-configured Boost DLL, which would otherwise have the same name. These libraries were compiled without optimization or inlining, with full debug symbols enabled, and without NDEBUG #define d.
If you want to use any of the separately-compiled Boost libraries, you'll need to acquire library binaries. If you wish to build from source with Visual C++, you can use a simple build procedure described in this section. Open the command prompt and change your current directory to the Boost root directory.
It's important to note the following: The path to the boost root directory (often C:\Program Files\boost\boost_1_76_0) is sometimes referred to as $BOOST_ROOT in documentation and mailing lists . To compile anything in Boost, you need a directory containing the boost\ subdirectory in your #include path.
The Boost website version of this Getting Started guide may have updated information, such as the location of additional installers or improved installation procedures, so you might want use that version if you've got an Internet connection available. Welcome to the Boost libraries!
Here the solution:
CC=/usr/bin/clang \
CXX=/usr/bin/clang++ \
CPPFLAGS=-I/usr/local/include \
LDFLAGS=-I/usr/local/include \
./bootstrap
CC=/usr/bin/clang \
CXX=/usr/bin/clang++ \
CPPFLAGS=-I/usr/local/include \
CXXFLAGS="-std=c++0x" \
LDFLAGS="-I/usr/local/include -lboost_system" \
LIBUSB_CFLAGS=-I/usr/local/include/libusb-1.0 \
LIBUSB_LIBS="-L/usr/local/lib -lusb-1.0" \
./configure
It allows to configure with boost 1.76. Found here https://gist.github.com/kidpixo/ef1a26ae953e3939a4eebe1b6fd2f07c
For mac with M1 CPU, macOS Monterey (boost version 1.78.0):
CC=/usr/bin/clang \
CXX=/usr/bin/clang++ \
CPPFLAGS=-I/opt/homebrew/include \
LDFLAGS=-I/opt/homebrew/include \
./bootstrap
CC=/usr/bin/clang \
CXX=/usr/bin/clang++ \
CPPFLAGS=-I/opt/homebrew/include \
CXXFLAGS="-std=c++0x" \
LDFLAGS="-L/opt/homebrew/Cellar/boost/1.78.0_1/lib/" \
LIBUSB_CFLAGS=-I/opt/homebrew/include/libusb-1.0 \
LIBUSB_LIBS="-L/opt/homebrew/lib -lusb-1.0" \
./configure
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With