Hi @Liviu, Thank you for your quick reply. I am thankful for the binaries you provide - I really do - but I still want to be able to compile OpenOCD from the sources :-)
I didn't change the build scripts. Here are the steps I took. FIRST TRY (29 Aug 2020, morning) ================================ I already have docker installed, following your guide at https://xpack.github.io/xbb/prerequisites This is how I installed docker, some months ago: $ sudo apt-get update $ sudo apt-get install apt-transport-https ca-certificates curl software-properties-common $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - $ cd Downloads $ wget "https://download.docker.com/linux/ubuntu/dists/disco/pool/stable/amd64/containerd.io_1.2.6-3_amd64.deb" $ wget "https://download.docker.com/linux/ubuntu/dists/disco/pool/stable/amd64/docker-ce-cli_19.03.3~3-0~ubuntu-disco_amd64.deb" $ wget "https://download.docker.com/linux/ubuntu/dists/disco/pool/stable/amd64/docker-ce_19.03.3~3-0~ubuntu-disco_amd64.deb" $ sudo dpkg -i "containerd.io_1.2.6-3_amd64.deb" $ sudo dpkg -i "docker-ce-cli_19.03.3~3-0~ubuntu-disco_amd64.deb" $ sudo dpkg -i "docker-ce_19.03.3~3-0~ubuntu-disco_amd64.deb" $ sudo apt-get -y install docker-ce $ sudo docker run hello-world $ sudo groupadd docker $ sudo gpasswd -a ${USER} docker $ sudo service docker restart $ reboot $ docker run hello-world And this is how I built OpenOCD this morning. First clone your git repo: $ rm -rf ~/Downloads/openocd-xpack.git $ git clone --recurse-submodules https://github.com/xpack-dev-tools/openocd-xpack.git \ ~/Downloads/openocd-xpack.git Then I modify the scripts - but not much. I just uncomment the three last lines from 'defs-source.sh' such that the latest master branch from OpenOCD gets pulled: $ cd ~/Downloads/openocd-xpack.git/scripts $ gedit defs-source.sh Then I start the build: $ cd ~ $ bash ~/Downloads/openocd-xpack.git/scripts/build.sh preload-images $ sudo rm -rf ~/Work/openocd-* $ bash ~/Downloads/openocd-xpack.git/scripts/build.sh --all --jobs $(nproc) I wait about 10 mins and then inspect the result: $ cd ~/Work/openocd-0.10.0-14/deploy I unzip the 64-bit Linux version and try to run the OpenOCD executable in the bin folder. Unfortunately, I get this error that 'libusb-0.1.so.4' cannot be found. SECOND TRY (29 Aug 2020, evening) ================================= I just completed a second trial. This time I followed your guide on GitHub (see https://github.com/xpack-dev-tools/openocd-xpack/blob/xpack/README-BUILD.md), please follow along. First I download your repo: $ rm -rf ~/Downloads/openocd-xpack.git $ curl -L https://github.com/xpack-dev-tools/openocd-xpack/raw/xpack/scripts/git-clone.sh | bash $ cd ~/Downloads/openocd-xpack.git Then I checkout the master branch: $ git checkout master Next I merge with the upstream OpenOCD master branch: $ git remote add openocd git://git.code.sf.net/p/openocd/code $ git remote update $ git merge openocd/master -X theirs --allow-unrelated-histories I checkout xpack-develop and merge the master in it: $ git checkout xpack-develop $ git merge master -X theirs --allow-unrelated-histories Finally I checkout xpack and merge xpack-develop in it: $ git checkout xpack $ git merge xpack-develop -X theirs --allow-unrelated-histories I preload the docker images: $ bash ~/Downloads/openocd-xpack.git/scripts/build.sh preload-images $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE ilegeul/ubuntu i386-12.04-xbb-v3.2 fadc6405b606 2 months ago 4.55GB ilegeul/ubuntu amd64-12.04-xbb-v3.2 3aba264620ea 2 months ago 4.98GB hello-world latest bf756fb1ae65 7 months ago 13.3kB Now I start the build: $ cd ~ $ sudo rm -rf ~/Work/openocd-* $ bash ~/Downloads/openocd-xpack.git/scripts/build.sh --all The build seems to complete smoothly after 10 minutes. I get a lot of output in my terminal, ending with: Script "/home/kristof/Downloads/openocd-xpack.git/scripts/build.sh" completed at Sat 29 Aug 2020 05:59:00 PM CEST. Duration: 10 minutes. Now I check the results: $ cd ~/Work/openocd-0.10.0-14/deploy $ ls -l -rw-rw-rw- 1 kristof kristof 3702773 Aug 29 17:56 xpack-openocd-0.10.0-14-linux-x32.tar.gz -rw-rw-rw- 1 kristof kristof 107 Aug 29 17:56 xpack-openocd-0.10.0-14-linux-x32.tar.gz.sha -rw-rw-rw- 1 kristof kristof 3633932 Aug 29 17:51 xpack-openocd-0.10.0-14-linux-x64.tar.gz -rw-rw-rw- 1 kristof kristof 107 Aug 29 17:51 xpack-openocd-0.10.0-14-linux-x64.tar.gz.sha -rw-rw-rw- 1 kristof kristof 3171649 Aug 29 17:58 xpack-openocd-0.10.0-14-win32-x32.zip -rw-rw-rw- 1 kristof kristof 104 Aug 29 17:58 xpack-openocd-0.10.0-14-win32-x32.zip.sha -rw-rw-rw- 1 kristof kristof 3167422 Aug 29 17:54 xpack-openocd-0.10.0-14-win32-x64.zip -rw-rw-rw- 1 kristof kristof 104 Aug 29 17:54 xpack-openocd-0.10.0-14-win32-x64.zip.sha Sadly, I get the same old 'libusb-0.1.so.4' missing error... What did I do wrong? Thanks for all your help :-) ----- Oorspronkelijk bericht ----- Van: "Liviu Ionescu" <i...@livius.net> Aan: "kristof mulier" <kristof.mul...@telenet.be> Cc: "openocd-devel" <openocd-devel@lists.sourceforge.net>, "johan" <jo...@embeetle.com>, "matic" <ma...@embeetle.com> Verzonden: Zaterdag 29 augustus 2020 16:22:55 Onderwerp: Re: Missing libusb shared object file in xPack build. > On 29 Aug 2020, at 16:30, kristof.mul...@telenet.be wrote: > > $ ls -l > total 4816 > -rwxrwx--- 1 root vboxsf 73232 Aug 29 14:14 libftdi1.so.2.4.0 > -rwxrwx--- 1 root vboxsf 22840 Aug 29 14:14 libhidapi-hidraw.so.0.0.0 > -rwxrwx--- 1 root vboxsf 992288 Aug 29 14:14 libiconv.so.2.6.0 > -rwxrwx--- 1 root vboxsf 57848 Aug 29 14:14 libudev.so > -rwxrwx--- 1 root vboxsf 22808 Aug 29 14:14 libusb-0.1.so.4.4.4 > -rwxrwx--- 1 root vboxsf 111464 Aug 29 14:14 libusb-1.0.so.0.1.0 > -rwxrwx--- 1 root vboxsf 3634432 Aug 29 14:14 openocd > > So there is a shared object file 'libusb-0.1.so.4.4.4', but it seems like > OpenOCD is looking for 'libusb-0.1.so.4'. Why? Most probably because you have a broken build. You changed something in the build scripts that should not be changed. The original binaries were tested on multiple distributions/platforms, including Ubuntu 20, and all were ok: https://travis-ci.org/github/xpack-dev-tools/openocd-xpack/builds/702320342 To check file's dependencies, use 'ldd -v <file>'. But mainly fix the build script. Or use the provided binaries, they just work; the reason for the xPack distribution to exist is exactly to avoid issues like this. Regards, Liviu _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel