freaking1 / crashpad

Automatically exported from code.google.com/p/crashpad
0 stars 0 forks source link

Linux compilation errors #6

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Steps to reproduce:

$ cd somewhere
$ mkdir crashpad
$ cd crashpad
$ gclient config --unmanaged 
https://chromium.googlesource.com/crashpad/crashpad.git
$ gclient sync
$ cd crashpad
$ ninja -C out/Debug
...

../../third_party/mini_chromium/mini_chromium/base/strings/string16.cc:45:36: 
error: use of undeclared identifier 'memmove'; did you mean 'wmemmove'?
  return reinterpret_cast<char16*>(memmove(s1, s2, n * sizeof(char16)));
                                   ^~~~~~~
                                   wmemmove
/usr/include/wchar.h:331:17: note: 'wmemmove' declared here
extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
                ^
../../third_party/mini_chromium/mini_chromium/base/strings/string16.cc:45:44: 
error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 
'char16 *' (aka 'unsigned short *')
  return reinterpret_cast<char16*>(memmove(s1, s2, n * sizeof(char16)));
                                           ^~
/usr/include/wchar.h:331:36: note: passing argument to parameter '__s1' here
extern wchar_t *wmemmove (wchar_t *__s1, __const wchar_t *__s2, size_t __n)
                                   ^
../../third_party/mini_chromium/mini_chromium/base/strings/string16.cc:49:36: 
error: use of undeclared identifier 'memcpy'; did you mean 'wmemcpy'?
  return reinterpret_cast<char16*>(memcpy(s1, s2, n * sizeof(char16)));
                                   ^~~~~~
                                   wmemcpy
/usr/include/wchar.h:326:17: note: 'wmemcpy' declared here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
                ^
../../third_party/mini_chromium/mini_chromium/base/strings/string16.cc:49:43: 
error: cannot initialize a parameter of type 'wchar_t *' with an lvalue of type 
'char16 *' (aka 'unsigned short *')
  return reinterpret_cast<char16*>(memcpy(s1, s2, n * sizeof(char16)));
                                          ^~
/usr/include/wchar.h:326:46: note: passing argument to parameter '__s1' here
extern wchar_t *wmemcpy (wchar_t *__restrict __s1,
                                             ^
4 errors generated.

Original issue reported on code.google.com by tfar...@chromium.org on 14 Dec 2014 at 1:19

GoogleCodeExporter commented 8 years ago
Crashpad is not supposed to work on Linux yet. There is no reason to have a bug 
for that at this point.

mini_chromium is supposed to work on Linux, and your build log shows a problem 
compiling mini_chromium for Linux. 

I fixed the problem from your build log in 
https://chromium.googlesource.com/chromium/mini_chromium/+/8c599712d10ca3be55251
ff28f400edfcff5dcfd. I also fixed other Linux build problems in 
https://chromium.googlesource.com/chromium/mini_chromium/+/e38cddb8357190387a06a
680787979781b3d5f04 and 
https://chromium.googlesource.com/chromium/mini_chromium/+/ef991f44ed63341035e7d
3657a430af5e2e2668b.

Original comment by mark@chromium.org on 17 Dec 2014 at 9:08