Error on rebuild_all.sh No FixedCapStr.h

I’ve pulled in the Examples from a git clone.
Most things seem to be there but I get a…

…/…/libdaisy/src/util/FixedCapStr.h:7:23: fatal error: string_view: No such file or directory
compilation terminated.

I check in that directory and I see this FixedCapStr.h file is there. What gives?!?!

More details on the error:

                 from ../../libdaisy/src/ui/AbstractMenu.h:4,
                 from ../../libdaisy/src/daisy.h:52,
                 from ../../libdaisy/src/daisy_seed.h:5,
                 from ../../libdaisy/src/daisy_patch.h:4,
                 from QuadMixer.cpp:2:
../../libdaisy/src/util/FixedCapStr.h:7:23: fatal error: string_view: No such file or directory```

most show the equivalent message.

Line 7 of that file includes “string_view” which is apparently not found. I don’t remember what it was needed for, and I’m away from the computer right now, so I can’t try it myself. Could you try to just remove that line and see if it was needed at all?

I started trying that a few minutes ago, and it definitely helps but then I get new error messages…
(I’m on a MacOS Mojave if that helps)

arm-none-eabi-g++  -c -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard  -DUSE_HAL_DRIVER -DSTM32H750xx -DHSE_VALUE=16000000  -DCORE_CM7 -DSTM32H750IB -DARM_MATH_CM7 -DUSE_FULL_LL_DRIVER  -include stm32h7xx.h -I../../libdaisy -I../../libdaisy/src/ -I../../libdaisy/src/sys -I../../libdaisy/src/usbd -I../../libdaisy/Drivers/CMSIS/Include/ -I../../libdaisy/Drivers/CMSIS/DSP/Include -I../../libdaisy/Drivers/CMSIS/Device/ST/STM32H7xx/Include -I../../libdaisy/Drivers/STM32H7xx_HAL_Driver/Inc/ -I../../libdaisy/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -I../../libdaisy/core/ -I../../DaisySP/Source -I../../libdaisy/Middlewares/Third_Party/FatFs/src -O2 -Wall -Wno-missing-attributes -fasm -fdata-sections -ffunction-sections -Wno-stringop-overflow -g -ggdb -MMD -MP -MF"build/Midi.d" -fno-exceptions -fasm -finline -finline-functions-called-once -fshort-enums -fno-move-loop-invariants -fno-unwind-tables -Wno-register -std=gnu++14 -Wa,-a,-ad,-alms=build/Midi.lst Midi.cpp -o build/Midi.o
In file included from ../../libdaisy/src/ui/ButtonMonitor.h:3:0,
                 from ../../libdaisy/src/daisy.h:48,
                 from ../../libdaisy/src/daisy_seed.h:5,
                 from ../../libdaisy/src/daisy_patch.h:4,
                 from Midi.cpp:1:
../../libdaisy/src/ui/UiEventQueue.h:95:48: warning: 'daisy::UiEventQueue::Event::<anonymous union>::<anonymous struct>::newActivityType' is too small to hold all values of 'enum class daisy::UiEventQueue::Event::ActivityType'
                 ActivityType newActivityType : 1;
                                                ^
../../libdaisy/src/ui/UiEventQueue.h:109:48: warning: 'daisy::UiEventQueue::Event::<anonymous union>::<anonymous struct>::newActivityType' is too small to hold all values of 'enum class daisy::UiEventQueue::Event::ActivityType'
                 ActivityType newActivityType : 1;
                                                ^
../../libdaisy/src/ui/UiEventQueue.h:62:20: warning: 'daisy::UiEventQueue::Event::type' is too small to hold all values of 'enum class daisy::UiEventQueue::Event::EventType'
             type : 16; // default size could be more than 16 bits - not required
                    ^
cc1plus: warning: unrecognized command line option '-Wno-register'
cc1plus: warning: unrecognized command line option '-Wno-stringop-overflow'
cc1plus: warning: unrecognized command line option '-Wno-missing-attributes'
arm-none-eabi-g++  build/startup_stm32h750xx.o build/Midi.o   -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard --specs=nano.specs --specs=nosys.specs -T../../libdaisy/core/STM32H750IB_flash.lds -L../../libdaisy/build -L ../../DaisySP/build -ldaisy -lc -lm -lnosys -ldaisysp -Wl,-Map=build/Midi.map,--cref -Wl,--gc-sections -o build/Midi.elf
/usr/local/Cellar/gcc-arm-none-eabi/20160928/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld: cannot find -ldaisy
collect2: error: ld returned 1 exit status
make: *** [build/Midi.elf] Error 1```

Thanks - I think you are on to something, but now, maybe my issue is in a new area???

A couple of points:

1.What version of the compiler are you using
2. libDaisy seems out of date, the warnings should be fixed already.
3. If you read the messages closely, you’ll see that most of it is just warnings. The last message is the error and it tells you that the linker can’t find libDaisy. You need to compile libDaisy first, then the examples afterwards

  1. Not sure, I pulled from git yesterday
  2. I ran ci/build_libs.sh and things are better…I can now MAKE individual folders… but I had to run sudo ./ci/build_libs.sh
  3. Yes, I now get most/all to run MAKE without issue

I guess FixedCapStr.h just needs to be fixed to remove <string_view>