On 08/30/2018 07:47 AM, Martin Jansa wrote:
This change is breaking spice build and might break some other components as well.

It was discussed in 2008 here:
https://bugzilla.redhat.com/show_bug.cgi?id=427616

And now HAVE_STDLIB_H is here again with the upgrade from 1.5.3 to 2.0

Thanks. I will try to fix this.

//Sandy

spice-native fails like this:
| 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: "HAVE_STDLIB_H" 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 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:
@@ -28,43 +33,37 @@
 #define BITS_IN_JSAMPLE  8      /* use 8 or 12 */
 /* Define to 1 if you have the <locale.h> header file. */
-#define HAVE_LOCALE_H 1
+#define HAVE_LOCALE_H
 /* Define to 1 if you have the <stddef.h> header file. */
-#define HAVE_STDDEF_H 1
+#define HAVE_STDDEF_H
 /* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
+#define HAVE_STDLIB_H
+
+/* Define if you need to include <sys/types.h> to get size_t. */
+#define NEED_SYS_TYPES_H
+
Can you check why it was redefined like this and if we can change it back?

On Tue, Aug 28, 2018 at 7:27 AM <changqing...@windriver.com <mailto:changqing...@windriver.com>> wrote:

    From: Changqing Li <changqing...@windriver.com
    <mailto:changqing...@windriver.com>>

    License-Update: Copyright Year Update

    1. Upgrade from 1.5.3 -> 2.0.0, change from autools to cmake
    2. Add a patch for fix package qa error
    3. remove --with-build-date since 2.0.0 not support config build date

    Signed-off-by: Changqing Li <changqing...@windriver.com
    <mailto:changqing...@windriver.com>>
    ---
     .../0001-libjpeg-turbo-fix-package_qa-error.patch  | 32
    ++++++++++++++++++++++
     ...bjpeg-turbo_1.5.3.bb <http://bjpeg-turbo_1.5.3.bb> =>
    libjpeg-turbo_2.0.0.bb <http://libjpeg-turbo_2.0.0.bb>} | 29
    ++++++++------------
     2 files changed, 43 insertions(+), 18 deletions(-)
     create mode 100644
    
meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch
     rename meta/recipes-graphics/jpeg/{libjpeg-turbo_1.5.3.bb
    <http://libjpeg-turbo_1.5.3.bb> => libjpeg-turbo_2.0.0.bb
    <http://libjpeg-turbo_2.0.0.bb>} (61%)

    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
    new file mode 100644
    index 0000000..44c2c76
    --- /dev/null
    +++
    
b/meta/recipes-graphics/jpeg/files/0001-libjpeg-turbo-fix-package_qa-error.patch
    @@ -0,0 +1,32 @@
    +From 0a24f03a67425a7b58b3fd40d965c0c9801ae7a1 Mon Sep 17 00:00:00
    2001
    +From: Changqing Li <changqing...@windriver.com
    <mailto:changqing...@windriver.com>>
    +Date: Mon, 27 Aug 2018 16:10:55 +0800
    +Subject: [PATCH] libjpeg-turbo: fix package_qa error
    +
    +Fix package qa errors like below:
    +libjpeg.so.62.3.0 contains probably-redundant RPATH /usr/lib
    [useless-rpaths]
    +usr/bin/cjpeg contains probably-redundant RPATH /usr/lib
    +
    +Upstream-Status: Inappropriate[oe-specific]
    +
    +Signed-off-by: Changqing Li <changqing...@windriver.com
    <mailto:changqing...@windriver.com>>
    +---
    + CMakeLists.txt | 2 --
    + 1 file changed, 2 deletions(-)
    +
    +diff --git a/CMakeLists.txt b/CMakeLists.txt
    +index 1719522..682cef1 100644
    +--- a/CMakeLists.txt
    ++++ b/CMakeLists.txt
    +@@ -109,8 +109,6 @@ endif()
    +
    + include(cmakescripts/GNUInstallDirs.cmake)
    +
    +-set(CMAKE_INSTALL_RPATH ${CMAKE_INSTALL_FULL_LIBDIR})
    +-
    + macro(report_directory var)
    +   if(CMAKE_INSTALL_${var} STREQUAL CMAKE_INSTALL_FULL_${var})
    +     message(STATUS "CMAKE_INSTALL_${var} = ${CMAKE_INSTALL_${var}}")
    +--
    +2.7.4
    +
    diff --git a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
    <http://libjpeg-turbo_1.5.3.bb>
    b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.0.bb
    <http://libjpeg-turbo_2.0.0.bb>
    similarity index 61%
    rename from meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
    <http://libjpeg-turbo_1.5.3.bb>
    rename to meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.0.bb
    <http://libjpeg-turbo_2.0.0.bb>
    index 6be6aa5..7737a59 100644
    --- a/meta/recipes-graphics/jpeg/libjpeg-turbo_1.5.3.bb
    <http://libjpeg-turbo_1.5.3.bb>
    +++ b/meta/recipes-graphics/jpeg/libjpeg-turbo_2.0.0.bb
    <http://libjpeg-turbo_2.0.0.bb>
    @@ -4,16 +4,17 @@ HOMEPAGE = "http://libjpeg-turbo.org/";

     LICENSE = "BSD-3-Clause"
     LIC_FILES_CHKSUM =
    "file://cdjpeg.h;endline=13;md5=8184bcc7c4ac7b9edc6a7bc00f231d0b \
    - file://jpeglib.h;endline=16;md5=f67d70e547a2662c079781c72f877f72 \
    + file://jpeglib.h;endline=16;md5=7ea97dc83b0f59052ee837e61ef0e08f \
     file://djpeg.c;endline=11;md5=c59e19811c006cb38f82d6477134d314 \
     "
     DEPENDS_append_x86-64_class-target = " nasm-native"
     DEPENDS_append_x86_class-target    = " nasm-native"

    -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
    +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz \
    +  file://0001-libjpeg-turbo-fix-package_qa-error.patch"

    -SRC_URI[md5sum] = "7c82f0f6a3130ec06b8a4d0b321cbca3"
    -SRC_URI[sha256sum] =
    "b24890e2bb46e12e72a79f7e965f409f4e16466d00e1dd15d93d73ee6b592523"
    +SRC_URI[md5sum] = "b12a3fcf1d078db38410f27718a91b83"
    +SRC_URI[sha256sum] =
    "778876105d0d316203c928fd2a0374c8c01f755d0a00b12a1c8934aeccff8868"
     UPSTREAM_CHECK_URI =
    "http://sourceforge.net/projects/libjpeg-turbo/files/";
     UPSTREAM_CHECK_REGEX =
    "/libjpeg-turbo/files/(?P<pver>(\d+[\.\-_]*)+)/"

    @@ -25,32 +26,24 @@ RPROVIDES_${PN} += "jpeg"
     RREPLACES_${PN} += "jpeg"
     RCONFLICTS_${PN} += "jpeg"

    -inherit autotools pkgconfig
    +inherit cmake pkgconfig

     # Add nasm-native dependency consistently for all build arches is
    hard
    -EXTRA_OECONF_append_class-native = " --without-simd"
    +EXTRA_OECMAKE_append_class-native = " -DWITH_SIMD=False"

     # Work around missing x32 ABI support
    -EXTRA_OECONF_append_class-target = "
    ${@bb.utils.contains("TUNE_FEATURES", "mx32", "--without-simd",
    "", d)}"
    +EXTRA_OECMAKE_append_class-target = "
    ${@bb.utils.contains("TUNE_FEATURES", "mx32", "-DWITH_SIMD=False",
    "", d)}"

     # Work around missing non-floating point ABI support in MIPS
    -EXTRA_OECONF_append_class-target = "
    ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "--without-simd",
    "", d)}"
    +EXTRA_OECMAKE_append_class-target = "
    ${@bb.utils.contains("MIPSPKGSFX_FPU", "-nf", "-DWITH_SIMD=False",
    "", d)}"

     # Provide a workaround if Altivec unit is not present in PPC
    -EXTRA_OECONF_append_class-target_powerpc = "
    ${@bb.utils.contains("TUNE_FEATURES", "altivec", "",
    "--without-simd", d)}"
    -EXTRA_OECONF_append_class-target_powerpc64 = "
    ${@bb.utils.contains("TUNE_FEATURES", "altivec", "",
    "--without-simd", d)}"
    +EXTRA_OECMAKE_append_class-target_powerpc = "
    ${@bb.utils.contains("TUNE_FEATURES", "altivec", "",
    "-DWITH_SIMD=False", d)}"
    +EXTRA_OECMAKE_append_class-target_powerpc64 = "
    ${@bb.utils.contains("TUNE_FEATURES", "altivec", "",
    "-DWITH_SIMD=False", d)}"

     DEBUG_OPTIMIZATION_append_armv4 = "
    ${@bb.utils.contains('TUNE_CCARGS', '-mthumb',
    '-fomit-frame-pointer', '', d)}"
     DEBUG_OPTIMIZATION_append_armv5 = "
    ${@bb.utils.contains('TUNE_CCARGS', '-mthumb',
    '-fomit-frame-pointer', '', d)}"

    -def get_build_time(d):
    -    if d.getVar('SOURCE_DATE_EPOCH') != None:
    -        import datetime
    -        return " --with-build-date="+
    
datetime.datetime.utcfromtimestamp(float(d.getVar('SOURCE_DATE_EPOCH'))).strftime("%Y%m%d")
    -    return ""
    -
    -EXTRA_OECONF_append_class-target = "${@get_build_time(d)}"
    -
     PACKAGES =+ "jpeg-tools libturbojpeg"

     DESCRIPTION_jpeg-tools = "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."
-- 2.7.4

-- _______________________________________________
    Openembedded-core mailing list
    Openembedded-core@lists.openembedded.org
    <mailto:Openembedded-core@lists.openembedded.org>
    http://lists.openembedded.org/mailman/listinfo/openembedded-core


--
BRs

Sandy(Li Changqing)
Wind River Linux

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to