Merge remote-tracking branch 'community/master' into enterprise

time-shift
Sébastien Villemot 2019-10-23 16:48:01 +02:00
commit 645ebda638
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
7 changed files with 82 additions and 14 deletions

View File

@ -25,7 +25,7 @@ build_binaries:
stage: build
script:
- autoreconf -si
- './configure --with-matlab=$(dirname $(dirname $(readlink -f $(which matlab)))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p")'
- './configure --with-matlab=$(dirname $(dirname $(readlink -f $(which matlab)))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p") PACKAGE_VERSION=$VERSION PACKAGE_STRING="dynare $VERSION"'
- make -j $(nproc) LN_S="cp -p"
artifacts:
paths:
@ -50,7 +50,7 @@ build_doc:
stage: build
script:
- autoreconf -si
- ./configure --disable-matlab --disable-octave
- ./configure --disable-matlab --disable-octave PACKAGE_VERSION=$VERSION PACKAGE_STRING="dynare $VERSION"
- make -j $(nproc) pdf html
artifacts:
paths:

View File

@ -46,6 +46,8 @@ AC_ARG_WITH(matio, AC_HELP_STRING([--with-matio=DIR], [prefix to MATIO installat
AC_CHECK_LIB([z], [compress])
dnl szip is needed under MSYS2
AC_CHECK_LIB([szip], [SZ_Compress])
dnl szip is needed for static linking on macOS (it's called libsz on macOS)
AC_CHECK_LIB([sz], [SZ_Compress])
AC_CHECK_LIB([hdf5], [H5Fcreate])
AC_CHECK_HEADER([matio.h], [], [has_matio=no])

View File

@ -44,11 +44,20 @@ LIB64="$ROOTDIR"/macOS/deps/lib64
##
## Compile Dynare
## Compile Dynare doc, dynare++, preprocessor, mex for MATLAB < 2018a
##
cd "$ROOTDIR"
[[ -f configure ]] || autoreconf -si
CC=$CC CXX=$CXX ./configure --with-matlab=/Applications/MATLAB_R2016b.app MATLAB_VERSION=R2016b --with-matio=/usr/local --with-gsl=/usr/local --with-slicot="$LIB64"/Slicot/with-underscore --disable-octave PACKAGE_VERSION="$VERSION" PACKAGE_STRING="dynare $VERSION"
CC=$CC CXX=$CXX ./configure \
PACKAGE_VERSION="$VERSION" \
PACKAGE_STRING="dynare $VERSION" \
CXXFLAGS=-I/usr/local/include \
LDFLAGS=-static-libgcc \
--with-gsl="$LIB64"/gsl \
--with-matio="$LIB64"/matio \
--with-slicot="$LIB64"/Slicot/with-underscore \
--disable-octave \
--with-matlab=/Applications/MATLAB_R2016b.app MATLAB_VERSION=R2016b
if [[ -z $CI ]]; then
# If not in Gitlab CI, clean the source and build the doc
make clean
@ -102,11 +111,19 @@ cp -p "$ROOTDIR"/macOS/deps/lib64/x13as/x13as "$PKGFILES"
##
## Create mex for MATLAB le 2018a
## Create mex for MATLAB 2018a
##
cd "$ROOTDIR"/mex/build/matlab
make clean
CC=$CC CXX=$CXX ./configure --with-matlab=/Applications/MATLAB_R2019b.app MATLAB_VERSION=R2019b --with-matio=/usr/local --with-gsl=/usr/local --with-slicot="$LIB64"/Slicot/with-underscore PACKAGE_VERSION="$VERSION" PACKAGE_STRING="dynare $VERSION"
CC=$CC CXX=$CXX ./configure \
PACKAGE_VERSION="$VERSION" \
PACKAGE_STRING="dynare $VERSION" \
CXXFLAGS=-I/usr/local/include \
LDFLAGS=-static-libgcc \
--with-gsl="$LIB64"/gsl \
--with-matio="$LIB64"/matio \
--with-slicot="$LIB64"/Slicot/with-underscore \
--with-matlab=/Applications/MATLAB_R2019b.app MATLAB_VERSION=R2019b
make -j"$NTHREADS"
cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-9.4-9.7
@ -115,7 +132,14 @@ cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"
## Create mex for Octave
##
cd "$ROOTDIR"/mex/build/octave
CC=$CC CXX=$CXX ./configure --with-matio=/usr/local --with-gsl=/usr/local --with-slicot="$LIB64"/Slicot/with-underscore LDFLAGS=-L/usr/local/lib PACKAGE_VERSION="$VERSION" PACKAGE_STRING="dynare $VERSION"
CC=$CC CXX=$CXX ./configure \
PACKAGE_VERSION="$VERSION" \
PACKAGE_STRING="dynare $VERSION" \
CXXFLAGS=-I/usr/local/include \
LDFLAGS="-static-libgcc -L/usr/local/lib" \
--with-gsl="$LIB64"/gsl \
--with-matio="$LIB64"/matio \
--with-slicot="$LIB64"/Slicot/with-underscore
make -j"$NTHREADS"
cp -L "$ROOTDIR"/mex/octave/* "$PKGFILES"/mex/octave
echo -e "function v = supported_octave_version\nv=\"$(octave --eval "disp(OCTAVE_VERSION)")\";\nend" > "$PKGFILES"/matlab/supported_octave_version.m

View File

@ -30,7 +30,7 @@ WGET_OPTIONS := --no-verbose --no-use-server-timestamps --retry-connrefused --re
all: build
build: build-slicot build-x13as
build: build-slicot build-x13as ln-matio ln-gsl
clean-lib: clean-libslicot clean-x13as-bin
@ -41,6 +41,48 @@ clean-tar: clean-slicot-tar clean-x13as-tar
clean-all: clean-lib clean-src clean-tar
#
# Matio & GSL
# (done to link only to static Matio and GSL libraries)
# Matio
lib64/matio/lib/libmatio.a: /usr/local/lib/libmatio.a
mkdir -p $(dir $@) && ln -sf $< $@
lib64/matio/lib/libhdf5.a: /usr/local/lib/libhdf5.a
mkdir -p $(dir $@) && ln -sf $< $@
lib64/matio/lib/libsz.a: /usr/local/lib/libsz.a
mkdir -p $(dir $@) && ln -sf $< $@
lib64/matio/include/matio.h: /usr/local/include/matio.h
mkdir -p $(dir $@) && cd $(dir $@).. && rm -rf include && ln -sf $(dir $<) .
ln-matio: lib64/matio/lib/libmatio.a \
lib64/matio/lib/libhdf5.a \
lib64/matio/lib/libsz.a \
lib64/matio/include/matio.h
clean-matio:
rm -rf lib64/matio
# GSL
lib64/gsl/lib/libgsl.a: /usr/local/lib/libgsl.a
mkdir -p $(dir $@) && ln -sf $< $@
lib64/gsl/lib/libgslcblas.a: /usr/local/lib/libgslcblas.a
mkdir -p $(dir $@) && ln -sf $< $@
lib64/gsl/include/gsl/gsl_blas.h: /usr/local/include/gsl/gsl_blas.h
mkdir -p $(dir $@) && cd $(dir $@).. && rm -rf gsl && ln -sf $(dir $<) .
ln-gsl: lib64/gsl/lib/libgsl.a \
lib64/gsl/lib/libgslcblas.a \
lib64/gsl/include/gsl/gsl_blas.h
clean-gsl:
rm -rf lib64/gsl
#
# Slicot
#

@ -1 +1 @@
Subproject commit 3ee29b89645f5ad7460fc8f64a20daa9d8b938b5
Subproject commit 38be99ed8d352ad27ce68a0a5886294ff05c445b

@ -1 +1 @@
Subproject commit 9e454debb5eb7cbabcf29e844e16f2463d8d7eb6
Subproject commit 2a127b1f2396fa52e26773b9314ec4e7621dde4e

View File

@ -20,8 +20,8 @@ MATLAB64_VERSION = 20181204
## Build dependencies
# pacman -Ss .*-boost$
MINGW32_BOOST_VERSION = 1.70.0-2
MINGW64_BOOST_VERSION = 1.70.0-2
MINGW32_BOOST_VERSION = 1.71.0-1
MINGW64_BOOST_VERSION = 1.71.0-1
# pacman -Ss .*-gsl$
MINGW32_GSL_VERSION = 2.6-1
@ -54,8 +54,8 @@ MINGW64_SZIP_VERSION = 2.1.1-2
## MinGW packages for the embedded compiler
# pacman -Ss mingw-w64-.*-gcc$
MINGW32_GCC_VERSION = 9.1.0-2
MINGW64_GCC_VERSION = 9.1.0-2
MINGW32_GCC_VERSION = 9.2.0-2
MINGW64_GCC_VERSION = 9.2.0-2
# pacman -Ss mingw-w64-.*-gmp$
MINGW32_GMP_VERSION = 6.1.2-1