From 1b2ebfc69a4be4dd72561e5be59f1c9063f8fbac Mon Sep 17 00:00:00 2001 From: mayeut Date: Thu, 8 Oct 2015 20:06:59 +0200 Subject: [PATCH 01/12] Add ABI tracker --- .travis.yml | 35 ++------- src/lib/openjp2/openjpeg.h | 2 + tools/abi-tracker/openjpeg.json | 131 ++++++++++++++++++++++++++++++++ tools/travis-ci/abi-check.sh | 45 +++++++++++ tools/travis-ci/install.sh | 110 +++++++++++++-------------- tools/travis-ci/run.sh | 7 +- 6 files changed, 244 insertions(+), 86 deletions(-) create mode 100644 tools/abi-tracker/openjpeg.json create mode 100755 tools/travis-ci/abi-check.sh diff --git a/.travis.yml b/.travis.yml index e5872a31e..1c2f55876 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,38 +1,10 @@ language: c os: - linux - - osx compiler: - gcc - - clang - - x86_64-w64-mingw32-gcc env: - - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release - - OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release - - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 - - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug - -matrix: - exclude: - - os: osx - compiler: gcc - - os: osx - compiler: x86_64-w64-mingw32-gcc - - compiler: clang - env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release - - compiler: clang - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug - - os: linux - compiler: clang - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release - - compiler: gcc - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 - - compiler: x86_64-w64-mingw32-gcc - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 - - compiler: x86_64-w64-mingw32-gcc - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug - - os: osx - env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 + - OPJ_CI_ABI_CHECK=1 addons: apt: @@ -44,9 +16,14 @@ addons: - gcc-mingw-w64-i686 - gcc-mingw-w64-x86-64 - gcc-mingw-w64 + - libelf-dev + - elfutils + - wdiff + - exuberant-ctags install: - ./tools/travis-ci/install.sh script: - ./tools/travis-ci/run.sh + - ./tools/travis-ci/abi-check.sh diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index 4a8e75ce5..f1a065cc4 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -677,6 +677,8 @@ typedef struct opj_image { OPJ_BYTE *icc_profile_buf; /** size of ICC profile */ OPJ_UINT32 icc_profile_len; + /** size of ICC profile */ + OPJ_UINT32 icc_profile_len2; } opj_image_t; diff --git a/tools/abi-tracker/openjpeg.json b/tools/abi-tracker/openjpeg.json new file mode 100644 index 000000000..67beb33a0 --- /dev/null +++ b/tools/abi-tracker/openjpeg.json @@ -0,0 +1,131 @@ +{ + "Name": "openjpeg", + "Title": "OpenJPEG", + "SourceUrl": "https://github.com/uclouvain/openjpeg/tags", + "Git": "https://github.com/uclouvain/openjpeg.git", + "Maintainer": "Antonin D.", + "MaintainerUrl": "http://www.openjpeg.org/", + "Package": "version.", + + "Versions": [ + { + "Number": "current", + "Installed": "installed/openjpeg/current", + "Source": "@OPJ_SRC_DIR@", + "Changelog": "On", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/current/list", + "PublicTypes": "public_types/openjpeg/current/list" + }, + { + "Number": "2.1", + "Installed": "installed/openjpeg/2.1", + "Source": "src/openjpeg/2.1/version.2.1.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/2.1/list", + "PublicTypes": "public_types/openjpeg/2.1/list" + }, + { + "Number": "2.0.1", + "Installed": "installed/openjpeg/2.0.1", + "Source": "src/openjpeg/2.0.1/version.2.0.1.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/2.0.1/list", + "PublicTypes": "public_types/openjpeg/2.0.1/list" + }, + { + "Number": "2.0", + "Installed": "installed/openjpeg/2.0", + "Source": "src/openjpeg/2.0/version.2.0.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "On", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/2.0/list", + "PublicTypes": "public_types/openjpeg/2.0/list" + }, + { + "Number": "1.5.2", + "Installed": "installed/openjpeg/1.5.2", + "Source": "src/openjpeg/1.5.2/version.1.5.2.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.5.2/list", + "PublicTypes": "public_types/openjpeg/1.5.2/list" + }, + { + "Number": "1.5.1", + "Installed": "installed/openjpeg/1.5.1", + "Source": "src/openjpeg/1.5.1/version.1.5.1.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.5.1/list", + "PublicTypes": "public_types/openjpeg/1.5.1/list" + }, + { + "Number": "1.5", + "Installed": "installed/openjpeg/1.5", + "Source": "src/openjpeg/1.5/version.1.5.tar.gz", + "Changelog": "NEWS", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.5/list", + "PublicTypes": "public_types/openjpeg/1.5/list" + }, + { + "Number": "1.4", + "Installed": "installed/openjpeg/1.4", + "Source": "src/openjpeg/1.4/version.1.4.tar.gz", + "Changelog": "CHANGES", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.4/list", + "PublicTypes": "public_types/openjpeg/1.4/list" + }, + { + "Number": "1.3", + "Installed": "installed/openjpeg/1.3", + "Source": "src/openjpeg/1.3/version.1.3.tar.gz", + "Changelog": "ChangeLog", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.3/list", + "PublicTypes": "public_types/openjpeg/1.3/list" + }, + { + "Number": "1.2", + "Installed": "installed/openjpeg/1.2", + "Source": "src/openjpeg/1.2/version.1.2.tar.gz", + "Changelog": "ChangeLog", + "HeadersDiff": "On", + "PkgDiff": "Off", + "ABIView": "Off", + "ABIDiff": "Off", + "PublicSymbols": "public_symbols/openjpeg/1.2/list", + "PublicTypes": "public_types/openjpeg/1.2/list" + }] +} diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh new file mode 100755 index 000000000..afdc251ba --- /dev/null +++ b/tools/travis-ci/abi-check.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# This script executes the abi-check step when running under travis-ci (in run step) + +# Set-up some bash options +set -o nounset ## set -u : exit the script if you try to use an uninitialised variable +set -o errexit ## set -e : exit the script if any statement returns a non-true return value +set -o pipefail ## Fail on error in pipe +set -o xtrace ## set -x : Print a trace of simple commands and their arguments after they are expanded and before they are executed. + +# Exit if not ABI check +if [ "${OPJ_CI_ABI_CHECK:-}" != "1" ]; then + exit 0 +fi + +OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) + +if [ ! -d ${HOME}/abi-check ]; then + mkdir ${HOME}/abi-check +fi + +cd ${HOME}/abi-check + +if [ ! -f ${HOME}/abi-check/.restored ]; then + # Clean all if .restored is not present + touch not.empty + rm -rf ./* + # Let's get tools not available with apt + mkdir tools + wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz + mv rfcdiff-1.42 ${PWD}/tools/rfcdiff + wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz + mkdir ${PWD}/tools/abi-tracker + make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker + mkdir tracker +fi + +cd tracker + +# Check ABI +export PATH=${PWD}/../tools/rfcdiff:${PWD}/../tools/abi-tracker/bin:$PATH +sed -e "s/@OPJ_SOURCE_DIR@/${OPJ_SOURCE_DIR//\//\\/}/g" ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > openjpeg.json +abi-monitor -get openjpeg.json +abi-monitor -build openjpeg.json +abi-tracker -build openjpeg.json diff --git a/tools/travis-ci/install.sh b/tools/travis-ci/install.sh index 11dcf26cb..ce85c97fa 100755 --- a/tools/travis-ci/install.sh +++ b/tools/travis-ci/install.sh @@ -19,67 +19,67 @@ function exit_handler () trap exit_handler EXIT trap exit ERR -# We don't need anything for coverity scan builds - -if [ "${COVERITY_SCAN_BRANCH:-}" != "1" ]; then +# We don't need anything for coverity scan builds. ABI check is managed in abi-check.sh +if [ "${COVERITY_SCAN_BRANCH:-}" == "1" ] || [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then + exit 0 +fi - if [ "${OPJ_CI_ASAN:-}" == "1" ]; then - # We need a new version of cmake than travis-ci provides - wget -qO - http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz | tar -xz - # copy to a directory that will not changed every version - mv cmake-3.3.1-Linux-x86_64 cmake-install - fi +if [ "${OPJ_CI_ASAN:-}" == "1" ]; then + # We need a new version of cmake than travis-ci provides + wget -qO - http://www.cmake.org/files/v3.3/cmake-3.3.1-Linux-x86_64.tar.gz | tar -xz + # copy to a directory that will not changed every version + mv cmake-3.3.1-Linux-x86_64 cmake-install +fi - if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then +if [ "${OPJ_CI_SKIP_TESTS:-}" != "1" ]; then - OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) + OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) - # We need test data - if [ "${TRAVIS_BRANCH:-}" == "" ]; then - TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up - fi - OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${TRAVIS_BRANCH} | wc -l) - if [ ${OPJ_DATA_HAS_BRANCH} -ne 0 ]; then - OPJ_DATA_BRANCH=${TRAVIS_BRANCH} - else - OPJ_DATA_BRANCH=master #default to master - fi - echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" - git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data + # We need test data + if [ "${TRAVIS_BRANCH:-}" == "" ]; then + TRAVIS_BRANCH=$(git -C ${OPJ_SOURCE_DIR} branch | grep '*' | tr -d '*[[:blank:]]') #default to same branch as we're setting up + fi + OPJ_DATA_HAS_BRANCH=$(git ls-remote --heads git://github.com/uclouvain/openjpeg-data.git ${TRAVIS_BRANCH} | wc -l) + if [ ${OPJ_DATA_HAS_BRANCH} -ne 0 ]; then + OPJ_DATA_BRANCH=${TRAVIS_BRANCH} + else + OPJ_DATA_BRANCH=master #default to master + fi + echo "Cloning openjpeg-data from ${OPJ_DATA_BRANCH} branch" + git clone --depth=1 --branch=${OPJ_DATA_BRANCH} git://github.com/uclouvain/openjpeg-data.git data - # We need jpylyzer for the test suite - echo "Retrieving jpylyzer" - wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz - mv jpylyzer-1.14.2 jpylyzer - chmod +x jpylyzer/jpylyzer/jpylyzer.py + # We need jpylyzer for the test suite + echo "Retrieving jpylyzer" + wget -qO - https://github.com/openpreserve/jpylyzer/archive/1.14.2.tar.gz | tar -xz + mv jpylyzer-1.14.2 jpylyzer + chmod +x jpylyzer/jpylyzer/jpylyzer.py - # When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: - # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. - # You are free to trial these executables and even to re-distribute them, - # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. - # Note: Binaries can only be used for non-commercial purposes. - if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then - if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then - echo "Retrieving Kakadu" - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip - cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip - mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu - elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then - echo "Retrieving Kakadu" - wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip - cmake -E tar -xf KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip - wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip - mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip - ./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg KDU77_Demo_Apps_for_OSX109_150710.dmg - pkgutil --expand Kakadu-demo-apps.pkg ./kdu - cd kdu - cat libkduv77r.pkg/Payload | gzip -d | cpio -id - cat kduexpand.pkg/Payload | gzip -d | cpio -id - cat kducompress.pkg/Payload | gzip -d | cpio -id - install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib - install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress - install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand - fi + # When OPJ_NONCOMMERCIAL=1, kakadu trial binaries are used for testing. Here's the copyright notice from kakadu: + # Copyright is owned by NewSouth Innovations Pty Limited, commercial arm of the UNSW Australia in Sydney. + # You are free to trial these executables and even to re-distribute them, + # so long as such use or re-distribution is accompanied with this copyright notice and is not for commercial gain. + # Note: Binaries can only be used for non-commercial purposes. + if [ "${OPJ_NONCOMMERCIAL:-}" == "1" ]; then + if [ "${TRAVIS_OS_NAME:-}" == "linux" ] || uname -s | grep -i Linux &> /dev/null; then + echo "Retrieving Kakadu" + wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_Linux-x86-64_150710.zip + cmake -E tar -xf KDU77_Demo_Apps_for_Linux-x86-64_150710.zip + mv KDU77_Demo_Apps_for_Linux-x86-64_150710 kdu + elif [ "${TRAVIS_OS_NAME:-}" == "osx" ] || uname -s | grep -i Darwin &> /dev/null; then + echo "Retrieving Kakadu" + wget -q http://kakadusoftware.com/wp-content/uploads/2014/06/KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip + cmake -E tar -xf KDU77_Demo_Apps_for_OSX109_150710.dmg_.zip + wget -q http://downloads.sourceforge.net/project/catacombae/HFSExplorer/0.23/hfsexplorer-0.23-bin.zip + mkdir hfsexplorer && cmake -E chdir hfsexplorer tar -xf ../hfsexplorer-0.23-bin.zip + ./hfsexplorer/bin/unhfs.sh -o ./ -fsroot Kakadu-demo-apps.pkg KDU77_Demo_Apps_for_OSX109_150710.dmg + pkgutil --expand Kakadu-demo-apps.pkg ./kdu + cd kdu + cat libkduv77r.pkg/Payload | gzip -d | cpio -id + cat kduexpand.pkg/Payload | gzip -d | cpio -id + cat kducompress.pkg/Payload | gzip -d | cpio -id + install_name_tool -id ${PWD}/libkdu_v77R.dylib libkdu_v77R.dylib + install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_compress + install_name_tool -change /usr/local/lib/libkdu_v77R.dylib ${PWD}/libkdu_v77R.dylib kdu_expand fi fi fi diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh index bec41d6d3..323b30e13 100755 --- a/tools/travis-ci/run.sh +++ b/tools/travis-ci/run.sh @@ -7,6 +7,11 @@ set -o nounset ## set -u : exit the script if you try to use an uninitialised set -o errexit ## set -e : exit the script if any statement returns a non-true return value set -o pipefail ## Fail on error in pipe +# ABI check is done by abi-check.sh +if [ "${OPJ_CI_ABI_CHECK:-}" == "1" ]; then + exit 0 +fi + # Set-up some variables if [ "${OPJ_CI_BUILD_CONFIGURATION:-}" == "" ]; then export OPJ_CI_BUILD_CONFIGURATION=Release #default @@ -207,8 +212,6 @@ New/unknown test failure found!!! OPJ_CI_RESULT=1 fi fi - - fi exit ${OPJ_CI_RESULT} From a7ae153a468816132fb71d02a8d2000c27461adb Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 21:20:54 +0200 Subject: [PATCH 02/12] ABI Check --- tools/abi-tracker/openjpeg.json | 3 +- tools/travis-ci/abi-check.sh | 64 +++++++++++++++++++++------------ 2 files changed, 43 insertions(+), 24 deletions(-) diff --git a/tools/abi-tracker/openjpeg.json b/tools/abi-tracker/openjpeg.json index 67beb33a0..8d83d222d 100644 --- a/tools/abi-tracker/openjpeg.json +++ b/tools/abi-tracker/openjpeg.json @@ -2,7 +2,6 @@ "Name": "openjpeg", "Title": "OpenJPEG", "SourceUrl": "https://github.com/uclouvain/openjpeg/tags", - "Git": "https://github.com/uclouvain/openjpeg.git", "Maintainer": "Antonin D.", "MaintainerUrl": "http://www.openjpeg.org/", "Package": "version.", @@ -11,7 +10,7 @@ { "Number": "current", "Installed": "installed/openjpeg/current", - "Source": "@OPJ_SRC_DIR@", + "Source": "src/openjpeg/current", "Changelog": "On", "HeadersDiff": "On", "PkgDiff": "Off", diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index afdc251ba..a5814d37e 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -13,33 +13,53 @@ if [ "${OPJ_CI_ABI_CHECK:-}" != "1" ]; then exit 0 fi +OPJ_UPLOAD_ABI_REPORT=0 +OPJ_LIMIT_ABI_BUILDS="-limit 2" +if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then + if [ "$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')" == "uclouvain" ] && [ "${TRAVIS_PULL_REQUEST:-}" == "false" ]; then + # Upload report + OPJ_UPLOAD_ABI_REPORT=1 + # Build full report + OPJ_LIMIT_ABI_BUILDS= + fi +fi + OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd) -if [ ! -d ${HOME}/abi-check ]; then - mkdir ${HOME}/abi-check -fi +mkdir ${HOME}/abi-check cd ${HOME}/abi-check +# Let's get tools not available with apt +mkdir tools +wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz +mv rfcdiff-1.42 ${PWD}/tools/rfcdiff +wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz +mkdir ${PWD}/tools/abi-tracker +make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker +rm -rf installer-0.2 +export PATH=${PWD}/tools/rfcdiff:${PWD}/tools/abi-tracker/bin:$PATH +mkdir tracker +cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./tracker/openjpeg.json +cd tracker -if [ ! -f ${HOME}/abi-check/.restored ]; then - # Clean all if .restored is not present - touch not.empty - rm -rf ./* - # Let's get tools not available with apt - mkdir tools - wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz - mv rfcdiff-1.42 ${PWD}/tools/rfcdiff - wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz - mkdir ${PWD}/tools/abi-tracker - make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker - mkdir tracker -fi +# Let's create all we need +abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -get openjpeg.json +cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current +abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -build openjpeg.json +abi-tracker -build openjpeg.json -cd tracker +EXIT_CODE=0 + +# Check API +abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -api -s || EXIT_CODE=1 # Check ABI -export PATH=${PWD}/../tools/rfcdiff:${PWD}/../tools/abi-tracker/bin:$PATH -sed -e "s/@OPJ_SOURCE_DIR@/${OPJ_SOURCE_DIR//\//\\/}/g" ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > openjpeg.json -abi-monitor -get openjpeg.json -abi-monitor -build openjpeg.json -abi-tracker -build openjpeg.json +abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -abi -s || EXIT_CODE=1 + +rm -rf src installed + +if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then + echo "TODO: Where to upload the report" +fi + +exit $EXIT_CODE From d2ddf006a6d3c326a4f68a0d37d0c96eda5b386e Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 21:48:33 +0200 Subject: [PATCH 03/12] retrieve & compile wdiff --- .travis.yml | 2 +- tools/travis-ci/abi-check.sh | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1c2f55876..b862832b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ addons: - gcc-mingw-w64 - libelf-dev - elfutils - - wdiff + - texinfo - exuberant-ctags install: diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index a5814d37e..e3cb281fb 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -31,13 +31,23 @@ mkdir ${HOME}/abi-check cd ${HOME}/abi-check # Let's get tools not available with apt mkdir tools +# Travis doesn't allow package wdiff... +wget -qO - http://mirrors.kernel.org/gnu/wdiff/wdiff-latest.tar.gz | tar -xz +cd wdiff-* +./configure --prefix=${HOME}/abi-check/tools/wdiff +make +make check +make install +cd .. +export PATH=${PWD}/tools/wdiff/bin:$PATH + wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz mv rfcdiff-1.42 ${PWD}/tools/rfcdiff +export PATH=${PWD}/tools/rfcdiff:$PATH wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz mkdir ${PWD}/tools/abi-tracker make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker -rm -rf installer-0.2 -export PATH=${PWD}/tools/rfcdiff:${PWD}/tools/abi-tracker/bin:$PATH +export PATH=${PWD}/tools/abi-tracker/bin:$PATH mkdir tracker cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./tracker/openjpeg.json cd tracker From e224dee4b8a5999d5f74ec3be5d686a2e6ff6a37 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 21:52:39 +0200 Subject: [PATCH 04/12] travis debugging --- tools/travis-ci/abi-check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index e3cb281fb..cc1a90463 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -71,5 +71,6 @@ rm -rf src installed if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then echo "TODO: Where to upload the report" fi - +cat build_logs/openjpeg/current/cmake +cmake -version exit $EXIT_CODE From 1a9cb9aef71ced7642140b185026984e2e919dc3 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:09:50 +0200 Subject: [PATCH 05/12] Use gcc-4.8 for ABI tracker --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b862832b7..a4e66baee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,16 @@ language: c os: - linux compiler: - - gcc + - gcc-4.8 env: - OPJ_CI_ABI_CHECK=1 addons: apt: + sources: + - ubuntu-toolchain-r-test packages: + - gcc-4.8 - gcc-multilib - gcc-mingw-w64-base - binutils-mingw-w64-i686 From cba89a62a18367ebccb1354afb884f9a8308f6bd Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:20:16 +0200 Subject: [PATCH 06/12] Revert modification made to check incompatibility --- src/lib/openjp2/openjpeg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/lib/openjp2/openjpeg.h b/src/lib/openjp2/openjpeg.h index 49aab7c8a..c07e9c84b 100644 --- a/src/lib/openjp2/openjpeg.h +++ b/src/lib/openjp2/openjpeg.h @@ -677,8 +677,6 @@ typedef struct opj_image { OPJ_BYTE *icc_profile_buf; /** size of ICC profile */ OPJ_UINT32 icc_profile_len; - /** size of ICC profile */ - OPJ_UINT32 icc_profile_len2; } opj_image_t; From a4eade843f18e5687bd0824fd3742c26bb364514 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:23:32 +0200 Subject: [PATCH 07/12] disable output for diff build --- tools/travis-ci/abi-check.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index cc1a90463..e4e8ce791 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -34,10 +34,10 @@ mkdir tools # Travis doesn't allow package wdiff... wget -qO - http://mirrors.kernel.org/gnu/wdiff/wdiff-latest.tar.gz | tar -xz cd wdiff-* -./configure --prefix=${HOME}/abi-check/tools/wdiff -make -make check -make install +./configure --prefix=${HOME}/abi-check/tools/wdiff &> /dev/null +make &> /dev/null +make check &> /dev/null +make install &> /dev/null cd .. export PATH=${PWD}/tools/wdiff/bin:$PATH From 5c3632b00e2fc8c13097e7668bb644412d82b645 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 22:24:51 +0200 Subject: [PATCH 08/12] Remove travis debugging --- tools/travis-ci/abi-check.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index e4e8ce791..e4766ce0f 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -71,6 +71,4 @@ rm -rf src installed if [ ${OPJ_UPLOAD_ABI_REPORT} -eq 1 ]; then echo "TODO: Where to upload the report" fi -cat build_logs/openjpeg/current/cmake -cmake -version exit $EXIT_CODE From 74f71ec923175af378886ce9fde70c453057e6d8 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 23:00:06 +0200 Subject: [PATCH 09/12] Use matrix --- .travis.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4e66baee..8fc6169f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,32 @@ language: c -os: - - linux -compiler: - - gcc-4.8 -env: - - OPJ_CI_ABI_CHECK=1 - + +matrix: + include: + - os: osx + compiler: clang + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc + env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug + - os: linux + compiler: clang + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1 + - os: linux + compiler: x86_64-w64-mingw32-gcc + env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: x86_64-w64-mingw32-gcc + env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release + - os: linux + compiler: gcc-4.8 + env: OPJ_CI_ABI_CHECK=1 + addons: apt: sources: From 87d44603a02f8d522e1e31ba44d40dbbe080d295 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 23:19:23 +0200 Subject: [PATCH 10/12] Update exception list for gcc 4.6.4 --- ...Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt diff --git a/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt b/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt new file mode 100644 index 000000000..bad459723 --- /dev/null +++ b/tools/travis-ci/knownfailures-Ubuntu12.04-gcc4.6.4-i386-Release-3rdP.txt @@ -0,0 +1,61 @@ +NR-ENC-issue203-32x32-bgr16.bmp-43-compare_dump2base +NR-ENC-issue203-32x32-bgr16.bmp-43-compare_dec-ref-out2base +NR-ENC-issue203-33x33-bgr16.bmp-44-compare_dump2base +NR-ENC-issue203-33x33-bgr16.bmp-44-compare_dec-ref-out2base +NR-ENC-issue203-32x32-bgra16.bmp-45-compare_dump2base +NR-ENC-issue203-33x33-bgra16.bmp-46-compare_dump2base +NR-ENC-issue203-127x64-bgr16.bmp-49-compare_dump2base +NR-ENC-issue203-127x64-bgr16.bmp-49-compare_dec-ref-out2base +NR-DEC-issue104_jpxstream.jp2-33-decode-md5 +NR-DEC-issue226.j2k-74-decode +NR-DEC-issue226.j2k-74-decode-md5 +NR-DEC-p1_06.j2k-156-decode +NR-DEC-p1_06.j2k-156-decode-md5 +NR-DEC-p1_06.j2k-164-decode-md5 +NR-C1P0-p0_04.j2k-compare2base +NR-C1P0-p0_05.j2k-compare2base +NR-C1P0-p0_06.j2k-compare2base +NR-C1P1-p1_02.j2k-compare2base +NR-C1P1-p1_03.j2k-compare2base +NR-C1P1-p1_04.j2k-compare2base +NR-C1P1-p1_05.j2k-compare2base +NR-JP2-file2.jp2-compare2base +NR-JP2-file3.jp2-compare2base +NR-RIC-subsampling_1.jp2-compare2base +NR-RIC-subsampling_2.jp2-compare2base +NR-RIC-zoo1.jp2-compare2base +NR-RIC-zoo2.jp2-compare2base +NR-DEC-_00042.j2k-2-decode-md5 +NR-DEC-buxI.j2k-9-decode-md5 +NR-DEC-CT_Phillips_JPEG2K_Decompr_Problem.j2k-13-decode-md5 +NR-DEC-Marrin.jp2-18-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-31-decode-md5 +NR-DEC-kodak_2layers_lrcp.j2c-32-decode-md5 +NR-DEC-file409752.jp2-40-decode-md5 +NR-DEC-issue188_beach_64bitsbox.jp2-41-decode-md5 +NR-DEC-issue206_image-000.jp2-42-decode-md5 +NR-DEC-issue205.jp2-43-decode-md5 +NR-DEC-issue228.j2k-60-decode-md5 +NR-DEC-issue134.jp2-67-decode-md5 +NR-DEC-issue208.jp2-69-decode-md5 +NR-DEC-issue211.jp2-70-decode-md5 +NR-DEC-issue135.j2k-68-decode-md5 +NR-DEC-issue414.jp2-110-decode-md5 +NR-DEC-p1_04.j2k-124-decode-md5 +NR-DEC-p1_04.j2k-125-decode-md5 +NR-DEC-p1_04.j2k-126-decode-md5 +NR-DEC-p1_04.j2k-127-decode-md5 +NR-DEC-p1_04.j2k-128-decode-md5 +NR-DEC-p1_04.j2k-129-decode-md5 +NR-DEC-p1_04.j2k-131-decode-md5 +NR-DEC-p1_04.j2k-134-decode-md5 +NR-DEC-p1_04.j2k-138-decode-md5 +NR-DEC-p1_04.j2k-140-decode-md5 +NR-DEC-p0_04.j2k-166-decode-md5 +NR-DEC-p0_04.j2k-168-decode-md5 +NR-DEC-p0_04.j2k-172-decode-md5 +NR-DEC-issue205.jp2-253-decode-md5 +NR-DEC-issue559-eci-090-CIELab.jp2-255-decode-md5 +NR-DEC-issue236-ESYCC-CDEF.jp2-254-decode-md5 +NR-DEC-issue559-eci-091-CIELab.jp2-256-decode-md5 +NR-DEC-p1_06.j2k-164-decode From 27102f0b06eea1f9857725528cde1bc9a57695d5 Mon Sep 17 00:00:00 2001 From: mayeut Date: Fri, 9 Oct 2015 23:51:54 +0200 Subject: [PATCH 11/12] Update ABI tools --- tools/abi-tracker/openjpeg.json | 1 + tools/travis-ci/abi-check.sh | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/abi-tracker/openjpeg.json b/tools/abi-tracker/openjpeg.json index 8d83d222d..146534721 100644 --- a/tools/abi-tracker/openjpeg.json +++ b/tools/abi-tracker/openjpeg.json @@ -2,6 +2,7 @@ "Name": "openjpeg", "Title": "OpenJPEG", "SourceUrl": "https://github.com/uclouvain/openjpeg/tags", + "Git": "https://github.com/uclouvain/openjpeg.git", "Maintainer": "Antonin D.", "MaintainerUrl": "http://www.openjpeg.org/", "Package": "version.", diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index e4766ce0f..bffbd6e82 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -44,16 +44,18 @@ export PATH=${PWD}/tools/wdiff/bin:$PATH wget -qO - https://tools.ietf.org/tools/rfcdiff/rfcdiff-1.42.tgz | tar -xz mv rfcdiff-1.42 ${PWD}/tools/rfcdiff export PATH=${PWD}/tools/rfcdiff:$PATH -wget -qO - https://github.com/lvc/installer/archive/0.2.tar.gz | tar -xz +wget -qO - https://github.com/lvc/installer/archive/0.4.tar.gz | tar -xz mkdir ${PWD}/tools/abi-tracker -make -C installer-0.2 install prefix=${PWD}/tools/abi-tracker target=abi-tracker +make -C installer-0.4 install prefix=${PWD}/tools/abi-tracker target=abi-tracker export PATH=${PWD}/tools/abi-tracker/bin:$PATH + mkdir tracker -cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./tracker/openjpeg.json cd tracker # Let's create all we need +grep -v Git ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json > ./openjpeg.json abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -get openjpeg.json +cp -f ${OPJ_SOURCE_DIR}/tools/abi-tracker/openjpeg.json ./openjpeg.json cp -rf ${OPJ_SOURCE_DIR} src/openjpeg/current abi-monitor ${OPJ_LIMIT_ABI_BUILDS} -build openjpeg.json abi-tracker -build openjpeg.json From 32ac092decf1108237ec1c24b2149c344b2fb7be Mon Sep 17 00:00:00 2001 From: mayeut Date: Sat, 10 Oct 2015 00:23:54 +0200 Subject: [PATCH 12/12] Disable ABI check. Keep API check. --- tools/travis-ci/abi-check.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/travis-ci/abi-check.sh b/tools/travis-ci/abi-check.sh index bffbd6e82..1a904d279 100755 --- a/tools/travis-ci/abi-check.sh +++ b/tools/travis-ci/abi-check.sh @@ -66,7 +66,8 @@ EXIT_CODE=0 abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -api -s || EXIT_CODE=1 # Check ABI -abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -abi -s || EXIT_CODE=1 +# Disabled for now, problems with symbol visibility... +# abi-compliance-checker -l openjpeg -old $(find ./abi_dump/openjpeg/2.1 -name '*.dump') -new $(find ./abi_dump/openjpeg/current -name '*.dump') -header openjpeg.h -abi -s || EXIT_CODE=1 rm -rf src installed