I'm trying to build v 1.6.4 with a local install of gcc 4.7.2. I am trying to use the following script
<begin>
OWD=$PWD
GMPD=$OWD/gmp-4.3.2
MPFRD=$OWD/mpfr-2.4.2
MPCD=$OWD/mpc-0.8.1
PPLD=$OWD/ppl-0.11
CLOOG=$OWD/cloog-ppl-0.15.9
GCC=$OWD/gcc-4.7.2-rhel5
export
LD_LIBRARY_PATH=$GCC/lib64:$GMPD/lib:$MPFRD/lib:$MPCD/lib:$PPLD/lib:$CLOOG/lib:$LD_LIBRARY_PATH
export PATH=$GCC/bin:/usr/bin:/bin
export CFLAGS='-I/nm/programs/third-party/gcc-4.7.2-rhel5/include
-I/nm/programs/third-party/gcc-4.7.2-rhel5/include/c++
-I/nm/programs/third-party/gcc-4.7.2-rhel5/include/c++/4.7.2'
#mkdir tmp-install >& /dev/null
cd tmp-install
rm -rf openmpi-1.6.4-$1
cp ../downloads/openmpi-1.6.4.tar.gz .
tar -xvf openmpi-1.6.4.tar.gz
mv openmpi-1.6.4 openmpi-1.6.4-$1
cd openmpi-1.6.4-$1
./configure \
--prefix=$OWD/openmpi-1.6.4-$1 \
--enable-static
#make
#make install
cd $OWD
<end>
The gcc executable is tested in test.sh:
OWD=$PWD
GMPD=$OWD/gmp-4.3.2
MPFRD=$OWD/mpfr-2.4.2
MPCD=$OWD/mpc-0.8.1
PPLD=$OWD/ppl-0.11
CLOOG=$OWD/cloog-ppl-0.15.9
export
LD_LIBRARY_PATH=$GMPD/lib:$MPFRD/lib:$MPCD/lib:$PPLD/lib:$CLOOG/lib:$OWD/gcc-4.7.2-rhel5/lib64
export PATH=$OWD/gcc-4.7.2-rhel5/bin:/bin:/usr/bin
which gcc
which g++
rm -r test >& /dev/null
c++ -o test test.c
./test
the test code test.c
include <stdio.h>
int
main(const int argc, const char* argv[])
{
bool bar;
bool foo = true;
bar = foo;
printf("Hello World!\n");
printf("sizeof bool %i\n", sizeof(bool));
return 0;
}
The output <test.sh > test.out>
/nm/programs/third_party/gcc-4.7.2-rhel5/bin/gcc
/nm/programs/third_party/gcc-4.7.2-rhel5/bin/g++
Hello World!
sizeof bool 1
The configure steps with message that bool size is zero (at least I think
that's why it stops). The config.log.gz is attached.
The compiling system is RHEL5.
Thanks,
Alan
config.log.bz2
Description: BZip2 compressed data
configure_openmpi-1.6.4-xxx.sh
Description: Bourne shell script
#include <stdio.h>
int
main(const int argc, const char* argv[])
{
bool bar;
bool foo = true;
bar = foo;
printf("Hello World!\n");
printf("sizeof bool %i\n", sizeof(bool));
return 0;
}
test.out
Description: Binary data
test.sh
Description: Bourne shell script
