|
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.
|
|
|
|
|
He's a spammer:
Hidden link spammer in QA (Member 14199368)[^]
He just forgot to add the hidden spam link to this message.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
something to consider ...
2019-03-26 11:35:24 ~/tmp $ #Starting from minimal Debian install ...
2019-03-26 11:35:41 ~/tmp $ #No compiler ...
2019-03-26 11:36:06 ~/tmp $ gcc -v
-bash: gcc: command not found
2019-03-26 11:36:24 ~/tmp $ # no cross-compiler ...
2019-03-26 11:36:35 ~/tmp $ arm-linux-gnueabihf-gcc -v
-bash: arm-linux-gnueabihf-gcc: command not found
2019-03-26 11:36:55 ~/tmp $ #lets install cross-compiler
2019-03-26 11:37:12 ~/tmp $ sudo apt install -q -y gcc-arm-linux-gnueabihf
Reading package lists...
Building dependency tree...
Reading state information...
[ ... output snipped ... ]
Setting up gcc-6-arm-linux-gnueabihf (6.3.0-18cross1) ...
Setting up gcc-arm-linux-gnueabihf (4:6.3.0-4) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
2019-03-26 11:39:53 ~/tmp $ # now we can cross-compile ...
2019-03-26 11:41:02 ~/tmp $ arm-linux-gnueabihf-gcc -Wall -Wextra hello.c -o hello_arm
2019-03-26 11:41:10 ~/tmp $ #that won't run on this system ...
2019-03-26 11:41:26 ~/tmp $ ./hello_arm
-bash: ./hello_arm: cannot execute binary file: Exec format error
2019-03-26 11:41:29 ~/tmp $ #what about the pi
2019-03-26 11:42:32 ~/tmp $ scp hello_arm pi3:
hello_arm 100% 8376 3.0MB/s 00:00<br />
2019-03-26 11:42:41 ~/tmp $ ssh pi3
Linux pi3 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l
Last login: Tue Mar 26 11:42:12 2019 from 192.168.235.51
k5054@pi3:~ $ ls
hello_arm
k5054@pi3:~ $ ./hello_arm
Hello from a pi!
k5054@pi3:~ $ logout
Connection to pi3 closed.
2019-03-26 11:42:57 ~/tmp $ #so far so good
2019-03-26 11:43:08 ~/tmp $ # now lets add armhf as foreign arch
2019-03-26 11:43:28 ~/tmp $ sudo dpkg --add-architecture armhf
2019-03-26 11:44:05 ~/tmp $ dpkg --print-foreign-architectures
armhf
2019-03-26 11:44:17 ~/tmp $ #update apt ...
2019-03-26 11:44:34 ~/tmp $ sudo apt-get -q update
[ ... output snipped ...]
Reading package lists...
2019-03-26 11:44:54 ~/tmp $ # now add libbluetooth for armhf
2019-03-26 11:45:22 ~/tmp $ sudo apt install libbluetooth-dev:armhf
Reading package lists... Done
Building dependency tree<br />
Reading state information... Done
[... output snipped ...]
Setting up libbluetooth3:armhf (5.43-2+deb9u1) ...
Setting up libbluetooth-dev:armhf (5.43-2+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
2019-03-26 11:45:56 ~/tmp $ #Now, lets compile that test program you posted some time back ...
2019-03-26 11:46:40 ~/tmp $ arm-linux-gnueabihf-gcc vscan.c -o vscan -lbluetooth -o vscan
2019-03-26 11:46:51 ~/tmp $ file vscan
vscan: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=6f7c63c8962a94e135b127cf3cf5033d512f6bb6, not stripped
2019-03-26 11:46:59 ~/tmp $ #that looks good ... lets test it on the pi
2019-03-26 11:47:23 ~/tmp $ scp vscan pi3:
vscan 100% 8696 3.0MB/s 00:00<br />
2019-03-26 11:47:33 ~/tmp $ ssh pi3
Linux pi3 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l
Last login: Tue Mar 26 11:42:47 2019 from 192.168.235.205
k5054@pi3:~ $ ls
hello_arm vscan
k5054@pi3:~ $ ./vscan
Basic bluetooth app BLUEZ_LINUX
k5054@pi3:~ $ logout
Connection to pi3 closed.
2019-03-26 11:48:22 ~/tmp $ # Ta Da ... total time about 15 minutes ...
2019-03-26 11:49:20 ~/tmp $
|
|
|
|
|
I did try this and it looks as the "problem " may be in Ubuntu itself.
jim@jim-desktop:~$ sudo apt install -q -y gcc-arm-linux-gnueabihf
[sudo] password for jim:
Reading package lists...
Building dependency tree...
Reading state information...
gcc-arm-linux-gnueabihf is already the newest version (4:5.3.1-1ubuntu1).
gcc-arm-linux-gnueabihf set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
jim@jim-desktop:~$ dpkg --print-foreign-architectures
i386
armhf
jim@jim-desktop:~$ sudo apt-get -q update
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:5 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu xenial InRelease
Guntu.com/ubuntu xenial/restricted armhf Packages
ltiverse armhf Packages
Err:10 http://us.archive.ubuntu.com/ubuntu xenial/main armhf Packages
404 Not Found [IP: 91.189.91.23 80]
http://us.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Ign:28 http://us.archive.ubuntu.com/ubuntu xenial-updates/universe armhf Packages
Ign:34 http://us.archive.ubuntu.com/ubuntu xenial-updates/multiverse armhf Packages
Err:18 http://us.archive.ubuntu.com/ubuntu xenial-updates/main armhf Packages
404 Not Found [IP: 91.189.91.23 80]
Ign:24 http://us.archive.ubuntu.com/ubuntu xenial-updates/restricted armhf Packages
Get:41 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [626 kB]
Ign:37 http://us.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
Err:37 http://us.archive.ubuntu.com/ubuntu xenial-backports/main armhf Packages
404 Not Found [IP: 91.189.91.23 80]
Ign:39 http://us.archive.ubuntu.com/ubuntu xenial-backports/universe armhf Packages
Get:46 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [64.6 kB]
Ign:47 http://security.ubuntu.com/ubuntu xenial-security/restricted armhf Packages
Err:43 http://security.ubuntu.com/ubuntu xenial-security/main armhf Packages
404 Not Found [IP: 91.189.88.152 80]
Ign:47 http://security.ubuntu.com/ubuntu xenial-security/restricted armhf Packages
Ign:50 http://security.ubuntu.com/ubuntu xenial-security/universe armhf Packages
Ign:54 http://security.ubuntu.com/ubuntu xenial-security/multiverse armhf Packages
Fetched 325 kB in 3s (81.9 kB/s)
Reading package lists...
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-armhf/Packages 404 Not Found [IP: 91.189.91.23 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.152 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
jim@jim-desktop:~$ sudo apt install libbluetooth-dev:armhf
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libbluetooth-dev:armhf
jim@jim-desktop:~$
|
|
|
|
|
You can fix that by editing /etc/apt/sources.list and changing all the lines that start
deb http://... to
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
libc-dev:armhf
E: Unable to correct problems, you have held broken packages.
I tried following along by adding all the dependencies manually e.g.
$sudo apt-get libbluetooth-dev:armhf libbluetooth3:armhf libc6-dev:armhf 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
vim-runtime
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:
gcc-8-base:armhf
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!'
?] no
Abort.
$ apt list --installed 2>/dev/null | wc -l
1648
$ 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.
modified 26-Mar-19 17:49pm.
|
|
|
|
|
Thanks, you are being very hel[full.
Hope you are not spend too much time on this problem.
But I do appreciate the help.
you could try installing virtualbox or VmWare, and install Debian as a guest OS. Guest OS's run only very slightly slower
I had a very bad experience "upgrading" to Ubuntu 18 , so I do prefer not to mess with my OS.
If I do the above will be be easy to switch between Ubuntu / Debian?
Of course I may have an issue re-installing Eclipse, especially moving current stuff over...
|
|
|
|
|
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.
|
|
|
|
|
|
I used wget....maybe I should do it over.
|
|
|
|
|
$ 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
e0a43cbb8b991735c1b38e7041019658 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.
modified 27-Mar-19 12:36pm.
|
|
|
|
|
When I use the icon it wants ...optical disk FILE
|
|
|
|
|
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-library
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 guess .NET does some things better than Linux.
Had Windows 10 talking to a Lego "brick" (EV3) using Bluetooth, USB and TCP/IP in less than an hour.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
This is a linker question.
Could somebody help me to decode this linker verbose output to find WHERE is the " linked to" option actually located.
Building target: BLUE2_LINUX_19381
Invoking: GCC C++ Linker
g++ -v -o "BLUE2_LINUX_19381" ./src/BLUE.o -lbluetooth
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu1~16.04.11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.11)
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/5/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/5/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'BLUE2_LINUX_19381' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
/usr/lib/gcc/x86_64-linux-gnu/5/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/5/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper -plugin-opt=-fresolution=/tmp/ccFV22zV.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/ --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z relro -o BLUE2_LINUX_19381 /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crt1.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/5/crtbegin.o -L/usr/lib/gcc/x86_64-linux-gnu/5 -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/5/../../.. ./src/BLUE.o -lbluetooth -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/5/crtend.o /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/crtn.o
Finished building target: BLUE2_LINUX_19381
08:15:26 Build Finished. 0 errors, 1 warnings. (took 2s.946ms)
I did try this and cannot find it:
jim@jim-desktop:~$ sudo find /usr -type f -name "bluetooth.*"
[sudo] password for jim:
/usr/share/help-langpack/en_GB/ubuntu-help/bluetooth.page
/usr/share/help-langpack/cs/ubuntu-help/bluetooth.page
/usr/share/help-langpack/cs/gnome-help/bluetooth.page
/usr/share/help-langpack/en_AU/ubuntu-help/bluetooth.page
/usr/share/help-langpack/en_CA/ubuntu-help/bluetooth.page
/usr/share/man/man1/bluetooth.1.gz
/usr/share/icons/Humanity/apps/22/bluetooth.svg
/usr/share/icons/Humanity/apps/48/bluetooth.svg
/usr/share/icons/Humanity/apps/24/bluetooth.svg
/usr/share/icons/HighContrast/48x48/apps/bluetooth.png
/usr/share/icons/HighContrast/16x16/apps/bluetooth.png
/usr/share/icons/HighContrast/22x22/apps/bluetooth.png
/usr/share/icons/HighContrast/24x24/apps/bluetooth.png
/usr/share/icons/HighContrast/32x32/apps/bluetooth.png
/usr/share/icons/HighContrast/256x256/apps/bluetooth.png
/usr/share/app-install/icons/bluetooth.svg
/usr/share/help/C/ubuntu-help/bluetooth.page
/usr/share/help/C/gnome-help/bluetooth.page
/usr/share/plainbox-provider-checkbox/jobs/bluetooth.txt.in
/usr/include/bluetooth/bluetooth.h
/usr/src/linux-headers-4.15.0-45/include/net/bluetooth/bluetooth.h
/usr/src/linux-headers-4.15.0-46/include/net/bluetooth/bluetooth.h
jim@jim-desktop:~$ sudo find /usr -type f -name "bluetooth.a"
jim@jim-desktop:~$
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.
There is no package "Bluez".
But my test app still compiles / links and runs.
Thanks
|
|
|
|
|
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.
This is the key:
g++ -v -o "BLUE2_LINUX_19381" ./src/BLUE.o -lbluetooth
A pre-linker is creating a new library object called BLUE2_LINUX_19381 , which you can see later being included in the main link process.
|
|
|
|
|
Richard,
that is my base site , however, I have not figured out if there is a "forum" for geeks like me.
All I see is "developers" access.
I'll try it again.
|
|
|
|
|
On the contact page there's link to the mailing list in the "community for the end users" section.
|
|
|
|
|
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).
|
|
|
|
|
Not exactly. No "apt-get".
The README instructions with BlueZ are
1. run "configure" and then
2. run "make && make install".
Their default "configure " is this:
jim@jim-desktop:/media/jim/DEV/BLUEZ/bluez-5.50$ ./configure --prefix=/usr \
> --sysconfdir=/etc \
> --localstatedir=/var \
> --enable-library \
> --disable-systemd &&
> make
I did added the "enable-library" but apparently it is not needed.
And I do not know the actual name of it , but the liker likes it.
So the /usr is the base directory and "*bluetooth*" should be there.
I'll run make && make install to verify the "BlueZ" package , again.
I'll will be adding --host= (ARM) later so I really need to know what is happening with "install library". I could end up with two "bluetooth.a" for two architectures...messy
|
|
|
|
|
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".
|
|
|
|
|
There's no reason you can't use /usr/X86 and /usr/ARM, if that's your wish, its not likely to cause problems for your linux system. In general, though, its a convention, nothing more, to put user-compiled software in /usr/local. If you run .configure for most software packages they default to --prefix=/usr/local. I suggested /usr/local/arm as that fits in with the accepted convention. Ultimately, you have root permissions, and can put things where you like. The one caveat, though, is if you put things in /[bin|lib], or /usr/[bin|lib] you run the risk of a) making your system unusable due to overwriting system provided executables or libraries with incompatible version and b) having your executables and libs reverted back to OS versions when updating software. For me, I think I'd put anything new I compiled for the X86 in /usr/local, as the compiler and linker will search /usr/local/include and /usr/local/lib, without having to add -I/usr/local/include or -L/usr/local/lib to compilation commands. I think /usr/local/arm or /usr/local/pi seems a reasonable location to put the ARM versions.
|
|
|
|
|
Another thing: If you have a successful compile/link AND you're linking shared libraries (.so), you can find out which version of the library will be used using the ldd command
e.g
rpi:~$ ldd /usr/bin/find
linux-vdso.so.1 (0x7eff1000)
/usr/lib/arm-linux-gnueabihf/libarmmem.so (0x76f53000)
libselinux.so.1 => /lib/arm-linux-gnueabihf/libselinux.so.1 (0x76f0c000)
libm.so.6 => /lib/arm-linux-gnueabihf/libm.so.6 (0x76e8d000)
libc.so.6 => /lib/arm-linux-gnueabihf/libc.so.6 (0x76d4e000)
/lib/ld-linux-armhf.so.3 (0x76f69000)
libpcre.so.3 => /lib/arm-linux-gnueabihf/libpcre.so.3 (0x76cd5000)
libdl.so.2 => /lib/arm-linux-gnueabihf/libdl.so.2 (0x76cc2000)
libpthread.so.0 => /lib/arm-linux-gnueabihf/libpthread.so.0 (0x76c99000)
|
|
|
|
|