I'm a bit out of my comfort zone here, but little digging suggests it has something to do with --as-needed of ld/binutils, not gcc 4.6. For Ubuntu default seems different than in e.g. SUSE. Sorry for confusion.
---clip---
make check-am
make[2]: Entering directory `/home/abuild/rpmbuild/BUILD/upstart-1.4/init'
make test_system test_environ test_process test_job_class test_job_process test_job test_log test_event test_event_operator test_blocked test_parse_job test_parse_conf test_conf test_control
make[3]: Entering directory `/home/abuild/rpmbuild/BUILD/upstart-1.4/init'
CC test_system.o
CCLD test_system
CC test_environ.o
CCLD test_environ
CC test_process.o
CCLD test_process
/usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld: job_process.o: undefined reference to symbol 'clock_gettime@@GLIBC_2.2'
/usr/lib/gcc/i586-suse-linux/4.6/../../../../i586-suse-linux/bin/ld: note: 'clock_gettime@@GLIBC_2.2' is defined in DSO /lib/librt.so.1 so try adding it to the linker command line
/lib/librt.so.1: could not read symbols: Invalid operation
To me, it only makes sense Upstart should explicitly list the required libraries for the linker.
I'm a bit out of my comfort zone here, but little digging suggests it has something to do with --as-needed of ld/binutils, not gcc 4.6. For Ubuntu default seems different than in e.g. SUSE. Sorry for confusion.
Demonstration of failure here in openSUSE build system: /build. opensuse. org/package/ live_build_ log?arch= i586&package= upstart& project= home%3Atuomotan skanen& repository= openSUSE_ 12.1_standard_ x86_64_ i586
https:/
---clip--- abuild/ rpmbuild/ BUILD/upstart- 1.4/init' abuild/ rpmbuild/ BUILD/upstart- 1.4/init' gcc/i586- suse-linux/ 4.6/../ ../../. ./i586- suse-linux/ bin/ld: job_process.o: undefined reference to symbol 'clock_ gettime@ @GLIBC_ 2.2' gcc/i586- suse-linux/ 4.6/../ ../../. ./i586- suse-linux/ bin/ld: note: 'clock_ gettime@ @GLIBC_ 2.2' is defined in DSO /lib/librt.so.1 so try adding it to the linker command line
make check-am
make[2]: Entering directory `/home/
make test_system test_environ test_process test_job_class test_job_process test_job test_log test_event test_event_operator test_blocked test_parse_job test_parse_conf test_conf test_control
make[3]: Entering directory `/home/
CC test_system.o
CCLD test_system
CC test_environ.o
CCLD test_environ
CC test_process.o
CCLD test_process
/usr/lib/
/usr/lib/
/lib/librt.so.1: could not read symbols: Invalid operation
To me, it only makes sense Upstart should explicitly list the required libraries for the linker.