Re: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts
On Mon, Jan 16, 2012 at 09:27:22PM +0100, Bernhard Walle wrote: > The build system of sitecopy uses 'uname' to determine the operating system > for > which it compiles sitecopy. However, on non-Linux hosts, this leads to wrong > results. > > Fixes Darwin (tested on Mac OS 10.7 Lion), doesn't break Linux (verified with > current Arch Linux on x86_64). In this case I actually prefer this over the patch. The cached variable is rather straightforward. Most importantly upstream seems to be dead (no release in over 3 years). This means we'll have to keep the patch forever, and I'd like to keep such patches at a minimum. Michael > Signed-off-by: Bernhard Walle > --- > rules/sitecopy.make |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/rules/sitecopy.make b/rules/sitecopy.make > index 44a7b8a..c5af415 100644 > --- a/rules/sitecopy.make > +++ b/rules/sitecopy.make > @@ -40,7 +40,8 @@ SITECOPY_AUTOCONF := $(CROSS_AUTOCONF_USR) \ > --disable-rpath \ > --without-pakchois \ > --without-socks \ > - --without-gssapi > + --without-gssapi \ > + ne_cv_os_uname=Linux It's a variable, so it should be defined in SITECOPY_CONF_ENV. See e.g. rules/libpv.make as an example. And add a comment why it's needed. Michael > > ifdef PTXCONF_SITECOPY_SFTP > SITECOPY_AUTOCONF += --enable-sftp > -- > 1.7.7.4 > > > -- > ptxdist mailing list > ptxdist@pengutronix.de > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts
Am 18.01.12 11:23, schrieb Juergen Beisert: > Hi Bernhard, > > Bernhard Walle wrote: >> Am 18.01.2012 11:05, schrieb Juergen Beisert: >>> Can you send me the "config.log" file of the sitecopy package, after >>> *preparing* (prepare stage) it? Please run it one times without your >>> patch shown above. >>> I have no other system than Linux here, to check what the autotools >>> really detecting on different systems. >> >> Will do in the evening, > > Thanks. A bite late for the evening, but anyway attached. ;-) The check comes from m4/neon/neon.m4 which is included in sitecopy sources. Maybe I should patch that to check for the target system and link ptxdist autogen.sh? Regards, Bernhard This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by sitecopy configure 0.16.6, which was generated by GNU Autoconf 2.61. Invocation command line was $ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --host=arm-v5te-linux-gnueabi --build=i386-host-darwin11.2.0 --disable-gnomefe --enable-threadsafe-ssl=posix --disable-nls --enable-threads=posix --disable-rpath --without-pakchois --without-socks --without-gssapi --enable-sftp --enable-rsh --enable-ftp --enable-webdav --with-expat ## - ## ## Platform. ## ## - ## hostname = galilei.fritz.box uname -m = x86_64 uname -r = 11.2.0 uname -s = Darwin uname -v = Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 /usr/bin/uname -p = i386 /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = Mach kernel version: Darwin Kernel Version 11.2.0: Tue Aug 9 20:54:00 PDT 2011; root:xnu-1699.24.8~1/RELEASE_X86_64 Kernel configured for up to 2 processors. 2 processors are physically available. 2 processors are logically available. Processor type: i486 (Intel 80486) Processors active: 0 1 Primary memory available: 4.00 gigabytes Default processor set: 118 tasks, 534 threads, 2 processors Load average: 4.61, Mach factor: 0.35 /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-cross/bin PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-cross/sbin PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-host/bin PATH: /Volumes/mdevel/ptxdist-vetero/platform-dockstar/sysroot-host/sbin PATH: /opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/bin PATH: /opt/ptxdist/lib/ptxdist-2012.01.0/bin PATH: /opt/ptxdist/bin PATH: /opt/texlive/2011-new/bin/universal-darwin PATH: /Users/bwalle/bin PATH: /opt/local/bin PATH: /opt/local/sbin PATH: /usr/bin PATH: /bin PATH: /usr/sbin PATH: /sbin PATH: /usr/local/bin PATH: /usr/X11/bin ## --- ## ## Core tests. ## ## --- ## configure:1905: checking for arm-v5te-linux-gnueabi-gcc configure:1932: result: arm-v5te-linux-gnueabi-gcc configure:2210: checking for C compiler version configure:2217: arm-v5te-linux-gnueabi-gcc --version >&5 arm-v5te-linux-gnueabi-gcc (OSELAS.Toolchain-2011.11.0) 4.6.2 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. configure:2220: $? = 0 configure:2227: arm-v5te-linux-gnueabi-gcc -v >&5 Using built-in specs. COLLECT_GCC=arm-v5te-linux-gnueabi-gcc COLLECT_LTO_WRAPPER=/opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/libexec/gcc/arm-v5te-linux-gnueabi/4.6.2/lto-wrapper Target: arm-v5te-linux-gnueabi Configured with: /Volumes/Devel/OSELAS.Toolchain-2011.11.0/platform-arm-v5te-linux-gnueabi-gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/build-cross/gcc-4.6.2/configure --target=arm-v5te-linux-gnueabi --with-sysroot=/opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/sysroot-arm-v5te-linux-gnueabi --disable-multilib --with-float=soft --with-fpu=vfp --with-cpu=arm926ej-s --enable-__cxa_atexit --disable-sjlj-exceptions --disable-nls --disable-decimal-float --disable-fixed-point --disable-win32-registry --enable-symvers=gnu --with-pkgversion=OSELAS.Toolchain-2011.11.0 --with-system-zlib --with-gmp=/Volumes/Devel/OSELAS.Toolchain-2011.11.0/platform-arm-v5te-linux-gnueabi-gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/sysroot-host --with-mpfr=/Volumes/Devel/OSELAS.Toolchain-2011.11.0/platform-arm-v5te-linux-gnueabi-gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized/sysroot-host --prefix=/opt/OSELAS.Toolchain-2011.11.0/arm-v5te-linux-gnueabi/gcc-4.6.2-glibc-2.14.1-binutils-2.21.1a-kernel-2.6.39-sanitized --e
Re: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts
Hi Bernhard, Bernhard Walle wrote: > Am 18.01.2012 11:05, schrieb Juergen Beisert: > > Can you send me the "config.log" file of the sitecopy package, after > > *preparing* (prepare stage) it? Please run it one times without your > > patch shown above. > > I have no other system than Linux here, to check what the autotools > > really detecting on different systems. > > Will do in the evening, Thanks. > but as I remember, it was the '-no-cpp-precomp' > compiler flag that caused the compilation failure: > > > (from configure:) > > if test "$ne_cv_os_uname" = "Darwin"; then > CPPFLAGS="$CPPFLAGS -no-cpp-precomp" > LDFLAGS="$LDFLAGS -flat_namespace" > # poll has various issues in various Darwin releases > if test x${ac_cv_func_poll+set} != xset; then > ac_cv_func_poll=no > fi > fi The correct fix should be something like if test "$host_os" = "Darwin"; then I guess. Testing the "ne_cv_os_uname" variable is for the build host only. But that's why I asked you for the 'config.log' file. I want to see what the autotools do on your system. Regards, Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts
Hi Jürgen, Am 18.01.2012 11:05, schrieb Juergen Beisert: > > Can you send me the "config.log" file of the sitecopy package, after > *preparing* (prepare stage) it? Please run it one times without your patch > shown above. > I have no other system than Linux here, to check what the autotools really > detecting on different systems. Will do in the evening, but as I remember, it was the '-no-cpp-precomp' compiler flag that caused the compilation failure: (from configure:) if test "$ne_cv_os_uname" = "Darwin"; then CPPFLAGS="$CPPFLAGS -no-cpp-precomp" LDFLAGS="$LDFLAGS -flat_namespace" # poll has various issues in various Darwin releases if test x${ac_cv_func_poll+set} != xset; then ac_cv_func_poll=no fi fi Regards, Bernhard -- ptxdist mailing list ptxdist@pengutronix.de
Re: [ptxdist] [PATCH] sitecopy: Fix build on non-Linux hosts
Hi Bernhard, Bernhard Walle wrote: > The build system of sitecopy uses 'uname' to determine the operating system > for which it compiles sitecopy. However, on non-Linux hosts, this leads to > wrong results. > > Fixes Darwin (tested on Mac OS 10.7 Lion), doesn't break Linux (verified > with current Arch Linux on x86_64). > > Signed-off-by: Bernhard Walle > --- > rules/sitecopy.make |3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/rules/sitecopy.make b/rules/sitecopy.make > index 44a7b8a..c5af415 100644 > --- a/rules/sitecopy.make > +++ b/rules/sitecopy.make > @@ -40,7 +40,8 @@ SITECOPY_AUTOCONF := $(CROSS_AUTOCONF_USR) \ > --disable-rpath \ > --without-pakchois \ > --without-socks \ > - --without-gssapi > + --without-gssapi \ > + ne_cv_os_uname=Linux > > ifdef PTXCONF_SITECOPY_SFTP > SITECOPY_AUTOCONF += --enable-sftp Can you send me the "config.log" file of the sitecopy package, after *preparing* (prepare stage) it? Please run it one times without your patch shown above. I have no other system than Linux here, to check what the autotools really detecting on different systems. Regards, Juergen -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | -- ptxdist mailing list ptxdist@pengutronix.de