Hi,
I’m trying to cross-compile OpenOCD for linux on a Zynq (ARM Cortex A9). But I run into the following problems:
-
configure requires libusb-1.0, but CentOS only has libusb-0.1 and libusbx-1.0 packages, so I had to move to Ubuntu instead.
-
On Ubuntu configure cannot detect the endianness, so I had to add ac_cv_c_bigendian=no
checking whether byte ordering is bigendian... unknown
configure: error: unknown endianness
presetting ac_cv_c_bigendian=no (or yes) will help
configure: error: ./configure.gnu failed for src/jtag/drivers/libjaylink
- Then make complains about libusb headers
make[9]: Entering directory '/home/erik/openocd/src/jtag/drivers/libjaylink/libjaylink'
/bin/sh ../libtool --tag=CC --silent --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Werror -fvisibility=hidden -I/usr/include/libusb-1.0 -MT buffer.lo -MD -MP -MF .deps/buffer.Tpo -c -o buffer.lo buffer.c
cc1: error: include location "/usr/include/libusb-1.0" is unsafe for cross-compilation [-Werror=poison-system-directories]
cc1: all warnings being treated as errors
Makefile:491: recipe for target 'buffer.lo' failed
make[9]: *** [buffer.lo] Error 1
- So I tried to configure with --disable-werror, which helps a bit but not enough
make[8]: Entering directory '/home/erik/openocd/src/jtag/drivers/libjaylink'
Making all in libjaylink
make[9]: Entering directory '/home/erik/openocd/src/jtag/drivers/libjaylink/libjaylink'
/bin/sh ../libtool --tag=CC --silent --mode=compile arm-xilinx-linux-gnueabi-gcc -DHAVE_CONFIG_H -I. -I.. -Wall -Wextra -Werror -fvisibility=hidden -I/usr/include/libusb-1.0 -MT buffer.lo -MD -MP -MF .deps/buffer.Tpo -c -o buffer.lo buffer.c
cc1: error: include location "/usr/include/libusb-1.0" is unsafe for cross-compilation [-Werror=poison-system-directories]
cc1: all warnings being treated as errors
Makefile:491: recipe for target 'buffer.lo' failed
make[9]: *** [buffer.lo] Error 1
I am at a loss at this point. I never had these problems with 0.8 or an early 0.9-dev (march 2015).
And all this while I don’t need any USB interface as I’m using sysfs-gpio to run SWD on.
Can anyone help?
Maarten Brock