Bug 2820

Summary: slang: pcre_module is never built
Product: [Build System, Metadata & Runtime] OE-Core Reporter: LiRongQing <rongqing.li>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandrux.palalau, hongxu.jia, liang.li2, liezhi.yang, meta.mr.watcher, meta.watcher, Qi.Chen, sgw, yi.zhao, zhenfeng.zhao
Version: 1.3   
Target Milestone: 1.4 M2   
Hardware: x86   
OS: Multiple   
Whiteboard: Design
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---
Attachments:
Description Flags
Slang compilation error log. none

Description LiRongQing 2012-07-24 06:58:58 UTC
when configure file checks if there is libpcre.so, it always check on host libdir. so even if pcre has been included, this module is not built.
Comment 1 Saul Wold 2012-07-24 14:39:27 UTC
Is this a hard dependency for slang?  It looks like slang currently includes a DEPENDS on pcre, so can you provide more details?
Comment 2 LiRongQing 2012-07-25 00:53:00 UTC
slang has depends on pcre, but the configure file will check if there is libpcre.so again.
Comment 3 LiRongQing 2012-07-25 07:04:23 UTC
slang has depends on pcre, but the configure file will check if there is libpcre.so again, and it always check host dir, the result is if host does
not install pcre, the pcre-module will be not compile.

If pcre installation dirs are different between host and target,  when link pcre-module, the RPATH for ld is wrong dir.
Comment 4 Saul Wold 2012-07-26 07:04:43 UTC
replied to patch on mailing list
Comment 6 Alexandru Palalau 2012-08-30 11:22:46 UTC
Created attachment 751 [details]
Slang compilation error log.
Comment 7 Alexandru Palalau 2012-08-30 12:08:22 UTC
/mnt/ssd/poky/build/tmp/work/i586-poky-linux/slang-2.2.4-r10/slang-2.2.4/modules/onig-module.c:27:23: fatal error: oniguruma.h: No such file or directory
compilation terminated.
make[1]: *** [objs/onig-module.so] Error 1
make[1]: Leaving directory `/mnt/ssd/poky/build/tmp/work/i586-poky-linux/slang-2.2.4-r10/slang-2.2.4/modules'
make: *** [elf] Error 2
ERROR: oe_runmake failed
Comment 8 Hongxu Jia 2012-11-26 11:57:31 UTC
*Analysis
1. In slang-2.2.4 source codes, its autoconf will checks for the existence of following libraries and header files:
   pcre, onig, zlib, iconv, png;

2. If exists, the corresponding source file will be compiled, including:
   pcre-module.c, onig-module.c, zlib-module.c, iconv-module.c, png-module.c 

3. In poky/meta/recipes-support, only supports libpcre, libiconv, and the others are not implemented.

4. But in slang_2.2.4.bb, only explicitly disable zlib and png by
    EXTRA_OECONF += " --without-z --without-png ..."

5. So if the host has installed onig, and slang's autoconf incorrectly tests its existence, the error showed in the above occurs.

*Resolution
explicitly disable onig by EXTRA_OECONF += " --without-z --without-png --without-ongi ..." in slang_2.2.4.bb
Comment 9 Hongxu Jia 2012-12-06 02:36:33 UTC
slang: explicity disable invoking onig module
    
We don't implement module onig in our recipes,
so we should explicity disable its invoke in slang
to avoid that slang's configure incorrectly tests
the existence of onig.

The patch has been merged into git://git.pokylinux.org/poky.git origin/master.
Comment 10 Hongxu Jia 2012-12-06 02:47:24 UTC
(In reply to comment #9)
> slang: explicity disable invoking onig module
>     
> We don't implement module onig in our recipes,
> so we should explicity disable its invoke in slang
> to avoid that slang's configure incorrectly tests
> the existence of onig.
> 
> The patch has been merged into git://git.pokylinux.org/poky.git

Merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=9a9710169d01788725ace91dbea0b8a268cede7c

> origin/master.
Comment 11 liang li 2012-12-06 03:28:18 UTC
no compile error when run "bitbake slang"(slang-2.2.4-r12) with git master commit:381c4b69c7e8b452f4d3de2f8214e6e5f6a9abe7
Comment 12 liang li 2012-12-06 03:43:10 UTC
also pcre-module.so is found in slang rpm (slang-2.2.4-r12).