Chromium for ARM을 어떻게 크로스 컴파일합니까?


12

Linux 3.0.8 armv7l을mini210s 실행 하는 FriendlyARM에 Chromium을 설치해야합니다

환경

툴체인 depot_tools

다음을 얻은 후 depot_tools:

vagrant@vagrant:~/depot_tools$ fetch chromium

환경 변수

export GYP_CROSSCOMPILE=1
export GYP_DEFINES="target_arch=arm arm_float_abi=hard"

의존성

vagrant@vagrant:~/depot_tools/src$  ./chrome/installer/linux/sysroot_scripts/install-debian.wheezy.sysroot.py --arch=arm 
Installing Debian Wheezy arm root image: /home/vagrant/depot_tools/src/chrome/installer/linux/debian_wheezy_arm-sysroot
Downloading http://storage.googleapis.com/chrome-linux-sysroot/toolchain/285950/debian_wheezy_arm_sysroot.tgz

build/install-build-deps.sh --arm
build/install-build-deps-android.sh
gclient sync

엮다

build/gyp_chromium -Goutput_dir=out_arm 
ninja -C out_arm/Debug chrome

오류

vagrant@vagrant:~/depot_tools/src$ ninja -C out_arm/Debug chrome
ninja: Entering directory `out_arm/Debug'
[222/18316] CXX obj/third_party/webrtc/modules/audio_coding/codecs/audio_encoder_interface.audio_encoder.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/webrtc/modules/audio_coding/codecs/audio_encoder_interface.audio_encoder.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=223108 -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DWEBRTC_RESTRICT_LOGGING -DEXPAT_RELATIVE_PATH -DWEBRTC_MODULE_UTILITY_VIDEO -DWEBRTC_CHROMIUM_BUILD -DLOGGING_INSIDE_WEBRTC -DWEBRTC_ARCH_ARM -DWEBRTC_ARCH_ARM_V7 -DWEBRTC_ARCH_ARM_NEON -DWEBRTC_POSIX -DWEBRTC_LINUX -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -Igen -I../.. -I../../third_party/webrtc/overrides -I../../third_party -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /home/vagrant/depot_tools/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -target arm-linux-gnueabihf -march=armv7-a -no-integrated-as -mtune=generic-armv7-a -mfpu=neon -mfloat-abi=hard -mthumb --sysroot=/home/vagrant/depot_tools/src/chrome/installer/linux/debian_wheezy_arm-sysroot -O0 -g -gdwarf-4 -funwind-tables -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11  -c ../../third_party/webrtc/modules/audio_coding/codecs/audio_encoder.cc -o obj/third_party/webrtc/modules/audio_coding/codecs/audio_encoder_interface.audio_encoder.o
/tmp/audio_encoder-f5366d.s: Assembler messages:
/tmp/audio_encoder-f5366d.s:559: Internal error!
Assertion failure in get_line_subseg at ../../gas/dwarf2dbg.c line 262.
Please report this bug.
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
[222/18316] ACTION Generating resources from app/generated_resources.grd
ninja: build stopped: subcommand failed.

몇 가지 권장 사항 및 리드를 기대

eyoung100의 지침에 따라 여전히 오류가 발생하지만 더

vagrant@vagrant:/vagrant_data/buildhost/src$ ninja -C out/Debug chrome
ninja: Entering directory `out/Debug'
[369/18783] CXX obj/mojo/public/cpp/bindings/lib/mojo_cpp_bindings.array_internal.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/mojo/public/cpp/bindings/lib/mojo_cpp_bindings.array_internal.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=223108 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -Igen -I../.. -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /vagrant_data/buildhost/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang strict-virtual-specifiers -fcolor-diagnostics -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -target arm-linux-gnueabihf -march=armv7-a -no-integrated-as -mtune=generic-armv7-a -mfpu=neon -mfloat-abi=hard -mthumb --sysroot=/vagrant_data/buildhost/src/chrome/installer/linux/debian_wheezy_arm-sysroot -O0 -g -gdwarf-4 -funwind-tables -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11  -c ../../mojo/public/cpp/bindings/lib/array_internal.cc -o obj/mojo/public/cpp/bindings/lib/mojo_cpp_bindings.array_internal.o
/tmp/array_internal-a7a8d2.s: Assembler messages:
/tmp/array_internal-a7a8d2.s:1182: Internal error!
Assertion failure in get_line_subseg at ../../gas/dwarf2dbg.c line 262.
Please report this bug.
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
[369/18783] ACTION Generating resources from app/generated_resources.grd
ninja: build stopped: subcommand failed.

다른 Google 그룹에 게시 된 문제 :

Precise64 VM에서 크로스 컴파일 할 때와 동일한 문제

Trusty64 VM에서 크로스 컴파일 할 때 발생하는 오류

업데이트 우분투 14.04 (Trusty) FAILED에서 크로스 컴파일 시도

... Precise64와 유사한 메시지

vagrant@vagrant-ubuntu-trusty-64:/vagrant_data/buildhost/src$ ninja -C out/Debug chrome
ninja: Entering directory `out/Debug'
[66/18785] CXX obj/mojo/public/cpp/bindings/lib/mojo_cpp_bindings.array_internal.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/mojo/public/cpp/bindings/lib/mojo_cpp_bindings.array_internal.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=223108 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -Igen -I../.. -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-reserved-user-defined-literal -Xclang -load -Xclang /vagrant_data/buildhost/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang strict-virtual-specifiers -fcolor-diagnostics -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -target arm-linux-gnueabihf -march=armv7-a -no-integrated-as -mtune=generic-armv7-a -mfpu=neon -mfloat-abi=hard -mthumb --sysroot=/vagrant_data/buildhost/src/chrome/installer/linux/debian_wheezy_arm-sysroot -O0 -g -gdwarf-4 -funwind-tables -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -std=gnu++11  -c ../../mojo/public/cpp/bindings/lib/array_internal.cc -o obj/mojo/public/cpp/bindings/lib/mojo_cpp_bindings.array_internal.o
/tmp/array_internal-227b6c.s: Assembler messages:
/tmp/array_internal-227b6c.s:1180: Internal error!
Assertion failure in get_line_subseg at ../../gas/dwarf2dbg.c line 271.
Please report this bug.
clang: error: assembler command failed with exit code 1 (use -v to see invocation)
[66/18785] CXX obj/mojo/public/cpp/bindings/lib/mojo_cpp_bindings.message_queue.o
ninja: build stopped: subcommand failed.

clang=False실패 했을 때 Precise64에서

사용시 chromium.gyp_env(환경 변수 없음)

vagrant@vagrant:/vagrant_data/buildhost/src$ more ../chromium.gyp_env 
{ 'GYP_DEFINES': 'target_arch=arm arm_float_abi=hard component=shared_library linux_use_gold_flags=1 clang=False', 'GYP_CROSSCOMPILE': 'True', }

나는 이것을 얻는다

vagrant@vagrant:/vagrant_data/buildhost/src$ ninja -C out/Debug chrome
ninja: Entering directory `out/Debug'
[2/18785] CC obj/third_party/libwebp/dsp/libwebp_dsp.enc_sse2.o
FAILED: cc -MMD -MF obj/third_party/libwebp/dsp/libwebp_dsp.enc_sse2.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -Igen -I../../third_party/libwebp -fstack-protector --param=ssp-buffer-size=4 -pthread -fno-strict-aliasing -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -Wno-format -Wno-unused-result -march=armv7-a -mtune=generic-armv7-a -mfpu=neon -mfloat-abi=hard -mthumb --sysroot=/vagrant_data/buildhost/src/chrome/installer/linux/debian_wheezy_arm-sysroot -O0 -g -gdwarf-4 -funwind-tables   -c ../../third_party/libwebp/dsp/enc_sse2.c -o obj/third_party/libwebp/dsp/libwebp_dsp.enc_sse2.o
cc1: error: unrecognized command line option ‘-mfpu=neon’
cc1: error: unrecognized command line option ‘-mfloat-abi=hard’
cc1: error: unrecognized command line option ‘-mthumb’
../../third_party/libwebp/dsp/enc_sse2.c:1:0: error: bad value (generic-armv7-a) for -mtune= switch
../../third_party/libwebp/dsp/enc_sse2.c:1:0: error: bad value (armv7-a) for -march= switch
../../third_party/libwebp/dsp/enc_sse2.c:1:0: error: bad value (generic-armv7-a) for -mtune= switch
[2/18785] ACTION Generating libudev0 library loader
ninja: build stopped: subcommand failed.

env를 내보낼 때 Precise64에서 변수clang=0

언제

vagrant@vagrant:/vagrant_data/buildhost/src$ env | grep GYP
GYP_CROSSCOMPILE=1
GYP_DEFINES=target_arch=arm arm_float_abi=hard component=shared_library linux_use_gold_flags=1 clang=0

이 오류가 발생합니다

$ ninja -C out/Debug chrome
ninja: Entering directory `out/Debug'
[6/18785] CXX obj/components/crash/app/crash_component_lib.crash_reporter_client.o
FAILED: /usr/bin/arm-linux-gnueabihf-g++ -MMD -MF obj/components/crash/app/crash_component_lib.crash_reporter_client.o.d -DV8_DEPRECATION_WARNINGS -D_FILE_OFFSET_BITS=64 -DCHROMIUM_BUILD -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUI_COMPOSITOR_IMAGE_TRANSPORT -DUSE_AURA=1 -DUSE_ASH=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_DEFAULT_RENDER_THEME=1 -DUSE_LIBJPEG_TURBO=1 -DUSE_X11=1 -DUSE_CLIPBOARD_AURAX11=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DUSE_UDEV -DDONT_EMBED_BUILD_METADATA -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_MDNS=1 -DENABLE_SERVICE_DISCOVERY=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DUSE_LIBPCI=1 -DUSE_GLIB=1 -DUSE_NSS=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -D_DEBUG -D_GLIBCXX_DEBUG=1 -Igen -I../.. -I../../breakpad/src -fstack-protector --param=ssp-buffer-size=4 -Werror -pthread -fno-strict-aliasing -Wall -Wno-unused-parameter -Wno-missing-field-initializers -fvisibility=hidden -pipe -fPIC -march=armv7-a -mtune=generic-armv7-a -mfpu=neon -mfloat-abi=hard -mthumb --sysroot=/vagrant_data/buildhost/src/chrome/installer/linux/debian_wheezy_arm-sysroot -O0 -g -gdwarf-4 -funwind-tables -fno-exceptions -fno-rtti -fno-threadsafe-statics -fvisibility-inlines-hidden -Wsign-compare -Wno-abi  -c ../../components/crash/app/crash_reporter_client.cc -o obj/components/crash/app/crash_component_lib.crash_reporter_client.o
In file included from ../../base/basictypes.h:18:0,
                 from ../../base/strings/string16.h:33,
                 from ../../components/crash/app/crash_reporter_client.h:10,
                 from ../../components/crash/app/crash_reporter_client.cc:5:
../../base/macros.h:165:3: error: identifier ‘static_assert’ will become a keyword in C++0x [-Werror=c++0x-compat]
../../base/macros.h: In function ‘Dest bit_cast(const Source&)’:
../../base/macros.h:165:3: error: there are no arguments to ‘static_assert’ that depend on a template parameter, so a declaration of ‘static_assert’ must be available [-fpermissive]
../../base/macros.h:165:3: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
In file included from ../../components/crash/app/crash_reporter_client.h:10:0,
                 from ../../components/crash/app/crash_reporter_client.cc:5:
../../base/strings/string16.h: At global scope:
../../base/strings/string16.h:67:3: error: expected identifier before ‘sizeof’
../../base/strings/string16.h:67:3: error: expected ‘,’ or ‘...’ before ‘sizeof’
../../base/strings/string16.h:67:3: error: ISO C++ forbids declaration of ‘static_assert’ with no type [-fpermissive]
In file included from ../../base/files/file_path.h:111:0,
                 from ../../components/crash/app/crash_reporter_client.cc:7:
../../base/containers/hash_tables.h:171:61: error: ‘>>’ operator will be treated as two right angle brackets in C++0x [-Werror=c++0x-compat]
../../base/containers/hash_tables.h:171:61: note: suggest parentheses around ‘>>’ expression
../../base/containers/hash_tables.h:171:61: error: ‘>>’ should be ‘> >’ within a nested template argument list
../../base/containers/hash_tables.h:172:1: error: expected unqualified-id before ‘using’
../../base/containers/hash_tables.h:177:61: error: ‘>>’ operator will be treated as two right angle brackets in C++0x [-Werror=c++0x-compat]
../../base/containers/hash_tables.h:177:61: note: suggest parentheses around ‘>>’ expression
../../base/containers/hash_tables.h:177:61: error: ‘>>’ should be ‘> >’ within a nested template argument list
../../base/containers/hash_tables.h:178:1: error: expected unqualified-id before ‘using’
../../base/containers/hash_tables.h:184:42: error: ‘>>’ operator will be treated as two right angle brackets in C++0x [-Werror=c++0x-compat]
../../base/containers/hash_tables.h:184:42: note: suggest parentheses around ‘>>’ expression
../../base/containers/hash_tables.h:184:42: error: spurious ‘>>’, use ‘>’ to terminate a template argument list
../../base/containers/hash_tables.h:185:1: error: expected ‘>’ before ‘using’
../../base/containers/hash_tables.h:186:68: error: expected unqualified-id before ‘;’ token
../../base/containers/hash_tables.h:191:42: error: ‘>>’ operator will be treated as two right angle brackets in C++0x [-Werror=c++0x-compat]
../../base/containers/hash_tables.h:191:42: note: suggest parentheses around ‘>>’ expression
../../base/containers/hash_tables.h:191:42: error: spurious ‘>>’, use ‘>’ to terminate a template argument list
../../base/containers/hash_tables.h:192:1: error: expected ‘>’ before ‘using’
../../base/containers/hash_tables.h:192:76: error: expected unqualified-id before ‘;’ token
cc1plus: all warnings being treated as errors
[6/18785] ACTION Generating resources from blink_resources.grd
ninja: build stopped: subcommand failed.

컴파일 완료 성공

Precise64 4GB 메모리 Vagrant VM

환경

GYP_CROSSCOMPILE=1
GYP_DEFINES=target_arch=arm arm_float_abi=hard component=shared_library linux_use_gold_flags=1

릴리스 모드로 구축

ninja -v -C out/Release chrome

vagrant@vagrant:~/chromium/buildhost/src/out/Release$ ls
build.ninja             gen         icudtl.dat              libpdf.so      nacl_bootstrap_raw       nacl_irt_arm.nexe.debug.raw  protoc                             resources          yasm
chrome                  genmacro    java_mojo               libpdf.so.TOC  nacl_helper              natives_blob.bin             pseudo_locales                     resources.pak
chrome.1                genmodule   keyboard_resources.pak  libyuv.a       nacl_helper_bootstrap    obj                          pyproto                            snapshot_blob.bin
chrome_100_percent.pak  genperf     lib                     libyuv_neon.a  nacl_irt_arm.nexe        obj.host                     re2c                               tls_edit
chrome-wrapper          genstring   libffmpegsumo.so        locales        nacl_irt_arm.nexe.cmd    pnacl                        remoting_locales                   xdg-mime

vagrant@vagrant:~/chromium/buildhost/src/out/Release$ ls -alh chrome
-rwxrwxr-x 1 vagrant vagrant 39M Jan 12 22:47 chrome

베어 리눅스 3.0.8 armv7l에 Chrome을 설치하는 방법에 대한 답변을 보려면 여기를 클릭하십시오.


1
다시 시작하여 빌드 디렉토리를 지우고 저장소 도구를 설치 한 후 레시피 2를 따르십시오 . 결과를 알려주세요 ...
eyoung100

알았어. 깨끗한 환경에서 CC, CXX 등을 설정하지 않고 다시 시작합니다. 내 질문 업데이트
zabumba

답변:


13

이제 직장에 다니면서 단계별 답변을 작성하겠습니다. 먼저 잘못된 순서로 단계를 수행하는 것 같습니다. 따라서이 단계는 실행 순서대로 번호를 매 깁니다.

  1. mkdir -pv ~/chromium
  2. cd ~/chromium
  3. git config --global user.name “Joel Maranhao”
  4. git config --global user.email “youremail@example.com”
  5. git config --global core.autocrlf false
  6. git config --global core.filemode false
  7. git config --global color.ui true
  8. git clone https://chromium.googlesource.com/chromium/tools/depot_tools
  9. export PATH=$PATH:~/chromium/depot_tools 업데이트 노트 1 참조
  10. mkdir -v ~/chromium/buildhost 업데이트 노트 2 참조
  11. cd ../buildhost 업데이트 노트 2 참조
  12. fetch --nohooks chromium
  13. cd src && ./build/install-build-deps.sh 참고 3 참조
  14. sudo apt-get install gcc-arm-linux-gnueabihf
  15. sudo apt-get install g++-4.8-multilib-arm-linux-gnueabihf
  16. ./build/install-build-deps.sh --arm 참고 3 참조
  17. gclient sync
  18. GYP_CROSSCOMPILE=1 GYP_DEFINES=target_arch=arm arm_float_abi=hard component=shared_library linux_use_gold_flags=1 참고 4 참조
  19. gclient runhooks
  20. ninja -C out/Debug chrome

공지 사항 단계 17-19. 단계 18은 chromium.gyp_env 파일에서 레시피 2의 내보내기 명령문을 대체합니다 (이는 빌드 컴파일러를 효과적으로 전환합니다 clang). 19 단계는 chromium.gyp_env 설정을 가져오고 적절한 빌드 스크립트를 올바른 순서로 실행합니다.

경고 : 테스트 단계

XUbuntu VM에서이 단계를 테스트하고 다시보고 / 업데이트합니다.


업데이트 노트

  1. PATH이 작업을 두 번 이상 수행 하려면 변수를 영구적으로 변경하는 것이 좋습니다. 다음을 찾으십시오.

# set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi

에서 $HOME\.profile. 추가 PATH=$PATH:~/chromium/depot_tools하여 최종 결과를 if다음과 같이 표시하십시오.

# set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" PATH=$PATH:~/chromium/depot_tools fi

필요한 경우 $HOME/bin디렉토리 (내 VM에 존재하지 않음)를 작성한 다음 로그 아웃 한 후 다시 로그인하십시오.


  1. Post Study에서, 저장소에서 Gigs 및 Gigs 데이터를 다운로드하는 동안 fetch스크립트 를 실행 하고 소스 코드를 depot_tools디렉토리 로 다운로드 한 것을 알 수 있습니다 . 이것은 일반적인 실수이며 내가 한 것처럼 별도의 디렉토리를 만들어 쉽게 해결할 수 있습니다. 이렇게하면 빌드 파일을 관리하고 조작하는 데 필요한 도구가 빌드중인 항목과 별도로 유지됩니다. 또한 빌드하는 항목이 빌드하는 데 사용 도구에 의해 오염 되지 않도록 합니다.
  2. 첫 번째 패스는 build-deps.sh크로스 컴파일 여부에 관계없이 모든 빌드 도구 를 다운로드합니다. 스크립트가 보류 패키지에 대해 불평하는 경우 14 단계와 15 단계가 필요합니다. 두 번째 패스 (16 단계)는 크로스 컴파일을 설정합니다. 빌드가 진행됨에 따라이 노트를 업데이트하겠습니다.
  3. 어떤 이유로 OP와 나는 gyp_env파일에 문제가있었습니다 . 이로 인해 필요한 내보내기를 포함하도록 18 단계를 업데이트했습니다. gyp_env파일 사용에 관심이있는 경우 Gyp 사용자 설명서 , 빌드 구성공통 Gyp 빌드 매개 변수를 참조하십시오.

1
@joelmaranhao 나는 지금 13 단계에 있습니다.
eyoung100

1
사용 apt-cache search -multilib-arm-linux-gnueabihf 나는 4.6 일 수 14.10 4.8 있도록를 사용하고 등
eyoung100

1
그렇지 않은 경우 /build/install-build-deps.sh첫 번째 패스 중에 오류를보고하지 않습니다. 문제가 있으면 15 단계에서 4.8을 4.6으로 /build/install-build-deps.sh
바꾸고

1
True는 1입니다. 이진 변수
eyoung100

1
기본 리눅스 컴파일러를 사용해 보자. 단계 18로 업데이트를 참조하십시오.
eyoung100
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.