diff mbox

Fix "make distcheck"

Message ID 1431874095-25609-1-git-send-email-mail@rotty.xx.vu
State Accepted
Headers show

Commit Message

mail@rotty.xx.vu May 17, 2015, 2:48 p.m. UTC
From: Andreas Rottmann <a.rottmann@gmx.at>

Running "make distcheck" failed trying to generate ".version" into the
read-only unpacked source directory. Actually shipping ".version" in the
tarball fixes that.
---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)

Comments

mail@rotty.xx.vu May 17, 2015, 3:25 p.m. UTC | #1
mail@rotty.xx.vu writes:

> From: Andreas Rottmann <a.rottmann@gmx.at>
>
[... patch elided ...]

This was a patch for libosmo-abis, FWIW.
Holger Freyther May 17, 2015, 4:08 p.m. UTC | #2
> On 17 May 2015, at 16:48, mail@rotty.xx.vu wrote:


> 
> Running "make distcheck" failed trying to generate ".version" into the
> read-only unpacked source directory. Actually shipping ".version" in the
> tarball fixes that.

What is the actual error your are seeing. We run make distcheck after
each commit on both a Linux and FreeBSD build (with different versions
of autoconf/automake)

E.g. I went to this build log http://jenkins.osmocom.org/jenkins/job/libosmo-abis/label=FreeBSD_amd64/1086/console
and checked:

LD_LIBRARY_PATH=/home/builder/source/workspace/libosmo-abis/label/FreeBSD_amd64/deps/install/lib gmake distcheck
gmake  dist-bzip2 am__post_remove_distdir=‘@:


holger
mail@rotty.xx.vu May 17, 2015, 5:29 p.m. UTC | #3
Holger Freyther <holger@freyther.de> writes:

>> On 17 May 2015, at 16:48, mail@rotty.xx.vu wrote:
>
>
>> 
>> Running "make distcheck" failed trying to generate ".version" into the
>> read-only unpacked source directory. Actually shipping ".version" in the
>> tarball fixes that.
>
> What is the actual error your are seeing. We run make distcheck after
> each commit on both a Linux and FreeBSD build (with different versions
> of autoconf/automake)
>
Again, the log (also on Debian jessie amd64):
make  dist-bzip2 am__post_remove_distdir='@:'
make[1]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build'
if test -d "libosmo-abis-0.3.1.2-3a58"; then find "libosmo-abis-0.3.1.2-3a58" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "libosmo-abis-0.3.1.2-3a58" || { sleep 5 && rm -rf "libosmo-abis-0.3.1.2-3a58"; }; else :; fi
test -d "libosmo-abis-0.3.1.2-3a58" || mkdir "libosmo-abis-0.3.1.2-3a58"
 (cd include && make  top_distdir=../libosmo-abis-0.3.1.2-3a58 distdir=../libosmo-abis-0.3.1.2-3a58/include \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[2]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/include'
make[2]: Leaving directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/include'
 (cd src && make  top_distdir=../libosmo-abis-0.3.1.2-3a58 distdir=../libosmo-abis-0.3.1.2-3a58/src \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[2]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/src'
make[2]: Leaving directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/src'
 (cd tests && make  top_distdir=../libosmo-abis-0.3.1.2-3a58 distdir=../libosmo-abis-0.3.1.2-3a58/tests \
     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)
make[2]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/tests'
:;{ \
               echo '# Signature of the current package.' && \
               echo 'm4_define([AT_PACKAGE_NAME],' && \
               echo '  [libosmo-abis])' && \
               echo 'm4_define([AT_PACKAGE_TARNAME],' && \
               echo '  [libosmo-abis])' && \
               echo 'm4_define([AT_PACKAGE_VERSION],' && \
               echo '  [0.3.1.2-3a58])' && \
               echo 'm4_define([AT_PACKAGE_STRING],' && \
               echo '  [libosmo-abis 0.3.1.2-3a58])' && \
               echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \
               echo '  [openbsc@lists.osmocom.org])'; \
               echo 'm4_define([AT_PACKAGE_URL],' && \
               echo '  [])'; \
             } >'../../tests/package.m4'
/bin/bash ../../missing --run autom4te --language=autotest -I '../../tests' -o ../../tests/testsuite.tmp ../../tests/testsuite.at
mv ../../tests/testsuite.tmp ../../tests/testsuite
make[2]: Leaving directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/tests'
make  \
  top_distdir="libosmo-abis-0.3.1.2-3a58" distdir="libosmo-abis-0.3.1.2-3a58" \
  dist-hook
make[2]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build'
echo 0.3.1.2-3a58 > libosmo-abis-0.3.1.2-3a58/.tarball-version
make[2]: Leaving directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build'
test -n "" \
|| find "libosmo-abis-0.3.1.2-3a58" -type d ! -perm -755 \
	-exec chmod u+rwx,go+rx {} \; -o \
  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
  ! -type d ! -perm -444 -exec /bin/bash /home/.big/rotty/src/_readonly/libosmo-abis/install-sh -c -m a+r {} {} \; \
|| chmod -R a+r "libosmo-abis-0.3.1.2-3a58"
tardir=libosmo-abis-0.3.1.2-3a58 && ${TAR-tar} chof - "$tardir" | BZIP2=${BZIP2--9} bzip2 -c >libosmo-abis-0.3.1.2-3a58.tar.bz2
make[1]: Leaving directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build'
if test -d "libosmo-abis-0.3.1.2-3a58"; then find "libosmo-abis-0.3.1.2-3a58" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "libosmo-abis-0.3.1.2-3a58" || { sleep 5 && rm -rf "libosmo-abis-0.3.1.2-3a58"; }; else :; fi
case 'libosmo-abis-0.3.1.2-3a58.tar.bz2' in \
*.tar.gz*) \
  GZIP=--best gzip -dc libosmo-abis-0.3.1.2-3a58.tar.gz | ${TAR-tar} xf - ;;\
*.tar.bz2*) \
  bzip2 -dc libosmo-abis-0.3.1.2-3a58.tar.bz2 | ${TAR-tar} xf - ;;\
*.tar.lz*) \
  lzip -dc libosmo-abis-0.3.1.2-3a58.tar.lz | ${TAR-tar} xf - ;;\
*.tar.xz*) \
  xz -dc libosmo-abis-0.3.1.2-3a58.tar.xz | ${TAR-tar} xf - ;;\
*.tar.Z*) \
  uncompress -c libosmo-abis-0.3.1.2-3a58.tar.Z | ${TAR-tar} xf - ;;\
*.shar.gz*) \
  GZIP=--best gzip -dc libosmo-abis-0.3.1.2-3a58.shar.gz | unshar ;;\
*.zip*) \
  unzip libosmo-abis-0.3.1.2-3a58.zip ;;\
esac
chmod -R a-w libosmo-abis-0.3.1.2-3a58
chmod u+w libosmo-abis-0.3.1.2-3a58
mkdir libosmo-abis-0.3.1.2-3a58/_build libosmo-abis-0.3.1.2-3a58/_inst
chmod a-w libosmo-abis-0.3.1.2-3a58
test -d libosmo-abis-0.3.1.2-3a58/_build || exit 0; \
dc_install_base=`CDPATH="${ZSH_VERSION+.}:" && cd libosmo-abis-0.3.1.2-3a58/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
  && dc_destdir="${TMPDIR-/tmp}/am-dc-$$/" \
  && am__cwd=`pwd` \
  && CDPATH="${ZSH_VERSION+.}:" && cd libosmo-abis-0.3.1.2-3a58/_build \
  && ../configure \
     \
     \
    --srcdir=.. --prefix="$dc_install_base" \
  && make  \
  && make  dvi \
  && make  check \
  && make  install \
  && make  installcheck \
  && make  uninstall \
  && make  distuninstallcheck_dir="$dc_install_base" \
        distuninstallcheck \
  && chmod -R a-w "$dc_install_base" \
  && ({ \
       (cd ../.. && umask 077 && mkdir "$dc_destdir") \
       && make  DESTDIR="$dc_destdir" install \
       && make  DESTDIR="$dc_destdir" uninstall \
       && make  DESTDIR="$dc_destdir" \
            distuninstallcheck_dir="$dc_destdir" distuninstallcheck; \
      } || { rm -rf "$dc_destdir"; exit 1; }) \
  && rm -rf "$dc_destdir" \
  && make  dist \
  && rm -rf libosmo-abis-0.3.1.2-3a58.tar.bz2 \
  && make  distcleancheck \
  && cd "$am__cwd" \
  || exit 1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... mt
checking if mt is a manifest tool... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking if gcc supports -fvisibility=hidden... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBOSMOCORE... yes
checking for LIBOSMOVTY... yes
checking for LIBOSMOGSM... yes
checking for ORTP... yes
checking for ORTP_VERSION... yes
checking dahdi/user.h usability... no
checking dahdi/user.h presence... no
checking for dahdi/user.h... no
configure: WARNING: DAHDI input driver will not be built
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating libosmoabis.pc
config.status: creating libosmotrau.pc
config.status: creating include/Makefile
config.status: creating src/Makefile
config.status: creating tests/Makefile
config.status: creating Makefile
config.status: creating config.h
config.status: executing tests/atconfig commands
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/libosmo-abis-0.3.1.2-3a58/_build'
echo 0.3.1.2-3a58 > ../.version-t && mv ../.version-t ../.version
/bin/bash: ../.version-t: Permission denied
Makefile:879: recipe for target '../.version' failed
make[1]: *** [../.version] Error 1
make[1]: Leaving directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/libosmo-abis-0.3.1.2-3a58/_build'
Makefile:665: recipe for target 'distcheck' failed
make: *** [distcheck] Error 1
The build steps were the usual (git clone, autoreconf, mkdir _build, cd
_build, configure, make distcheck).

Regards, Rotty
Holger Freyther May 17, 2015, 5:50 p.m. UTC | #4
> On 17 May 2015, at 19:29, Andreas Rottmann <mail@rotty.xx.vu> wrote:
> 
> Holger Freyther <holger@freyther.de> writes:


> 
> make[1]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/libosmo-abis-0.3.1.2-3a58/_build'
> echo 0.3.1.2-3a58 > ../.version-t && mv ../.version-t ../.version
> /bin/bash: ../.version-t: Permission denied
> Makefile:879: recipe for target '../.version’ failed

BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version:
        echo $(VERSION) > $@-t && mv $@-t $@

I assume the dir name implies that it is really ro, So what would it take to
to not generate this in the “srcdir” at all?
mail@rotty.xx.vu May 17, 2015, 6:18 p.m. UTC | #5
Holger Freyther <holger@freyther.de> writes:

>> On 17 May 2015, at 19:29, Andreas Rottmann <mail@rotty.xx.vu> wrote:
>> 
>> Holger Freyther <holger@freyther.de> writes:
>
>
>> 
>> make[1]: Entering directory '/home/.big/rotty/src/_readonly/libosmo-abis/_build/libosmo-abis-0.3.1.2-3a58/_build'
>> echo 0.3.1.2-3a58 > ../.version-t && mv ../.version-t ../.version
>> /bin/bash: ../.version-t: Permission denied
>> Makefile:879: recipe for target '../.version’ failed
>
> BUILT_SOURCES = $(top_srcdir)/.version
> $(top_srcdir)/.version:
>         echo $(VERSION) > $@-t && mv $@-t $@
>
> I assume the dir name implies that it is really ro, So what would it take to
> to not generate this in the “srcdir” at all?
>
No, this is misleading; I use the _readonly directory for stuff I don't
intend to touch (much). However, automake makes the unpacked tarball
(containing $(top_srcdir), obviously) readonly during "make distcheck".

Regarding generating ".version" into the build dir: the way I fixed
things is the way is consistent with the recipe in git-version-gen
(implied in the text of the git-version-gen revision in libosmo-abis,
explicit in newer versions).

Regards, Rotty
Holger Freyther May 19, 2015, 6:53 p.m. UTC | #6
> On 17 May 2015, at 20:18, Andreas Rottmann <mail@rotty.xx.vu> wrote:
> 
> 
> Regarding generating ".version" into the build dir: the way I fixed
> things is the way is consistent with the recipe in git-version-gen
> (implied in the text of the git-version-gen revision in libosmo-abis,
> explicit in newer versions).

applied. thanks.
diff mbox

Patch

diff --git a/Makefile.am b/Makefile.am
index 9c82f09..fdcddb9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,7 @@  SUBDIRS = include src tests
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libosmoabis.pc libosmotrau.pc
 
+EXTRA_DIST = .version
 BUILT_SOURCES = $(top_srcdir)/.version
 $(top_srcdir)/.version:
 	echo $(VERSION) > $@-t && mv $@-t $@