Failing to enable stlink in openOCD - microcontroller

I am trying to enable stlink by configuring openOCD. It is saying it cannot find my libusb-1.x file even though it is installed by virtue of installing openOCD as it is a dependency. I am not sure what to do
Here is the error:
checking for LIBUSB1... no
configure: WARNING: libusb-1.x not found, trying legacy libusb-0.1 as
a fallback; consider installing libusb-1.x instead
checking for LIBUSB0... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for HIDAPI... no
checking for LIBFTDI... no
checking for LIBFTDI... no
checking for LIBJAYLINK... no
configure: error: libusb-1.x is required for the ST-Link JTAG Programmer
This is my input:
./configure --enable-stlink
What can I do to fix this?
Thank you

You can try to install libusb via
sudo apt-get install libusb-1.0-0-dev

In my case I have to install pkg-config, which suddenly was not installed in my system.
Then this error gone.
sudo apt install pkg-config

First, install the missing dependency, then configure openOCD while enabling the maintainer mode and FTDI support.
By doing this you will still be able to interface STM32 uCs with ST-Link and FTDI but you will lose JTAG support, but that's ok for non-hard-core stuff.
sudo apt-get install libusb-1.0.0-dev
./configure --enable-maintainer-mode --enable-ftdi

Related

Error related to compilation when using install.packages

I am using R 3.3.3 on raspbian. I'm trying to install packages, and most have worked with no problem. However, when I try to install lubridate it fails and I get an extensive error message. The following part caught my attention:
#error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
I haven't been able to find how to add these compiler options. Any ideas/support would be appreciated.
The solution was to update the compiler by running sudo apt-get install g++

Installation of memcached - unable to find libevent

To install memcached I run:
./configure
from memcached server location but I receive error:
checking for libevent directory... configure: error: libevent is required. You can get it from http://www.monkey.org/~provos/libevent/
If it's already installed, specify its path using --with-libevent=/dir/
So I installed libevent manually by downloading from http://www.monkey.org/~provos/libevent/ and running ./configure from downloaded libevent folder
But when I try command:
./configure --with-libevent=/export/home/me/libevent-2.0.21-stable/
I receive same error :
checking for libevent directory... configure: error: libevent is required. You can get it from http://www.monkey.org/~provos/libevent/
If it's already installed, specify its path using --with-libevent=/dir/
How can I check where libevent is installed? Am I specifying the path correctly?
I'm required to install libevent manually as I'm installing memcached from behind a firewall.
After downloading and extracting libevent, you have to configure, build and install it.
Only then can you go back to the memcached directory and rerun its configure, specifying where you installed libevent if it wasn't in one of the standard places (such as /lib, /usr/lib or /usr/local/lib).

Compiling Qt 4.8.3 on Ubuntu 12 failing

I am new to Ubuntu and i am getting a message while building Qt 4.8.3 on Ubuntu 12:
Basic XLib functionality test failed! You might need to modify the
include and library search paths by editing QMAKE_INCDIR_X11 and
QMAKE_LIBDIR_X11 in
/home/majidmax/qt-everywhere-opensource-src-4.8.3/mkspecs/linux-g++.
what the proper steps to build Qt on Ubuntu?
http://qt-project.org/doc/qt-4.8/requirements-x11.html
the website provide the package list which must be installed
try it~
These are the packages you need to install and you'll be good to go. I just had this same problem and this worked for me. These came from the link provided by Garlic Tseng in the accepted answer. I am just putting these here for convenience:
libfontconfig1-dev
libfreetype6-dev
libx11-dev
libxcursor-dev
libxext-dev
libxfixes-dev
libxft-dev
libxi-dev
libxrandr-dev
libxrender-dev
One (copy pastable) command to install all:
sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev libxcursor-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxrandr-dev libxrender-dev
What about sudo apt-get build-dep qt4-qmake?
Try to run that command before you compile Qt (on Debian-like distros).
Same problem i faced in fedora20 (64-bit) for Qt-4.8.3
1)- yum install libXext-devel
(internet connectivity should be there for checking the dependency and install all dependency).
2)- ./configure
3)- make
4)- make install
5)- Installation finish successfully.
The error message doesn't give a lot of information as to the actual issue of XLib failing.
To get more information on the error causing it to fail you can 'make' the xlib tests:
$ cd <Qt_Source_Directory>/config.tests/x11/xlib/
$ make
g++ -Wl,-O1 -o xlib xlib.o -L/usr/X11R6/lib -ltcg -lXext -lX11 -lm
/usr/bin/ld: cannot find -ltcg
collect2: error: ld returned 1 exit status
make: *** [xlib] Error 1
In my case above, I was using -ltcg which was being interpreted as an explicit library to include. I was using this option as it is listed on the qt 4.8 configure options as:
Use Link Time Code Generation
When I looked at the configure options using ./configure --help I noticed that this option isn't listed. Removing the option from my configure line fixed my issue.
what the proper steps to build Qt on Ubuntu?
Check the Qt supported Platforms.
Check Qt for X11 requirements.
3a. Check steps to install Qt on X11 platforms(along with build).
or
3b. Check steps to build static Qt.

Gcc-Ada configuration error

I downloaded gcc-ada-4.3.4.tar.gz when configure gave an error configure: error: cannot find install-sh or install.sh in . ./.. ./..
gcc version=4.3.4 using fedora16
On Fedora 16 you can do yum install gcc-gnat. This will install the appropriate GNAT version for your system.
If you really want to build it yourself, you have to install all dependencies first. You can find them easily.

Trouble linking to correct libxml2 when installing libxslt

Trying to install libxslt-1.1.24 but getting an error during ./configure that says:
checking for libxml libraries >= 2.6.27... configure: error: Version 2.6.16 found. You need at least libxml2 2.6.27 for this version of libxslt
but libxml2-2.7.3 was JUST installed and can be seen in /usr/local/include/libxml2
How do I get libxslt to link to new libxml2 when ./configure?
The various --with-libxml-* arguments will allow you to point it to your alternate install of libxml2. See ./configure --help for more details.
Unsure if your ld cache would have been rebuilt by the libxslt install, but if not, try refreshing it by running:
ldconfig
(make sure /usr/local/lib is already in /etc/ld.so/conf).
Again, you may be linking static, or the cache may already be up-to-date, so this may not matter... but worth a shot I suppose.

Resources