Error "@LN_S@: command not found" when attempting to build BlueZ 5.66 from source

89 Views Asked by At

I have downloaded BlueZ 5.66 source from http://www.kernel.org/pub/linux/bluetooth/bluez-5.66.tar.xz onto an Ubuntu 22.04 system, and am attempting to build it from source. I have executed the following commands:

apt-get update
sudo apt-get install -y libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev autoconf python3-docutils
cd bluez-5.66
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental

This succeeds, and here's the output just in case it matters:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking how to create a pax tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for C/C++ restrict keyword... __restrict__
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether gcc accepts -fPIE... yes
checking whether gcc accepts -fsanitize=address... yes
checking whether gcc accepts -fsanitize=leak... yes
checking whether gcc accepts -fsanitize=undefined... yes
./configure: line 5986: AC_DISABLE_STATIC: command not found
./configure: line 5987: AC_PROG_LIBTOOL: command not found
checking for explicit_bzero... yes
checking for getrandom... yes
checking for rawmemchr... yes
checking for signalfd... yes
checking for clock_gettime in -lrt... yes
checking for pthread_create in -lpthread... yes
checking for dlopen in -ldl... yes
checking for linux/types.h... yes
checking for linux/if_alg.h... yes
checking for linux/uinput.h... yes
checking for linux/uhid.h... yes
checking for sys/random.h... yes
checking for glib-2.0 >= 2.28... yes
checking for dbus-1 >= 1.6... yes
checking D-Bus configuration directory... /etc
checking D-Bus system bus services dir... /usr/share/dbus-1/system-services
checking D-Bus session bus services dir... /usr/share/dbus-1/services
${prefix}/share/zsh/site-functions
checking for libudev >= 172... yes
checking for udev_hwdb_new in -ludev... yes
checking udev directory... /lib/udev
checking for libical... yes
checking for readline/readline.h... yes
checking systemd system unit dir... /lib/systemd/system
checking systemd user unit dir... /usr/lib/systemd/user
checking for rst2man... rst2man
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/bluetoothd.rst
config.status: creating lib/bluez.pc
config.status: creating mesh/bluetooth-meshd.rst
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

But then it fails when I run "make":

make -j 4
  GEN      lib/bluetooth/bluetooth.h
/bin/bash: line 1: @LN_S@: command not found
  GEN      lib/bluetooth/hci.h
/bin/bash: line 1: @LN_S@: command not found
make: *** [Makefile:13176: lib/bluetooth/bluetooth.h] Error 127
make: *** Waiting for unfinished jobs....
make: *** [Makefile:13176: lib/bluetooth/hci.h] Error 127
  GEN      lib/bluetooth/hci_lib.h
/bin/bash: line 1: @LN_S@: command not found
make: *** [Makefile:13176: lib/bluetooth/hci_lib.h] Error 127
  GEN      lib/bluetooth/sco.h
/bin/bash: line 1: @LN_S@: command not found
make: *** [Makefile:13176: lib/bluetooth/sco.h] Error 127

Am I missing some dependency?

(I would note that these instructions worked for me on earlier versions of BlueZ. Also this page implies these are the right instructions for Ubuntu 22.04))

After searching around more, I found this page that has some helpful output about the missing AC_PROG_LIBTOOL macro. I ran

$ aclocal
$ autoconf
configure.ac:36: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:36: You should run autoupdate.
aclocal.m4:121: AC_PROG_LIBTOOL is expanded from...
configure.ac:36: the top level

And then that gave me the hint to run autoupdate. Once I did that, the compile at least started in earnest. But then I got this error:

libtool: Version mismatch error.  This is libtool 2.4.7 Debian-2.4.7-4, but the
libtool: definition of this LT_INIT comes from libtool 2.4.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4.7 Debian-2.4.7-4
libtool: and run autoconf again.
make[1]: *** [Makefile:7537: gdbus/mainloop.lo] Error 63

And now I'm not sure how to get past that error.

But in general, does this mean there's an error in BlueZ 5.66 in that it's using AC_PROG_LIBTOOL when it shouldn't be?

0

There are 0 best solutions below