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

Test if meta-mono test image can be a reproducible build #161

Open
ajlennon opened this issue Feb 6, 2023 · 2 comments
Open

Test if meta-mono test image can be a reproducible build #161

ajlennon opened this issue Feb 6, 2023 · 2 comments

Comments

@ajlennon
Copy link
Member

ajlennon commented Feb 6, 2023

No description provided.

@zboszor
Copy link
Collaborator

zboszor commented Aug 15, 2023

I get a lot of warnings of this kind, they are also in CI:

WARNING: mono-6.12.0.182-r0 do_package_qa: QA Issue: File /usr/lib/mono/4.5/gacutil.exe in package mono-libs-4.5 contains reference to TMPDIR

The problem is that the PDB (debuginfo?) file path is embedded in the DLL and EXE files, and it's the native builddir:

$ strings usr/lib/mono/4.5/gacutil.exe | grep tmp
.../tmp-sicom-glibc/work/x86_64-linux/mono-native/6.12.0.182-r0/mono-6.12.0.182/mcs/class/lib/net_4_x-linux/gacutil.pdb

Possibly part of the problem is that the native build artifacts are used to speed up building the target build via this in mono-base.inc:

do_install:append() {
        install -d ${D}${libdir}/${PN}
        for lib in ${MONOLIBS}; do
            if [ -d "${STAGING_DIR_NATIVE}${libdir}/${PN}/$lib" ]; then
                cp -af --no-preserve=ownership \
                    ${STAGING_DIR_NATIVE}${libdir}/${PN}/$lib ${D}${libdir}/${PN}
            fi
        done
        # AJL - Remove mscorlib.dll.so and mcs.exe.so files copied from mono-native to the mono destination
        find ${D}${libdir}/${PN} -name *.dll.so -o -name *.exe.so | xargs -i rm {}
}

The target build for C projects get the -fdebug-prefix-map=src=dst option so whatever file path ends up in *.o, *.so or executables, the mapping will get corrected to use the correct installation file prefix as on a target system.

mcs has a similar switch:

$ mcs --help
...
   -pathmap:K=V[,Kn=Vn] Sets a mapping for source path names used in generated output
...

We should

  1. use a correct target build (maybe the native build may still be used? testing is needed) and
  2. patch the build of Mono and any Mono based project's build to use -pathmap:... for compiling EXE/DLL files

@ajlennon
Copy link
Member Author

Sounds good to me

@zboszor zboszor mentioned this issue Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants