clang cannot find stddef.h

Bug #1198123 reported by Pavol Klačanský
82
This bug affects 17 people
Affects Status Importance Assigned to Milestone
llvm-defaults (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

/usr/include/stdlib.h:32:10: fatal error: 'stddef.h' file not found
#include <stddef.h>

I am getting this error

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: clang 1:3.2-19
ProcVersionSignature: Ubuntu 3.9.0-1.5-generic 3.9.1
Uname: Linux 3.9.0-1-generic x86_64
ApportVersion: 2.10.2-0ubuntu3
Architecture: amd64
Date: Fri Jul 5 11:00:39 2013
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-04-26 (69 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: llvm-defaults
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Pavol Klačanský (pavolzetor-deactivatedaccount) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in llvm-defaults (Ubuntu):
status: New → Confirmed
Revision history for this message
Mike G (bluplr) wrote :

Also affects me since upgrading to ubuntu 13.10 last night.

Revision history for this message
Kirit Sælensminde (kayess) wrote :

stdarg.h also seems to be affected.

Revision history for this message
Kirit Sælensminde (kayess) wrote :

The following seems to work as a workaround for me:

cd /usr/lib/clang/3.2/
sudo ln -s /usr/lib/llvm-3.2/lib/clang/3.2/include

It looks like there's a mismatch between where the include files are installed to and where clang expects to find them

Diagnosed with the help of:

echo '#include <stdarg.h>' | clang -xc -v -

Revision history for this message
Andy Buckley (andy-insectnation) wrote :

Thanks for the workaround: works for me. The problem is still there in vanilla 13.10.

Andy

Revision history for this message
Stephen Sinclair (radarsat1) wrote :

This workaround also fixed it for me.

Revision history for this message
Nick Andrik (andrikos) wrote :

I'm marking this as duplicate of another similar bug, because it includes more information.
I will copy the workaround solution also there, thanks Kirit!

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.