Skip to content

Can't build on arch #23

@D4nte

Description

@D4nte

Hi there,

Trying to build on arch, getting:

▶ make
g++ -std=c++17 -Os -Wall -g3 -I. -Ipc/ -Isrc/ -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/ -Ilibs/stm32fs/ -Ilibs/bearssl/ -Ilibs/spiffs/ -Ilibs/spiffs/default -Ilibs/spiffs/test -c -o obj/opgpdevice.o ./pc/opgpdevice.cpp
g++ -std=c++17 -Os -Wall -g3 -I. -Ipc/ -Isrc/ -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/ -Ilibs/stm32fs/ -Ilibs/bearssl/ -Ilibs/spiffs/ -Ilibs/spiffs/default -Ilibs/spiffs/test -c -o obj/cryptolib.o ./src/cryptolib.cpp
g++ -std=c++17 -Os -Wall -g3 -I. -Ipc/ -Isrc/ -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/ -Ilibs/stm32fs/ -Ilibs/bearssl/ -Ilibs/spiffs/ -Ilibs/spiffs/default -Ilibs/spiffs/test -c -o obj/opgputil.o ./src/opgputil.cpp
./src/opgputil.cpp:9:10: fatal error: led.h: No such file or directory
    9 | #include "led.h"
      |          ^~~~~~~
./pc/opgpdevice.cpp:31:10: fatal error: spiffs.h: No such file or directory
   31 | #include <spiffs.h>
      |          ^~~~~~~~~~
compilation terminated.
compilation terminated.
make: *** [Makefile:31: obj/opgpdevice.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:31: obj/opgputil.o] Error 1
./src/cryptolib.cpp:15:10: fatal error: device.h: No such file or directory
   15 | #include "device.h"
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:31: obj/cryptolib.o] Error 1

Then with #24, I fixed spiffs. I used submodule strategy, let me know if you prefer another method.

▶ make
g++ -std=c++17 -Os -Wall -g3 -I. -Ipc/ -Isrc/ -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/ -Ilibs/stm32fs/ -Ilibs/bearssl/ -Ilibs/spiffs/src -Ilibs/spiffs/src/default -Ilibs/spiffs/src/test -c -o obj/opgpdevice.o ./pc/opgpdevice.cpp
g++ -std=c++17 -Os -Wall -g3 -I. -Ipc/ -Isrc/ -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/ -Ilibs/stm32fs/ -Ilibs/bearssl/ -Ilibs/spiffs/src -Ilibs/spiffs/src/default -Ilibs/spiffs/src/test -c -o obj/cryptolib.o ./src/cryptolib.cpp
g++ -std=c++17 -Os -Wall -g3 -I. -Ipc/ -Isrc/ -Ilibs/mbedtls/ -Ilibs/mbedtls/mbedtls/crypto/include/ -Ilibs/stm32fs/ -Ilibs/bearssl/ -Ilibs/spiffs/src -Ilibs/spiffs/src/default -Ilibs/spiffs/src/test -c -o obj/opgputil.o ./src/opgputil.cpp
./src/opgputil.cpp:9:10: fatal error: led.h: No such file or directory
    9 | #include "led.h"
      |          ^~~~~~~
compilation terminated.
make: *** [Makefile:31: obj/opgputil.o] Error 1
make: *** Waiting for unfinished jobs....
./src/cryptolib.cpp:15:10: fatal error: device.h: No such file or directory
   15 | #include "device.h"
      |          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:31: obj/cryptolib.o] Error 1
./pc/opgpdevice.cpp: In function ‘void hw_spiffs_mount()’:
./pc/opgpdevice.cpp:71:26: error: invalid conversion from ‘s32_t (*)(u32_t, u32_t, u8_t*)’ {aka ‘int (*)(unsigned int, unsigned int, unsigned char*)’} to ‘spiffs_read’ {aka ‘int (*)(spiffs_t*, unsigned int, unsigned int, unsigned char*)’} [-fpermissive]
   71 |         cfg.hal_read_f = hw_spiffs_read;
      |                          ^~~~~~~~~~~~~~
      |                          |
      |                          s32_t (*)(u32_t, u32_t, u8_t*) {aka int (*)(unsigned int, unsigned int, unsigned char*)}
./pc/opgpdevice.cpp:72:27: error: invalid conversion from ‘s32_t (*)(u32_t, u32_t, u8_t*)’ {aka ‘int (*)(unsigned int, unsigned int, unsigned char*)’} to ‘spiffs_write’ {aka ‘int (*)(spiffs_t*, unsigned int, unsigned int, unsigned char*)’} [-fpermissive]
   72 |         cfg.hal_write_f = hw_spiffs_write;
      |                           ^~~~~~~~~~~~~~~
      |                           |
      |                           s32_t (*)(u32_t, u32_t, u8_t*) {aka int (*)(unsigned int, unsigned int, unsigned char*)}
./pc/opgpdevice.cpp:73:27: error: invalid conversion from ‘s32_t (*)(u32_t, u32_t)’ {aka ‘int (*)(unsigned int, unsigned int)’} to ‘spiffs_erase’ {aka ‘int (*)(spiffs_t*, unsigned int, unsigned int)’} [-fpermissive]
   73 |         cfg.hal_erase_f = hw_spiffs_erase;
      |                           ^~~~~~~~~~~~~~~
      |                           |
      |                           s32_t (*)(u32_t, u32_t) {aka int (*)(unsigned int, unsigned int)}
./pc/opgpdevice.cpp: In function ‘int ireadfile(char*, uint8_t*, size_t, size_t*)’:
./pc/opgpdevice.cpp:271:15: error: ordered comparison of pointer with integer zero (‘FILE*’ and ‘int’)
  271 |         if (f <= 0)
      |             ~~^~~~
./pc/opgpdevice.cpp: In function ‘int iwritefile(char*, uint8_t*, size_t)’:
./pc/opgpdevice.cpp:314:15: error: ordered comparison of pointer with integer zero (‘FILE*’ and ‘int’)
  314 |         if (f <= 0)
      |             ~~^~~~
make: *** [Makefile:31: obj/opgpdevice.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions