The default bug view has changed. See this FAQ.

gcc LTO compilation error in crashreporter_gtk_common.cpp

RESOLVED FIXED in mozilla18

Status

()

Toolkit
Breakpad Integration
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Martin Liška, Assigned: Six)

Tracking

Trunk
mozilla18
x86_64
Linux
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.15 Safari/536.5

Steps to reproduce:

.mozconfig:

mk_add_options MOZ_MAKE_FLAGS=-j16
ac_add_options --enable-application=browser                                     
ac_add_options --enable-libxul                                                  
ac_add_options --enable-optimize                                                
ac_add_options --disable-tests     
ac_add_options --disable-libjpeg-turbo
ac_add_options --disable-necko-wifi

CXX=/aux/marxin/gcc/gcc-bin/bin_install/usr/local/bin/g++ -fuse-linker-plugin  -fpermissive -static-libstdc++
CC=/aux/marxin/gcc/gcc-bin/bin_install/usr/local/bin/gcc -flto -fuse-linker-plugin

Fix hint:
adding #include <unistd.h> in the problematic file?




Actual results:

/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp: In function 'bool RestartApplication()':
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:106:20: error: 'fork' was not declared in this scope
   pid_t pid = fork();
                    ^
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:110:30: error: 'execv' was not declared in this scope
     (void)execv(argv[0], argv);
                              ^
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:111:12: error: '_exit' was not declared in this scope
     _exit(1);
            ^
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp: In function 'bool UIMoveFile(const string&, const string&)':
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:423:21: error: 'vfork' was not declared in this scope
   pid_t pID = vfork();
                     ^
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:434:5: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     };
     ^
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:436:32: error: 'execve' was not declared in this scope
       execve("/bin/mv", args, 0);
                                ^
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp: In function 'bool UIDeleteFile(const string&)':
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:450:30: error: 'unlink' was not declared in this scope
   return (unlink(file.c_str()) != -1);
                              ^
/aux/marxin/mozilla/toolkit/crashreporter/client/crashreporter_gtk_common.cpp:451:1: error: control reaches end of non-void function [-Werror=return-type]
 }
(Assignee)

Comment 1

5 years ago
Created attachment 659701 [details] [diff] [review]
add #include <unistd.h> to crashreporter_gtk_common.cpp
(Assignee)

Comment 2

5 years ago
I'm having the same issue :

$>cat .mozconfig
mk_add_options MOZ_MAKE_FLAGS="CC='gcc' CXX='g++ -std=c++11' -j4"
ac_add_options --enable-debug

gcc version 4.7.1 (Debian 4.7.1-7)
on Debian 2.6.32-5-amd64
Assignee: nobody → six.dsn
Attachment #659701 - Attachment description: add #include <unistd.h> to crash_reporter_gtk_common.cpp → add #include <unistd.h> to crashreporter_gtk_common.cpp
Component: Untriaged → Breakpad Integration
Product: Firefox → Toolkit
(Assignee)

Comment 3

5 years ago
Created attachment 659849 [details] [diff] [review]
add #include <unistd.h> to crashreporter_gtk_common.cpp to fix Linux x86_64 build issue
Attachment #659701 - Attachment is obsolete: true
Attachment #659849 - Flags: review?(ted.mielczarek)
Comment on attachment 659849 [details] [diff] [review]
add #include <unistd.h> to crashreporter_gtk_common.cpp to fix Linux x86_64 build issue

Review of attachment 659849 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for the patch!
Attachment #659849 - Flags: review?(ted.mielczarek) → review+
Keywords: checkin-needed
https://hg.mozilla.org/integration/mozilla-inbound/rev/96287ad60bef
Flags: in-testsuite-
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/96287ad60bef
Status: UNCONFIRMED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla18
You need to log in before you can comment on or make changes to this bug.