[Bug 882954] [NEW] gcc fails to compile legal code
Sandy Harris
sandyinchina at gmail.com
Fri Oct 28 07:37:19 UTC 2011
Public bug reported:
I am working on a program (ftp://ftp.cs.sjtu.edu.cn:990/sandy/maxwell/).
It compiled fine until I upgraded to Xubuntu 11.10, but now it fails
with " undefined reference to `clock_gettime'".
I am including time.h as man clock-gettime says I should.
Compiling on a different Ubuntu system (11.04) works fine.
cpp timermod.c | grep clock_gettime seems to show it is being defined.
I am baffled. Here is a tiny program that also fails to compile, and
gives the sane error:
#include <time.h>
unsigned timetest()
{
struct timespec t ;
return( clock_gettime(CLOCK_REALTIME,&t)) ;
}
** Affects: gcc-defaults (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/882954
Title:
gcc fails to compile legal code
Status in “gcc-defaults” package in Ubuntu:
New
Bug description:
I am working on a program
(ftp://ftp.cs.sjtu.edu.cn:990/sandy/maxwell/). It compiled fine until
I upgraded to Xubuntu 11.10, but now it fails with " undefined
reference to `clock_gettime'".
I am including time.h as man clock-gettime says I should.
Compiling on a different Ubuntu system (11.04) works fine.
cpp timermod.c | grep clock_gettime seems to show it is being defined.
I am baffled. Here is a tiny program that also fails to compile, and
gives the sane error:
#include <time.h>
unsigned timetest()
{
struct timespec t ;
return( clock_gettime(CLOCK_REALTIME,&t)) ;
}
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/882954/+subscriptions
More information about the foundations-bugs
mailing list