Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson build: fails to build stlinkv3 when usb is disabled #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

meson build: fails to build stlinkv3 when usb is disabled #128

wants to merge 1 commit into from

Conversation

MilhouseVH
Copy link

Presumably this is the correct fix, and it should have been added with 3eae695.

Without this PR, build v1.2 will fail when using the following meson options (cross-compiling for RPi):

-Dpciutils=false
-Dusb=false
-Dconfig_ft2232_spi=false
-Dconfig_usbblaster_spi=false

Error:

[12/82] Compiling C object 'flashrom@sha/stlinkv3_spi.c.o'.
FAILED: flashrom@sha/stlinkv3_spi.c.o 
/home/neil/projects/LibreELEC.tv/build.LibreELEC-RPi4.arm-9.80-devel/toolchain/bin/armv8a-libreelec-linux-gnueabihf-gcc -Iflashrom@sha -I. -I.. -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -std=c99 -Wwrite-strings -Wno-unused-parameter -Wno-address-of-packed-member -Wno-missing-braces -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE -D_BSD_SOURCE '-DFLASHROM_VERSION="v1.2"' -DHAVE_CLOCK_GETTIME=1 -DHAVE_STRNLEN=1 -DHAVE_UTSNAME=1 -march=armv8-a+crc -mtune=cortex-a53 -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated -mfloat-abi=hard -mfpu=neon-fp-armv8 -Wall -O2 -fomit-frame-pointer -fPIC -DCONFIG_BUSPIRATE_SPI=1 -DCONFIG_DUMMY=1 -DCONFIG_LINUX_MTD=1 -DCONFIG_LINUX_SPI=1 -DCONFIG_PONY_SPI=1 -DCONFIG_SERPROG=1 -DCONFIG_STLINKV3_SPI=1 -DCONFIG_BITBANG_SPI=1 -MD -MQ 'flashrom@sha/stlinkv3_spi.c.o' -MF 'flashrom@sha/stlinkv3_spi.c.o.d' -o 'flashrom@sha/stlinkv3_spi.c.o' -c ../stlinkv3_spi.c
../stlinkv3_spi.c:30:10: fatal error: libusb.h: No such file or directory
   30 | #include <libusb.h>
      |          ^~~~~~~~~~
compilation terminated.

Full log: http://ix.io/2cgY

Signed-off-by: Neil MacLeod <milhouseVH.github@nmacleod.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant