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

Build fails on raspberry pi 4 #5

Closed
stansotn opened this issue Nov 24, 2020 · 1 comment
Closed

Build fails on raspberry pi 4 #5

stansotn opened this issue Nov 24, 2020 · 1 comment

Comments

@stansotn
Copy link

Describe the bug
Compilation throws

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I./src -I./src -I./src/helper -DPKGDATADIR=\"/usr/local/share/openocd\" -DBINDIR=\"/usr/local/bin\" -I./jimtcl -I./jimtcl -Wall -Wstrict-prototypes -Wformat-security -Wshadow -Wextra -Wno-unused-parameter -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -g -O2 -MT src/flash/mflash.lo -MD -MP -MF src/flash/.deps/mflash.Tpo -c src/flash/mflash.c -o src/flash/mflash.o
In file included from /usr/include/string.h:495,
                 from ./src/helper/system.h:27,
                 from ./config.h:338,
                 from src/flash/mflash.c:19:
In function ‘memset’,
    inlined from ‘mg_gen_ataid’ at src/flash/mflash.c:1162:2,
    inlined from ‘mg_storage_config’ at src/flash/mflash.c:1174:2:
/usr/include/aarch64-linux-gnu/bits/string_fortified.h:71:10: error: ‘__builtin_memset’ offset [509, 512] from the object at ‘buff’ is out of the bounds of referenced subobject ‘reserved7’ with type ‘mg_io_uint8[186]’ {aka ‘unsigned char[186]’} at offset 322 [-Werror=array-bounds]
   71 |   return __builtin___memset_chk (__dest, __ch, __len, __bos0 (__dest));
      |     

How To Reproduce

  1. Clean install Ubuntu 20.04 on Raspberry pi 4 (4gb)
  2. Install libusb and clone this repo.
sudo apt install libusb-1.0-0 libusb-1.0-0-dev
git clone --recursive https://github.com/STMicroelectronics/OpenOCD.git
cd OpenOCD
  1. Try to build
./bootstrap
./configure
make

Also tried with:

./configure --enable-sysfsgpio --enable-bcm2835gpio

Additional Context
Raspberry pi support would be very handy. Please let me know if I am doing anything wrong.

@stansotn
Copy link
Author

duplicate of #2

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

No branches or pull requests

1 participant