Hi @Tommy Murphy, 

I just did a clean build, following the exact steps you mentioned. 
Please note that just before starting the build, I uncomment the last 
three lines in 
~ /Downloads/ openocd-xpack.git/scripts/defs-source.sh 
to make sure that I'm building the most recent master branch. 

So these are the exact commands I run: 

# Clean apt-get and install the needed packages 
$ sudo apt-get clean 
$ sudo apt-get install -y apt-transport-https ca-certificates curl 
software-properties-common 

# Download and install docker 
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - 
$ version_name=$(lsb_release -cs) 
$ sudo add-apt-repository "deb [arch=amd64] 
https://download.docker.com/linux/ubuntu ${version_name} stable" 
$ sudo apt-get update 
$ sudo apt-get -y install docker-ce 
$ sudo docker run hello-world 
$ sudo groupadd docker 
$ sudo gpasswd -a ${ USER } docker 
$ sudo service docker restart 

# Restart Ubuntu VM 
$ shutdown -r now 

# Test docker 
$ docker run hello-world 

# Clean everything from previous builds 
$ sudo rm -rf ~ /Downloads/openocd-xpack.git 
$ sudo rm -rf ~ /Work 

# Clone OpenOCD Xpack project 
$ git clone --recurse-submodules 
https://github.com/xpack-dev-tools/openocd-xpack.git ~ 
/Downloads/openocd-xpack.git 

# Navigate to the build script ' defs-source.sh ' 
$ cd ~ /Downloads/openocd-xpack.git/scripts/ 

# Edit the build script (uncomment three last lines) 
$ gedit defs-source.sh 

# Return to home folder and start build procedure 
$ cd ~ 
$ bash ~ /Downloads/openocd-xpack.git/scripts/build.sh --all 


Unfortunately the earlier problem persists: the shared-object libusb-0.1.so.4 
cannot be found. On the advice of @Liviu Ionescu, I issue the ldd command to 
print all the dependencies of the OpenOCD executable. First I navigate to the 
folder where the OpenOCD executable is, then I issue this command: 

$ ldd -v ./openocd 
linux-vdso.so.1 (0x00007ffd96ddd000) 
libusb-0.1.so.4 => not found 
libftdi1.so.2 => not found 
libhidapi-hidraw.so.0 => not found 
libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007fadcb88c000) 
libudev.so.0 => not found 
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fadcb73d000) 
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fadcb735000) 
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fadcb712000) 
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fadcb707000) 
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fadcb515000) 
libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007fadcb4e9000) 
/lib64/ld-linux-x86-64.so.2 (0x00007fadcbcb7000) 

Version information: 
./openocd: 
librt.so.1 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/librt.so.1 
libdl.so.2 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libdl.so.2 
libm.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libm.so.6 
libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0 
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.11) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6 
/lib/x86_64-linux-gnu/libusb-1.0.so.0: 
libudev.so.1 (LIBUDEV_183) => /lib/x86_64-linux-gnu/libudev.so.1 
libpthread.so.0 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libpthread.so.0 
libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0 
libc.so.6 (GLIBC_2.9) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.8) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 
/lib/x86_64-linux-gnu/libm.so.6: 
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6 
/lib/x86_64-linux-gnu/libdl.so.2: 
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 
libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 
/lib/x86_64-linux-gnu/libpthread.so.0: 
ld-linux-x86-64.so.2 (GLIBC_2.2.5) => /lib64/ld-linux-x86-64.so.2 
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 
libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6 
/lib/x86_64-linux-gnu/librt.so.1: 
libpthread.so.0 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libpthread.so.0 
libpthread.so.0 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libpthread.so.0 
libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0 
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_PRIVATE) => /lib/x86_64-linux-gnu/libc.so.6 
/lib/x86_64-linux-gnu/libc.so.6: 
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2 
ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2 
/lib/x86_64-linux-gnu/libudev.so.1: 
ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2 
libpthread.so.0 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libpthread.so.0 
libc.so.6 (GLIBC_2.3) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.9) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.6) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.25) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.28) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.16) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.8) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.3.2) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.17) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.7) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.26) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.30) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.14) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.3.4) => /lib/x86_64-linux-gnu/libc.so.6 
libc.so.6 (GLIBC_2.2.5) => /lib/x86_64-linux-gnu/libc.so.6 

I don't need an immediate fix. I just want to inform you that building the 
OpenOCD 
executable for Linux doesn't work for the latest master branch (unless I'm 
doing 
something wrong myself here). 

Again my sincere thanks to all of you (Liviu Ionescu, Tommy Murphy, ...) that 
are 
helping people like me to build OpenOCD for Windows/Linux/Mac. 

Kind regards, 
Kristof Mulier 


Van: "Tommy Murphy" <tommy_mur...@hotmail.com> 
Aan: "Liviu Ionescu" <i...@livius.net> 
Cc: "kristof mulier" <kristof.mul...@telenet.be>, "johan" <jo...@embeetle.com>, 
"matic" <ma...@embeetle.com>, "openocd-devel" 
<openocd-devel@lists.sourceforge.net> 
Verzonden: Zondag 30 augustus 2020 15:35:09 
Onderwerp: Re: [OpenOCD-devel] Missing libusb shared object file in xPack 
build. 

I wanted to do a completely clean new build with nothing carried over from the 
previous run. 

From: Liviu Ionescu <i...@livius.net> 
Sent: Sunday, August 30, 2020 2:27:09 PM 
To: Tommy Murphy <tommy_mur...@hotmail.com> 
Cc: kristof.mul...@telenet.be <kristof.mul...@telenet.be>; johan 
<jo...@embeetle.com>; matic <ma...@embeetle.com>; openocd-devel 
<openocd-devel@lists.sourceforge.net> 
Subject: Re: [OpenOCD-devel] Missing libusb shared object file in xPack build. 


> On 30 Aug 2020, at 15:36, Tommy Murphy <tommy_mur...@hotmail.com> wrote: 
> 
> ... sudo rm -rf ~/Work to clean all downloads off 

cleaning the Work/cache folder is not necessary, on the contrary. 

regards, 

Liviu 


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to