Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 411543 - www-client/firefox-11.0-r1 fails to build with GCC 4.7
Summary: www-client/firefox-11.0-r1 fails to build with GCC 4.7
Status: RESOLVED DUPLICATE of bug 410557
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 02:06 UTC by Ryan Hill (RETIRED)
Modified: 2012-04-28 05:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (firefox-11.0-r1:20120411-021606.log.gz,235.67 KB, application/x-gzip)
2012-04-11 02:41 UTC, Ryan Hill (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill (RETIRED) gentoo-dev 2012-04-11 02:06:01 UTC
x86_64-pc-linux-gnu-g++ -o file_util.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"Linux3.2\" -DOSARCH=Linux -DEXCLUDE_SKIA_DEPENDENCIES  -DOS_LINUX=1 -DOS_POSIX=1  -I../../dist -I/var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium/src -I/var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I/var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium -I. -I../../dist/include -I../../dist/include/nsprpub  -I/usr/include/nspr -I/usr/include/nss      -fPIC -D_FORTIFY_SOURCE=2 -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -march=native -g -pipe -D_FORTIFY_SOURCE=2 -mno-avx -fno-exceptions -fno-strict-aliasing -std=gnu++0x -pthread -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -g -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/include/libdrm -I/usr/include/gtk-unix-print-2.0   -Os -freorder-blocks  -fomit-frame-pointer  -D_FORTIFY_SOURCE=2 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/file_util.pp /var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium/src/base/file_util.cc
../../../ipc/chromium/src/base/file_util.cc: In function 'FILE* file_util::CreateAndOpenTemporaryFile(FilePath*)':
../../../ipc/chromium/src/base/file_util.cc:197:12: warning: converting 'false' to pointer type 'FILE* {aka _IO_FILE*}' [-Wconversion-null]
../../../ipc/chromium/src/base/file_util.cc: In function 'bool file_util::TruncateFile(FILE*)':
../../../ipc/chromium/src/base/file_util.cc:228:35: error: 'ftruncate' was not declared in this scope


Easy fix, add #include <unistd.h>.  There are usually more, so I'll keep poking at it.
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2012-04-11 02:39:20 UTC
x86_64-pc-linux-gnu-g++ -o message_pump_libevent.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include
 /var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -D_IMPL_
NS_COM -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES 
 -DSTATIC_EXPORTABLE_JS_API -DOSTYPE=\"Linux3.2\" -DOSARCH=Linux -DEXCLUDE_SKIA_DEPENDENCIES  -DOS_LINUX=1 -DOS_POSIX
=1  -I../../dist -I/var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium/src -I/var/tmp/porta
ge/www-client/firefox-11.0-r1/work/mozilla-release/ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I/var/tmp/portage/www-cli
ent/firefox-11.0-r1/work/mozilla-release/ipc/chromium -I. -I../../dist/include -I../../dist/include/nsprpub  -I/usr/i
nclude/nspr -I/usr/include/nss      -fPIC -D_FORTIFY_SOURCE=2 -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -W
synth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=re
turn-type -march=native -g -pipe -D_FORTIFY_SOURCE=2 -mno-avx -fno-exceptions -fno-strict-aliasing -std=gnu++0x -pthr
ead -ffunction-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -g -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-
2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr
/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpn
g15 -I/usr/include/libdrm -I/usr/include/gtk-unix-print-2.0   -Os -freorder-blocks  -fomit-frame-pointer  -D_FORTIFY_
SOURCE=2 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/message_pump_libevent.pp /var/tmp/portage/www
-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium/src/base/message_pump_libevent.cc
../../../ipc/chromium/src/base/message_pump_libevent.cc: In static member function 'static void base::MessagePumpLibe
vent::OnWakeup(int, short int, void*)':
../../../ipc/chromium/src/base/message_pump_libevent.cc:91:45: error: 'read' was not declared in this scope
../../../ipc/chromium/src/base/message_pump_libevent.cc:91:64: error: invalid type in declaration before ';' token
../../../ipc/chromium/src/base/message_pump_libevent.cc: In member function 'bool base::MessagePumpLibevent::Init()':
../../../ipc/chromium/src/base/message_pump_libevent.cc:109:15: error: 'pipe' was not declared in this scope
../../../ipc/chromium/src/base/message_pump_libevent.cc: In destructor 'virtual base::MessagePumpLibevent::~MessagePumpLibevent()':
../../../ipc/chromium/src/base/message_pump_libevent.cc:140:26: error: 'close' was not declared in this scope
../../../ipc/chromium/src/base/message_pump_libevent.cc:142:27: error: 'close' was not declared in this scope
../../../ipc/chromium/src/base/message_pump_libevent.cc: In member function 'virtual void base::MessagePumpLibevent::ScheduleWork()':
../../../ipc/chromium/src/base/message_pump_libevent.cc:359:56: error: 'write' was not declared in this scope
../../../ipc/chromium/src/base/message_pump_libevent.cc:359:75: error: invalid type in declaration before ';' token
make[6]: *** [message_pump_libevent.o] Error 1


x86_64-pc-linux-gnu-g++ -o file_util_linux.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /var/
tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM
 -DEXPORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTA
TIC_EXPORTABLE_JS_API -DOSTYPE=\"Linux3.2\" -DOSARCH=Linux -DEXCLUDE_SKIA_DEPENDENCIES  -DOS_LINUX=1 -DOS_POSIX=1  -I
../../dist -I/var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium/src -I/var/tmp/portage/www
-client/firefox-11.0-r1/work/mozilla-release/ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I/var/tmp/portage/www-client/fi
refox-11.0-r1/work/mozilla-release/ipc/chromium -I. -I../../dist/include -I../../dist/include/nsprpub  -I/usr/include
/nspr -I/usr/include/nss      -fPIC -D_FORTIFY_SOURCE=2 -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth 
-Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-t
ype -march=native -g -pipe -D_FORTIFY_SOURCE=2 -mno-avx -fno-exceptions -fno-strict-aliasing -std=gnu++0x -pthread -f
function-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -g -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/in
clude -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/inclu
de/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I
/usr/include/libdrm -I/usr/include/gtk-unix-print-2.0   -Os -freorder-blocks  -fomit-frame-pointer  -D_FORTIFY_SOURCE
=2 -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/file_util_linux.pp /var/tmp/portage/www-client/fire
fox-11.0-r1/work/mozilla-release/ipc/chromium/src/base/file_util_linux.cc
../../../ipc/chromium/src/base/file_util_linux.cc: In function 'bool file_util::CopyFile(const FilePath&, const FileP
ath&)':
../../../ipc/chromium/src/base/file_util_linux.cc:43:17: error: 'close' was not declared in this scope
../../../ipc/chromium/src/base/file_util_linux.cc:52:74: error: 'read' was not declared in this scope
../../../ipc/chromium/src/base/file_util_linux.cc:52:93: error: invalid type in declaration before ';' token
../../../ipc/chromium/src/base/file_util_linux.cc:62:133: error: 'write' was not declared in this scope
../../../ipc/chromium/src/base/file_util_linux.cc:62:152: error: invalid type in declaration before ';' token
../../../ipc/chromium/src/base/file_util_linux.cc:74:29: error: 'close' was not declared in this scope
../../../ipc/chromium/src/base/file_util_linux.cc:74:48: error: invalid type in declaration before ';' token
../../../ipc/chromium/src/base/file_util_linux.cc:76:30: error: 'close' was not declared in this scope
../../../ipc/chromium/src/base/file_util_linux.cc:76:49: error: invalid type in declaration before ';' token
make[6]: *** [file_util_linux.o] Error 1


x86_64-pc-linux-gnu-g++ -o time_posix.o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /var/tmp/p
ortage/www-client/firefox-11.0-r1/work/mozilla-release/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -D_IMPL_NS_COM -DEX
PORT_XPT_API -DEXPORT_XPTC_API -D_IMPL_NS_GFX -D_IMPL_NS_WIDGET -DIMPL_XREAPI -DIMPL_NS_NET -DIMPL_THEBES  -DSTATIC_E
XPORTABLE_JS_API -DOSTYPE=\"Linux3.2\" -DOSARCH=Linux -DEXCLUDE_SKIA_DEPENDENCIES  -DOS_LINUX=1 -DOS_POSIX=1  -I../..
/dist -I/var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium/src -I/var/tmp/portage/www-clie
nt/firefox-11.0-r1/work/mozilla-release/ipc/glue -I../../ipc/ipdl/_ipdlheaders  -I/var/tmp/portage/www-client/firefox
-11.0-r1/work/mozilla-release/ipc/chromium -I. -I../../dist/include -I../../dist/include/nsprpub  -I/usr/include/nspr
 -I/usr/include/nss      -fPIC -D_FORTIFY_SOURCE=2 -fno-rtti -Wall -Wpointer-arith -Woverloaded-virtual -Wsynth -Wno-
ctor-dtor-privacy -Wno-non-virtual-dtor -Wcast-align -Wno-invalid-offsetof -Wno-variadic-macros -Werror=return-type -
march=native -g -pipe -D_FORTIFY_SOURCE=2 -mno-avx -fno-exceptions -fno-strict-aliasing -std=gnu++0x -pthread -ffunct
ion-sections -fdata-sections -pipe -DNDEBUG -DTRIMMED -g -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include
 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gl
ib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng15 -I/usr/
include/libdrm -I/usr/include/gtk-unix-print-2.0   -Os -freorder-blocks  -fomit-frame-pointer  -D_FORTIFY_SOURCE=2 -D
MOZILLA_CLIENT -include ../../mozilla-config.h -MD -MF .deps/time_posix.pp /var/tmp/portage/www-client/firefox-11.0-r
1/work/mozilla-release/ipc/chromium/src/base/time_posix.cc
/var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/ipc/chromium/src/base/time_posix.cc:181:2: error: #error No usable tick clock function on this platform.
make[6]: *** [time_posix.o] Error 1


 521 configure:11687: checking for clock_gettime(CLOCK_MONOTONIC) and -lrt
 522 configure:11700: x86_64-pc-linux-gnu-gcc -o conftest -march=native -g -pipe -D_FORTIFY_SOURCE=2 -mno-avx -fno-strict-aliasing -pthread -D_FORTIFY_SOURCE=2 -lpthread -Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -lrt conftest.     c -ldl  1>&5
 523 /var/tmp/portage/www-client/firefox-11.0-r1/temp/cctzH9iH.o: In function `main':
 524 /var/tmp/portage/www-client/firefox-11.0-r1/work/mozilla-release/obj-x86_64-unknown-linux-gnu/configure:11696: undefined reference to `clock_gettime'
 525 collect2: error: ld returned 1 exit status
 526 configure: failed program was:
 527 #line 11692 "configure"
 528 #include "confdefs.h"
 529 #include <time.h>
 530 int main() {
 531  struct timespec ts;
 532                               clock_gettime(CLOCK_MONOTONIC, &ts);
 533 ; return 0; }


Needs to include <time.h>.
Comment 2 Ryan Hill (RETIRED) gentoo-dev 2012-04-11 02:41:17 UTC
Created attachment 308479 [details]
build log
Comment 3 Ryan Hill (RETIRED) gentoo-dev 2012-04-11 02:42:46 UTC
Uh, scratch that last one.  It already includes <time.h>.  Not sure what the problem is then.
Comment 4 Jory A. Pratt gentoo-dev 2012-04-11 11:55:07 UTC

*** This bug has been marked as a duplicate of bug 410557 ***
Comment 5 Tolga Dalman 2012-04-11 11:57:19 UTC
Ryan, could you test out whether a plain test for clock_gettime() works ?
I.e., create clock_gettime.c:

#include <time.h>
int main() {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return 0; 
}

and compile it with 'gcc -lrt clock_gettime.c'. If that works, you can successively try adding the other compile flags. Thanks.