Fail to build cryptohome

105 views
Skip to first unread message

夏正乔

unread,
Apr 2, 2022, 6:57:32 AM4/2/22
to Chromium OS Development
I build packages, it reports cryptohome fail:
(cr) ((d8610ec...)) xzq@ubuntu /mnt/host/source/src/scripts $ emerge-strongbad  cryptohome
/usr/lib64/python3.6/site-packages/portage/package/ebuild/_config/KeywordsManager.py:72: UserWarning: /etc/portage/package.keywords is deprecated, use /etc/portage/package.accept_keywords instead
  UserWarning)
!!! CONFIG_PROTECT is empty for '/build/strongbad/'
Calculating dependencies... done!

>>> 18:54:55 Emerging (1 of 1) chromeos-base/cryptohome-0.0.1-r4205::chromiumos for /build/strongbad/
 * Running stacked hooks for pre_pkg_setup
 *    sysroot_build_bin_dir ...                                                                                                                                                                             [ ok ]
 * Running stacked hooks for post_pkg_setup
 *    python_eclass_hack ...                                                                                                                                                                                [ ok ]
18:54:56 >>> Unpacking source...
Cloning into '/build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2'...
done.
18:54:57 >>> Source unpacked in /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work
 * Running stacked hooks for post_src_unpack
 *    asan_init ...                                                                                                                                                                                         [ ok ]
 * Running stacked hooks for pre_src_prepare
 *    build_toolchain_catch ...                                                                                                                                                                             [ ok ]
18:54:57 >>> Preparing source in /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome ...
18:54:57 >>> Source prepared.
18:54:57 >>> Configuring source in /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome ...
18:54:57.792: INFO: run: gn gen '--root=/build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2' '--args=platform_subdir="cryptohome" cc="armv7a-cros-linux-gnueabihf-clang" cxx="armv7a-cros-linux-gnueabihf-clang++" ar="llvm-ar" pkg_config="/build/strongbad/build/bin/pkg-config" target_cpu="arm" target_os="linux" clang_cc=true clang_cxx=true OS="linux" sysroot="/build/strongbad" libdir="/usr/lib" build_root="/build/strongbad/var/cache/portage/chromeos-base/cryptohome" platform2_root="/build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2" libbase_ver="930012" enable_exceptions=false external_cflags=["-Os","-pipe","-march=armv8-a+crc","-ftree-vectorize","-g","-fno-exceptions","-fno-unwind-tables","-fno-asynchronous-unwind-tables","-ffunction-sections","-fdata-sections"] external_cxxflags=["-Os","-pipe","-march=armv8-a+crc","-ftree-vectorize","-g","-fno-exceptions","-fno-unwind-tables","-fno-asynchronous-unwind-tables","-ffunction-sections","-fdata-sections"] external_cppflags=["-D_FILE_OFFSET_BITS=64","-D_LARGEFILE_SOURCE","-D_LARGEFILE64_SOURCE"] external_ldflags=["-Wl,-O2","-Wl,--as-needed","-Wl,--gc-sections","-Wl,--icf=all"] use={amd_oemcrypto=false amd64=false android_vm_rvc=false arc_adb_sideloading=false arc_hw_oemcrypto=false arcpp=false arcvm=false arm=true asan=false attestation=false bluetooth_suspend_management=false camera_feature_auto_framing=false camera_feature_face_detection=false camera_feature_hdrnet=false camera_feature_portrait_mode=false cdm_factory_daemon=false cellular=false cert_provision=false cfm=false cfm_enabled_device=false cheets=false chromeless_tty=false containers=false coverage=false cr50_onboard=false cros_arm64=false cros_host=false cros_i686=false crosvm_virtio_video=false crosvm_wl_dmabuf=false crypto=false csme_emulator=false dbus=false device_mapper=true dhcpv6=false direncryption=true dlc=false double_extend_pcr_issue=false enable_slow_boot_notify=false encrypted_reboot_vault=false encrypted_stateful=false esdfs=false factory_runtime_probe=false fake_drivefs_launcher=false feedback=false fp_on_power_button=false fsverity=false ftdi_tpm=false fuzzer=false generic_tpm2=false hammerd_api=false houdini=false houdini64=false hw_details=false hwid_override=false iioservice=false inference_accuracy_eval=false intel_oemcrypto=false ipu6=false ipu6ep=false ipu6se=false iwlwifi_dump=false jetstream_routing=false kvm_guest=false kvm_host=false libglvnd=false lvm_stateful_partition=false crosvm_siblings=false manage_efi_boot_entries=false metrics_uploader=false ml_benchmark_drivers=false mojo=false mount_oop=false msan=false mtd=false ndk_translation=false oemcrypto_v16=false ondevice_document_scanner=false ondevice_grammar=false ondevice_handwriting=false ondevice_handwriting_dlc=false ondevice_speech=false ondevice_text_suggestions=false opengles=false passive_metrics=false pinweaver=true pinweaver_csme=false postinstall_config_efi_and_legacy=false power_management=false prjquota=false profiling=false qrtr=false report_requisition=false selinux=true slow_mount=false systemd=false tcmalloc=false test=false ti50_onboard=false timers=false tpm=false tpm_dynamic=false tpm2=true tpm2_simulator=false ubsan=false udev=false user_session_isolation=false v4l2_codec=false vaapi=false video_cards_msm=false vm_borealis=false vpn=false vtpm_proxy=false vulkan=false wake_on_wifi=false wifi=false wired_8021x=false wpa3_sae=false chrome_kiosk_app=true chrome_network_proxy=true cros_debug=true direncription_allow_v2=true downloads_bind_mount=true elibc_glibc=true has_chromeos_config_bsp=true has_chromeos_config_bsp_private=true kernel_5_4=true kernel_linux=true unibuild=true userland_GNU=true vault_legacy_mount=true}' /build/strongbad/var/cache/portage/chromeos-base/cryptohome/out/Default in /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2
Done. Made 56 targets from 15 files in 364ms
18:54:58 >>> Source configured.
18:54:58 >>> Compiling source in /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome ...
18:54:58.631: INFO: run: ninja -C /build/strongbad/var/cache/portage/chromeos-base/cryptohome/out/Default -j 16 cryptohome:all
ninja: Entering directory `/build/strongbad/var/cache/portage/chromeos-base/cryptohome/out/Default'
[8/214] COPY ../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome/flatbuffer_schemas/flatbuffer_cpp_binding_generator.py gen/python/flatbuffer_cpp_bind[12/214] ACTION //cryptohome/libs:namespace-mounter-ipc-proto_gen(//common-mk/toolchain:toolchain)
/build/strongbad/usr/share/proto: warning: directory does not exist.
[14/214] COPY ../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome/flatbuffer_schemas/flatbuffer_cpp_binding_generator.py gen/python/flatbuffer_cpp_bin[16/214] ACTION //common-mk/external_dependencies:install_attributes-proto_gen(//common-mk/toolchain:toolchain)
/build/strongbad/usr/share/proto: warning: directory does not exist.
[23/213] ACTION //cryptohome/libs:cryptohome-proto_gen(//common-mk/toolchain:toolchain)
/build/strongbad/usr/share/proto: warning: directory does not exist.
[47/213] ACTION //cryptohome/libs:user-secret-stash-flatbuffers-binding-generate(//common-mk/toolchain:toolchain)
WARNING:root:Not all internal data of cryptohome._serialized_.UserSecretStashContainer is secure
WARNING:root:Not all internal data of cryptohome._serialized_.UserSecretStashWrappedKeyBlock is secure
[49/213] ACTION //cryptohome/libs:cryptohome-flatbuffers-binding-generate(//common-mk/toolchain:toolchain)
WARNING:root:Not all internal data of cryptohome._serialized_.ChallengeCredentialAuthBlockState is secure
[211/213] LINK cryptohome
FAILED: cryptohome
armv7a-cros-linux-gnueabihf-clang++ -Wl,-O2 -Wl,--as-needed -Wl,--gc-sections -Wl,--icf=all -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,now -Wl,--as-needed --sysroot=/build/strongbad -pie -L/build/strongbad/usr/lib -o cryptohome -Wl,--start-group obj/cryptohome/cryptohome.cryptohome.o obj/gen/cryptohome/common/cryptohome.print_auth_factor_proto.o obj/gen/cryptohome/common/cryptohome.print_fido_proto.o obj/gen/cryptohome/common/cryptohome.print_key_proto.o obj/gen/cryptohome/common/cryptohome.print_rpc_proto.o obj/gen/cryptohome/common/cryptohome.print_UserDataAuth_proto.o obj/gen/include/cryptohome/flatbuffer_schemas/cryptohome-flatbuffers-binding.auth_block_state.o obj/gen/include/cryptohome/flatbuffer_schemas/cryptohome-flatbuffers-binding.user_secret_stash_container.o obj/gen/include/cryptohome/flatbuffer_schemas/cryptohome-flatbuffers-binding.user_secret_stash_payload.o libcryptohome-proto.a libcrostpm.a libcryptohome.a libcrosplatform.a libinstall_attributes-proto.a libnamespace-mounter-ipc-proto.a -Wl,--end-group  -lchaps -lkeyutils -lpolicy -lpthread -lbrillo -lgrpc -lbase -lssl -lcrypto -lsystem_api-hps-protos -lsystem_api-power_manager-protos -lsystem_api-authpolicy-protos -lsystem_api-biod-protos -lsystem_api-protos -lsystem_api-kerberos-protos -lsystem_api-login_manager-protos -lsystem_api-lorgnette-protos -lsystem_api-smbprovider-protos -lsystem_api-vm_concierge-protos -lsystem_api-vm_applications-protos -lsystem_api-vm_disk_management-protos -lsystem_api-vm_launch-protos -lsystem_api-vm_sk_forwarding-protos -lsystem_api-vm_cicerone-protos -lsystem_api-seneschal-protos -lsystem_api-oobe_config-protos -lsystem_api-runtime_probe-protos -lsystem_api-dlcservice-protos -lsystem_api-update_engine-protos -lsystem_api-vm_plugin_dispatcher-protos -lsystem_api-u2f-protos -lsystem_api-chunneld-protos -lsystem_api-system_proxy-protos -lsystem_api-vm_permission_service-protos -lsystem_api-anomaly_detector-protos -lsystem_api-minios-protos -lsystem_api-dlp-protos -lsystem_api-rmad-protos -lsystem_api-fusebox-protos -lsystem_api-privacy_screen-protos -lsystem_api-cdm_oemcrypto-protos -lsystem_api-ml-protos -lsystem_api -lprotobuf-lite -ldbus-1 -lecryptfs -lmetrics -lvboot_host -lbootlockbox-client -lhwsec -lhwsec-foundation -ltpm_manager -ltrunks -lrootdev -lsecure_erase_file -lselinux -lattestation -lbiod_proxy
ld.lld: error: undefined symbol: google::protobuf::Message::MergeFrom(google::protobuf::Message const&)
>>> referenced by vault_keyset.pb.cc:1308 (/build/strongbad/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/vault_keyset.pb.cc:1308)
>>>               obj/gen/include/cryptohome/libcryptohome-proto.vault_keyset.pb.o:(cryptohome::SerializedVaultKeyset::MergeFrom(cryptohome::SerializedVaultKeyset const&)) in archive libcryptohome-proto.a
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
[212/213] LINK cryptohomed
FAILED: cryptohomed
armv7a-cros-linux-gnueabihf-clang++ -Wl,-O2 -Wl,--as-needed -Wl,--gc-sections -Wl,--icf=all -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,now -Wl,--as-needed --sysroot=/build/strongbad -pie -L/build/strongbad/usr/lib -o cryptohomed -Wl,--start-group obj/cryptohome/cryptohomed.cryptohomed.o obj/gen/include/cryptohome/flatbuffer_schemas/cryptohome-flatbuffers-binding.auth_block_state.o obj/gen/include/cryptohome/flatbuffer_schemas/cryptohome-flatbuffers-binding.user_secret_stash_container.o obj/gen/include/cryptohome/flatbuffer_schemas/cryptohome-flatbuffers-binding.user_secret_stash_payload.o libcrostpm.a libcryptohome.a libcryptohome-proto.a libcrosplatform.a libinstall_attributes-proto.a libnamespace-mounter-ipc-proto.a -Wl,--end-group  -lchaps -lkeyutils -lpolicy -lpthread -lbrillo -lgrpc -lbase -lssl -lcrypto -lsystem_api-hps-protos -lsystem_api-power_manager-protos -lsystem_api-authpolicy-protos -lsystem_api-biod-protos -lsystem_api-protos -lsystem_api-kerberos-protos -lsystem_api-login_manager-protos -lsystem_api-lorgnette-protos -lsystem_api-smbprovider-protos -lsystem_api-vm_concierge-protos -lsystem_api-vm_applications-protos -lsystem_api-vm_disk_management-protos -lsystem_api-vm_launch-protos -lsystem_api-vm_sk_forwarding-protos -lsystem_api-vm_cicerone-protos -lsystem_api-seneschal-protos -lsystem_api-oobe_config-protos -lsystem_api-runtime_probe-protos -lsystem_api-dlcservice-protos -lsystem_api-update_engine-protos -lsystem_api-vm_plugin_dispatcher-protos -lsystem_api-u2f-protos -lsystem_api-chunneld-protos -lsystem_api-system_proxy-protos -lsystem_api-vm_permission_service-protos -lsystem_api-anomaly_detector-protos -lsystem_api-minios-protos -lsystem_api-dlp-protos -lsystem_api-rmad-protos -lsystem_api-fusebox-protos -lsystem_api-privacy_screen-protos -lsystem_api-cdm_oemcrypto-protos -lsystem_api-ml-protos -lsystem_api -lprotobuf-lite -ldbus-1 -lbootlockbox-client -lecryptfs -lmetrics -lvboot_host -lhwsec -lhwsec-foundation -ltpm_manager -ltrunks -lrootdev -lsecure_erase_file -lselinux -lattestation -lbiod_proxy
ld.lld: error: undefined symbol: google::protobuf::Message::MergeFrom(google::protobuf::Message const&)
>>> referenced by vault_keyset.pb.cc:1308 (/build/strongbad/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/vault_keyset.pb.cc:1308)
>>>               obj/gen/include/cryptohome/libcryptohome-proto.vault_keyset.pb.o:(cryptohome::SerializedVaultKeyset::MergeFrom(cryptohome::SerializedVaultKeyset const&)) in archive libcryptohome-proto.a
clang-14: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
platform2.py: Unhandled exception:
Traceback (most recent call last):
  File "/build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/common-mk/platform2.py", line 707, in <module>
    commandline.ScriptWrapperMain(lambda _: main)
  File "/usr/lib64/python3.6/site-packages/chromite/lib/commandline.py", line 1037, in ScriptWrapperMain
    ret = target(argv[1:])
  File "/build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/common-mk/platform2.py", line 703, in main
    getattr(p2, options.action)(options.args)
  File "/build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/common-mk/platform2.py", line 496, in compile
    cros_build_lib.run(ninja_args)
  File "/usr/lib64/python3.6/site-packages/chromite/lib/cros_build_lib.py", line 938, in run
    raise RunCommandError(msg, cmd_result)
chromite.lib.cros_build_lib.RunCommandError: return code: 1; command: ninja -C /build/strongbad/var/cache/portage/chromeos-base/cryptohome/out/Default -j 16 cryptohome:all
cmd=['ninja', '-C', '/build/strongbad/var/cache/portage/chromeos-base/cryptohome/out/Default', '-j', '16', 'cryptohome:all']
 * ERROR: chromeos-base/cryptohome-0.0.1-r4205::chromiumos failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *               ebuild.sh, line  127:  Called src_compile
 *             environment, line 4532:  Called platform_src_compile
 *             environment, line 4237:  Called platform 'compile' 'all'
 *             environment, line 4137:  Called die
 * The specific snippet of code:
 *       "${cmd[@]}" || die
 *
 * Build log: /build/strongbad/tmp/portage/logs/chromeos-base:cryptohome-0.0.1-r4205:20220402-105455.log
 * Stable log symlink: /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/temp/build.log
 * CWD: /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome
 * S:   /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome

>>> 18:55:00 Failed to emerge chromeos-base/cryptohome-0.0.1-r4205 for /build/strongbad/, Log file:
>>> 18:55:00   /build/strongbad/tmp/portage/logs/chromeos-base:cryptohome-0.0.1-r4205:20220402-105455.log

 * Messages for package chromeos-base/cryptohome-0.0.1-r4205 merged to /build/strongbad/:
 * Log file: /build/strongbad/tmp/portage/logs/chromeos-base:cryptohome-0.0.1-r4205:20220402-105455.log

 * ERROR: chromeos-base/cryptohome-0.0.1-r4205::chromiumos failed (compile phase):
 *   (no error message)
 *
 * Call stack:
 *               ebuild.sh, line  127:  Called src_compile
 *             environment, line 4532:  Called platform_src_compile
 *             environment, line 4237:  Called platform 'compile' 'all'
 *             environment, line 4137:  Called die
 * The specific snippet of code:
 *       "${cmd[@]}" || die
 *
 * Build log: /build/strongbad/tmp/portage/logs/chromeos-base:cryptohome-0.0.1-r4205:20220402-105455.log
 * Stable log symlink: /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/temp/build.log
 * CWD: /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome
 * S:   /build/strongbad/tmp/portage/chromeos-base/cryptohome-0.0.1-r4205/work/cryptohome-0.0.1/platform2/cryptohome

please help me.

Daniil Lunev

unread,
Apr 5, 2022, 8:03:27 AM4/5/22
to 夏正乔, Chromium OS Development, Yi Chou
Chiming in on behalf of Yi. This is an artifact of some changes to the build of the package we did recently. The simplest way to resolve this issue is removing these stale files:
/build/$BOARD/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/auth_factor.pb.h
/build/$BOARD/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/fido.pb.h
/build/$BOARD/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/key.pb.h
/build/$BOARD/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/rpc.pb.h
/build/$BOARD/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/signed_secret.pb.h
/build/$BOARD/var/cache/portage/chromeos-base/cryptohome/out/Default/gen/include/cryptohome/UserDataAuth.pb.h

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
https://groups.google.com/a/chromium.org/group/chromium-os-dev
---
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-os-d...@chromium.org.


--
Daniil Lunev
ChromeOS Platform Storage

夏正乔

unread,
Apr 7, 2022, 4:37:17 AM4/7/22
to Chromium OS Development, Daniil Lunev, Chromium OS Development, Yi Chou, 夏正乔
Thank you, I can build that successfully  by your method.
Reply all
Reply to author
Forward
0 new messages