Sorry, little hard to figure out what you are trying to say.
Just for update
I am using bluez source to build a C++ library for specific (--host= arm) architecture using (--build=x86) architecture.
It supposedly works, but not for me.
I am in process of analyzing the "lead script" - configure - to find out how it should process the options. It is a slow process.
You can fix that by editing /etc/apt/sources.list and changing all the lines that start
deb [arch=amd64,i386] http://...
and add the ubuntu ports repo
deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports bionic main universe
However, that doesn't help a lot - then you get:
sudo apt-get install libbluetooth-dev:armhf
Reading package lists... Done
Building dependency tree<br />
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:
The following packages have unmet dependencies:
libbluetooth-dev:armhf : Depends: libbluetooth3:armhf (= 5.48-0ubuntu3) but it is not going to be installed
Depends: libc6-dev:armhf but it is not going to be installed or
E: Unable to correct problems, you have held broken packages.
I tried following along by adding all the dependencies manually e.g.
thinking I'd eventually get all the dependencies were added, but then you get to gcc-8-base:armhf and you get this
$ sudo apt-get install gcc-8-base:armhf
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
amd64-microcode gcc-7-arm-linux-gnueabihf-base gcc-7-cross-base
gcc-8-cross-base libasan4-armhf-cross libatomic1-armhf-cross
libc6-armhf-cross libc6-dev-armhf-cross libcilkrts5-armhf-cross
libgcc-7-dev-armhf-cross libgcc1-armhf-cross libgomp1-armhf-cross
libstdc++6-armhf-cross libubsan0-armhf-cross linux-libc-dev
linux-libc-dev-armhf-cross m17n-db manpages-dev ncurses-term vim-gui-common
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
accountsservice acl acpi-support acpid adduser adwaita-icon-theme aisleriot
alsa-base alsa-utils anacron apg apparmor apport apport-gtk appstream apt
[ ... about 300 lines removed ...]
xserver-xorg-video-vesa xserver-xorg-video-vmware xul-ext-ubufox xwayland
xxd xz-utils yelp zeitgeist-core zenity zip zlib1g
The following NEW packages will be installed:
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
apt adduser (due to apt) gpgv (due to apt) libapt-pkg5.0 (due to apt)
libc6 (due to apt) libgcc1 (due to apt) libgnutls30 (due to apt)
[ .. more lines removed ...]
0 upgraded, 1 newly installed, 1421 to remove and 0 not upgraded.
Need to get 18.2 kB of archives.
After this operation, 3,343 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'
$ apt list --installed 2>/dev/null | wc -l1648
So that's not the way to go, either. There seems to be something broken with Ubuntu's foreign-arch handling.
Debian and Ubuntu are very close, so maybe you could switch to Debian for your PC rather than Ubuntu - otherwise, you could try installing virtualbox or VmWare, and install Debian as a guest OS. Guest OS's run only very slightly slower than the host. For example, it took about 4 minutes to compile the source code for postgresql-11.1 on my host, and about 4:30 on the guest. Not much in it, and eclipse is available for Debian, so you should be at home. If you run your host in full-screen mode, you'd hardly be aware you're not running the OS natively on the PC.
I got "virtualbox" loaded , but after selecting Debian as OS I get "no bootable medium...process halted ". It actually asked for "optical disk" to use as boot (?)
I'll try different "virtual disk" next try.
$ file debian-9.8.0-amd64-netinst.iso
debian-9.8.0-amd64-netinst.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'Debian 9.8.0 amd64 n' (bootable)
$ md5sum debian-9.8.0-amd64-netinst.iso
In VitrualBox Manager, select your guest image, settings -> storage. Select Controler IDE, then the ()Empty slot. The right pane should show Optical Drive : [IDE Secondary Master v]. CLick on the icon next to that. If the iso image is in the drop-down, select it, otherwise select [Choose Virtual Optical Drive ...] navigate to your iso image and select. Under storage tree -> Controller:IDE it should now show "debian-9.8.0 amd64-netinst.iso"
Boot and install .... hopefully
Couple of things ...
If you want to ssh into the guest from the host, change the Network Adapter from NAT to Bridged or Host only (see the help file for the difference). In either case you'll need to either have a DHCP server or configure the IP manually.
By default the disk size is 8GB - that's barely big enough to install Debian with a GUI. You should probably have at least 16GB of drive space.
This is part of README file included in BlueZ.
Here is a part I am not sure about.
Could somebody please translate this techno-talk to plain English (talk ) ?
For a working system, certain configuration options need to be enabled:
Of course I want working system
Enable installation of Bluetooth library
What is the name of this library and where is it going to be installed ?
Installed by configure itself or make / make install?
By default the Bluetooth library is no longer installed.
The user interfaces or command line utilities do not
require an installed Bluetooth library anymore. This
option is provided for legacy third party applications
that still depend on the library.
When the library installation is enabled, it is a good
idea to use a separate bluez-library or libbluetooth
package for it.Any suggestion HOW to do the above highlighted text ?
Build a NEW packages??
You'll probably get better results if you direct your questions to the bluez user mailing list. While people here can answer questions of a general nature, specific questions relating to a specific package are, I think, outside of the intended scope of this forum. That doesn't mean that someone with related experience won't respond just because its out of scope (though that might be the case), but those with the information you seek are more likely to be in the user-group/mailing lists for that package.
I agree with k5054, and have already suggested you go to the Bluez site. While I have a reasonable knowledge of Linux, configurable packages, compiling and linking etc., all your questions are specific to Bluez. And I (and I guess k5054) have no experience of this package or how it is put together.
I am trying to figure out how BlueZ is actually used , so I did purge Bluez.
There is no package "Bluez".
Before that I fully configured Bluez - and I added enable-library to the configuration.
I did not even run make make install and tested my app and it run with the -lbluetooth linker option.
It appears the "bluetooth" library was build by running BlueZ -> configure and "purge Bluez" won't delete it.
I like to prove this by deleting it manually, but need to know where it is.
Not sure exactly what your question is, but "make clean" should purge all the generated objects. To be honest you may get better answers at The BlueZ website[^]; that's where the knowledge is likely to be.
As has been explained before, -lbluetooth tells the linker to look for a library file named either libbluetooth.so or libbluetooth.a. Your find doesn't find it because -name option uses standard file globbing so -name "bluetooth.*" wont find any files that look like .../libbluetooth.a. You need to use -name "libbluetooth.*", or -name "*bluetooth.*"
I think you said you had built and installed bluez from source. Unless you changed the installation location, it probably put the libraries under /usr/local. When you purged bluez (I'm assuming you mean the command apt-get delete --purge bluez), that will only remove the packages installed by apt. Any packages you built and installed yourself will not be touched (unless you deliberately configured the package to overwrite the system packages).
using --prefix=/usr put all the generated files in /usr. If you still have your build directory, you should be able to remove everything with using make uninstall. If you've already deleted your build directory, then unpack the source again, re-run configure as you did before, then run make uninstall. Note that installing into /usr means that you've overwritten anything that apt installed previously, so you might end up with the apt thinking thinking that some of its files have gone missing. If you plan to build a cross-compilation library DO NOT USE --prefix=/usr. That will overwrite the X86 executables, libraries, etc with the ARM versions, which will lead to further pain on your part. If you still want to create a cross-compile bluez instalation, use --prefix=/usr/local/arm --sysconfdir=/usr/local/arm/etc --localstatedir=/usr/local/arm/var. Of course, you can use any path you wish in place of "/usr/local/arm", just not "/usr" or "/", as that will overwrite your X86 system files.
Am I correct to say that /usr is a common Linux directory ,used by other applications?
So I should be able to "insert " another directory - such as --prefix=/usr/X86 for the X86 architecture and --prefix =/usr/ARM for the ARM?
Such as you suggested using /usr/local/arm....?
What would be the advantage of inserting ../local/ ..?
I should take a look at "configure prefix".
Last Visit: 2-Dec-20 3:00 Last Update: 2-Dec-20 3:00