Hi Christian,
 
Thank you very much for response.
 
Details:
$ g++ --version
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-48)
Copyright (C) 2006 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.
 
$ echo 'int main() {return 0;}' | g++ -x c++ -
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: cannot find -lm
collect2: ld returned 1 exit status
Regards,
Satish
On Tue, Oct 9, 2012 at 6:00 PM, Christian Franke <Christian.Franke@t-online.de> wrote:
Satish k wrote:
Looking for help to configure sartmontool, I am unable to load the smarttool 5.43.
...

smartmontools-5.43 # ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for g++... g++
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.

GNU g++ is present in PATH but its installation is apparently broken.

Please try the following commands:

$ g++ --version

$ echo 'int main() {return 0;}' | g++ -x c++ -

The latter should produce an executable with the traditional default name "a.out".

If the compiler does not work, reinstalling GNU gcc/g++ and binutils packages might fix the problem.

Thanks,
Christian