[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: revisiting condor and libtool
From: |
Ralf Wildenhues |
Subject: |
Re: revisiting condor and libtool |
Date: |
Tue, 1 Dec 2009 07:26:08 +0100 |
User-agent: |
Mutt/1.5.20 (2009-08-09) |
Hi Adam,
* Adam Mercer wrote on Tue, Dec 01, 2009 at 04:48:57AM CET:
> Making all in src
> make[1]: Entering directory `/home/ram/condor_libtool-0.1/src'
> condor_compile gcc -std=gnu99 -DPACKAGE_NAME=\"condor_libtool\"
> -DPACKAGE_TARNAME=\"condor_libtool\" -DPACKAGE_VERSION=\"0.1\"
> -DPACKAGE_STRING=\"condor_libtool\ 0.1\"
> -DPACKAGE_BUGREPORT=\"address@hidden" -DPACKAGE_URL=\"\"
> -DPACKAGE=\"condor_libtool\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1
> -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1
> -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1
> -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
> -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -g -O2 -MT foo.o -MD
> -MP -MF .deps/foo.Tpo -c -o foo.o foo.c
> /opt/condor/bin/condor_compile: line 331: [: too many arguments
> gcc: 0.1": No such file or directory
> make[1]: *** [foo.o] Error 1
> make[1]: Leaving directory `/home/ram/condor_libtool-0.1/src'
> make: *** [all-recursive] Error 1
>
> which to me looks like condor_compile is choking on the quoting in one
> of the defines?
Yes, the condor_compile script puts the quotes all in the wrong places.
To work around it, use AC_CONFIG_HEADERS([config.h]) and include that
from your code. Your build setup looks ok otherwise.
Below's a completely untested patch for condor_compile, to fix the worst
quoting issues I found upon inspection. The patch is completely
untested, but if you could test it, I'd like to ask you to send it
upstream, too. Thanks.
Cheers,
Ralf
--- ./src/condor_scripts/condor_compile.orig 2009-12-01 07:14:37.000000000
+0100
+++ ./src/condor_scripts/condor_compile 2009-12-01 07:22:29.000000000 +0100
@@ -134,35 +134,35 @@
fi
- if [ $1 = "-condor_syscall_lib" ]; then
+ if [ "$1" = "-condor_syscall_lib" ]; then
shift
CONDOR_SPECIAL_CLIB=$1
shift
continue
fi
- if [ $1 = "-condor_rt0" ]; then
+ if [ "$1" = "-condor_rt0" ]; then
shift
CONDOR_RT0=$1
shift
continue
fi
- if [ $1 = "-condor_c++_support" ]; then
+ if [ "$1" = "-condor_c++_support" ]; then
shift
CONDOR_CPLUS=$1
shift
continue
fi
- if [ $1 = "-condor_ld_dir" ]; then
+ if [ "$1" = "-condor_ld_dir" ]; then
shift
CONDOR_LD_DIR=$1
shift
continue
fi
- if [ $1 = "-condor_standalone" ]; then
+ if [ "$1" = "-condor_standalone" ]; then
#
# This option is ignored. Standalone checkpointing
# has the same build procedure as standard jobs now.
@@ -172,7 +172,7 @@
continue
fi
- if [ $1 = "-condor_lib" ]; then
+ if [ "$1" = "-condor_lib" ]; then
shift
CONDOR_LIBDIR=$1
shift
@@ -194,7 +194,7 @@
# If the compressed ckpt library is available, use it.
#
-if [ -r $CONDOR_ZCLIB ]; then
+if [ -r "$CONDOR_ZCLIB" ]; then
CONDOR_CLIB="$CONDOR_ZCLIB"
fi
@@ -204,7 +204,7 @@
CONDOR_CLIB="$CONDOR_CLIB $STATIC_ZLIB"
-if [ -r $CONDOR_SPECIAL_CLIB ]; then
+if [ -r "$CONDOR_SPECIAL_CLIB" ]; then
CONDOR_CLIB="$CONDOR_SPECIAL_CLIB"
fi
@@ -315,23 +315,18 @@
# hit our special ld
if [ $CONDOR_FULLINSTALL = true ]; then
- invoke_linker $*
+ invoke_linker "$@"
fi
# If we were passed a -c, we're not going to be used for linking, so
# we don't have to do anything special to make sure our special ld is
# used.
-ARGS=$*
NAME=$1
-while [ A = A ]
+for arg
do
- if [ $# = 0 ]; then
- break;
+ if [ "$arg" = "-c" ]; then
+ exec "$@"
fi
- if [ $1 = "-c" ]; then
- exec $ARGS;
- fi
- shift
done
@@ -346,19 +341,19 @@
# Handle GNU compilers
if [ $myname = "gcc" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
if [ $myname = "g++" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
if [ $myname = "g77" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
if [ $myname = "gfortran" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
# Handle Portland compilers.
@@ -366,19 +361,19 @@
# Their run-time support libraries conflict with libcondorc++support.a
if [ $myname = "pgcc" ]; then
- invoke_linker $ARGS -Yl,$CONDOR_LD_DIR/
+ invoke_linker "$@" -Yl,$CONDOR_LD_DIR/
fi
if [ $myname = "pgf77" ]; then
- invoke_linker $ARGS -Yl,$CONDOR_LD_DIR/
+ invoke_linker "$@" -Yl,$CONDOR_LD_DIR/
fi
if [ $myname = "pgf90" ]; then
- invoke_linker $ARGS -Yl,$CONDOR_LD_DIR/
+ invoke_linker "$@" -Yl,$CONDOR_LD_DIR/
fi
if [ $myname = "pghpf" ]; then
- invoke_linker $ARGS -Yl,$CONDOR_LD_DIR/
+ invoke_linker "$@" -Yl,$CONDOR_LD_DIR/
fi
# Handle ld (linker). Since the user might have specified a full path
@@ -386,7 +381,7 @@
# call our ld directly with the remaining arguments.
if [ $myname = "ld" ]; then
shift;
- invoke_linker $CONDOR_LD_DIR/ld $ARGS
+ invoke_linker $CONDOR_LD_DIR/ld "$@"
fi
# Handle all the vendor system compilers ---------------
@@ -403,45 +398,45 @@
if [ $myname = "cc" ]; then
VCCRET=`cc -tul 2>&1 | head -1 | grep 'WARNING'`
if [ "X$VCCRET" = "X" ]; then
- invoke_linker $ARGS -tul -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tul -h$CONDOR_LD_DIR -B
else
- invoke_linker $ARGS -Y l,$CONDOR_LD_DIR -B
dynamic
+ invoke_linker "$@" -Y l,$CONDOR_LD_DIR -B
dynamic
fi
fi
if [ $myname = "CC" ]; then
VCPPRET=`CC -tul 2>&1 | head -1 | grep 'WARNING'`
if [ "X$VCPPRET" = "X" ]; then
- invoke_linker $ARGS -tul -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tul -h$CONDOR_LD_DIR -B
else
- invoke_linker $ARGS -Y l,$CONDOR_LD_DIR -B
dynamic
+ invoke_linker "$@" -Y l,$CONDOR_LD_DIR -B
dynamic
fi
fi
if [ $myname = "c89" ]; then
VC89RET=`c89 -tul 2>&1 | head -1 | grep 'WARNING'`
if [ "X$VC89RET" = "X" ]; then
- invoke_linker $ARGS -tul -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tul -h$CONDOR_LD_DIR -B
else
- invoke_linker $ARGS -Y l,$CONDOR_LD_DIR -B
dynamic
+ invoke_linker "$@" -Y l,$CONDOR_LD_DIR -B
dynamic
fi
fi
if [ $myname = "f77" ]; then
VF77RET=`f77 -tul 2>&1 | head -1 | grep 'WARNING'`
if [ "X$VF77RET" = "X" ]; then
- invoke_linker $ARGS -tul -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tul -h$CONDOR_LD_DIR -B
else
- invoke_linker $ARGS -Y l,$CONDOR_LD_DIR -B
dynamic
+ invoke_linker "$@" -Y l,$CONDOR_LD_DIR -B
dynamic
fi
fi
if [ $myname = "f90" ]; then
VF90RET=`f90 -tul 2>&1 | head -1 | grep 'WARNING'`
if [ "X$VF90RET" = "X" ]; then
- invoke_linker $ARGS -tul -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tul -h$CONDOR_LD_DIR -B
else
- invoke_linker $ARGS -Y l,$CONDOR_LD_DIR -B
dynamic
+ invoke_linker "$@" -Y l,$CONDOR_LD_DIR -B
dynamic
fi
fi
@@ -449,31 +444,31 @@
OSF1 )
if [ $myname = "cc" ]; then
- invoke_linker $ARGS -tl -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tl -h$CONDOR_LD_DIR -B
fi
if [ $myname = "CC" ]; then
- invoke_linker $ARGS -tl -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tl -h$CONDOR_LD_DIR -B
fi
if [ $myname = "cxx" ]; then
- invoke_linker $ARGS -tl -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tl -h$CONDOR_LD_DIR -B
fi
if [ $myname = "c89" ]; then
- invoke_linker $ARGS -tl -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tl -h$CONDOR_LD_DIR -B
fi
if [ $myname = "f77" ]; then
- invoke_linker $ARGS -tl -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tl -h$CONDOR_LD_DIR -B
fi
if [ $myname = "f90" ]; then
- invoke_linker $ARGS -tl -h$CONDOR_LD_DIR -B
+ invoke_linker "$@" -tl -h$CONDOR_LD_DIR -B
fi
if [ $myname = "KCC" ]; then
- invoke_linker $ARGS --backend -tl --backend \
+ invoke_linker "$@" --backend -tl --backend \
-h$CONDOR_LD_DIR --backend -B
fi
@@ -481,27 +476,27 @@
HP-UX )
if [ $myname = "cc" ]; then
- invoke_linker $ARGS -tl,$CONDOR_LD_DIR/ld
+ invoke_linker "$@" -tl,$CONDOR_LD_DIR/ld
fi
if [ $myname = "CC" ]; then
- invoke_linker $ARGS +A -tl,$CONDOR_LD_DIR/ld
+ invoke_linker "$@" +A -tl,$CONDOR_LD_DIR/ld
fi
if [ $myname = "aCC" ]; then
- invoke_linker $ARGS +A -tl,$CONDOR_LD_DIR/ld
+ invoke_linker "$@" +A -tl,$CONDOR_LD_DIR/ld
fi
if [ $myname = "c89" ]; then
- invoke_linker $ARGS -tl,$CONDOR_LD_DIR/ld
+ invoke_linker "$@" -tl,$CONDOR_LD_DIR/ld
fi
if [ $myname = "f77" ]; then
- invoke_linker $ARGS -tl,$CONDOR_LD_DIR/ld
+ invoke_linker "$@" -tl,$CONDOR_LD_DIR/ld
fi
if [ $myname = "fort77" ]; then
- invoke_linker $ARGS -tl,$CONDOR_LD_DIR/ld
+ invoke_linker "$@" -tl,$CONDOR_LD_DIR/ld
fi
;;
@@ -509,26 +504,26 @@
SunOS )
use_qpath=`cc -help -flags | grep Qpath | wc -l`
if [ $myname = "cc" -a $use_qpath = 0 ]; then
- invoke_linker $ARGS -Yl,$CONDOR_LD_DIR
+ invoke_linker "$@" -Yl,$CONDOR_LD_DIR
fi
if [ $myname = "cc" -a $use_qpath != 0 ]; then
- invoke_linker $ARGS -Qpath $CONDOR_LD_DIR
+ invoke_linker "$@" -Qpath $CONDOR_LD_DIR
fi
if [ $myname = "acc" ]; then
- invoke_linker $ARGS -Qpath $CONDOR_LD_DIR
+ invoke_linker "$@" -Qpath $CONDOR_LD_DIR
fi
if [ $myname = "CC" ]; then
- invoke_linker $ARGS -Qpath $CONDOR_LD_DIR
+ invoke_linker "$@" -Qpath $CONDOR_LD_DIR
fi
if [ $myname = "f77" ]; then
- invoke_linker $ARGS -Qpath $CONDOR_LD_DIR
+ invoke_linker "$@" -Qpath $CONDOR_LD_DIR
fi
if [ $myname = "f90" ]; then
- invoke_linker $ARGS -Qpath $CONDOR_LD_DIR
+ invoke_linker "$@" -Qpath $CONDOR_LD_DIR
fi
;;
@@ -536,23 +531,23 @@
Linux )
# Linux's system compilers are GNU
if [ $myname = "cc" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
if [ $myname = "CC" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
if [ $myname = "c++" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
if [ $myname = "f77" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
if [ $myname = "gfortran" ]; then
- invoke_linker $ARGS -B$CONDOR_LD_DIR/
+ invoke_linker "$@" -B$CONDOR_LD_DIR/
fi
;;
- Re: revisiting condor and libtool,
Ralf Wildenhues <=