getting error: bash: ./autogen.sh: No such file or directory

Need to install st-linkv2 in eclipse for stm32f4 programming.

automake, dh-autoreconf, libusb-1.0-0-dev are required for st-linkv2.

Terminal looks like this:

abin@abin-Compaq-Presario-C700-Notebook-PC:~/ARMToolchains/stlink-master$ ls -a
. debian LICENSE .travis.sh
.. doc Makefile .travis.yml
.appveyor.yml etc README.md usr
build flashloaders scripts .version
ChangeLog.md .github src
cmake .gitignore stlinkv1_macosx_driver
CMakeLists.txt include tests
$ ./autogen.sh
bash: ./autogen.sh: No such file or directory
$ whereis automake
automake: /usr/share/man/man1/automake.1.gz
$ ./configure
bash: ./configure: No such file or directory
$ sudo apt-get install automake
[sudo] password for abin:
Reading package lists... Done
Building dependency tree
Reading state information... Done
automake is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
$ whereis autoconf
autoconf: /usr/bin/autoconf /usr/share/autoconf /usr/share/man/man1/autoconf.1.gz
$ whereis libusb-1.0-0-dev
libusb-1: /usr/include/libusb-1.0

I have downloaded the source from here on GitHub.

I've been blindly following this You Tube video which shows how to use Eclipse in Linux for STMboard programming and dumping the code into the board. The maker of the video performs the operation I'm trying to do at 8:37.

OS is Ubuntu 15.04, 32-bit.

I would like to know how to compile this. I also want to understand why we use methods like ./autogen.sh and other commands.

7

1 Answer

The syntax you are using

./name-of-file

runs an executable in the current working directory. If you cannot see name-of-file with ls -a it will fail with the error you saw, and if it does not have execute permission for the user running the command, it will fail with permission denied (if there are no x bits set at all, and you try running it with sudo, the fail message will be command not found)

The program you are trying to compile uses the cmake method to set up the build environment, and there is evidently no autogen.sh (or configure) script to run.

I just successfully built this release from the GitHub page you linked to. It was straightforward, and I didn't encounter any problems.

First you need to install all the dependencies for the build. I'm not sure if all this is actually required, but you mentioned needing some of it anyway...

sudo apt install build-essential automake dh-autoreconf libusb-1.0-0-dev cmake g++

make a directory at the location shown in your screenshot (open a terminal and cd /ARMToolchains/stlink-master if necessary... why aren't you building in your home directory? I recommend moving the whole directory to $USER, but anyway...) the basic method is

mkdir build
cd build
cmake ..

When that exits successfully, you can run

make

If that exists successfully, you may run

sudo make install

To move the binaries to the correct locations. If not, you can run them from the current directory. If you can't get the version you've already downloaded to build (this happens quite often when cloning the master as it might be in the process of getting tweaked), then download one of the releases (like the one I linked above) and try again.

12

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like