package doesn't provide c++ library

Bug #1293024 reported by Sam Lin
58
This bug affects 12 people
Affects Status Importance Assigned to Milestone
gcc-arm-none-eabi (Ubuntu)
Confirmed
Undecided
Unassigned

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)

Revision history for this message
Sam Lin (itrs-lin) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in gcc-arm-none-eabi (Ubuntu):
status: New → Confirmed
Revision history for this message
mateczek (marcof) wrote :

https://packages.debian.org/unstable/main/libstdc++-arm-none-eabi-newlib

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

Revision history for this message
Kees Bakker (keestux) 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
  /usr/lib/gcc/arm-none-eabi/4.8.2/../../../arm-none-eabi/include/c++/4.8.2
and that the libstc++ package installed the files in
  /usr/include/newlib/c++/4.8

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?

Revision history for this message
Kees Bakker (keestux) wrote :

For the time being I have created my own package. I started with git clone of git://anonscm.debian.org/collab-maint/libstdc++-arm-none-eabi.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.

Revision history for this message
Kees Bakker (keestux) wrote :

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

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

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
Revision history for this message
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.

Revision history for this message
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 (http://packages.ubuntu.com/utopic/libstdc++-arm-none-eabi-newlib) by hand.

Revision history for this message
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.