-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 02.06.2012 04:37, Nilesh Govindrajan wrote:
> On Jun 2, 2012 6:08 AM, "walt" wrote:
>
> Has anyone tried compiling chromium 20 (as of yesterday) and
> libreoffice 3.5.4.2 using gcc 4.7.0? I am unable to do so. Using
> unstable Amd64.
>
> -- Nilesh Govindrajan http://nileshgr.com
>
Openoffice: No
Chromium >20: Yes - they're a bit of a PITA...
It won't work without some patches. Mostly missing includes for
unistd.h (in most files is a
#if defined(OS_ANDROID)
#include
#endif
where it is needed (ideally in a #id defined(OS_POSIX) (or LINUX?)
#endif block).
I've got no time to look into the versions 20.x to <21.0.1155.2 and my
custom patch for 21.0.1155.2 also fixes a selinux related issue.
If you google you'll find some other patches (even one on
bugs.gentoo.org) which max work for you (depends on version, I think).
I'll attach my patch for reference.
WKR
Hinnerk
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJPybgeAAoJEJwwOFaNFkYcu2YIAIa3xtDXMD7hFy/7iI5yEhd2
eLE5+GswNKYdCeYRaLvuqQpWJnm2GZj7UQVklxd1qgA2UhxgHCZkiya5Uj8M3va6
iE8e2TfCwAUqkL69/9HAXQh+cuHreq7ZAP9/+1yUaH8NOa9gZluIzyZv/TtO/PiJ
wDK6Zhar/MlpFOrduz3m0gFuJun1fruVGvT9cIWRTDSsMmsGm6l88JNG1YyXtmZV
yoL5ZfT0g+Lw1IJ6C03WEFG8yW/nXjE9wIojjzQoC3fkBmTPNWmcXdz5LzPx8T+P
rc9WQf8IGRQwA8ME8LPEJZdGxZmT170nOs74TqwJOs7F2YGAwL+N0euHF8DCilg=
=16Fc
-END PGP SIGNATURE-
diff -ru chromium-21.0.1155.2/chrome/browser/policy/policy_path_parser_linux.cc chromium-21.0.1155.2.new/chrome/browser/policy/policy_path_parser_linux.cc
--- chromium-21.0.1155.2/chrome/browser/policy/policy_path_parser_linux.cc 2012-05-30 03:47:01.0 +0200
+++ chromium-21.0.1155.2.new/chrome/browser/policy/policy_path_parser_linux.cc 2012-05-30 23:53:01.123823731 +0200
@@ -4,6 +4,10 @@
#include
+//#if defined(OS_POSIX)
+#include
+//#endif
+
#include "chrome/browser/policy/policy_path_parser.h"
#include "base/logging.h"
diff -ru chromium-21.0.1155.2/content/public/common/sandbox_init.cc chromium-21.0.1155.2.new/content/public/common/sandbox_init.cc
--- chromium-21.0.1155.2/content/public/common/sandbox_init.cc 2012-05-30 03:46:30.0 +0200
+++ chromium-21.0.1155.2.new/content/public/common/sandbox_init.cc 2012-05-30 17:09:00.044889918 +0200
@@ -6,6 +6,8 @@
#if defined(OS_ANDROID)
#include
+#elif defined(OS_POSIX)
+#include
#endif
namespace content {
diff -ru chromium-21.0.1155.2/content/zygote/zygote_linux.cc chromium-21.0.1155.2.new/content/zygote/zygote_linux.cc
--- chromium-21.0.1155.2/content/zygote/zygote_linux.cc 2012-05-30 03:46:27.0 +0200
+++ chromium-21.0.1155.2.new/content/zygote/zygote_linux.cc 2012-05-31 04:04:32.072791812 +0200
@@ -31,10 +31,38 @@
#include "content/common/sandbox_methods_linux.h"
#include "content/common/zygote_commands_linux.h"
+#if defined(CHROMIUM_SELINUX)
+#include
+#include
+#endif
+
// See http://code.google.com/p/chromium/wiki/LinuxZygote
namespace content {
+
+#if defined(CHROMIUM_SELINUX)
+static void SELinuxTransitionToTypeOrDie(char const* type) {
+ security_context_t security_context;
+ if (getcon(&security_context))
+LOG(FATAL) << "Cannot get SELinux context";
+
+ context_t context = context_new(security_context);
+ context_type_set(context, type);
+ const int r = setcon(context_str(context));
+ context_free(context);
+ freecon(security_context);
+
+ if (r) {
+LOG(FATAL) << "dynamic transition to type '" << type << "' failed. "
+ "(this binary has been built with SELinux support, but maybe "
+ "the policies haven't been loaded into the kernel?)";
+ }
+}
+#endif // CHROMIUM_SELINUX
+
+
+
namespace {
// NOP function. See below where this handler is installed.
diff -ru chromium-21.0.1155.2/content/zygote/zygote_linux.h chromium-21.0.1155.2.new/content/zygote/zygote_linux.h
--- chromium-21.0.1155.2/content/zygote/zygote_linux.h 2012-05-30 03:46:27.0 +0200
+++ chromium-21.0.1155.2.new/content/zygote/zygote_linux.h 2012-05-31 03:31:16.013928301 +0200
@@ -16,6 +16,8 @@
namespace content {
+static void SELinuxTransitionToTypeOrDie(char const * type);
+
class ZygoteForkDelegate;
// This is the object which implements the zygote. The ZygoteMain function,
@@ -106,7 +108,6 @@
int initial_uma_sample_;
int initial_uma_boundary_value_;
};
-
} // namespace content
#endif // CONTENT_ZYGOTE_ZYGOTE_H_
diff -ru chromium-21.0.1155.2/content/zygote/zygote_main_linux.cc chromium-21.0.1155.2.new/content/zygote/zygote_main_linux.cc
--- chromium-21.0.1155.2/content/zygote/zygote_main_linux.cc 2012-05-30 03:46:27.0 +0200
+++ chromium-21.0.1155.2.new/content/zygote/zygote_main_linux.cc 2012-05-31 04:04:21.383792544 +0200
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "content/zygote/zygote_linux.h"