<div dir="ltr">This change is breaking spice build and might break some other components as well.<div><br></div><div>It was discussed in 2008 here:</div><div><a href="https://bugzilla.redhat.com/show_bug.cgi?id=427616">https://bugzilla.redhat.com/show_bug.cgi?id=427616</a><br></div><div><br></div><div>And now <span style="color:rgb(0,0,0);white-space:pre-wrap">HAVE_STDLIB_H is here again with the upgrade from 1.5.3 to 2.0</span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap">spice-native fails like this:</span></div><div><font color="#000000"><span style="white-space:pre-wrap">| In file included from ../../git/spice-common/common/mem.h:27:0,                                                                                                            
|                  from ../../git/spice-common/common/marshaller.h:25,
|                  from ../../git/server/red-common.h:30,                                                                                                                    
|                  from ../../git/server/jpeg-encoder.c:24:
| ../config.h:65:0: error: &quot;HAVE_STDLIB_H&quot; redefined [-Werror]                                                                                                               
|  #define HAVE_STDLIB_H 1    
|                                                                                                                                                                            
| In file included fromx86_64-linux/spice-native/0.14.0+gitAUTOINC+f1050bfc76_95743f40a2-r0/recipe-sysroot-native/usr/include/jpeglib.h:29:0,                                                                                                                                                           
|                  from ../../git/server/jpeg-encoder.c:22:
|x86_64-linux/spice-native/0.14.0+gitAUTOINC+f1050bfc76_95743f40a2-r0/recipe-sysroot-native/usr/include/jconfig.h:42:0: note: this is the location of the previous definition
|  #define HAVE_STDLIB_H                               </span></font><br></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><span style="white-space:pre-wrap">It used to define it with 1 to match the rest of the world, here is the relevant part of jconfig.h diff between 1.5.3 and 2.0.0:</span></font></div><div><font color="#000000"><span style="white-space:pre-wrap"><br></span></font></div><div><font color="#000000"><div><span style="white-space:pre-wrap">@@ -28,43 +33,37 @@           </span></div><div><span style="white-space:pre-wrap"> #define BITS_IN_JSAMPLE  8      /* use 8 or 12 */                                                                                                                           </span></div><div><span style="white-space:pre-wrap">                              </span></div><div><span style="white-space:pre-wrap"> /* Define to 1 if you have the &lt;locale.h&gt; header file. */                                                                                                                   </span></div><div><span style="white-space:pre-wrap">-#define HAVE_LOCALE_H 1      </span></div><div><span style="white-space:pre-wrap">+#define HAVE_LOCALE_H                                                                                                                                                       </span></div><div><span style="white-space:pre-wrap">                              </span></div><div><span style="white-space:pre-wrap"> /* Define to 1 if you have the &lt;stddef.h&gt; header file. */                                                                                                                   </span></div><div><span style="white-space:pre-wrap">-#define HAVE_STDDEF_H 1      </span></div><div><span style="white-space:pre-wrap">+#define HAVE_STDDEF_H                                                                                                                                                       </span></div><div><span style="white-space:pre-wrap">                              </span></div><div><span style="white-space:pre-wrap"> /* Define to 1 if you have the &lt;stdlib.h&gt; header file. */</span></div><div><span style="white-space:pre-wrap">-#define HAVE_STDLIB_H 1</span></div><div><span style="white-space:pre-wrap">+#define HAVE_STDLIB_H</span></div><div><span style="white-space:pre-wrap">+</span></div><div><span style="white-space:pre-wrap">+/* Define if you need to include &lt;sys/types.h&gt; to get size_t. */</span></div><div><span style="white-space:pre-wrap">+#define NEED_SYS_TYPES_H</span></div><div><span style="white-space:pre-wrap">+</span></div><div style="white-space:pre-wrap"><br></div><div style="white-space:pre-wrap">Can you check why it was redefined like this and if we can change it back?</div></font></div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 28, 2018 at 7:27 AM &lt;<a href="mailto:changqing.li@windriver.com">changqing.li@windriver.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Changqing Li &lt;<a href="mailto:changqing.li@windriver.com" target="_blank">changqing.li@windriver.com</a>&gt;<br>
<br>
License-Update: Copyright Year Update<br>
<br>
1. Upgrade from 1.5.3 -&gt; 2.0.0, change from autools to cmake<br>
2. Add a patch for fix package qa error<br>
3. remove --with-build-date since 2.0.0 not support config build date<br>
<br>
Signed-off-by: Changqing Li &lt;<a href="mailto:changqing.li@windriver.com" target="_blank">changqing.li@windriver.com</a>&gt;<br>
---<br>
 .../0001-libjpeg-turbo-fix-package_qa-error.patch  | 32 ++++++++++++++++++++++<br>
 ...<a href="http://bjpeg-turbo_1.5.3.bb" rel="noreferrer" target="_blank">bjpeg-turbo_1.5.3.bb</a> =&gt; <a href="http://libjpeg-turbo_2.0.0.bb" rel="noreferrer" target="_blank">libjpeg-turbo_2.0.0.bb</a>} | 29 ++++++++------------<br>
 2 files changed, 43 insertions(+), 18 deletions(-)<br>
 create mode 100644 meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch<br>
 rename meta/recipes-graphics/jpeg/{<a href="http://libjpeg-turbo_1.5.3.bb" rel="noreferrer" target="_blank">libjpeg-turbo_1.5.3.bb</a> =&gt; <a href="http://libjpeg-turbo_2.0.0.bb" rel="noreferrer" target="_blank">libjpeg-turbo_2.0.0.bb</a>} (61%)<br>
<br>
diff --git a/meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch b/meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch<br>
new file mode 100644<br>
index 0000000..44c2c76<br>
--- /dev/null<br>
+++ b/meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch<br>
@@ -0,0 +1,32 @@<br>
+From 0a24f03a67425a7b58b3fd40d965c0c9801ae7a1 Mon Sep 17 00:00:00 2001<br>
+From: Changqing Li &lt;<a href="mailto:changqing.li@windriver.com" target="_blank">changqing.li@windriver.com</a>&gt;<br>
+Date: Mon, 27 Aug 2018 16:10:55 +0800<br>
+Subject: [PATCH] libjpeg-turbo: fix package_qa error<br>
+<br>
+Fix package qa errors like below:<br>
+libjpeg.so.62.3.0 contains probably-redundant RPATH /usr/lib [useless-rpaths]<br>
+usr/bin/cjpeg contains probably-redundant RPATH /usr/lib<br>
+<br>
+Upstream-Status: Inappropriate[oe-specific]<br>
+<br>
+Signed-off-by: Changqing Li &lt;<a href="mailto:changqing.li@windriver.com" target="_blank">changqing.li@windriver.com</a>&gt;<br>
+---<br>
+ CMakeLists.txt | 2 --<br>
+ 1 file changed, 2 deletions(-)<br>
+<br>
+diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
+index 1719522..682cef1 100644<br>
+--- a/CMakeLists.txt<br>
++++ b/CMakeLists.txt<br>
+@@ -109,8 +109,6 @@ endif()<br>
+ <br>
+ include(cmakescripts/GNUInstallDirs.cmake)<br>
+ <br>
+-set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})<br>
+-<br>
+ macro(report_directory var)<br>
+   if(CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_FULL_${var})<br>
+     message(STATUS &quot;CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}}&quot;)<br>
+-- <br>
+2.7.4<br>
+<br>
diff --git a/meta/recipes-graphics/jpeg/<a href="http://libjpeg-turbo_1.5.3.bb" rel="noreferrer" target="_blank">libjpeg-turbo_1.5.3.bb</a> b/meta/recipes-graphics/jpeg/<a href="http://libjpeg-turbo_2.0.0.bb" rel="noreferrer" target="_blank">libjpeg-turbo_2.0.0.bb</a><br>
similarity index 61%<br>
rename from meta/recipes-graphics/jpeg/<a href="http://libjpeg-turbo_1.5.3.bb" rel="noreferrer" target="_blank">libjpeg-turbo_1.5.3.bb</a><br>
rename to meta/recipes-graphics/jpeg/<a href="http://libjpeg-turbo_2.0.0.bb" rel="noreferrer" target="_blank">libjpeg-turbo_2.0.0.bb</a><br>
index 6be6aa5..7737a59 100644<br>
--- a/meta/recipes-graphics/jpeg/<a href="http://libjpeg-turbo_1.5.3.bb" rel="noreferrer" target="_blank">libjpeg-turbo_1.5.3.bb</a><br>
+++ b/meta/recipes-graphics/jpeg/<a href="http://libjpeg-turbo_2.0.0.bb" rel="noreferrer" target="_blank">libjpeg-turbo_2.0.0.bb</a><br>
@@ -4,16 +4,17 @@ HOMEPAGE = &quot;<a href="http://libjpeg-turbo.org/" rel="noreferrer" target="_blank">http://libjpeg-turbo.org/</a>&quot;<br>
<br>
 LICENSE = &quot;BSD-3-Clause&quot;<br>
 LIC_FILES_CHKSUM = &quot;file://cdjpeg.h;endline=13;md5=8184bcc7c4ac7b9edc6a7bc00f231d0b \<br>
-                    file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \<br>
+                    file://jpeglib.h;endline=16;md5=7ea97dc83b0f59052ee837e61ef0e08f \<br>
                     file://djpeg.c;endline=11;md5=c59e19811c006cb38f82d6477134d314 \<br>
 &quot;<br>
 DEPENDS_append_x86-64_class-target = &quot; nasm-native&quot;<br>
 DEPENDS_append_x86_class-target    = &quot; nasm-native&quot;<br>
<br>
-SRC_URI = &quot;${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz&quot;<br>
+SRC_URI = &quot;${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \<br>
+           file://0001-libjpeg-turbo-fix-package_qa-error.patch&quot;<br>
<br>
-SRC_URI[md5sum] = &quot;7c82f0f6a3130ec06b8a4d0b321cbca3&quot;<br>
-SRC_URI[sha256sum] = &quot;b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523&quot;<br>
+SRC_URI[md5sum] = &quot;b12a3fcf1d078db38410f27718a91b83&quot;<br>
+SRC_URI[sha256sum] = &quot;778876105d0d316203c928fd2a0374c8c01f755d0a00b12a1c8934aeccff8868&quot;<br>
 UPSTREAM_CHECK_URI = &quot;<a href="http://sourceforge.net/projects/libjpeg-turbo/files/" rel="noreferrer" target="_blank">http://sourceforge.net/projects/libjpeg-turbo/files/</a>&quot;<br>
 UPSTREAM_CHECK_REGEX = &quot;/libjpeg-turbo/files/(?P&lt;pver&gt;(\d+[\.\-_]*)+)/&quot;<br>
<br>
@@ -25,32 +26,24 @@ RPROVIDES_${PN} += &quot;jpeg&quot;<br>
 RREPLACES_${PN} += &quot;jpeg&quot;<br>
 RCONFLICTS_${PN} += &quot;jpeg&quot;<br>
<br>
-inherit autotools pkgconfig<br>
+inherit cmake pkgconfig<br>
<br>
 # Add nasm-native dependency consistently for all build arches is hard<br>
-EXTRA_OECONF_append_class-native = &quot; --without-simd&quot;<br>
+EXTRA_OECMAKE_append_class-native = &quot; -DWITH_SIMD=False&quot;<br>
<br>
 # Work around missing x32 ABI support<br>
-EXTRA_OECONF_append_class-target = &quot; ${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;mx32&quot;, &quot;--without-simd&quot;, &quot;&quot;, d)}&quot;<br>
+EXTRA_OECMAKE_append_class-target = &quot; ${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;mx32&quot;, &quot;-DWITH_SIMD=False&quot;, &quot;&quot;, d)}&quot;<br>
<br>
 # Work around missing non-floating point ABI support in MIPS<br>
-EXTRA_OECONF_append_class-target = &quot; ${@bb.utils.contains(&quot;MIPSPKGSFX_FPU&quot;, &quot;-nf&quot;, &quot;--without-simd&quot;, &quot;&quot;, d)}&quot;<br>
+EXTRA_OECMAKE_append_class-target = &quot; ${@bb.utils.contains(&quot;MIPSPKGSFX_FPU&quot;, &quot;-nf&quot;, &quot;-DWITH_SIMD=False&quot;, &quot;&quot;, d)}&quot;<br>
<br>
 # Provide a workaround if Altivec unit is not present in PPC<br>
-EXTRA_OECONF_append_class-target_powerpc = &quot; ${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;altivec&quot;, &quot;&quot;, &quot;--without-simd&quot;, d)}&quot;<br>
-EXTRA_OECONF_append_class-target_powerpc64 = &quot; ${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;altivec&quot;, &quot;&quot;, &quot;--without-simd&quot;, d)}&quot;<br>
+EXTRA_OECMAKE_append_class-target_powerpc = &quot; ${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;altivec&quot;, &quot;&quot;, &quot;-DWITH_SIMD=False&quot;, d)}&quot;<br>
+EXTRA_OECMAKE_append_class-target_powerpc64 = &quot; ${@bb.utils.contains(&quot;TUNE_FEATURES&quot;, &quot;altivec&quot;, &quot;&quot;, &quot;-DWITH_SIMD=False&quot;, d)}&quot;<br>
<br>
 DEBUG_OPTIMIZATION_append_armv4 = &quot; ${@bb.utils.contains(&#39;TUNE_CCARGS&#39;, &#39;-mthumb&#39;, &#39;-fomit-frame-pointer&#39;, &#39;&#39;, d)}&quot;<br>
 DEBUG_OPTIMIZATION_append_armv5 = &quot; ${@bb.utils.contains(&#39;TUNE_CCARGS&#39;, &#39;-mthumb&#39;, &#39;-fomit-frame-pointer&#39;, &#39;&#39;, d)}&quot;<br>
<br>
-def get_build_time(d):<br>
-    if d.getVar(&#39;SOURCE_DATE_EPOCH&#39;) != None:<br>
-        import datetime<br>
-        return &quot; --with-build-date=&quot;+ datetime.datetime.utcfromtimestamp(float(d.getVar(&#39;SOURCE_DATE_EPOCH&#39;))).strftime(&quot;%Y%m%d&quot;)<br>
-    return &quot;&quot;<br>
-<br>
-EXTRA_OECONF_append_class-target = &quot;${@get_build_time(d)}&quot;<br>
-<br>
 PACKAGES =+ &quot;jpeg-tools libturbojpeg&quot;<br>
<br>
 DESCRIPTION_jpeg-tools = &quot;The jpeg-tools package includes client programs to access libjpeg functionality.  These tools allow for the compression, decompression, transformation and display of JPEG files and benchmarking of the libjpeg library.&quot;<br>
-- <br>
2.7.4<br>
<br>
-- <br>
_______________________________________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div>