rockchip-linux / rkdeveloptool

GNU General Public License v2.0
146 stars 85 forks source link

./configure: line 4449: syntax error #52

Open iav opened 3 years ago

iav commented 3 years ago

trying to build got syntax error in configure:

rock:~/rkdeveloptool$ autoreconf -i
configure.ac:12: installing 'cfg/compile'
configure.ac:19: installing 'cfg/config.guess'
configure.ac:19: installing 'cfg/config.sub'
configure.ac:7: installing 'cfg/install-sh'
configure.ac:7: installing 'cfg/missing'
Makefile.am: installing 'cfg/depcomp'
rock:~/rkdeveloptool$ ./configure
...
checking build system type... aarch64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for library containing iconv... none required
./configure: line 4449: syntax error near unexpected token `LIBUSB1,libusb-1.0'
./configure: line 4449: `PKG_CHECK_MODULES(LIBUSB1,libusb-1.0)'
iav commented 3 years ago

And I did sudo apt-get install pkg-config libusb-1.0 already

bobkocisko commented 11 months ago

Same here. If you're like me, I didn't install pkg-config until I got the error you reported. But then after I installed it and re-ran ./configure the error was still there.

Some digging around brought me to this: https://stackoverflow.com/questions/8578181/using-the-pkg-config-macro-pkg-check-modules-failing

The issue seems to be that there is a macro called PKG_CHECK_MODULES which won't be replaced with real code by the bootstrapping steps unless you have pkg-config installed.

Anyway, the solution for me was to re-run ALL the install steps AFTER installing pkg-config. Then the ./configure step succeeded.