Bug 3547 - mkelfimage-native: do_compile failed if host does not install libz
Summary: mkelfimage-native: do_compile failed if host does not install libz
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: devtools / tool chain (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.4
Assignee: Hongxu Jia
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2012-12-06 11:37 UTC by Hongxu Jia
Modified: 2013-01-11 09:25 UTC (History)
10 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hongxu Jia 2012-12-06 11:37:36 UTC
OS:Fedora 17
tree/branch: poky/master
commit 381c4b69c7e8b452f4d3de2f8214e6e5f6a9abe7

*problem
Compile mkelfimage-native failed if host does not 
install libz.
>>log<<
...
fatal error: zlib.h: No such file or directory
/usr/bin/ld: cannot find -lz
...

*analysis
If the host does not install libz, bitbake mkelfimage 
works well but mkelfimage-native failed, because
mkelfimage-native find libz from host dir, not from 
the staging directories.

*solution
1.Config LDFLAGS and LDFALGS_class-native in bb 
file to let mkelfimage and mkelfimage-native 
find libz and zlib.h from the staging directories.

2.Modify confiugre.ac to let makefile find libz 
and zlib.h by CFLAGS and LDFLAGS. Because the 
original Makefile don't make use of them.
Comment 2 liang li 2013-01-11 09:25:35 UTC
verified on git commit 66f4c8a674d9f8db958b13866af4d63ab8cbcd44