siemens / meta-iot2050

SIMATIC IOT2050 Isar/Debian Board Support Package
MIT License
129 stars 76 forks source link

Building fails on tag V01.02.02 #485

Closed Erokos closed 9 months ago

Erokos commented 9 months ago

Hi,

we checked out the tag V01.02.02 and initiated the build using the following command:

./kas-container build kas-iot2050-example.yml:kas/opt/package-lock.yml

contrary to expectations the build fails with the following error:

ERROR: openssl-latest-r0 do_dpkg_build: Error executing a python function in exec_python_func() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_dpkg_build(d)
     0003:
File: '/work/isar/meta/classes/dpkg-base.bbclass', lineno: 184, function: do_dpkg_build
     0180:    lock = bb.utils.lockfile(d.getVar("REPO_ISAR_DIR") + "/isar.lock",
     0181:                             shared=True)
     0182:    bb.build.exec_func("dpkg_do_mounts", d)
     0183:    try:
 *** 0184:        bb.build.exec_func("dpkg_runbuild", d)
     0185:    finally:
     0186:        bb.build.exec_func("dpkg_undo_mounts", d)
     0187:        bb.utils.unlockfile(lock)
     0188:}
File: '/work/isar/bitbake/lib/bb/build.py', lineno: 251, function: exec_func
     0247:    with bb.utils.fileslocked(lockfiles):
     0248:        if ispython:
     0249:            exec_func_python(func, d, runfile, cwd=adir)
     0250:        else:
 *** 0251:            exec_func_shell(func, d, runfile, cwd=adir)
     0252:
     0253:    try:
     0254:        curcwd = os.getcwd()
     0255:    except:
File: '/work/isar/bitbake/lib/bb/build.py', lineno: 452, function: exec_func_shell
     0448:    with open(fifopath, 'r+b', buffering=0) as fifo:
     0449:        try:
     0450:            bb.debug(2, "Executing shell function %s" % func)
     0451:            with open(os.devnull, 'r+') as stdin, logfile:
 *** 0452:                bb.process.run(cmd, shell=False, stdin=stdin, log=logfile, extrafiles=[(fifo,readfifo)])
     0453:        finally:
     0454:            os.unlink(fifopath)
     0455:
     0456:    bb.debug(2, "Shell function %s finished" % func)
File: '/work/isar/bitbake/lib/bb/process.py', lineno: 182, function: run
     0178:        if not stderr is None:
     0179:            stderr = stderr.decode("utf-8")
     0180:
     0181:    if pipe.returncode != 0:
 *** 0182:        raise ExecutionError(cmd, pipe.returncode, stdout, stderr)
     0183:    return stdout, stderr
Exception: bb.process.ExecutionError: Execution of '/build/tmp/work/iot2050-debian-arm64/openssl/latest-r0/temp/run.dpkg_runbuild.126684' failed with exit code 2:
dpkg-buildpackage: info: source package openssl
dpkg-buildpackage: info: source version 1.1.1n-0+deb11u4+iot2050
dpkg-buildpackage: info: source distribution UNRELEASED
dpkg-buildpackage: info: source changed by Unknown maintainer <unknown@example.com>
dpkg-architecture: warning: specified GNU system type aarch64-linux-gnu does not match CC system type x86_64-linux-gnu, try setting a correct CC environment variable
 dpkg-source -I --before-build .
dpkg-buildpackage: info: host architecture arm64
 debian/rules clean
dh clean --without autoreconf
   debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/builder/openssl/openssl-latest'
rm -rf build_static build_shared
test -z "" || for opt in ; \
do \
        set -xe; \
        rm -rf build_$opt; \
done
rm -f doc/openssl.pod doc/crypto.pod doc/ssl.pod
dh_auto_clean
make[1]: Leaving directory '/home/builder/openssl/openssl-latest'
   dh_clean
 dpkg-source -I -b .
dpkg-source: info: using source format '3.0 (quilt)'
dpkg-source: info: building openssl using existing ./openssl_1.1.1n.orig.tar.gz
dpkg-source: info: building openssl using existing ./openssl_1.1.1n.orig.tar.gz.asc
dpkg-source: info: using patch list from debian/patches/series
dpkg-source: warning: ignoring deletion of file apps/vms_decc_argv.c, use --include-removal to override
dpkg-source: warning: ignoring deletion of file test/testrsa_withattrs.der, use --include-removal to override
dpkg-source: warning: ignoring deletion of file test/data.bin, use --include-removal to override
dpkg-source: warning: ignoring deletion of file test/testrsa_withattrs.pem, use --include-removal to override
dpkg-source: warning: ignoring deletion of file test/dane-cross.in, use --include-removal to override
dpkg-source: warning: ignoring deletion of file test/certs/cross-root.pem, use --include-removal to override
dpkg-source: warning: ignoring deletion of file test/certs/cross-key.pem, use --include-removal to override
dpkg-source: warning: ignoring deletion of file test/certs/root-cross-cert.pem, use --include-removal to override
dpkg-source: info: local changes detected, the modified files are:
 openssl-latest/CHANGES
 openssl-latest/Configurations/10-main.conf
 openssl-latest/Configurations/15-android.conf
 openssl-latest/Configurations/descrip.mms.tmpl
 openssl-latest/Configurations/unix-Makefile.tmpl
 openssl-latest/Configurations/windows-makefile.tmpl
 openssl-latest/Configure
 openssl-latest/NEWS
 openssl-latest/README
 openssl-latest/apps/apps.c
 openssl-latest/apps/ciphers.c
 openssl-latest/apps/crl2p7.c
 openssl-latest/apps/dgst.c
 openssl-latest/apps/enc.c
 openssl-latest/apps/openssl.c
 openssl-latest/apps/passwd.c
 openssl-latest/apps/s_cb.c
 openssl-latest/apps/s_client.c
 openssl-latest/apps/s_server.c
 openssl-latest/apps/s_socket.c
 openssl-latest/apps/speed.c
 openssl-latest/apps/vms_decc_init.c
 openssl-latest/config
 openssl-latest/crypto/armcap.c
 openssl-latest/crypto/asn1/a_object.c
 openssl-latest/crypto/asn1/a_print.c
 openssl-latest/crypto/asn1/a_strex.c
 openssl-latest/crypto/asn1/asn1_lib.c
 openssl-latest/crypto/asn1/bio_asn1.c
 openssl-latest/crypto/asn1/bio_ndef.c
 openssl-latest/crypto/asn1/charmap.h
 openssl-latest/crypto/asn1/d2i_pr.c
 openssl-latest/crypto/asn1/t_spki.c
 openssl-latest/crypto/bio/b_addr.c
 openssl-latest/crypto/bio/b_sock2.c
 openssl-latest/crypto/bio/bss_dgram.c
 openssl-latest/crypto/bio/bss_mem.c
 openssl-latest/crypto/bn/asm/mips.pl
 openssl-latest/crypto/bn/bn_div.c
 openssl-latest/crypto/bn/bn_exp2.c
 openssl-latest/crypto/bn/bn_prime.h
 openssl-latest/crypto/bn/bn_print.c
 openssl-latest/crypto/bn/bn_sqrt.c
 openssl-latest/crypto/chacha/asm/chacha-x86_64.pl
 openssl-latest/crypto/cms/cms_env.c
 openssl-latest/crypto/conf/conf_def.h
 openssl-latest/crypto/dh/dh_ameth.c
 openssl-latest/crypto/dsa/dsa_prn.c
 openssl-latest/crypto/ec/curve448/field.h
 openssl-latest/crypto/ec/ec2_oct.c
 openssl-latest/crypto/ec/ec_asn1.c
 openssl-latest/crypto/ec/ec_curve.c
 openssl-latest/crypto/engine/eng_all.c
 openssl-latest/crypto/engine/eng_dyn.c
 openssl-latest/crypto/engine/eng_lib.c
 openssl-latest/crypto/engine/eng_list.c
 openssl-latest/crypto/engine/eng_local.h
 openssl-latest/crypto/err/err.c
 openssl-latest/crypto/err/openssl.txt
 openssl-latest/crypto/evp/digest.c
 openssl-latest/crypto/evp/e_aes.c
 openssl-latest/crypto/evp/e_camellia.c
 openssl-latest/crypto/evp/evp_enc.c
 openssl-latest/crypto/evp/p_lib.c
 openssl-latest/crypto/hmac/hm_ameth.c
 openssl-latest/crypto/lhash/lhash.c
 openssl-latest/crypto/objects/o_names.c
 openssl-latest/crypto/objects/obj_dat.c
 openssl-latest/crypto/objects/obj_dat.h
 openssl-latest/crypto/objects/obj_xref.h
 openssl-latest/crypto/pem/pem_lib.c
 openssl-latest/crypto/pkcs12/p12_key.c
 openssl-latest/crypto/poly1305/poly1305_ameth.c
 openssl-latest/crypto/ppccap.c
 openssl-latest/crypto/rand/rand_unix.c
 openssl-latest/crypto/rand/rand_vms.c
 openssl-latest/crypto/rsa/rsa_prn.c
 openssl-latest/crypto/siphash/siphash_ameth.c
 openssl-latest/crypto/sm2/sm2_crypt.c
 openssl-latest/crypto/sm2/sm2_pmeth.c
 openssl-latest/crypto/sparcv9cap.c
 openssl-latest/crypto/srp/srp_vfy.c
 openssl-latest/crypto/store/loader_file.c
 openssl-latest/crypto/ts/ts_rsp_verify.c
 openssl-latest/crypto/ts/ts_verify_ctx.c
 openssl-latest/crypto/ui/ui_openssl.c
 openssl-latest/crypto/uid.c
 openssl-latest/crypto/x509/t_x509.c
 openssl-latest/crypto/x509/x509_vfy.c
 openssl-latest/crypto/x509/x509_vpm.c
 openssl-latest/crypto/x509/x_name.c
 openssl-latest/crypto/x509v3/v3_akey.c
 openssl-latest/crypto/x509v3/v3_alt.c
 openssl-latest/crypto/x509v3/v3_cpols.c
 openssl-latest/crypto/x509v3/v3_ncons.c
 openssl-latest/crypto/x509v3/v3_pci.c
 openssl-latest/crypto/x509v3/v3_utl.c
 openssl-latest/crypto/x509v3/v3err.c
 openssl-latest/demos/bio/client-arg.c
 openssl-latest/demos/bio/client-conf.c
 openssl-latest/doc/man1/cms.pod
 openssl-latest/doc/man1/enc.pod
 openssl-latest/doc/man1/passwd.pod
 openssl-latest/doc/man1/pkeyutl.pod
 openssl-latest/doc/man1/s_client.pod
 openssl-latest/doc/man1/s_server.pod
 openssl-latest/doc/man3/BIO_ctrl.pod
 openssl-latest/doc/man3/BIO_f_base64.pod
 openssl-latest/doc/man3/BIO_f_ssl.pod
 openssl-latest/doc/man3/BIO_push.pod
 openssl-latest/doc/man3/BN_add.pod
 openssl-latest/doc/man3/BN_cmp.pod
 openssl-latest/doc/man3/BN_rand.pod
 openssl-latest/doc/man3/DEFINE_STACK_OF.pod
 openssl-latest/doc/man3/ENGINE_add.pod
 openssl-latest/doc/man3/ERR_load_strings.pod
 openssl-latest/doc/man3/EVP_EncryptInit.pod
 openssl-latest/doc/man3/OBJ_nid2obj.pod
 openssl-latest/doc/man3/SSL_CONF_cmd.pod
 openssl-latest/doc/man3/SSL_CTX_set_num_tickets.pod
 openssl-latest/doc/man3/SSL_CTX_set_tlsext_ticket_key_cb.pod
 openssl-latest/doc/man3/SSL_get_session.pod
 openssl-latest/doc/man3/SSL_set_fd.pod
 openssl-latest/doc/man3/X509_STORE_CTX_new.pod
 openssl-latest/doc/man3/d2i_PrivateKey.pod
 openssl-latest/doc/man3/d2i_X509.pod
 openssl-latest/doc/man7/ossl_store.pod
 openssl-latest/doc/man7/x509.pod
 openssl-latest/engines/e_afalg.c
 openssl-latest/engines/e_dasync.c
 openssl-latest/include/crypto/rand.h
 openssl-latest/include/crypto/sm2.h
 openssl-latest/include/crypto/x509.h
 openssl-latest/include/internal/sockets.h
 openssl-latest/include/openssl/e_os2.h
 openssl-latest/include/openssl/ec.h
 openssl-latest/include/openssl/engine.h
 openssl-latest/include/openssl/obj_mac.h
 openssl-latest/include/openssl/opensslv.h
 openssl-latest/include/openssl/sslerr.h
 openssl-latest/include/openssl/x509v3err.h
 openssl-latest/ssl/bio_ssl.c
 openssl-latest/ssl/d1_lib.c
 openssl-latest/ssl/record/rec_layer_s3.c
 openssl-latest/ssl/record/ssl3_buffer.c
 openssl-latest/ssl/record/ssl3_record.c
 openssl-latest/ssl/s3_cbc.c
 openssl-latest/ssl/s3_lib.c
 openssl-latest/ssl/s3_msg.c
 openssl-latest/ssl/ssl_asn1.c
 openssl-latest/ssl/ssl_cert.c
 openssl-latest/ssl/ssl_ciph.c
 openssl-latest/ssl/ssl_err.c
 openssl-latest/ssl/ssl_lib.c
 openssl-latest/ssl/ssl_local.h
 openssl-latest/ssl/statem/README
 openssl-latest/ssl/statem/extensions.c
 openssl-latest/ssl/statem/extensions_clnt.c
 openssl-latest/ssl/statem/extensions_cust.c
 openssl-latest/ssl/statem/extensions_srvr.c
 openssl-latest/ssl/statem/statem_clnt.c
 openssl-latest/ssl/statem/statem_lib.c
 openssl-latest/ssl/statem/statem_local.h
 openssl-latest/ssl/statem/statem_srvr.c
 openssl-latest/ssl/t1_lib.c
 openssl-latest/test/afalgtest.c
 openssl-latest/test/asn1_decode_test.c
 openssl-latest/test/asn1_internal_test.c
 openssl-latest/test/bio_memleak_test.c
 openssl-latest/test/bntest.c
 openssl-latest/test/build.info
 openssl-latest/test/certs/ee-self-signed.pem
 openssl-latest/test/certs/setup.sh
 openssl-latest/test/clienthellotest.c
 openssl-latest/test/danetest.c
 openssl-latest/test/ec_internal_test.c
 openssl-latest/test/ectest.c
 openssl-latest/test/evp_extra_test.c
 openssl-latest/test/evp_test.c
 openssl-latest/test/packettest.c
 openssl-latest/test/recipes/01-test_symbol_presence.t
 openssl-latest/test/recipes/10-test_bn_data/bnmod.txt
 openssl-latest/test/recipes/15-test_genrsa.t
 openssl-latest/test/recipes/20-test_dgst.t
 openssl-latest/test/recipes/25-test_req.t
 openssl-latest/test/recipes/25-test_verify.t
 openssl-latest/test/recipes/30-test_evp_data/evpkdf.txt
 openssl-latest/test/recipes/30-test_evp_data/evppkey.txt
 openssl-latest/test/recipes/70-test_tls13kexmodes.t
 openssl-latest/test/recipes/70-test_verify_extra.t
 openssl-latest/test/recipes/80-test_dane.t
 openssl-latest/test/recipes/80-test_ssl_old.t
 openssl-latest/test/rsa_test.c
 openssl-latest/test/sm2_internal_test.c
 openssl-latest/test/sslapitest.c
 openssl-latest/test/ssltest_old.c
 openssl-latest/test/testutil/format_output.c
 openssl-latest/test/testutil/tests.c
 openssl-latest/test/verify_extra_test.c
 openssl-latest/test/x509_time_test.c
 openssl-latest/util/mkdir-p.pl
dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/openssl_1.1.1n-0+deb11u4+iot2050.diff.MdLX1a
dpkg-source: info: you can integrate the local changes with dpkg-source --commit
dpkg-buildpackage: error: dpkg-source -I -b . subprocess returned exit status 2
WARNING: exit code 2 from a shell command.

ERROR: Logfile of failure stored in: /build/tmp/work/iot2050-debian-arm64/openssl/latest-r0/temp/log.do_dpkg_build.126684
ERROR: Task (/repo/recipes-security/openssl/openssl_latest.bb:do_dpkg_build) failed with exit code '1'
NOTE: Tasks Summary: Attempted 285 tasks of which 84 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /repo/recipes-security/openssl/openssl_latest.bb:do_dpkg_build
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
2023-09-21 08:53:51 - ERROR    - Command returned non-zero exit status 1

Can you please help with this issue? Tags should point to something reproducible and stable.

jan-kiszka commented 9 months ago

Please try building head of the stable/V01.02 branch instead.

Erokos commented 9 months ago

Thank you for the prompt response, on this branch I get this:

ERROR: openssl-latest-r0 do_apt_unpack: Execution of '/build/tmp/work/iot2050-debian-arm64/openssl/latest-r0/temp/run.do_apt_unpack.41089' failed with exit code 1:
cp: -r not specified; omitting directory '/downloads/deb-src/iot2050-debian/openssl/bullseye'
WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /build/tmp/work/iot2050-debian-arm64/openssl/latest-r0/temp/log.do_apt_unpack.41089
Log data follows:
| DEBUG: Executing shell function do_apt_unpack
| cp: -r not specified; omitting directory '/downloads/deb-src/iot2050-debian/openssl/bullseye'
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/build/tmp/work/iot2050-debian-arm64/openssl/latest-r0/temp/run.do_apt_unpack.41089' failed with exit code 1:
| cp: -r not specified; omitting directory '/downloads/deb-src/iot2050-debian/openssl/bullseye'
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/repo/recipes-security/openssl/openssl_latest.bb:do_apt_unpack) failed with exit code '1'
NOTE: Tasks Summary: Attempted 217 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /repo/recipes-security/openssl/openssl_latest.bb:do_apt_unpack
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
2023-09-21 11:50:36 - ERROR    - Command returned non-zero exit status 1
Erokos commented 9 months ago

I've also tried commenting out the DEPENDS += openssl line and removed the node-red packages from the recipe because it was then failing because of them. Now I got the farthest but still fails:

Errors were encountered while processing:
 customizations-example
E: Sub-process /usr/bin/dpkg returned an error code (1)
WARNING: exit code 100 from a shell command.

ERROR: Logfile of failure stored in: /build/tmp/work/iot2050-debian-arm64/iot2050-image-example-iot2050-wic-img/1.0-r0/temp/log.do_rootfs_install.673
ERROR: Task (/repo/recipes-core/images/iot2050-image-example.bb:do_rootfs_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 269 tasks of which 255 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /repo/recipes-core/images/iot2050-image-example.bb:do_rootfs_install

I wonder is this possible to build?

jan-kiszka commented 9 months ago

Was this a clean rebuild attempt? I will retry locally as well.

Erokos commented 9 months ago

Yes it was a clean rebuild. Have you managed to successfully build it?

jan-kiszka commented 9 months ago

I did a clean build locally with your command line and 3c0f8553fe2ec15c5f241d988b06699d20b7d5bd (stable/V01.02) without problems.

Erokos commented 9 months ago

Ok thank you, I'll try to see where the problem is with my setup.