-
Notifications
You must be signed in to change notification settings - Fork 62
Feedback: pre-build requirements #21
Comments
that's bad. the script has (had?) some tests at the beginning to check the prerequisites, and should not start if there is something missing. could you list the executables that failed, to extend the initial tests?
in my opinion it is not ok, the script should complain from the beginning.
that's bad too, it means something was wrong in the first part of the script, where variables are set. |
good point. I thought most of the interesting actions happen inside the container, where things should already be present. could you remove those packages from the ubuntu host, retry the script, and take a closer look where things break? if the actions are ok to happen on the host, then the executables need to be tested at the beginning. if the actions are executed on the host by mistake, the script needs to be fixed. |
Yes - I will do this later on and post feedback on it. |
Apologies for the delay on this but I only got to look at it again now.
Perhaps it is a mistake that the script looks for these on the host rather than in the docker container(s)? Also as mentioned above at the end of the build process I got this again:
P.S. one other small thing is that the website instructions refer to the working folder as "work" when, in fact, it is "Work" (e.g. ~/Work). More detailed info if needed: I started with a clean (VM) install of Ubuntu 16.04 64 bit desktop mode. I followed these instructions for installing/configuring docker:
The RISC-V tools build instructions link to this page and also to the docker installation instructions but the OpenOCD build instructions only link to the latter - the former are simpler to follow so maybe the OpenOCD page could also link to them? I then followed the instructions here for building OpenOCD.
So I installed automake:
and ran the script again but this time it failed on makeinfo:
So I installed texinfo which provides makeinfo:
I ran the script again but this time it failed on libtool:
So I installed libtool
and ran the script again - this time it worked. Hope this helps. |
thank you for your detailed message. I'll take a look and try to fix this, but right now I'm very busy with the future project template. |
OK - thanks. Just to clarify is it a mistake that the script is trying to find these tools on the host rather than in the docker container? If so and I can spot the difference between the RISC-V GCC build script and the OpenOCD build script I'll see if I can do anything to address this issue (and the unbound variable issue). |
I guess the problem is a wrong assumption that the script runs on macOS. in this case the script should check the prerequisites on the host, since there are no macOS Docker containers. probably a pair of if/fi to test the host will solve the problem. |
Yes - that seems to be the problem alright - I commented out the calls to/checks for automake, makeinfo and libtool and did a clean build and it worked fine on Ubuntu. So I guess that these calls/checks are macOS specific. I thought that comparing these to the RISC-V GCC tools build script would make it obvious how to wrap them in a host test but that script doesn't have such a test and yet works fine. I'm also not clear on how to fix the unbound variable issue. So I will leave it to you to make the necessary changes whenever you get time. Thanks for the feedback on this. |
I updated the build script and the helper, be sure you update the git and the submodule. I also updated the build page, which refers to the global Build Prerequisites page. the page defines the packages required on Ubuntu. it would be great to try again with a fresh Ubuntu with those packages. I also added the missing please remove the openocd build folder and try again. |
one small note: the checkout-stable and checkout-dev are not implemented, you need to manually checkout the desired branch. |
is this issue still actual? |
Hi Liviu There still seem to be problems as far as I can see. I started with a clean Ubuntu 16.04 64 bit VM installation with the latest VirtualBox guest extensions and all available Ubuntu updates installed - nothing else manually installed. I pulled the latest (I presume?) script as follows:
I kicked off a build of the win32 and deb32 targets but only got this far before the script terminated:
I installed automake on the Ubuntu host and kicked the build off again but I got this (not sure if this is significant?):
and then it failed with this:
I installed libtool and tried again but again it failed with an error that seems to relate to the docker container (/Host/Work/...) so I'm not really sure how to work around that.
I don't think that I am doing anything wrong but if I am please let me know. Hope this helps |
Looking at the contents of ~/Work/openocd/openocd.git the problem looks to be that there is no configure script because bootstrap has not been run first. |
I'll take a look and fix it during the next few days. (I had a similar problem with the gcc script, the changes are small, I need to identify them and apply to this script too). I might also change the configuration to use git submodules instead of downloding the helper, at least this keeps the scripts in sync. |
bootstrap was somewhere in the script, probably something went wrong before trying to run it. |
build.sh does not call bootstrap for openocd.
but then it fails with this:
I'm not sure why because ~/Work/openocd/openocd.git/configure.ac does exist. |
it looks like I messed the script recently, I remember before it was there. |
Actually I may be wrong.
I tried that but still get the error with configure.ac. |
I'm a bit busy now, I'll try to fix it tomorrow afternoon. |
OK - thanks. Is the "if false ..." snippet correct here or could this be relevant to the current problems?
FWIW I tried build.sh checkout-dev and got this:
I don't know if this is a different problem or related to the original build problem(s) above. |
this is a tricky issue that I'm not very happy with. the problem is that for convenience the initial |
the 'Not a git repository (or any of the parent directories): .git' problem was solved: |
the bootstrap script is always executed right after cloning the openocd git, so it should not be required to do it manually. but if bootstrap fails, you need to run it manually before restarting the script. or you can remove everything and start from scratch. the bootstrap script requires automake, and this is the reason automake is checked to be present on the host. the Prerequisites page also asks for automake. I suggest you retry with a clean Ubuntu, install the packages listed in the Prerequisites page, and run the script. if the script still fails, there must be something else missing, and we need to identify the packages, and add them to the Prerequisites page. |
I managed to install a new Ubuntu 16 VM and you were right, in my environment the build script was successful for all 4 platforms. |
Thanks Liviu.
but it failed with this:
Just in case I did
and tried again but got the same error. |
this looks like a damaged file. define DEBUG=-x before starting the script and you should be able to see all script lines. |
Yes - the contents of the libusb-1.0.20.tar.bz2 file are HTML including
so it's a problem with SourceForge. |
hmmm... SourceForge is less and less reliable :-( probably I should re-post those files on GitHub and update the script to get them from there. |
Is this a common occurrence? |
Oh now I can't and I get this in a browser:
I'll leave it until the morning to try again. Thanks a lot for the work on this - much appreciated. |
I already published the binaries on GitHub: https://github.com/gnu-mcu-eclipse/files/tree/master/libs |
Thanks - I tried to hack the script to take them from there but I can't seem to figure out the magic URL that will download the raw file and I just keep getting HTML e.g.:
|
I already updated the script to use the 'magic' urls: |
Thanks a lot. Edit: deb32 build completed successfully too. Feel free to close the issue if you see fit to do so. Thanks again. |
you're welcome! I'll probably update the other build script to use GitHub archives too. |
I ran through the build process on a clean Ubuntu 16.04 64 bit installation.
In case it helps to refine the installation instructions at all I found that the script failed a few times until I installed each of the following in turn:
sudo apt install automake
sudo apt install texinfo
sudo apt install makeinfo
Maybe it's too much trouble to enumerate all required packages for all possible build platforms in which case running the script and installing things on a trial and error basis is probably OK?
Curiously the GCC build script did not complain about these tools being missing and did not install them (otherwise they would still be available now for the openocd script) so I don't know if it uses and installs them in the docker container while the openocd script installs and uses them on the host or something?!
One other thing - at the very end of the build process I got this but I don't know if it's significant?
/Host/Work/openocd/scripts/build-helper.sh: line 743: DEPLOY_FOLDER_NAME: unbound variable
The text was updated successfully, but these errors were encountered: