Python support for GDB at Ubuntu14.04_64

Asked by Dennis Lindemann

Hello,

I followed this tutorial to install your excellent arm-none-eabi-gcc and it works perfect to compile and flash:
http://istarc.wordpress.com/2014/07/06/stm32f4-in-circuit-debugging/
So I'm using Terry Guo's PPA package sucessfully at Ubuntu 14.04 64bit but have never debugged my STM32F4 Discovery Board.

Instead of Eclipse I would strongly prefer to use QTCreator (because all my other QT projects need it) and I tried to get arm-none-eabi-gdb to work.
So I followed this tutorial:
https://groups.google.com/forum/#!msg/phoenixpilot/caJ5HvN9h-g/Wpff-8X0uscJ
I can set everything up successfully and come to the point where I want to remote-connect to my running OpenOCD Server.
My problem is that I get the Error that my current GDB was built without Python support.

I found this question:
https://answers.launchpad.net/gcc-arm-embedded/+question/218684
So I wanted to rebuild gcc-arm-embedded from source with python support but failed.

Even without modifying build-toolchain.sh (remove =no at --with-python) I can't build and get:
make[4]: *** [as.info] Error 1
make[3]: *** [install-am] Error 2
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-gas] Error 2
make: *** [install] Error 2

I called it like this:
./build-toolchain.sh --skip_mingw32 > build_log.log
and the log is HUGE. Here are the last lines:

make[3]: Leaving directory `/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/binutils/gas/po'
make[3]: Entering directory `/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/binutils/gas'
make[4]: Entering directory `/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/binutils/gas'
/bin/bash /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/src/binutils/gas/../mkinstalldirs /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/bin
 /bin/bash ./libtool --mode=install /usr/bin/install -c as-new /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/bin/arm-none-eabi-as
libtool: install: /usr/bin/install -c as-new /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/bin/arm-none-eabi-as
/bin/bash /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/src/binutils/gas/../mkinstalldirs /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/arm-none-eabi/bin
n=`echo as | sed 's&^&arm-none-eabi-&'`; \
 if [ "/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/bin/$n" != "/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/arm-none-eabi/bin/as" ]; then \
   rm -f /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/arm-none-eabi/bin/as; \
   ln /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/bin/$n /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/arm-none-eabi/bin/as >/dev/null 2>/dev/null \
     || /bin/bash ./libtool --mode=install /usr/bin/install -c as-new /home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/install-native/arm-none-eabi/bin/as; \
 else \
   true ; \
 fi
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/binutils/gas'
make[3]: Leaving directory `/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/binutils/gas'
make[2]: Leaving directory `/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/binutils/gas'
make[1]: Leaving directory `/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/build-native/binutils'

Is this what you would expect because I tried the plain GNU Tools for ARM Embedded Processors under Ubuntu without Terry Guos modufication? This was my assumption.

So I downloaded the source from https://launchpad.net/~terry.guo and replaced the original files in
/home/dl/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805/src
with Terrys. Again WITHOUT changing any script to enable Python I still can't build:
./build-prerequisites.sh fails:
checking whether cc is gcc... yes
checking compiler cc -m32 -O2 -pedantic -fomit-frame-pointer -fexceptions... no
checking compiler cc -O2 -pedantic -fomit-frame-pointer -fexceptions... yes
checking compiler cc -O2 -pedantic -fomit-frame-pointer has sizeof(long)==4... no
configure: error: could not find a working compiler, see config.log for details

I'm not sure what that means but I have gcc:
dl@dl-SVP1321C5E:~/gcc-arm-none-eabi-src/gcc-arm-none-eabi-4_8-2014q3-20140805$ gcc --version
gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2

I'm completly stuck.

Was my approach the right way? What is an easy way to get Ubuntu-compatible ARM ToolChain with python?

Many many thanks for reading and any help!

Question information

Language:
English Edit question
Status:
Solved
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Solved by:
Terry Guo
Solved:
Last query:
Last reply:
Revision history for this message
Best Terry Guo (terry.guo) said :
#1

The build failure is because some texinfo files in source package are not compatible with texinfo tools in Ubuntu 14.04. The texinfo files are used to generate manuals in pdf/html/info/man formats for Binutils like arm-none-eabi-as. With option --skip_manual, we can skip the build for pdf/html/man format, but there is no way to avoid the build for INFO format so far. So the source for 14.04 PPA has a little patch to update those texinfo files. If you want to rebuild, please find and apply the patch firstly, then build with option --skip_manual.

Meanwhile I am going to update the ppa to enable the gdb python support. Please keep an eye on this if you don't want to rebuild.

Revision history for this message
Dennis Lindemann (dennislindemann) said :
#2

Hello Terry, many many thanks for this incredible fast fix! Less than 12 hours from question to fix is faster than I ever saw even for products I paid a lot for.
I just want to confirm that the new PPA works perfect with QTCreator. The steps I did to make it run were as expected:
sudo apt-get purge gcc-arm-none-eabi gdb-arm-none-eabi
was not necessary because I purged before starting my try on self-build.
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi=4.8.4.2014q3-0trusty11
brought me the python support.

Big THANK YOU again!

Revision history for this message
Dennis Lindemann (dennislindemann) said :
#3

Thanks Terry Guo, that solved my question.

Revision history for this message
Stephen Street (stephen-redrocketcomputing) said :
#4

Hi Terry,

Could you point me to the patch referenced above? I would like to build the toolchain from scratch..

Thanks!!

Revision history for this message
Terry Guo (terry.guo) said :
#5

Please go to https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded/+packages, then click package " gcc-arm-none-eabi - 4.8.4.2014q3-0trusty11", you will see file "gcc-arm-none-eabi_4.8.4.2014q3-0trusty11.debian.tar.gz" in "Package files" area. Download this file and decompress it, you will find patch binutils-texi.patch under folder patches.