linux:chromium:cef

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
linux:chromium:cef [2019/05/14 13:39] – [参考文献] ともやんlinux:chromium:cef [2019/05/18 02:23] (現在) – 外部編集 非ログインユーザー
行 3: 行 3:
  
 ===== フレームワークのダウンロード ===== ===== フレームワークのダウンロード =====
-[[https://bitbucket.org/chromiumembedded/cef|chromiumembedded / cef — Bitbucket]] の Binary Distributions - [[http://opensource.spotify.com/cefbuilds/index.html|CEF Automated Builds]] より [[http://opensource.spotify.com/cefbuilds/cef_binary_3.3626.1886.g162fdec_linux64.tar.bz2|cef_binary_3.3626.1886.g162fdec_linux64.tar.bz2]](フレームワークのバイナリディストリビューション)をダウンロードする。\\+[[https://bitbucket.org/chromiumembedded/cef|chromiumembedded / cef — Bitbucket]] の Binary Distributions - [[http://opensource.spotify.com/cefbuilds/index.html|CEF Automated Builds]] より [[http://opensource.spotify.com/cefbuilds/cef_binary_74.1.16%2Bge20b240%2Bchromium-74.0.3729.131_linux64.tar.bz2|cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64.tar.bz2]](フレームワークのバイナリディストリビューション)をダウンロードする。\\
  
 ===== フレームワーク入門 ===== ===== フレームワーク入門 =====
行 29: 行 29:
 Chromium Embedded Framework (CEF) のバイナリディストリビューションを解凍する。 Chromium Embedded Framework (CEF) のバイナリディストリビューションを解凍する。
 <code> <code>
-$ tar jxvf cef_binary_3.3626.1886.g162fdec_linux64.tar.bz2+$ tar jxvf cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64.tar.bz2
 </code> </code>
 Makefile を生成する。 Makefile を生成する。
 <code> <code>
-$ cd cef_binary_3.3626.1886.g162fdec_linux64+$ cd cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/
 $ mkdir build && cd build $ mkdir build && cd build
 $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug .. $ cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug ..
行 39: 行 39:
 <WRAP prewrap 100%> <WRAP prewrap 100%>
 <code> <code>
--- The C compiler identification is GNU 8.2.1 +-- The C compiler identification is GNU 9.1.1 
--- The CXX compiler identification is GNU 8.2.1+-- The CXX compiler identification is GNU 9.1.1
 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc
 -- Check for working C compiler: /usr/bin/cc -- works -- Check for working C compiler: /usr/bin/cc -- works
行 60: 行 60:
   CMake variable CEF_ROOT is set to:   CMake variable CEF_ROOT is set to:
  
-    /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64+    /home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64
  
   For compatibility, CMake is ignoring the variable.   For compatibility, CMake is ignoring the variable.
 This warning is for project developers.  Use -Wno-dev to suppress it. This warning is for project developers.  Use -Wno-dev to suppress it.
  
 +-- Performing Test COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE
 +-- Performing Test COMPILER_SUPPORTS_NO_UNDEFINED_VAR_TEMPLATE - Success
 -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS
 -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success -- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success
行 76: 行 78:
 -- Project architecture:         x86_64 -- Project architecture:         x86_64
 -- Build type:                   Debug -- Build type:                   Debug
--- Binary distribution root:     /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64+-- Binary distribution root:     /home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64
 -- CEF sandbox:                  ON -- CEF sandbox:                  ON
 -- Standard libraries:           X11 -- Standard libraries:           X11
行 85: 行 87:
 -- C compile flags (Debug):      -O0;-g  -- C compile flags (Debug):      -O0;-g 
 -- C compile flags (Release):    -O2;-fdata-sections;-ffunction-sections;-fno-ident;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2  -- C compile flags (Release):    -O2;-fdata-sections;-ffunction-sections;-fno-ident;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2 
--- C++ compile flags:            -fno-strict-aliasing;-fPIC;-fstack-protector;-funwind-tables;-fvisibility=hidden;--param=ssp-buffer-size=4;-pipe;-pthread;-Wall;-Werror;-Wno-missing-field-initializers;-Wno-unused-parameter;-Wno-error=comment;-Wno-comment;-m64;-march=x86-64 -fno-exceptions;-fno-rtti;-fno-threadsafe-statics;-fvisibility-inlines-hidden;-std=gnu++11;-Wsign-compare;-Wno-literal-suffix;-Wno-narrowing+-- C++ compile flags:            -fno-strict-aliasing;-fPIC;-fstack-protector;-funwind-tables;-fvisibility=hidden;--param=ssp-buffer-size=4;-pipe;-pthread;-Wall;-Werror;-Wno-missing-field-initializers;-Wno-unused-parameter;-Wno-error=comment;-Wno-comment;-m64;-march=x86-64 -fno-exceptions;-fno-rtti;-fno-threadsafe-statics;-fvisibility-inlines-hidden;-std=gnu++11;-Wsign-compare;-Wno-undefined-var-template;-Wno-literal-suffix;-Wno-narrowing;-Wno-attributes
 -- C++ compile flags (Debug):    -O0;-g  -- C++ compile flags (Debug):    -O0;-g 
 -- C++ compile flags (Release):  -O2;-fdata-sections;-ffunction-sections;-fno-ident;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2  -- C++ compile flags (Release):  -O2;-fdata-sections;-ffunction-sections;-fno-ident;-U_FORTIFY_SOURCE;-D_FORTIFY_SOURCE=2 
行 98: 行 100:
 -- Configuring done -- Configuring done
 -- Generating done -- Generating done
--- Build files have been written to: /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/build+-- Build files have been written to: /home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/build
 </code> </code>
 </WRAP> </WRAP>
行 107: 行 109:
 <WRAP prewrap 100%> <WRAP prewrap 100%>
 <code> <code>
-In file included from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/value_ctocpp.h:25, +Scanning dependencies of target cef_gtest 
-                 from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc:16: +Scanning dependencies of target libcef_dll_wrapper 
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:78:27: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] + 0%Building CXX object tests/gtest/CMakeFiles/cef_gtest.dir/src/gtest-all.cc.o 
-   void UnderlyingAddRef() const { + 0%Building CXX object libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/shutdown_checker.cc.o 
-                           ^~~~~ + 1%Building CXX object libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/base/cef_atomicops_x86_gcc.cc.o 
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:86:28: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +〜省略〜 
-   bool UnderlyingRelease() const { +65%Building CXX object tests/cefclient/CMakeFiles/cefclient.dir/browser/scheme_test.cc.o
-                            ^~~~~ +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:95:30: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +
-   bool UnderlyingHasOneRef() const { +
-                              ^~~~~ +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:104:37: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +
-   bool UnderlyingHasAtLeastOneRef() const { +
-                                     ^~~~~ +
-cc1plus: all warnings being treated as errors +
-make[2]: *** [libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/build.make:219: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/accessibility_handler_cpptoc.cc.o] エラー 1 +
-make[2]: *** 未完了のジョブを待っています.... +
-In file included from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/command_line_ctocpp.h:26, +
-                 from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/cpptoc/app_cpptoc.cc:19: +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:78:27: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +
-   void UnderlyingAddRef() const { +
-                           ^~~~~ +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:86:28: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +
-   bool UnderlyingRelease() const { +
-                            ^~~~~ +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:95:30: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +
-   bool UnderlyingHasOneRef() const { +
-                              ^~~~~ +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:104:37: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +
-   bool UnderlyingHasAtLeastOneRef() const { +
-                                     ^~~~~ +
-In file included from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/scheme_registrar_ctocpp.h:25, +
-                 from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/cpptoc/app_cpptoc.cc:20: +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_scoped.h:184:14: エラー: ‘cfi-icall’ attribute directive ignored [-Werror=attributes] +
-     void* ptr) { +
-              ^ +
-cc1plus: all warnings being treated as errors +
-make[2]: *** [libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/build.make:232: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/cpptoc/app_cpptoc.cc.o] エラー 1 +
-make[1]: *** [CMakeFiles/Makefile2:91: libcef_dll_wrapper/CMakeFiles/libcef_dll_wrapper.dir/all] エラー 2 +
-make: *** [Makefile:84: all] エラー 2 +
-</code> +
-</WRAP> +
-ビルドエラーが発生してコンパイルが停止してしまった。\\ +
-[[https://www.magpcss.org/ceforum/viewtopic.php?f=6&t=16313|CEF Forum • Building new version fails with attribute directive ignored]] に同じケースのエラーの対処が載っていたので、それを参考に ../cmake/cef_variables.cmake を修正する。\\ +
-<code> +
-$ vi ../cmake/cef_variables.cmake +
-</code> +
-<file autoconf cmake/cef_variables.cmake> +
-+
-# Linux configuration. +
-#+
  
-if(OS_LINUX) +*** Run the following command manually to set SUID permissions *** 
-  # Platform-specific compiler/linker flags. +EXE="/home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/build/tests/cefsimple/Debug/chrome-sandbox&& sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE
-  set(CEF_LIBTYPE SHARED) +
-  list(APPEND CEF_COMPILER_FLAGS +
-    -fno-strict-aliasing            # Avoid assumptions regarding non-aliasing of objects of different types +
-    -fPIC                           # Generate position-independent code for shared libraries +
-    -fstack-protector               # Protect some vulnerable functions from stack-smashing (security feature) +
-    -funwind-tables                 # Support stack unwinding for backtrace() +
-    -fvisibility=hidden             # Give hidden visibility to declarations that are not explicitly marked as visible +
-    --param=ssp-buffer-size=4       # Set the minimum buffer size protected by SSP (security feature, related to stack-protector) +
-    -pipe                           # Use pipes rather than temporary files for communication between build stages +
-    -pthread                        # Use the pthread library +
-    -Wall                           # Enable all warnings +
-#    -Werror                         # Treat warnings as errors +
-    -Wno-missing-field-initializers # Don't warn about missing field initializers +
-    -Wno-unused-parameter           # Don't warn about unused parameters +
-    -Wno-error=comment              # Don't warn about code in comments +
-    -Wno-comment                    # Don't warn about code in comments +
-    ) +
-</file> +
-**-Werror**コンパイラオプションを無効にする。\\ +
-\\ +
-再度 CEF をビルドする。 +
-<code> +
-$ make -j4 +
-</code> +
-<WRAP prewrap 100%> +
-<code> +
-CMake Warning (dev) at CMakeLists.txt:187 (find_package): +
-  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables. +
-  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy +
-  command to set the policy and suppress this warning.+
  
-  CMake variable CEF_ROOT is set to: +[ 65%] Built target cefsimple 
- +[ 66%] Building CXX object tests/cefclient/CMakeFiles/cefclient.dir/browser/server_test.cc.o
-    /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64 +
- +
-  For compatibility, CMake is ignoring the variable. +
-This warning is for project developers.  Use -Wno-dev to suppress it. +
-〜省略〜 +
-In file included from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/value_ctocpp.h:25, +
-                 from /home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/cpptoc/accessibility_handler_cpptoc.cc:16: +
-/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/libcef_dll/ctocpp/ctocpp_ref_counted.h:78:27: 警告: ‘cfi-icall’ attribute directive ignored [-Wattributes] +
-   void UnderlyingAddRef() const { +
-                           ^~~~~+
 〜省略〜 〜省略〜
 [ 99%] Building CXX object tests/ceftests/CMakeFiles/ceftests.dir/views/textfield_unittest.cc.o [ 99%] Building CXX object tests/ceftests/CMakeFiles/ceftests.dir/views/textfield_unittest.cc.o
行 210: 行 128:
  
 *** Run the following command manually to set SUID permissions *** *** Run the following command manually to set SUID permissions ***
-EXE="/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/build/tests/cefclient/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE+EXE="/home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/build/tests/cefclient/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE
  
 [100%] Built target cefclient [100%] Built target cefclient
  
 *** Run the following command manually to set SUID permissions *** *** Run the following command manually to set SUID permissions ***
-EXE="/home/tomoyan/my_projects/cef_binary_3.3626.1886.g162fdec_linux64/build/tests/ceftests/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE+EXE="/home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/build/tests/ceftests/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE
  
 [100%] Built target ceftests [100%] Built target ceftests
 </code> </code>
 </WRAP> </WRAP>
-※**警告: ‘cfi-icall’ attribute directive ignored [-Wattributes]** 警告は出るがコンパイルは通なった。\\+ 
 +==== SUIDアクセス許可を設定 ==== 
 +ビルド終わったら指示にしたがって、手動で次のドを実行して SUID アクセス許可を設定す。 
 +<WRAP prewrap 100%> 
 +<code> 
 +$ EXE="/home/tomoyan/my_projects/cef_binary_74.1.16+ge20b240+chromium-74.0.3729.131_linux64/build/tests/ceftests/Debug/chrome-sandbox" && sudo -- chown root:root $EXE && sudo -- chmod 4755 $EXE 
 +</code> 
 +</WRAP> 
 + 
 +==== Sample の実行 ==== 
 +cefclient を実行する。\\ 
 +<code> 
 +$ ./tests/cefclient/Debug/cefclient 
 +</code> 
 +URL に chrome:%%//%%version/ を入力する\\ 
 +{{:linux:chromium:cefclient_about_version.png?800|}}\\
  
 ==== cef-project のビルド ==== ==== cef-project のビルド ====
行 237: 行 170:
 </code> </code>
 <code> <code>
--- The C compiler identification is GNU 8.2.1 +-- The C compiler identification is GNU 9.1.1 
--- The CXX compiler identification is GNU 8.2.1+-- The CXX compiler identification is GNU 9.1.1
 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc
 -- Check for working C compiler: /usr/bin/cc -- works -- Check for working C compiler: /usr/bin/cc -- works
行 251: 行 184:
 -- Detecting CXX compile features -- Detecting CXX compile features
 -- Detecting CXX compile features - done -- Detecting CXX compile features - done
--- Downloading /home/tomoyan/my_projects/cef-project/third_party/cef/cef_binary_3.3538.1852.gcb937fc_linux64.tar.bz2.sha1... +CMake Warning (dev) at CMakeLists.txt:54 (find_package): 
--- Downloading /home/tomoyan/my_projects/cef-project/third_party/cef/cef_binary_3.3538.1852.gcb937fc_linux64.tar.bz2... +  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables. 
--- [download 0% complete] +  Run "cmake --help-policy CMP0074" for policy details Use the cmake_policy 
--- [download 1% complete] +  command to set the policy and suppress this warning
--- [download 2% complete]+ 
 +  CMake variable CEF_ROOT is set to: 
 + 
 +    /home/tomoyan/my_projects/cef-project/third_party/cef/cef_binary_3.3538.1852.gcb937fc_linux64 
 + 
 +  For compatibility, CMake is ignoring the variable. 
 +This warning is for project developers Use -Wno-dev to suppress it. 
 + 
 +-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS 
 +-- Performing Test COMPILER_SUPPORTS_NO_UNUSED_LOCAL_TYPEDEFS - Success 
 +-- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX 
 +-- Performing Test COMPILER_SUPPORTS_NO_LITERAL_SUFFIX - Success 
 +-- Performing Test COMPILER_SUPPORTS_NO_NARROWING 
 +-- Performing Test COMPILER_SUPPORTS_NO_NARROWING - Success 
 +-- Found PythonInterp: /usr/bin/python (found version "2.7.16")  
 +-- Downloading clang-format from Google Storage...
 〜省略〜 〜省略〜
 -- [download 98% complete] -- [download 98% complete]
行 313: 行 261:
 -- Build files have been written to: /home/tomoyan/my_projects/cef-project/build -- Build files have been written to: /home/tomoyan/my_projects/cef-project/build
 </code> </code>
- 
-=== cef_variables.cmake の修正 === 
-ビルドエラーにならない様に cef_variables.cmake を修正する。 
-<code> 
-$ vi ../third_party/cef/cef_binary_3.3538.1852.gcb937fc_linux64/cmake/cef_variables.cmake 
-</code> 
-<file autoconf ../third_party/cef/cef_binary_3.3538.1852.gcb937fc_linux64/cmake/cef_variables.cmake> 
-#    -Werror                         # Treat warnings as errors 
-</file> 
-※**-Werror**をコメントアウトする。\\ 
  
 === ビルド === === ビルド ===
  • linux/chromium/cef.1557808765.txt.gz
  • 最終更新: 2019/05/18 02:23
  • (外部編集)