devicehive/esp8266-firmware

esp-utils doesn't compile with version 8.2.0 (Ubuntu 8.2.0-7ubuntu1)

oli4gate opened this issue · 0 comments

compiling esp-utils with g++ version 8.2.0 stops with errors like :

In file included from /usr/include/x86_64-linux-gnu/sys/types.h:193,
from /usr/include/stdlib.h:394,
from /usr/include/c++/8/bits/std_abs.h:38,
from /usr/include/c++/8/cmath:47,
from /usr/include/c++/8/math.h:36,
from esp-flasher.cpp:15:
esp-flasher.cpp:87:10: error: redefinition of ‘uint16_t __uint16_identity(uint16_t)’
uint16_t htole16(uint16_t n) {

to bypass this I have installed g++-5
and modified the Makefile,

CXX ?= gcc
VERSION += -5
CFLAGS += -c -Wall
LDFLAGS += -Os

$(OBJDIR)/%.o: %.cpp
@echo "CXX $<"
@mkdir -p $(dir $@)
@$(CXX)$(VERSION) $(CFLAGS) $&lt; -o $@

just fyi