package doesn't provide c++ library

Bug #1293024 reported by Sam Lin on 2014-03-16
This bug affects 12 people
Affects Status Importance Assigned to Milestone
gcc-arm-none-eabi (Ubuntu)

Bug Description

gcc-arm-none-eabi/libnewlib-arm-none-eabi doesn't provide c++ library.

the gcc-arm-none-eabi package provided by ppa:terry.guo/gcc-arm-embedded contains libstdc++.a
but official gcc-arm-none-eabi/libnewlib-arm-none-eabi package doesn't.

that caused obvious compilation error:

/usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/bin/ld: cannot find -lstdc++

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gcc-arm-none-eabi 4.8.2-14ubuntu1+6
ProcVersionSignature: Ubuntu 3.13.0-15.35-generic 3.13.5
Uname: Linux 3.13.0-15-generic x86_64
ApportVersion: 2.13.3-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Sun Mar 16 12:18:12 2014
InstallationDate: Installed on 2011-12-24 (812 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
SourcePackage: gcc-arm-none-eabi
UpgradeStatus: Upgraded to trusty on 2014-03-04 (11 days ago)

Sam Lin (itrs-lin) wrote :
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gcc-arm-none-eabi (Ubuntu):
status: New → Confirmed
mateczek (marcof) wrote :

On Ubuntu 14.4 there is a lack this package. After installing this package, the sample project in C++ to build a successful

keestux (kees-bakker-xs4all) wrote :

After installing libstc++-arm-none-eabi-newlib (4.8.2-16+1) I'm getting:
  fatal error: cstddef: No such file or directory

The reason is a mismatch between the compiler looking in
and that the libstc++ package installed the files in

That looks totally off but it is only 4.8 that should have been 4.8.2

For the curious among us.

$ ls -l /usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/include
lrwxrwxrwx 1 root root 43 Apr 21 22:54 /usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/include -> /etc/alternatives/gcc-arm-none-eabi-include

$ ls -l /etc/alternatives/gcc-arm-none-eabi-include
lrwxrwxrwx 1 root root 19 Apr 21 22:54 /etc/alternatives/gcc-arm-none-eabi-include -> /usr/include/newlib

$ ls -l /usr/include/newlib/c++
total 4
drwxr-xr-x 12 root root 4096 Apr 27 22:17 4.8

As a quick workaround I created a symlink

# ln -s 4.8 /usr/include/newlib/c++/4.8.2

Which of the two packages is configured incorrectly? gcc-arm-none-eabi or libstdc++-arm-none-eabi-newlib?

keestux (kees-bakker-xs4all) wrote :

For the time being I have created my own package. I started with git clone of git:// and commit a4128a0.
Next I applied a patch to change BASE-VER in FULL-VER. Maybe this is not exactly how it should be done, but I simply couldn't find another way.

Now the include directory of the installation is /usr/include/newlib/c++/4.8.2 and arm-none-eabi-g++ is happy.

keestux (kees-bakker-xs4all) wrote :

This is a patch to create a package which installs the include files in the directory where the compiler expects them.

The attachment "0001-Use-FULL-VER-instead-of-BASE-VER.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Jeremy Herbert (jeremyherbert) wrote :

I can confirm this problem on a fresh install of Xubuntu 14.04 today. The patch from keestux solves the problem for me.

Pere Tuset (peretuset) wrote :

I have the same problem in Ubuntu 14.04 LTS but have been able to fix it by installing the libstdc++-arm-none-eabi-newlib package ( by hand.

Mike Purvis (mikepurvis) wrote :

Yes, please bring libstdc++-arm-none-eabi-newlib into Trusty!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers