Problems with 6-2016-q4-major build instructions

Asked by TM

Hi all

I've downloaded the 6-2016-q4-major source source package from here:

https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads

I've installed a clean/new Ubuntu 14.04.05 LTS VirtualBox VM using ubuntu-14.04.5-desktop-amd64.iso and updated it with any available packages (but did not upgrade to 16.04.1!) and installed the VirtualBox guest extensions.
I'm using VirtualBox 5.1.14r11924 (Qt 5.6.2).

I then followed the build instructions (How-to-build-toolchain.pdf) bundled with the source package.
(Note that the instructions do not make it clear that all commands must be run as root/sudo and some are most easily run under an interactive su/root shell using sudo -i due to quoting requirements).
These instructions do mention that there may be some errors but I don't think that what I'm getting is correct.
Can anybody tell me what, if anything, I am doing wrong?
Below is a transcript of what I'm doing and getting.
If any more info is needed please let me know.

Thanks a lot
Tommy

user@gcc-arm-embedded:~$ sudo -i
[sudo] password for user:
root@gcc-arm-embedded:~# echo \
> "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse" \
> > /etc/apt/sources.list
root@gcc-arm-embedded:~# echo "deb http://security.ubuntu.com/ubuntu trusty-security main" \
> >> /etc/apt/sources.list
root@gcc-arm-embedded:~# echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" \
> > /etc/apt/sources.list.d/xenial.list
root@gcc-arm-embedded:~# echo "deb-src http://archive.ubuntu.com/ubuntu xenial main universe" \
> >> /etc/apt/sources.list.d/xenial.list
root@gcc-arm-embedded:~# echo 'APT::Default-Release "trusty";' > /etc/apt/apt.conf.d/00default
root@gcc-arm-embedded:~# dpkg --add-architecture i386
root@gcc-arm-embedded:~# exit
logout
user@gcc-arm-embedded:~$ sudo apt-get update
Hit http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Get:1 http://archive.ubuntu.com xenial InRelease [247 kB]
Hit http://security.ubuntu.com trusty-security/main i386 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Get:2 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:3 http://archive.ubuntu.com trusty Release [58.5 kB]
Get:4 http://archive.ubuntu.com xenial/main Sources [868 kB]
Get:5 http://archive.ubuntu.com xenial/universe Sources [7,728 kB]
Get:6 http://archive.ubuntu.com xenial/main amd64 Packages [1,201 kB]
Get:7 http://archive.ubuntu.com xenial/universe amd64 Packages [7,532 kB]
Get:8 http://archive.ubuntu.com xenial/main i386 Packages [1,196 kB]
Get:9 http://archive.ubuntu.com xenial/universe i386 Packages [7,512 kB]
Get:10 http://archive.ubuntu.com xenial/main Translation-en [568 kB]
Get:11 http://archive.ubuntu.com xenial/universe Translation-en [4,354 kB]
Get:12 http://archive.ubuntu.com trusty/main amd64 Packages [1,350 kB]
Get:13 http://archive.ubuntu.com trusty/restricted amd64 Packages [13.0 kB]
Get:14 http://archive.ubuntu.com trusty/universe amd64 Packages [5,859 kB]
Get:15 http://archive.ubuntu.com trusty/multiverse amd64 Packages [132 kB]
Get:16 http://archive.ubuntu.com trusty/main i386 Packages [1,348 kB]
Get:17 http://archive.ubuntu.com trusty/restricted i386 Packages [13.4 kB]
Get:18 http://archive.ubuntu.com trusty/universe i386 Packages [5,866 kB]
Get:19 http://archive.ubuntu.com trusty/multiverse i386 Packages [134 kB]
Get:20 http://archive.ubuntu.com trusty/main Translation-en [762 kB]
Get:21 http://archive.ubuntu.com trusty/multiverse Translation-en [102 kB]
Get:22 http://archive.ubuntu.com trusty/restricted Translation-en [3,457 B]
Get:23 http://archive.ubuntu.com trusty/universe Translation-en [4,089 kB]
Ign http://archive.ubuntu.com trusty/main Translation-en_IE
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_IE
Ign http://archive.ubuntu.com trusty/restricted Translation-en_IE
Ign http://archive.ubuntu.com trusty/universe Translation-en_IE
Fetched 50.9 MB in 24s (2,109 kB/s)
Reading package lists... Done
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Unknown Multi-Arch type 'no' for package 'libxapian-dev'
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'kwin'
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package php-psr-http-message-implementation
W: Ignoring Provides line with DepCompareOp for package php-psr-log-implementation
W: Ignoring Provides line with DepCompareOp for package php-seclib
W: Ignoring Provides line with DepCompareOp for package php-sabre-http
W: Ignoring Provides line with DepCompareOp for package php-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Unknown Multi-Arch type 'no' for package 'libxapian-dev'
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: You may want to run apt-get update to correct these problems
user@gcc-arm-embedded:~$ sudo apt-get install -y -t xenial \
> gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  binutils gcc-mingw-w64-base libisl15 libmpfr4 mingw-w64-common
  mingw-w64-i686-dev
Suggested packages:
  binutils-doc gcc-5-locales wine
The following NEW packages will be installed:
  binutils-mingw-w64-i686 g++-mingw-w64-i686 gcc-mingw-w64-base
  gcc-mingw-w64-i686 libisl15 mingw-w64-common mingw-w64-i686-dev
The following packages will be upgraded:
  binutils libmpfr4
2 upgraded, 7 newly installed, 0 to remove and 1373 not upgraded.
Need to get 58.7 MB of archives.
After this operation, 325 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ xenial/main binutils amd64 2.26-8ubuntu2 [2,303 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ xenial/main libisl15 amd64 0.16.1-1 [524 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ xenial/main libmpfr4 amd64 3.1.4-1 [191 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ xenial/universe binutils-mingw-w64-i686 amd64 2.26-3ubuntu1+6.6 [1,782 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ xenial/universe mingw-w64-common all 4.0.4-2 [4,787 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ xenial/universe mingw-w64-i686-dev all 4.0.4-2 [2,059 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ xenial/universe gcc-mingw-w64-base amd64 5.3.1-8ubuntu3+17 [11.2 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ xenial/universe gcc-mingw-w64-i686 amd64 5.3.1-8ubuntu3+17 [27.3 MB]
Get:9 http://archive.ubuntu.com/ubuntu/ xenial/universe g++-mingw-w64-i686 amd64 5.3.1-8ubuntu3+17 [19.8 MB]
Fetched 58.7 MB in 29s (2,000 kB/s)
(Reading database ... 199262 files and directories currently installed.)
Preparing to unpack .../binutils_2.26-8ubuntu2_amd64.deb ...
Unpacking binutils (2.26-8ubuntu2) over (2.24-5ubuntu14.1) ...
Selecting previously unselected package libisl15:amd64.
Preparing to unpack .../libisl15_0.16.1-1_amd64.deb ...
Unpacking libisl15:amd64 (0.16.1-1) ...
Preparing to unpack .../libmpfr4_3.1.4-1_amd64.deb ...
Unpacking libmpfr4:amd64 (3.1.4-1) over (3.1.2-1) ...
Selecting previously unselected package binutils-mingw-w64-i686.
Preparing to unpack .../binutils-mingw-w64-i686_2.26-3ubuntu1+6.6_amd64.deb ...
Unpacking binutils-mingw-w64-i686 (2.26-3ubuntu1+6.6) ...
Selecting previously unselected package mingw-w64-common.
Preparing to unpack .../mingw-w64-common_4.0.4-2_all.deb ...
Unpacking mingw-w64-common (4.0.4-2) ...
Selecting previously unselected package mingw-w64-i686-dev.
Preparing to unpack .../mingw-w64-i686-dev_4.0.4-2_all.deb ...
Unpacking mingw-w64-i686-dev (4.0.4-2) ...
Selecting previously unselected package gcc-mingw-w64-base.
Preparing to unpack .../gcc-mingw-w64-base_5.3.1-8ubuntu3+17_amd64.deb ...
Unpacking gcc-mingw-w64-base (5.3.1-8ubuntu3+17) ...
Selecting previously unselected package gcc-mingw-w64-i686.
Preparing to unpack .../gcc-mingw-w64-i686_5.3.1-8ubuntu3+17_amd64.deb ...
Unpacking gcc-mingw-w64-i686 (5.3.1-8ubuntu3+17) ...
Selecting previously unselected package g++-mingw-w64-i686.
Preparing to unpack .../g++-mingw-w64-i686_5.3.1-8ubuntu3+17_amd64.deb ...
Unpacking g++-mingw-w64-i686 (5.3.1-8ubuntu3+17) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
Setting up binutils (2.26-8ubuntu2) ...
Setting up libisl15:amd64 (0.16.1-1) ...
Setting up libmpfr4:amd64 (3.1.4-1) ...
Setting up binutils-mingw-w64-i686 (2.26-3ubuntu1+6.6) ...
Setting up mingw-w64-common (4.0.4-2) ...
Setting up mingw-w64-i686-dev (4.0.4-2) ...
Setting up gcc-mingw-w64-base (5.3.1-8ubuntu3+17) ...
Setting up gcc-mingw-w64-i686 (5.3.1-8ubuntu3+17) ...
update-alternatives: using /usr/bin/i686-w64-mingw32-gcc-posix to provide /usr/bin/i686-w64-mingw32-gcc (i686-w64-mingw32-gcc) in auto mode
update-alternatives: warning: skip creation of /usr/bin/i686-w64-mingw32-gcc-5 because associated file /usr/bin/i686-w64-mingw32-gcc-5-posix (of link group i686-w64-mingw32-gcc) doesn't exist
update-alternatives: using /usr/bin/i686-w64-mingw32-gcc-win32 to provide /usr/bin/i686-w64-mingw32-gcc (i686-w64-mingw32-gcc) in auto mode
update-alternatives: warning: skip creation of /usr/bin/i686-w64-mingw32-gcc-5 because associated file /usr/bin/i686-w64-mingw32-gcc-5-win32 (of link group i686-w64-mingw32-gcc) doesn't exist
Setting up g++-mingw-w64-i686 (5.3.1-8ubuntu3+17) ...
update-alternatives: using /usr/bin/i686-w64-mingw32-g++-posix to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode
update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode
Processing triggers for libc-bin (2.19-0ubuntu6.9) ...
user@gcc-arm-embedded:~$ sudo apt-get -f install -y \
> apt-src \
> autoconf \
> autogen \
> bison \
> dejagnu \
> flex \
> flip \
> gawk \
> git \
> gperf \
> gzip \
> nsis \
> openssh-client \
> p7zip-full \
> perl \
> python-dev \
> libisl-dev \
> scons \
> tcl \
> texinfo \
> tofrodos \
> wget \
> zip \
> texlive \
> texlive-extra-utils
[sudo] password for user:
Reading package lists... Done
Building dependency tree
Reading state information... Done
gzip is already the newest version.
tcl is already the newest version.
tcl set to manually installed.
zip is already the newest version.
zip set to manually installed.
openssh-client is already the newest version.
openssh-client set to manually installed.
perl is already the newest version.
wget is already the newest version.
wget set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apt-src : Depends: dpkg-dev but it is not going to be installed
           Recommends: build-essential but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
user@gcc-arm-embedded:~$

Question information

Language:
English Edit question
Status:
Answered
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#1

Hi,

You should be able to skip apt-src and dpkg-dev if you do not intend to build the PPA version of the toolchain. However, out of curiosity, what does apt-get install dpkg-dev show you? You can also install aptitude and see what aptitude install tells you (it tends to be a bit more verbose).

Best regards.

Revision history for this message
TM (tm1234) said :
#2

Hi Thomas

Thanks for the quick reply.
I went through the instructions afresh (with my VM rolled back to its pristine post install state) and I think that originally my copy and paste of one of the instructions from the PDF to the console was incorrect so that would not have helped!
But even after verifying that all commands were executed correctly I still get errors.

I get this when I attempt to install apt-src:

user@gcc-arm-embedded:~$ sudo apt-get install apt-src
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 apt-src : Depends: dpkg-dev but it is not going to be installed
           Recommends: build-essential but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

I get this when I attempt to install dpkg-dev:

user@gcc-arm-embedded:~$ sudo apt-get install dpkg-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 dpkg-dev : Depends: libdpkg-perl (= 1.17.5ubuntu5.6) but 1.18.4ubuntu1 is to be installed
            Recommends: build-essential but it is not going to be installed
            Recommends: fakeroot
            Recommends: libalgorithm-merge-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

In spite of this since you say that apt-src should not be needed in this case I went ahead and followed the rest of the build instructions. I will post back when I have results of the build.

BTW - the PDF instructions do solicit feedback and corrections.
As they stand I believe that the instructions are not simple to use given my experience.
Where can bugs/enhancement requests be logged against the docs?

Thanks again
Tommy

Revision history for this message
TM (tm1234) said :
#3

Unfortunately the build failed again.
I can't see if/how I can attach a log so here is the end of the log (I did run the build-prerequisites.sh script so I'm not sure why it cannot find them)

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... arm-none-eabi
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /bin/sed
checking for gawk... gawk
checking for libatomic support... no
checking for libcilkrts support... no
checking for libitm support... no
checking for libsanitizer support... no
checking for libvtv support... no
checking for libmpx support... no
checking for x86_64-linux-gnu-gcc... x86_64-linux-gnu-gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether x86_64-linux-gnu-gcc accepts -g... yes
checking for x86_64-linux-gnu-gcc option to accept ISO C89... none needed
checking for x86_64-linux-gnu-g++... no
checking for x86_64-linux-gnu-c++... no
checking for x86_64-linux-gnu-gpp... no
checking for x86_64-linux-gnu-aCC... no
checking for x86_64-linux-gnu-CC... no
checking for x86_64-linux-gnu-cxx... no
checking for x86_64-linux-gnu-cc++... no
checking for x86_64-linux-gnu-cl.exe... no
checking for x86_64-linux-gnu-FCC... no
checking for x86_64-linux-gnu-KCC... no
checking for x86_64-linux-gnu-RCC... no
checking for x86_64-linux-gnu-xlC_r... no
checking for x86_64-linux-gnu-xlC... no
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for x86_64-linux-gnu-gnatbind... no
checking for gnatbind... no
checking for x86_64-linux-gnu-gnatmake... no
checking for gnatmake... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#4

Can you check that these three components are indeed built in their respective folder in build-native?

As to the apt-get error, it seems to come from a conflict between xenial and trusty package. For some reason it wants to install the Xenial package.

Can you copy/paste the content of /etc/apt/apt.conf.d/00default ? Can you also show the output of:

1) ls -l /etc/apt/apt.conf.d/
2) grep -r Default-Release /etc/apt/apt.conf.d/

Best regards.

Revision history for this message
TM (tm1234) said :
#5

Hi Thomas

Thanks again for your quick reply. Your help is much appreciated.

Seems that the prerequisite packages did NOT build successfully after all - there was no C++ compiler installed and configured choked - I had overlooked this first time.
I manually did sudo apt-get install g++ and then the build-prerequisites.sh script seems to have completed OK.
So I have now kicked off another run of build-toolchain.sh

Apropos of your other comments/questions...

> Can you copy/paste the content of /etc/apt/apt.conf.d/00default ?

user@gcc-arm-embedded:~$ cat /etc/apt/apt.conf.d/00default
APT::Default-Release "trusty";

> 1) ls -l /etc/apt/apt.conf.d/

user@gcc-arm-embedded:~$ ls -l /etc/apt/apt.conf.d/
total 52
-rw-rw-r-- 1 root root 49 Jan 19 17:53 00aptitude
-rw-r--r-- 1 root root 31 Jan 20 09:23 00default
-rw-rw-r-- 1 root root 40 Jan 19 17:53 00trustcdrom
-rw-r--r-- 1 root root 643 Apr 10 2014 01autoremove
-rw-r--r-- 1 root root 1036 Jan 19 18:46 01autoremove-kernels
-rw-r--r-- 1 root root 129 Aug 22 2011 10periodic
-rw-r--r-- 1 root root 108 Aug 22 2011 15update-stamp
-rw-r--r-- 1 root root 85 Aug 22 2011 20archive
-rw-r--r-- 1 root root 123 Apr 10 2014 20changelog
-rw-r--r-- 1 root root 243 Mar 11 2013 20dbus
-rw-r--r-- 1 root root 2331 Dec 3 2015 50unattended-upgrades
-rw-r--r-- 1 root root 182 Feb 23 2014 70debconf
-rw-r--r-- 1 root root 231 Aug 22 2011 99update-notifier

> 2) grep -r Default-Release /etc/apt/apt.conf.d/

user@gcc-arm-embedded:~$ grep -r Default-Release /etc/apt/apt.conf.d/
/etc/apt/apt.conf.d/00default:APT::Default-Release "trusty";

The build instructions certainly don't seem reliable/complete to me.
Where can bugs/enhancement requests against these be logged?

Thanks a lot.
Tommy

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#6

Hi,

We'll happily improve the documentation once we figure out what's wrong there. I'll add g++ right away for instance. Still not sure about the apt issue. We reproduced the build in a virtual machine ourselves so this is quite surprising.

Best regards.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#7

Hi,

Could you post the output of "apt-cache policy"?

Best regards.

Revision history for this message
TM (tm1234) said :
#8

Thanks Thomas. My build is still running so I'll post back once it completes or fails.

Revision history for this message
TM (tm1234) said :
#9

Build still running so hopefully that's good news.

> Could you post the output of "apt-cache policy"?

user@gcc-arm-embedded:~$ apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://archive.ubuntu.com/ubuntu/ xenial/universe Translation-en
 500 http://archive.ubuntu.com/ubuntu/ xenial/main Translation-en
 500 http://archive.ubuntu.com/ubuntu/ xenial/universe i386 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=universe
     origin archive.ubuntu.com
 500 http://archive.ubuntu.com/ubuntu/ xenial/main i386 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main
     origin archive.ubuntu.com
 500 http://archive.ubuntu.com/ubuntu/ xenial/universe amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=universe
     origin archive.ubuntu.com
 500 http://archive.ubuntu.com/ubuntu/ xenial/main amd64 Packages
     release v=16.04,o=Ubuntu,a=xenial,n=xenial,l=Ubuntu,c=main
     origin archive.ubuntu.com
 500 http://security.ubuntu.com/ubuntu/ trusty-security/main Translation-en
 990 http://security.ubuntu.com/ubuntu/ trusty-security/main i386 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=main
     origin security.ubuntu.com
 990 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty-security,n=trusty,l=Ubuntu,c=main
     origin security.ubuntu.com
 500 http://archive.ubuntu.com/ubuntu/ trusty/universe Translation-en
 500 http://archive.ubuntu.com/ubuntu/ trusty/restricted Translation-en
 500 http://archive.ubuntu.com/ubuntu/ trusty/multiverse Translation-en
 500 http://archive.ubuntu.com/ubuntu/ trusty/main Translation-en
 990 http://archive.ubuntu.com/ubuntu/ trusty/multiverse i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=multiverse
     origin archive.ubuntu.com
 990 http://archive.ubuntu.com/ubuntu/ trusty/universe i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=universe
     origin archive.ubuntu.com
 990 http://archive.ubuntu.com/ubuntu/ trusty/restricted i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=restricted
     origin archive.ubuntu.com
 990 http://archive.ubuntu.com/ubuntu/ trusty/main i386 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
     origin archive.ubuntu.com
 990 http://archive.ubuntu.com/ubuntu/ trusty/multiverse amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=multiverse
     origin archive.ubuntu.com
 990 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=universe
     origin archive.ubuntu.com
 990 http://archive.ubuntu.com/ubuntu/ trusty/restricted amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=restricted
     origin archive.ubuntu.com
 990 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
     release v=14.04,o=Ubuntu,a=trusty,n=trusty,l=Ubuntu,c=main
     origin archive.ubuntu.com
Pinned packages:

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

For the "dpkg-dev : Depends: libdpkg-perl (= 1.17.5ubuntu5.6) but 1.18.4ubuntu1 is to be installed" problem:

What is the output of the command
apt-cache policy dpkg-dev libdpkg-perl

The installation might work with the command
sudo apt-get install dpkg-dev libdpkg-perl
or with
sudo apt-get install dpkg-dev libdpkg-perl=1.17.5ubuntu5.6

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#11

Hi Manfred,

forcing the version to be installed would probably work indeed but I am trying to determine why the current command indicated in the how to build document does not work as is. We tested both on a clean Ubuntu 14.04 install and one 14.04 workstation and it worked in both case.

Best regards.

Revision history for this message
TM (tm1234) said :
#12

Hi Manfred - thanks for taking an interest.

> What is the output of the command
> apt-cache policy dpkg-dev libdpkg-perl

user@gcc-arm-embedded:~$ apt-cache policy dpkg-dev libdpkg-perl
dpkg-dev:
  Installed: (none)
  Candidate: 1.17.5ubuntu5.6
  Version table:
     1.18.4ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ xenial/main amd64 Packages
     1.17.5ubuntu5.6 0
        990 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1.17.5ubuntu5 0
        990 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
libdpkg-perl:
  Installed: 1.17.5ubuntu5.7
  Candidate: 1.18.4ubuntu1
  Version table:
     1.18.4ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ xenial/main amd64 Packages
 *** 1.17.5ubuntu5.7 0
        100 /var/lib/dpkg/status
     1.17.5ubuntu5.6 0
        990 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
     1.17.5ubuntu5 0
        990 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

> The installation might work with the command

My build is still (!) running so I may try that later.

If the build eventually succeeds then I intend to try everything from scratch in the hope that a transcript of what goes on (and wrong in some cases) may help to improve the canned instructions.

Regards
Tommy

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#13

Interesting, your libdpkg-perl version is not the one from trusty. If you install libdpkg-perl=1.17.5ubuntu5.6 the command line in the how to build should then work. Can you describe how you installed and upgraded your trusty image?

Thanks Manfred for suggesting that, I assumed the package was coming from trusty.

Best regards.

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

dpkg
The Trusty Tahr (supported)
  1.17.5ubuntu5.7 updates (main) 2016-06-23
  1.17.5ubuntu5.6 security (main) 2016-04-26
  1.17.5ubuntu5 release (main) 2014-03-07

I assume that trusty-updates was enabled once, but is no longer in the list of active repository sources.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#15

Good catch. And that's probably what's confusing apt: it will prefer to upgrade rather than downgrade but the version in xenial causes problem. So adding back the update repository or downgrading to the version in security should do the trick.

Best regards.

Revision history for this message
TM (tm1234) said :
#16

> Can you describe how you installed and upgraded your trusty image?

From my original post:

> I've installed a clean/new Ubuntu 14.04.05 LTS VirtualBox VM using ubuntu-14.04.5-desktop-amd64.iso
> and updated it with any available packages (but did not upgrade to 16.04.1!) and installed the VirtualBox
> guest extensions. I'm using VirtualBox 5.1.14r11924 (Qt 5.6.2).

So I simply installed Ubuntu on a brand new VM, rebooted, installed any updates that it reported (I did not change any software sources/repos), rebooted, installed VirtualBox guest additions rebooted and then started following the build instructions for the tools. In short - totally clean 14.04.05 LTS 64 bit installation as recommended by the instructions. The instructions don't say whether or not to install updates reported by the OS so I assumed that it was best to do so.

Revision history for this message
TM (tm1234) said :
#17

> If you install libdpkg-perl=1.17.5ubuntu5.6 the command line in the how to build should then work

I presume that should read libdpkg-perl-1.17.5ubuntu5.6?

Revision history for this message
Manfred Hampl (m-hampl) said :
#18

There might be even more packages currently in version from the -proposed repository, such that proposed solution "sudo apt-get install dpkg-dev libdpkg-perl=1.17.5ubuntu5.6" might fail with other dependency problems.

The most reasonable solution will probably be to re-enable trusty-proposed.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#19

Certainly, installing updates is a good idea. What's strange is that a step seems to disable the updates repository at some point. Possibly the image has the updates but doesn't enable the updates repository.

Find the file in /etc/apt/sources.list.d/* or /etc/apt/sources.list that contains lines of the form:

deb URL trusty main restricted universe multiverse

Then add the line:

deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse

Then run apt-get update and try again to install apt-src.

Revision history for this message
TM (tm1234) said :
#20

> What's strange is that a step seems to disable the updates repository at some point.

The first line of the instructions is:

echo \
"deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse" \
> /etc/apt/sources.list

i.e. it overwrites sources.list.
Should it be perhaps...

echo \
"deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse" \
>> /etc/apt/sources.list

i.e. APPEND rather than overwrite?

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#21

Oh indeed, it was right in front of me. I think the lines related to trusty could be removed since they are supposed to already be there.

Will look into fixing that for next release. Thanks.

Revision history for this message
TM (tm1234) said :
#22

> Oh indeed, it was right in front of me. I think the lines related to trusty could be removed since
> they are supposed to already be there.

Sorry - are you referring to my comments about overwriting the sources.list file?
I'm still confused as to what the recommended solution is here...
Maybe somebody cal clarify please?
Thanks.

Also... (apologies for piggybacking on my original query):

(1) how long would the build be expected to take on a modern machine (HP EliteBook 840, Core i5, 16GB RAM)?
(2) would you expect the instructions to work on Ubuntu 14.04.5 LTS 32 bit to build a 32 bit toolchain? Or would this still need Ubuntu 64 bit and -m32 or --host=i686 or whatever?

Thanks

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#23

Here's the recommended solution (thanks ManFred again for finding the root cause of the problem):

[as root] echo "deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse" >> /etc/apt/sources.list

As to your questions:

1) about 2-3h (assuming 4 cores) I guess

2) I think it should work on 32bit system as is but I might be forgetting something. Try and let us know how that goes.

Revision history for this message
TM (tm1234) said :
#24

Thanks - sorry to labour the point but does that mean that the first line in the instructions:

echo "deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse" /etc/apt/sources.list

is wrong and should be changed to:

echo "deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse" >> /etc/apt/sources.list

i.e. "trusty-updates" rather than "trusty" and append (>>) rather than overwrite (>)?

And then all instructions thereafter remain as stated in the PDF instructions?

Thanks for the info a bout build time and 32 bit.
I will let you know how it goes.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#25

I would suspect the correct procedure would be to not execute the trusty lines but add a line for xenial-security [1]. But that would require starting from a fresh system. In your case the right approach is just to add back the trusty-updates [2] line.

[1] deb http://security.ubuntu.com/ubuntu xenial-security main universe
[2] deb http://archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse

Best regards,

Thomas

Revision history for this message
TM (tm1234) said :
#26

I'm going to start afresh with a clean Ubuntu 14.04 64 bit install (I'll defer trying to build 32 bit tools until I get this working).
So I should do the following where the original first line of the instructions has been modified (a) to omit "trusty" and (b) to append to rather than overwrite sournces.list (i.e. >> rather than >)?

$ echo \
"deb http://archive.ubuntu.com/ubuntu/ *trusty* main restricted universe multiverse" \
>> /etc/apt/sources.list

$ echo "deb http://security.ubuntu.com/ubuntu trusty-security main" \
>> /etc/apt/sources.list

$ echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" \
> /etc/apt/sources.list.d/xenial.list

$ echo "deb-src http://archive.ubuntu.com/ubuntu xenial main universe" \
>> /etc/apt/sources.list.d/xenial.list

$ echo 'APT::Default-Release "trusty";' > /etc/apt/apt.conf.d/00default

$ dpkg --add-architecture i386

$ sudo apt-get update

$ sudo apt-get install -y -t xenial \
gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686

$ sudo apt-get -f install -y \
apt-src \
autoconf \
autogen \
bison \
dejagnu \
flex \
flip \
gawk \
git \
gperf \
gzip \
nsis \
openssh-client \
p7zip-full \
perl \
python-dev \
libisl-dev \
scons \
tcl \
texinfo \
tofrodos \
wget \
zip \
texlive \
texlive-extra-utils

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#27

xenial.list should not exist so you can overwrite for the first line, ie:

$ echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" \
> /etc/apt/sources.list.d/xenial.list

$ echo "deb-src http://archive.ubuntu.com/ubuntu xenial main universe" \
>> /etc/apt/sources.list.d/xenial.list

$ echo "deb http://security.ubuntu.com/ubuntu xenial-security main universe" \
>> /etc/apt/sources.list.d/xenial.list

$ echo 'APT::Default-Release "trusty";' > /etc/apt/apt.conf.d/00default

$ dpkg --add-architecture i386

$ sudo apt-get update

etc.

Let us know how that goes.

Revision history for this message
TM (tm1234) said :
#28

I'm going to start afresh with a clean Ubuntu 14.04 64 bit install (I'll defer trying to build 32 bit tools until I get this working).
So I should do the following where the original first line of the instructions has been modified (a) to omit "trusty" and (b) to append to rather than overwrite sournces.list (i.e. >> rather than >)?

$ echo \
"deb http://archive.ubuntu.com/ubuntu/ *trusty* main restricted universe multiverse" \
>> /etc/apt/sources.list

$ echo "deb http://security.ubuntu.com/ubuntu trusty-security main" \
>> /etc/apt/sources.list

$ echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" \
> /etc/apt/sources.list.d/xenial.list

$ echo "deb-src http://archive.ubuntu.com/ubuntu xenial main universe" \
>> /etc/apt/sources.list.d/xenial.list

$ echo 'APT::Default-Release "trusty";' > /etc/apt/apt.conf.d/00default

$ dpkg --add-architecture i386

$ sudo apt-get update

$ sudo apt-get install -y -t xenial \
gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686

$ sudo apt-get -f install -y \
apt-src \
autoconf \
autogen \
bison \
dejagnu \
flex \
flip \
gawk \
git \
gperf \
gzip \
nsis \
openssh-client \
p7zip-full \
perl \
python-dev \
libisl-dev \
scons \
tcl \
texinfo \
tofrodos \
wget \
zip \
texlive \
texlive-extra-utils

Revision history for this message
TM (tm1234) said :
#29

Apologies for the duplicate post.
I meant to post this...

I have just started with a clean VM installation and the tools build is currently running.
Following these steps seem to be giving better results and no errors (other than the multi-arch ones alluded to in the instructions):

user@gcc-arm-embedded-64:~$ mkdir toolchain
user@gcc-arm-embedded-64:~$ cd toolchain
user@gcc-arm-embedded-64:~/toolchain$ sudo -i
[sudo] password for user:
root@gcc-arm-embedded-64:~# echo "deb http://archive.ubuntu.com/ubuntu xenial main universe" \
> > /etc/apt/sources.list.d/xenial.list
root@gcc-arm-embedded-64:~# echo "deb-src http://archive.ubuntu.com/ubuntu xenial main universe" \
> >> /etc/apt/sources.list.d/xenial.list
root@gcc-arm-embedded-64:~# echo 'APT::Default-Release "trusty";' > /etc/apt/apt.conf.d/00default
root@gcc-arm-embedded-64:~# dpkg --add-architecture i386
root@gcc-arm-embedded-64:~# exit
logout
user@gcc-arm-embedded-64:~/toolchain$ sudo apt-get update
...
user@gcc-arm-embedded-64:~/toolchain$ sudo apt-get install -y -t xenial \
> gcc-mingw-w64-i686 g++-mingw-w64-i686 binutils-mingw-w64-i686
...
etc.

Revision history for this message
Manfred Hampl (m-hampl) said :
#30

If you start from a clean installation, the sources file for trusty should be fine, and there should not be any need to modify it.
The only part necessary is adding the xenial part. And what you write above looks file to me.

Revision history for this message
TM (tm1234) said :
#31

Thanks Manfred - as I said I didn't get the sort of problems that I got before doing the pre-build steps and the build is currently running so hopefully it'll proceed and complete OK. I'll report back how it goes. And then I will try a 32 bit build.

Revision history for this message
TM (tm1234) said :
#32

OK - using the commands in post #29 the build complete successfully. :-)
The only issues that I got during the pre-build setup were these:

W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Unknown Multi-Arch type 'no' for package 'libxapian-dev'
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'kwin'
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package php-psr-http-message-implementation
W: Ignoring Provides line with DepCompareOp for package php-psr-log-implementation
W: Ignoring Provides line with DepCompareOp for package php-seclib
W: Ignoring Provides line with DepCompareOp for package php-sabre-http
W: Ignoring Provides line with DepCompareOp for package php-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Unknown Multi-Arch type 'no' for package 'libxapian-dev'
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: You may want to run apt-get update to correct these problems

and

update-alternatives: using /usr/bin/i686-w64-mingw32-gcc-posix to provide /usr/bin/i686-w64-mingw32-gcc (i686-w64-mingw32-gcc) in auto mode
update-alternatives: warning: skip creation of /usr/bin/i686-w64-mingw32-gcc-5 because associated file /usr/bin/i686-w64-mingw32-gcc-5-posix (of link group i686-w64-mingw32-gcc) doesn't exist
update-alternatives: using /usr/bin/i686-w64-mingw32-gcc-win32 to provide /usr/bin/i686-w64-mingw32-gcc (i686-w64-mingw32-gcc) in auto mode
update-alternatives: warning: skip creation of /usr/bin/i686-w64-mingw32-gcc-5 because associated file /usr/bin/i686-w64-mingw32-gcc-5-win32 (of link group i686-w64-mingw32-gcc) doesn't exist
Setting up g++-mingw-w64-i686 (5.3.1-8ubuntu3+17) ...
update-alternatives: using /usr/bin/i686-w64-mingw32-g++-posix to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode
update-alternatives: using /usr/bin/i686-w64-mingw32-g++-win32 to provide /usr/bin/i686-w64-mingw32-g++ (i686-w64-mingw32-g++) in auto mode

but I presume that these are expected and can be ignored?

It would be good if the build instructions were updated/clarified in the light of my feedback.
If I can provide any further info let me know.
I am now going to try a 32 bit Linux build and see how that goes.

Thanks a lot for all your help.

Regards
Tommy

Revision history for this message
TM (tm1234) said :
#33

I installed a new Ubuntu 14.04.5 LTS 32 bit VM and ran through the build instructions there (albeit I skipped building the win32 prerequisites and tools as I'm more concerned about 32 bit linux tools here) and the build process completed successfully. I haven't tested or run the tools yet but I presume that they will work.

Thanks for all the help in this thread.

Revision history for this message
TM (tm1234) said :
#34

Actually I just noticed appendix A of the instructions which says that some scripts are not compatible with the dash shell and that this should be replaced with bash. However I never did this and yet the build process completes OK. Is this still a mandatory pre-build configuration step? If it is then surely it should be in the "main" build instructions and not buried in an appendix?

Also - is there a recommended way to test (using DejaGnu?) the built tools?

Thanks again.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#35

Hi,

I'm glad that the two builds were successful. Regarding bash, our systems are configured with bash as the system shell (/bin/sh) so we cannot be sure whether the scripts we provide is bourne shell compliant. We might introduce non bourne shell compliant code in future release so we prefer to leave this message in place until we have appropriate procedure to test the compliance.

You can check the scripts test_installed in the contrib directory of GCC source. You'll need to set the DEJAGNU environment variable to a site.exp file to describe your configuration and you'll also need to set the RUNTESTFLAGS environment variable to tell which board file to use and what option to pass to the testsuite. Check out dejagnu documentation for more details.

Revision history for this message
TM (tm1234) said :
#36

Thanks Thomas.
I guess that the scripts are not actually incompatible with dash right now but I take your point about the possibility that they may be at some stage.
As such I would suggest that the reconfiguration of /bin/sh as bash instead of dash be in the "main" pre-build instructions and not in the appendix.

Thanks for the tips on testing. I will have a look at that as soon as I get a chance.
If you or anybody else needs any clarification on the issues that I found or the suggestions that I have for improving the build instructions please let me know.
If I should log them as an enhancement request somewhere please let me know where.

Thanks
Tommy

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#37

Your feedback here about the documentation is enough for us to be aware of the issue. We'll open an internal ticket to keep track of it. So far I've noted a request for the following improvements:

* add g++ to the list of dependency needed to build the toolchain
* fix the steps to prepare APT's repository list
* move the requirement for bash as /bin/sh more prominent in the documentation
* be more specific about the expected errors when running apt-get update
* clarify which commands need to be run as root or using sudo

Did I miss anything?

Revision history for this message
TM (tm1234) said :
#38

Hi Thomas

> add g++ to the list of dependency needed to build the toolchain

This is not actually necessary as it happens.
I think that the problem arose because the original instructions caused /etc/apt/sources.list to be overwritten.
When the first two steps that do this are skipped then g++ is found once the other packages are installed - presumably because it's a dependency of some other package(s?)?
So the existing pre-build instructions work OK if the first two steps that change /etc/apt/sources.list are skipped.

> Did I miss anything?

Other than the above - no, thanks. :-)

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#39

I'm guessing it's installed as a dependency of apt-src. But I'm not sure we actually apt-src so to be more future-proof it's better to add that dependency.

Best regards.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#40

Hi,

I believe I've addressed all issues but for the bash one. I'm currently considering what is the best course of action for that one.

Best regards.

Revision history for this message
TM (tm1234) said :
#41

Thanks Thomas.
My suggestion would be to specify at the start of the pre-build instructions that users should switch from dash to bash and explain the reason why (even if dash currently works).

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#42

An alternate solution is to start looking for bashism being introduced. There is a tool for that in Ubuntu but we need to make a decision whether it's worth it. It will also depends on whether the current script works by chance (ie there is bashisms but it still works) or the file is actually bourne shell compliant.

Best regards.

Revision history for this message
TM (tm1234) said :
#43

Two follow-up questions...

(1) Will the build instructions be updated in the next release after 6-2017-q1-update?

(2) Are there any instructions anywhere for running a/the test suite on a build of the tools and will these also be included in future releases?

Thanks.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#44

Hi,

(1) 2017Q1 has already been released and contain updated instructions
(2) Look into test_installed script in contrib directory of the GCC source

Best regards.

Revision history for this message
TM (tm1234) said :
#45

Thanks - but I just followed the instructions in 6-2017-q1-update to the letter and got this:

# Start root session
$ sudo su
# Add extra repositories to be used by APT
$ sed -i '/trusty.*universe/!s/$/ universe/' /etc/apt/sources.list
$ cat >/etc/apt/sources.list.d/xenial.list <<EOF
deb http://archive.ubuntu.com/ubuntu xenial main universe
deb-src http://archive.ubuntu.com/ubuntu xenial main universe
deb http://security.ubuntu.com/ubuntu xenial-security main
EOF
# Ensure package for Ubuntu Trusty are chosen by default
$ echo 'APT::Default-Release "trusty";' > /etc/apt/apt.conf.d/00default
# Enable use of 32bit packages
$ dpkg --add-architecture i386
$ apt-get update
E: Type 'universe' is not known on line 2 in source list /etc/apt/sources.list
E: The list of sources could not be read.

so there seems to be something still wrong with the published instructions?

Thanks for the tip on the test suite - I'll look into that.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#46

Can you show what does /etc/apt/sources.list contain?

Best regards.

Revision history for this message
TM (tm1234) said :
#47

Apologies for the delay.

On a pristine Ubuntu 14.04.5 32 bit install this is what sources.list contains:

====================================================================================================

#deb cdrom:[Ubuntu 14.04.5 LTS _Trusty Tahr_ - Release i386 (20160803)]/ trusty main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ie.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ie.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ie.archive.ubuntu.com/ubuntu/ trusty multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-updates multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu trusty-security main restricted
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

====================================================================================================

After running this:

# Add extra repositories to be used by APT
$ sed -i '/trusty.*universe/!s/$/ universe/' /etc/apt/sources.list

====================================================================================================

#deb cdrom:[Ubuntu 14.04.5 LTS _Trusty Tahr_ - Release i386 (20160803)]/ trusty main restricted universe
 universe
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to universe
# newer versions of the distribution. universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty main restricted universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty main restricted universe
 universe
## Major bug fix updates produced after the final release of the universe
## distribution. universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
 universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu universe
## team. Also, please note that software in universe WILL NOT receive any universe
## review or updates from the Ubuntu security team. universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-updates universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-updates universe
 universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu universe
## team, and may not be under a free licence. Please satisfy yourself as to universe
## your rights to use the software. Also, please note that software in universe
## multiverse WILL NOT receive any review or updates from the Ubuntu universe
## security team. universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty multiverse universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty multiverse universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-updates multiverse universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-updates multiverse universe
 universe
## N.B. software from this repository may not have been tested as universe
## extensively as that contained in the main release, although it includes universe
## newer versions of some applications which may provide useful features. universe
## Also, please note that software in backports WILL NOT receive any review universe
## or updates from the Ubuntu security team. universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
 universe
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted universe
deb http://security.ubuntu.com/ubuntu trusty-security universe
deb-src http://security.ubuntu.com/ubuntu trusty-security universe
deb http://security.ubuntu.com/ubuntu trusty-security multiverse universe
deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse universe
 universe
## Uncomment the following two lines to add software from Canonical's universe
## 'partner' repository. universe
## This software is not part of Ubuntu, but is offered by Canonical and the universe
## respective vendors as a service to Ubuntu users. universe
# deb http://archive.canonical.com/ubuntu trusty partner universe
# deb-src http://archive.canonical.com/ubuntu trusty partner universe
 universe
## This software is not part of Ubuntu, but is offered by third-party universe
## developers who want to ship their latest software. universe
deb http://extras.ubuntu.com/ubuntu trusty main universe
deb-src http://extras.ubuntu.com/ubuntu trusty main universe

====================================================================================================

Revision history for this message
TM (tm1234) said :
#48

It seems to be adding "universe" to the end of EVERY line.
I presume that that's not the intention?

Revision history for this message
TM (tm1234) said :
#49

The sed pattern doesn't make sense to me.
It's replacing the end of line with " universe" for all lines that don't match the pattern "trusty.*universe".

In any case what is the point of changing the sources.list given that universe seems to be already configured as a source by default?

What am I missing here...?

Revision history for this message
Manfred Hampl (m-hampl) said :
#50

Suggestion:

Use the command
sudo apt-add-repository universe
That should be all you need to enable the universe repository for trusty
(Probably needs the package python-software-properties installed)

or
check whether "^deb *trusty*universe*" already exists in /etc/apt/sources.list or /etc/apt/sources.list.d/*.list with an appropriate grep command, and only if this is not already present then add the universe repository, but only once for each component, e.g. by adding it to all lines that contain trusty and main

Revision history for this message
TM (tm1234) said :
#51

But isn't universe already enabled in the clean install sources.list that I posted above?
It certainly seems to be enabled when I run the GUI tool that allows sources to be configured.
I did go ahead and tried to build the tools without changing the default installed sources.list at all and the build completed successfully.
Is this instruction for changing sources.list redundant (and erroneous at the moment)?

Revision history for this message
TM (tm1234) said :
#52

> check whether "^deb *trusty*universe*" already exists in /etc/apt/sources.list or /etc/apt/sources.

Did you mean "^deb.*trusty.*universe"?
In the default sources.list installed by a new install of Ubuntu 14.04 32 bit I get this:

root@ubuntu-arm:/home/user# grep "^deb.*trusty.*universe*" /etc/apt/sources.list
deb http://ie.archive.ubuntu.com/ubuntu/ trusty main restricted universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty main restricted universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe
deb http://ie.archive.ubuntu.com/ubuntu/ trusty-backports main restricted multiverse universe
deb-src http://ie.archive.ubuntu.com/ubuntu/ trusty-backports main restricted multiverse universe
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted universe

So presumably that means that no change is required?
In which case the instruction to change sources.list, apart from being wrong, is also totally redundant since the first step is to do an install of Ubuntu 14.04?

Revision history for this message
Manfred Hampl (m-hampl) said :
#53

One of the choices in the initial installation of an Ubuntu system is whether you want universe enabled or not.
It is dependant on this decision, whether it will be already contained in the sources.list file or not.

Revision history for this message
TM (tm1234) said :
#54

Ok - I didn't notice any option to choose software sources while installing and I guess it was enabled by default.
So I guess that the instruction needs to be corrected as it's wrong at the moment and seems to result in an invalid sources.list file and the instruction should also be safe in the presence of a system already configured to use "universe"?
Thanks.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#55

Hi,

Try using instead: sed -i '/trusty.*universe/!s/^deb.*$/& universe/' /etc/apt/sources.list

As Manfred explained, it's possible to have an Ubuntu 14.04 without universe enabled. This is also what happened when doing a chroot with debootstrap for instance which is why our instructions add universe in case it's not already there. Thanks for the suggestion of add-apt-repository however we want an instruction that works for whatever mirror people might use so it would need to be combined with some form of grep to retrieve the mirror used and feed it to add-apt-repository to enable universe.

Revision history for this message
TM (tm1234) said :
#56

Thanks Thomas.

> Try using instead: sed -i '/trusty.*universe/!s/^deb.*$/& universe/' /etc/apt/sources.list

But will that cause problems if universe is already specified?
Or will it result in a duplicate but otherwise innocuous specification of universe?

Regarding the test suite I had a look at .../gcc/contrib/test_installed but how to run it is not obvious to me.
Are there any instructions on what setup/parameters are required?
I tried a few but could not get it to find the gcc compiler.

Thanks

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#57

The sed command line is unnocuous if universe is ralready present:

sed -i '/trusty.*universe/!s/^deb.*$/& universe/' /etc/apt/sources.list

the first part /trusty.*universe/! means the second part is only run if not matching trusty followed by universe
the second part adds universe if there is a line starting by deb

Actually, to be fool proof in the case of a mix of several repository one should probably use instead:

sed -i '/universe/!s/^deb.*trusty.*$/& universe/' /etc/apt/sources.list

Revision history for this message
TM (tm1234) said :
#58

With the test suite I got a bit further when I did this:

../contrib/test_installed --target=arm-none-eabi --with-testsuite=/home/user/Downloads/toolchain/gcc-arm-none-eabi-6-2017-q1-update/src/gcc/gcc/testsuite --prefix=/home/user/Downloads/toolchain/gcc-arm-none-eabi-6-2017-q1-update/install-native/arm-none-eabi --without-gfortran --without-objc --tmpdir=./temp --with-gcc=/home/user/Downloads/toolchain/gcc-arm-none-eabi-6-2017-q1-update/install-native/bin/arm-none-eabi-gcc --with-g++=/home/user/Downloads/toolchain/gcc-arm-none-eabi-6-2017-q1-update/install-native/bin/arm-none-eabi-g++

but I still get this:

Test Run By user on Mon Mar 6 10:45:55 2017
Target is arm-none-eabi
Host is i686-pc-linux-gnu

  === gcc tests ===

Schedule of variations:
    unix

Running target unix
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/user/Downloads/toolchain/gcc-arm-none-eabi-6-2017-q1-update/src/gcc/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
WARNING: Assuming target board is the local machine (which is probably wrong).
You may need to set your DEJAGNU environment variable.

Why is it mentioning unix when this is a bare metal toolchain?
What should I set DEJAGNU to?

Thanks.

Revision history for this message
TM (tm1234) said :
#59

Sorry - posts crossed.
Thanks for the explanation of the sed command Thomas.
That all makes sense now.
I guess that the instructions will updated with this correction next time around?
Thanks again.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#60

Yes they will. I'm sorry they don't work out of the box for this release. I did test them on a chroot but the chroot doesn't have any blank line inside.

As to the DEJAGNU variable, it needs to be set to a site.exp file which describe how to run things on the board you want to run the tests (incl. ARM Fast Models, Qemu, etc.).

Check into dejagnu what kind of board is publicly supported. You will also need to set RUNTESTFLAGS to something like:

RUNTESTFLAGS="--target_board=<boardname>/-mthumb/-mcpu=cortex-m3"

Best regards.

Revision history for this message
TM (tm1234) said :
#61

Thanks Thomas.

> I'm sorry they don't work out of the box for this release. I did test them on a chroot but the chroot doesn't have any blank line inside.

No worries - that's how things get debugged/improved I guess. :-)

Re the test suite would it be possible to publish the command/options used to test the binary builds of the GCC ARM Embedded tools so that I/others can follow the same process when building the tools ourselves?

Revision history for this message
Manfred Hampl (m-hampl) said :
#62

The sed instruction
sed -i '/trusty.*universe/!s/^deb.*$/& universe/' /etc/apt/sources.list

will still produce undesired results in cases where the sources.list file contains
deb //server/ trusty main
deb //server/ trusty restricted
or similar.

"apt-add-repository universe" should work also in that case. There is no need to retrieve the mirror used for this command.
From "usage":
  Examples:
    apt-add-repository 'deb http://myserver/path/to/repo stable myrepo'
    apt-add-repository 'http://myserver/path/to/repo myrepo'
    apt-add-repository 'https://packages.medibuntu.org free non-free'
    apt-add-repository http://extras.ubuntu.com/ubuntu
    apt-add-repository ppa:user/repository
    apt-add-repository multiverse

The very last variant is exactly what you need.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#63

Oh wonderful, thanks Manfred! That should be much more solid indeed. Will change that ASAP.

Revision history for this message
TM (tm1234) said :
#64

Sorry - just in case this got overlooked during recent traffic would anybody have any opinion/feedback on this?

"Re the test suite would it be possible to publish the command/options used to test the binary builds of the GCC ARM Embedded tools so that I/others can follow the same process when building the tools ourselves?"

I was thinking that it might make sense to supplement the build instructions with instructions on how to run the test suite?
After all anybody who builds the tools themselves (e.g. me because I want Linux 32 bit executables which are no longer provided by default) will need to run the test suite so will need instructions.
I realise that there may be general instructions elsewhere for running the gcc test suite but in this case I mean the specific commands/settings/options used to run the test suite on this specific version of gcc (bare metal ARM).

Thanks a lot.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#65

The problem I see is that the configuration we use to run the testsuite is not publicly available. Once it is it would be a nice addition to the How to build document.

Revision history for this message
TM (tm1234) said :
#66

Thanks Thomas.
Is there a reason it's not published?
Telling people how to build the tools but not how to run the test suite is a critical omission in my opinion.
Can anybody post specific details of how to run the test suite in this context?
Thanks.

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#67

Hi,

The reason is that the files are not in a state where they would be accepted (they need to be tidied up) and doing so is a background task. However some people managed to run the testsuite and get similar results to ours so there should be publicly available configurations already.

Best regards.

Revision history for this message
TM (tm1234) said :
#68

Thanks Thomas.
Anybody here got any tips on running the test suite so?
The info posted earlier is insufficient for me to get it running correctly. :-(

Revision history for this message
TM (tm1234) said :
#69

A couple of follow ups...

(1) > As Manfred explained, it's possible to have an Ubuntu 14.04 without universe enabled.

When I install Ubuntu it never gives me any option to choose repositories and universe is enabled by default.

(2) I managed to get the test suite running but I'm not sure what result should be deemed "success".
Is there any info about this anywhere?

(3) In the past The GCC ARM Embedded launchpad binary releases for Linux (32) bit were built on a much older version of Ubuntu than 14.04. This meant that the resulting tools ran on older Linuxes fine - e.g. in my case I'm interested in CentOS/RHEL 6.8. However now that the tools are built on Ubuntu 14.04 they don't run on, say, CentOS 6:

[user@centos bin]$ ./arm-none-eabi-gdb -tui
./arm-none-eabi-gdb: /lib/libc.so.6: version `GLIBC_2.15' not found (required by ./arm-none-eabi-gdb)

Was this a known consequence of the change to use a later Ubuntu to build the tools?
As far as I recall the original build instructions deliberately used an old Ubuntu release in order to maximise compatibility with other Linux distros including ones that might be classed as "old" now.
Has anybody tried following the new instructions but on an older Linux?
I might have to try that.

Regards
Tommy

Revision history for this message
Thomas Preud'homme (thomas-preudhomme) said :
#70

Hi TM,

(1) It depends on what medium you used for installation. If you use debootstrap universe is going to be disabled by default.

(2) You can post your results and we'll tell you if there is any difference

(3) Yes it was a deliberate decision. We had more and more trouble building on an old system. That's more work for us which could be spent doing something more useful (like fixing bugs in the compiler itself rather than the build system).

Best regards,

Thomas

Can you help with this problem?

Provide an answer of your own, or ask TM for more information if necessary.

To post a message you must log in.