riscv-software-src / riscv-tools

RISC-V Tools (ISA Simulator and Tests)
1.14k stars 447 forks source link

Error building the tools on CentOS #127

Closed gjmabo closed 6 years ago

gjmabo commented 6 years ago

Hi, I'm trying to build the tools in CentOS 6.9. It seems to have a problem with the libusb package, as can be seen below:

# ./build.sh
Starting RISC-V Toolchain build process

Removing existing riscv-openocd/build directory
Configuring project riscv-openocd
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
/usr/share/aclocal/libtool.m4:1022: _LT_SYS_MODULE_PATH_AIX is expanded from...
/usr/share/aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
/usr/share/aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
/usr/share/aclocal/libtool.m4:138: _LT_SETUP is expanded from...
/usr/share/aclocal/libtool.m4:67: LT_INIT is expanded from...
configure.ac:51: the top level
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
/usr/share/aclocal/libtool.m4:4161: _LT_LINKER_SHLIBS is expanded from...
/usr/share/aclocal/libtool.m4:5236: _LT_LANG_C_CONFIG is expanded from...
/usr/share/aclocal/libtool.m4:138: _LT_SETUP is expanded from...
/usr/share/aclocal/libtool.m4:67: LT_INIT is expanded from...
configure.ac:51: the top level
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:1037: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:159: _LT_SETUP is expanded from...
aclocal.m4:88: LT_INIT is expanded from...
configure.ac:51: the top level
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:159: _LT_SETUP is expanded from...
aclocal.m4:88: LT_INIT is expanded from...
configure.ac:51: the top level
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:1037: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:159: _LT_SETUP is expanded from...
aclocal.m4:88: LT_INIT is expanded from...
configure.ac:51: the top level
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:159: _LT_SETUP is expanded from...
aclocal.m4:88: LT_INIT is expanded from...
configure.ac:51: the top level
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:1037: _LT_SYS_MODULE_PATH_AIX is expanded from...
aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:159: _LT_SETUP is expanded from...
aclocal.m4:88: LT_INIT is expanded from...
configure.ac:51: the top level
configure.ac:51: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from...
../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from...
aclocal.m4:4176: _LT_LINKER_SHLIBS is expanded from...
aclocal.m4:5251: _LT_LANG_C_CONFIG is expanded from...
aclocal.m4:159: _LT_SETUP is expanded from...
aclocal.m4:88: LT_INIT is expanded from...
configure.ac:51: the top level
configure: WARNING: libusb-1.x not found, trying legacy libusb-0.1 as a fallback; consider installing libusb-1.x instead
configure: error: Package requirements (libusb-1.0 >= 1.0.9) were not met:

No package 'libusb-1.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables libusb_CFLAGS
and libusb_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

configure: error: ../../../../../src/jtag/drivers/libjaylink/configure.gnu failed for src/jtag/drivers/libjaylink

The problem is, for CentOS i can't find any libusb package that complies with the libusb-1.0 >= 1.0.9 condition. The closest I got was libusb1-1.0.9, but that one doesn't seem to help either.

Is there any way around this, so i can install the tools and get started with RocketChip?

palmer-dabbelt commented 6 years ago

Can you try disabling jaylink when building openocd? Note that you'll probably need devtoolset yo build anything reasonable on Red Hat, IIRC they're still shipping GCC-4.4.