TobleMiner / mk_esp32fat

A simple tool for building FAT filesystem images for the ESP32 fatfs with wear levelling support
Apache License 2.0
14 stars 4 forks source link

[make] Error on running make: conflicting types for 'esp_partition_erase_range' #4

Open LanFly opened 5 years ago

LanFly commented 5 years ago

hi, I found several errors in the process of make. I hope can fix the problem with your help. thanks you.

my environment:


full log:

lan:mk_esp32fat lan$ make
/Library/Developer/CommandLineTools/usr/bin/make -C /Users/lan/Documents/workspace/esp-idf/components/wear_levelling/test_wl_host lib SDKCONFIG=/Users/lan/Documents/workspace/esp-tools/mk_esp32fat/sdkconfig/sdkconfig.h
make[1]: Nothing to be done for `lib'.
/Library/Developer/CommandLineTools/usr/bin/make -C /Users/lan/Documents/workspace/esp-idf/components/spi_flash/sim lib SDKCONFIG=/Users/lan/Documents/workspace/esp-tools/mk_esp32fat/sdkconfig/sdkconfig.h
mkdir -p build
cc -I. -I../include -I../private_include -Istubs/app_update/include -Istubs/driver/include -Istubs/esp32/include -Istubs/freertos/include -Istubs/log/include -Istubs/newlib/include -Istubs/sdmmc/include -Istubs/vfs/include -I../../../components/soc/esp32/include -I../../../components/esp32/include -I../../../components/bootloader_support/include -I../../../components/app_update/include -I../../../components/spi_flash/include -I/Users/lan/Documents/workspace/esp-tools/mk_esp32fat/sdkconfig/ -g -m32  -c -o  build/partition.o  ../partition.c
In file included from ../partition.c:25:
../../../components/bootloader_support/include/esp_flash_encrypt.h:38:28: error: argument to 'section'
      attribute is not valid for this target: mach-o section specifier requires a segment and section
      separated by a comma
static inline /** @cond */ IRAM_ATTR /** @endcond */ bool esp_flash_encryption_enabled(void) {
                           ^
../../../components/esp32/include/esp_attr.h:24:42: note: expanded from macro 'IRAM_ATTR'
#define IRAM_ATTR __attribute__((section(".iram1")))
                                         ^
In file included from ../partition.c:26:
stubs/log/include/esp_log.h:12:9: warning: 'strlcpy' macro redefined [-Wmacro-redefined]
#define strlcpy(a, b, c)
        ^
/usr/include/secure/_string.h:107:9: note: previous definition is here
#define strlcpy(dest, ...) \
        ^
In file included from ../partition.c:26:
stubs/log/include/esp_log.h:13:9: warning: 'strlcat' macro redefined [-Wmacro-redefined]
#define strlcat(a, b, c)
        ^
/usr/include/secure/_string.h:114:9: note: previous definition is here
#define strlcat(dest, ...) \
        ^
../partition.c:278:11: error: conflicting types for 'esp_partition_erase_range'
esp_err_t esp_partition_erase_range(const esp_partition_t* partition,
          ^
../include/esp_partition.h:258:11: note: previous declaration is here
esp_err_t esp_partition_erase_range(const esp_partition_t* partition,
          ^
2 warnings and 2 errors generated.
make[1]: *** [build/partition.o] Error 1
make: *** [/Users/lan/Documents/workspace/esp-idf/components/spi_flash/sim/build/libspi_flash.a] Error 2

if you need more information, please contact me on issue.

TobleMiner commented 5 years ago

Hey, unfortunately I don't own a Mac myself. However, a friend of mine does. I'll try replicating the issue with him and see if it can be fixed. That might take a few days though.