Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build warnings on DTS #833

Open
macpijan opened this issue May 14, 2024 · 20 comments
Open

Fix build warnings on DTS #833

macpijan opened this issue May 14, 2024 · 20 comments
Assignees
Labels
bug Something isn't working DasharoToolsSuite

Comments

@macpijan
Copy link
Contributor

Component

Dasharo Tools Suite

Device

other

Dasharo version

No response

Dasharo Tools Suite version

No response

Brief summary

There are several warning when building DTS

How reproducible

100% when building from clean directory

How to reproduce

Build DTS image from: Dasharo/meta-dts#122

Expected behavior

No warnings

Actual behavior

Following warnings have been identified:

  • linux-yocto
WARNING: linux-yocto-6.6.21+git-r0 do_kernel_configcheck: [kernel config]: This BSP contains fragments with warnings:


[INFO]: the following symbols were not found in the active configuration:
     - CONFIG_EFI_VARS
     - CONFIG_INTEL_MENLOW
  • systemd
WARNING: systemd-1_255.4-r0 do_install: Using /home/root as root user's home directory is not fully supported by systemd
  • acpi-call
WARNING: systemd-1_255.4-r0 do_install: Using /home/root as root user's home directory is not fully supported by systemd
  • others (buildpaths QA issue)
WARNING: gcab-1.6-r0 do_package_qa: QA Issue: File /usr/src/debug/gcab/1.6/libgcab/gcab-enums.c in package gcab-src contains reference to TMPDIR [buildpaths]
WARNING: intelp2m-git-r0 do_package_qa: QA Issue: File /usr/sbin/intelp2m in package intelp2m contains reference to TMPDIR [buildpaths]
WARNING: nvramtool-git-r0 do_package_qa: QA Issue: File /usr/sbin/.debug/nvramtool in package nvramtool-dbg contains reference to TMPDIR [buildpaths]

Screenshots

No response

Additional context

No response

Solutions you've tried

No response

@m-iwanicki
Copy link

There is also another warning on current develop (built using dev cache):

WARNING: smmstoretool-git-r0 do_package_qa: QA Issue: File /usr/bin/.debug/smmstoretool in package smmstoretool-dbg contains reference to TMPDIR [buildpaths]

Binary contains build path e.g.

$ grep -ao "/build/.*" build/tmp/work/core2-64-dts-linux/smmstoretool/git/package/usr/bin/.debug/smmstoretool | head -c 105
/build/tmp/work/core2-64-dts-linux/smmstoretool/git/git/src/vendorcode/intel/edk2/UDK2017/MdePkg/Include/

@artur-rs
Copy link
Member

artur-rs commented Sep 4, 2024

@m-iwanicki Thanks, I'm scheduling this for the team now.

@DaniilKl
Copy link
Contributor

DaniilKl commented Sep 4, 2024

This issue #729 may be useful here.

@artur-rs artur-rs assigned dancios and unassigned artur-rs Sep 4, 2024
@dancios
Copy link

dancios commented Sep 5, 2024

@DaniilKl Thanks for input but for 6.X kernel series

  • CONFIG_EFI_VARS
  • CONFIG_INTEL_MENLOW
    are not deprecated?

@macpijan
Copy link
Contributor Author

macpijan commented Sep 5, 2024

@dancios What kind of answer do expect? Is your question based on any source? If so, please link it. That would help to driver the discussion. Otherwise it seems that to answer your question, we would need to look it up ourselves.

@m-iwanicki
Copy link

torvalds/linux@0f5b2c6

I usually check https://cateee.net/lkddb/ to see kconfig options and in which versions they are available e.g.:
https://cateee.net/lkddb/web-lkddb/EFI_VARS.html

@dancios
Copy link

dancios commented Sep 5, 2024

@macpijan I asked doing my quick research not seeing such opts in trunk.
CONFIG_INTEL_MENLOW: (DROPPED - No Active Users)
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/thermal/intel/intel_menlow.c?h=v6.10.7&id=2b6a7409ac390d3edb49822ea602ac129486ea3f

CONFIG_EFI_VARS: (deprecated)
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/firmware/efi/efivars.c?h=v6.10.8&id=0f5b2c69a4cbe4166ca24b76d5ada98ed2867741

@m-iwanicki
Copy link

Current replacement: https://cateee.net/lkddb/web-lkddb/EFIVAR_FS.html

@dancios
Copy link

dancios commented Sep 5, 2024

@macpijan @m-iwanicki

WARNING: nvramtool-git-r0 do_package_qa: QA Issue: File /usr/sbin/.debug/nvramtool in package nvramtool-dbg contains reference to TMPDIR [buildpaths]
WARNING: intelp2m-git-r0 do_package_qa: QA Issue: File /usr/sbin/intelp2m in package intelp2m contains reference to TMPDIR [buildpaths]
WARNING: wolfssl-5.7.0-r0 do_package_qa: QA Issue: File /usr/lib/libwolfssl.so.42.1.0 in package wolfssl contains reference to TMPDIR [buildpaths]
WARNING: smmstoretool-git-r0 do_package_qa: QA Issue: File /usr/bin/.debug/smmstoretool in package smmstoretool-dbg contains reference to TMPDIR [buildpaths]
WARNING: gcab-1.6-r0 do_package_qa: QA Issue: File /usr/src/debug/gcab/1.6/libgcab/gcab-enums.c in package gcab-src contains reference to TMPDIR [buildpaths]

i found error reference in yocto documentation.

File <filename> in package <packagename> contains reference to TMPDIR [buildpaths]

        This check ensures that build system paths (including [TMPDIR](https://docs.yoctoproject.org/ref-manual/variables.html#term-TMPDIR)) do not appear in output files, which not only leaks build system configuration into the target, but also hinders binary reproducibility as the output will change if the build system configuration changes.

        Typically these paths will enter the output through some mechanism in the configuration or compilation of the software being built by the recipe. To resolve this issue you will need to determine how the detected path is entering the output. Sometimes it may require adjusting scripts or code to use a relative path rather than an absolute one, or to pick up the path from runtime configuration or environment variables.

I understand that it's releated with build susbsystem GO/C/WhateeverBIN not directly with YOCTO/DTS but project tjhat work with recipies like intelp2m/nvramtool/wolfssl?

@dancios
Copy link

dancios commented Sep 9, 2024

Series that remove:

WARNING: nvramtool-git-r0 do_package_qa: QA Issue: File /usr/sbin/.debug/nvramtool in package nvramtool-dbg contains reference to TMPDIR [buildpaths]

PR160

WARNING: intelp2m-git-r0 do_package_qa: QA Issue: File /usr/sbin/intelp2m in package intelp2m contains reference to TMPDIR [buildpaths]

PR159

WARNING: smmstoretool-git-r0 do_package_qa: QA Issue: File /usr/bin/.debug/smmstoretool in package smmstoretool-dbg contains reference to TMPDIR [buildpaths]

PR161

@m-iwanicki
Copy link

@dancios you wrote

INHIBIT_PACKAGE_DEBUG_SPLIT="1" this change force system not to build debug packages

Does it stop building -dbg packages or includes all debug and source information inside normal package?

@dancios
Copy link

dancios commented Sep 10, 2024

@dancios you wrote

INHIBIT_PACKAGE_DEBUG_SPLIT="1" this change force system not to build debug packages

Does it stop building -dbg packages or includes all debug and source information inside normal package?

@m-iwanicki
This is tricky :>
INHIBIT_PACKAGE_DEBUG_SPLIT = "1" is including all information in package - but in the end binary are striiped so basically all debug data is lost and we want it to silent this warning. In case when you want have one packege with debug data you also add INHIBIT_PACKAGE_STRIP = "1". If -dbg is required we can only silence this build leaving as it is.

@m-iwanicki
Copy link

I don't think we used -dbg packages anyway I was just concerned that debug parts would get included in normal package.

@dancios
Copy link

dancios commented Sep 11, 2024

WARNING: systemd-1_255.4-r0 do_install: Using /home/root as root user's home directory is not fully supported by systemd                                                                                                             

PR164


WARNING: gcab-1.6-r0 do_package_qa: QA Issue: File /usr/src/debug/gcab/1.6/libgcab/gcab-enums.c in package gcab-src contains reference to TMPDIR [buildpaths]

PR165


WARNING: wolfssl-5.7.0-r0 do_package_qa: QA Issue: File /usr/lib/libwolfssl.so.42.1.0 in package wolfssl contains reference to TMPDIR [buildpaths]

PR166

@m-iwanicki
Copy link

@dancios Would be easier to have all those changes in one PR (with multiple commits), no need to rebuild image 6 times

@dancios
Copy link

dancios commented Sep 11, 2024

@dancios Would be easier to have all those changes in one PR (with multiple commits), no need to rebuild image 6 times

@m-iwanicki
Dasharo/meta-dts#167 suggestion makes sense taking in consideration rebuild times.
To make faster build without rm -fr build/ i found that this may be sufficient:

bitbake -ccleansstate smmstoretool gcab systemd smmstoretool wolfssl nvramtool linux-yocto

@DaniilKl
Copy link
Contributor

DaniilKl commented Sep 27, 2024

@m-iwanicki, what is the status of this issue? I see here some PRs which are said to fix the issues, do they work?

@m-iwanicki
Copy link

@DaniilKl I haven't tested them yet as I couldn't find time to do that. I'll run a clean build without cache on builder to see if there are any warnings still.

@m-iwanicki
Copy link

@DaniilKl 2 comments to be addressed and PR could be merged. Build completed without warnings.

@artur-rs
Copy link
Member

We can confirm whether warnings from this comment could be fixed here as well: Dasharo/meta-dts#179 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working DasharoToolsSuite
Projects
None yet
Development

No branches or pull requests

5 participants