Skip to content

Host Path Included in Build Output Causes Yocto Build Failure #1087

Open
@surainbow

Description

@surainbow

Description
Following the provided CMake build instructions:

mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/.local/lapack ..
cmake --build . -j --target install

Upon inspecting the build.make file, the generated build command appears as follows:
cd /buildarea6/pzha1-cn/upstream/lapack-buil/SRC && /folk/pzha1-cn/homebrew/bin/gfortran $(Fortran_DEFINES) $(Fortran_INCLUDES) $(Fortran_FLAGS) -cpp -c /buildarea6/pzha1-cn/upstream/lapack/SRC/xerbla.f -o CMakeFiles/lapack_obj.dir/xerbla.f.o
Checking the resulting xerbla.f.o file using strings and readelf reveals that the compiled object file contains host paths:

$strings BLAS/SRC/CMakeFiles/blas_64_obj.dir/blas_64_obj/xerbla.f.o | grep buildarea6
/buildarea6/pzha1-cn/upstream/lapack-buil/BLAS/SRC/blas_64_obj/xerbla.f

$readelf -x .rodata.str1.8 BLAS/SRC/CMakeFiles/blas_64_obj.dir/blas_64_obj/xerbla.f.o
Hex dump of section '.rodata.str1.8':
  0x00000000 2f627569 6c646172 6561362f 707a6861 /buildarea6/pzha
  0x00000010 312d636e 2f757073 74726561 6d2f6c61 1-cn/upstream/la
  0x00000020 7061636b 2d627569 6c2f424c 41532f53 pack-buil/BLAS/S
  0x00000030 52432f62 6c61735f 36345f6f 626a2f78 RC/blas_64_obj/x
  0x00000040 6572626c 612e6600 28202720 2a2a204f erbla.f.( ' ** O
  0x00000050 6e20656e 74727920 746f2027 2c20412c n entry to ', A,
  0x00000060 20272070 6172616d 65746572 206e756d  ' parameter num
  0x00000070 62657220 272c2049 322c2027 20686164 ber ', I2, ' had
  0x00000080 20272c20 20202020 20202761 6e20696c  ',       'an il
  0x00000090 6c656761 6c207661 6c756527 202900   legal value' ).

The inclusion of host paths (e.g., /buildarea6/pzha1-cn/upstream/lapack-buil/...) in the .o file leads to a failure in the Yocto build process during the do_package_qa step.

Host paths embedded in object files violate Yocto's reproducibility and deterministic build requirements, causing the build to fail.

Can anyone assist in resolving this issue of host paths being included in the build artifacts? Any guidance or patches to ensure a clean and reproducible build without embedded host-specific paths would be greatly appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions