| Summary: | ERROR: QA Issue: File xxx in package contained reference to tmpdir [buildpaths] | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Wenzong.Fan <wenzong.fan> |
| Component: | core | Assignee: | Hongxu Jia <hongxu.jia> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | Medium | CC: | bluelightning, meta.mr.watcher, meta.watcher, ross.burton |
| Version: | 1.8 | ||
| Target Milestone: | 2.2 M1 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
| Bug Depends on: | |||
| Bug Blocks: | 8446, 8458, 9169 | ||
|
Description
Wenzong.Fan
2014-12-11 03:11:58 UTC
FWIW, this check has never really been practically usable, and most of these aren't actually causing any problems right now. However, Richard pointed out we shouldn't really have target paths going into output files, and this will become more of a concern in the context of bug 6992 and bug 5866. So, if we can fix some of these that would be ideal if isn't too difficult, however fixing them all isn't high priority. Introduce buildpaths issue
1. Exist in ELF fiels DWARF (debugging information)
gcc compiled with '-g' option.
Solutions:
Add option '-fdebug-prefix-map' to traslate build path to target path.
Make sure use option ${DEBUG_FLAGS} to compile
2. Exist in ELF files section .rodata ( Read-only data)
'__FILE__' is used in C/C++ source/hearder files.
1) If '__FILE__' exists in source file, use relative path to compile.
gcc /absolute_dir/test.c -o test --> gcc ../relative_dir/test.c -o test
Solutions:
- Use relative path to run configure.
- Improve python distutils module to use relative path to compile
C/C++ source file
- Improve cmake-native which generate Makefile to use relative path
to compile C/C++ source file
2) TODO: If '__FILE__' exists in hearder file. No way?(Need to improve gcc?)
3. Exist in ANSII Text fiels (Makefile/Configure)
Solution:
- Process the text files to translate build path to target path
- Directly remove build path without side effect.
Such as removing --sysroot and -fdebug-prefix-map in Makefile is no harm.
4. Exist in python compiled file (Python bytecode, .pyc/.pyo)
Invoke python with absolute dir.
python -m py_compile /absolute_dir/test.py
Solution: - Improve distutils, get the "--root" directory supplied to the "install"
command, and use it as a prefix to strip off the purported filename
encoded in bytecode files.
- Manually update specific bytecode file by invoking py_compile module.
py_compile.compile(file, cfile=None, dfile=None, doraise=False), use
target path for 'dfile'
Introduce buildpaths QA issue
1. Exist in ELF files DWARF (debugging information)
gcc compiled with '-g' option.
Solutions:
Add option '-fdebug-prefix-map' to translate build path to target path.
Make sure use option ${DEBUG_FLAGS} to compile
2. Exist in ELF files section .rodata ( Read-only data)
'__FILE__' is used in C/C++ source/header files.
1) If '__FILE__' exists in source file, use relative path to compile.
gcc /absolute_dir/test.c -o test --> gcc ../relative_dir/test.c -o test
Solutions:
- Use relative path to run configure.
- Improve python distutils module to use relative path to compile
C/C++ source file
- Improve cmake-native which generate Makefile to use relative path
to compile C/C++ source file
2) TODO: If '__FILE__' exists in header file. No way?(Need to improve gcc?)
3. Exist in ANSII Text files (Makefile/Configure)
Solution:
- Process the text files to translate build path to target path
- Directly remove build path without side effect.
Such as removing --sysroot and -fdebug-prefix-map in Makefile is no harm.
4. Exist in python compiled file (Python bytecode, .pyc/.pyo)
Invoke python with absolute dir.
python -m py_compile /absolute_dir/test.py
Solution: - Improve distutils, get the "--root" directory supplied to the "install"
command, and use it as a prefix to strip off the purported filename
encoded in bytecode files.
- Manually update specific bytecode file by invoking py_compile module.
py_compile.compile(file, cfile=None, dfile=None, doraise=False), use
target path for 'dfile'
There have been many patches towards fixing this. Hongxu Jia, would you consider this resolved now? (In reply to comment #4) > There have been many patches towards fixing this. Hongxu Jia, would you > consider this resolved now? Agree //Hongxu |