<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12810</bug_id>
          
          <creation_ts>2018-06-22 09:52:56 +0000</creation_ts>
          <short_desc>openssl do_compile failed when ccache enabled</short_desc>
          <delta_ts>2018-09-26 10:56:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.7</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mingli Yu">mingli.yu</reporter>
          <assigned_to name="Mingli Yu">mingli.yu</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80903</commentid>
    <comment_count>0</comment_count>
    <who name="Mingli Yu">mingli.yu</who>
    <bug_when>2018-06-22 09:52:56 +0000</bug_when>
    <thetext>Steps to reproduce:
1, mkdir -p /home/prj/yocto &amp;&amp; cd /home/prj/yocto
2, git clone git://git.yoctoproject.org/poky
3, . oe-init-build-env build
4, mkdir -p /home/prj/yocto/SSTATE_1018_US &amp;&amp; mkdir -p /home/prj/yocto/CACHE_1018_US
5, update MACHINE ??= &quot;qemux86&quot; to MACHINE ??= &quot;qemux86-64&quot; in conf/local.conf
6, add below lines in to local.conf
SSTATE_DIR = &quot;/home/prj/yocto/SSTATE_1018_US&quot;
INHERIT += &quot;ccache&quot;
CCACHE_DIR = &quot;/home/prj/yocto/CACHE_1018_US&quot;
7, bitbake openssl

ERROR: openssl-1.0.2o-r0 do_compile: oe_runmake failed
ERROR: openssl-1.0.2o-r0 do_compile: Function failed: do_compile (log file is located at /home/prj/yocto/build/tmp/work/core2-64-poky-linux/openssl/1.0.2o-r0/temp/log.do_compile.39540)
ERROR: Logfile of failure stored in: /home/prj/yocto/build/tmp/work/core2-64-poky-linux/openssl/1.0.2o-r0/temp/log.do_compile.39540
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 128 depend
| making depend in crypto...
| make[1]: warning: jobserver unavailable: using -j1.  Add &apos;+&apos; to parent make rule.
| make[1]: Entering directory &apos;/home/prj/yocto/build/tmp/work/core2-64-poky-linux/openssl/1.0.2o-r0/openssl-1.0.2o/crypto&apos;
| ccache: invalid option -- &apos;D&apos;
| Usage:
|     ccache [options]
|     ccache compiler [compiler options]
|     compiler [compiler options]          (via symbolic link)
| 
| Options:
|     -c, --cleanup         delete old files and recalculate size counters
|                           (normally not needed as this is done automatically)
|     -C, --clear           clear the cache completely (except configuration)
|     -F, --max-files=N     set maximum number of files in cache to N (use 0 for
|                           no limit)
|     -M, --max-size=SIZE   set maximum size of cache to SIZE (use 0 for no
|                           limit); available suffixes: k, M, G, T (decimal) and
|                           Ki, Mi, Gi, Ti (binary); default suffix: G
|     -o, --set-config=K=V  set configuration key K to value V
|     -p, --print-config    print current configuration options
|     -s, --show-stats      show statistics summary
|     -z, --zero-stats      zero statistics counters
| 
|     -h, --help            print this help text
|     -V, --version         print version and copyright information
| 
| See also &lt;https://ccache.samba.org&gt;.
| mv: cannot stat &apos;Makefile.new&apos;: No such file or directory
| Makefile:136: recipe for target &apos;local_depend&apos; failed
| make[1]: *** [local_depend] Error 1
| make[1]: Leaving directory &apos;/home/prj/yocto/build/tmp/work/core2-64-poky-linux/openssl/1.0.2o-r0/openssl-1.0.2o/crypto&apos;
| Makefile:492: recipe for target &apos;depend&apos; failed
| make: *** [depend] Error 1
| ERROR: oe_runmake failed
| WARNING: /home/prj/yocto/build/tmp/work/core2-64-poky-linux/openssl/1.0.2o-r0/temp/run.do_compile.39540:1 exit 1 from &apos;exit 1&apos;
| ERROR: Function failed: do_compile (log file is located at /home/prj/yocto/build/tmp/work/core2-64-poky-linux/openssl/1.0.2o-r0/temp/log.do_compile.39540)
ERROR: Task (/home/prj/yocto/poky/meta/recipes-connectivity/openssl/openssl_1.0.2o.bb:do_compile) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 784 tasks of which 768 didn&apos;t need to be rerun and 1 failed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80964</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-06-28 14:44:05 +0000</bug_when>
    <thetext>I&apos;ve just sent a patch to disable ccache in openssl, which is a workaround instead of a fix but might be the best we can do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81198</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2018-07-27 17:32:33 +0000</bug_when>
    <thetext>Mingli please work on this as a medium priority bug, even after the 2.6 release would be okay with me since it&apos;s a build optimization that few people use.

Note that openssl-1.1 also has problems with ccache in some cases and has disabled it or clang-3.6:

$ cd .../openssl/openssl.git 
$ git log -1 --stat 4b8574461b92ea64ef048335f942995a09025331
commit 4b8574461b92ea64ef048335f942995a09025331
Author: Emilia Kasper &lt;emilia@openssl.org&gt;
Date:   Sat Mar 12 17:18:25 2016 +0100

    Workaround for false -Warray-bounds in Travis
    
    ccache + clang produces a false strcmp warning, see
    https://llvm.org/bugs/show_bug.cgi?id=20144
    
    Since this only happens with ccache and --strict-warnings, and
    only with certain versions of glibc / clang, disabling
    ccache is a reasonable short-term workaround.
    
    Reviewed-by: Richard Levitte &lt;levitte@openssl.org&gt;

 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
rmacleod@fidler openssl/openssl.git $ git tag --contains 4b8574461b92ea64ef048335f942995a09025331 | head -1
OpenSSL_1_1_0</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81217</commentid>
    <comment_count>3</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2018-08-01 06:52:08 +0000</bug_when>
    <thetext>Hi Randy,

Since Ross has workarounded the issue, it doesn&apos;t break anything now, and seldom ones use ccache, so I think that we can hold on the bug until upstream fixes it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81632</commentid>
    <comment_count>4</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2018-09-26 10:56:02 +0000</bug_when>
    <thetext>Merged in oe-core 8f9ceebb197dba10f2d08449de2dd64584de06bb</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>