[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug or wrong use ?

From: Patrick Guio
Subject: bug or wrong use ?
Date: Wed, 18 Oct 2000 20:37:56 +0200 (CEST)

Dear all

I try to write a system for my c++ code and I get
the following problem. I have a compiler check which looks like this

# Compiler check
[  --with-cxx=COMPILER[:name-flags]   set options for COMPILER ],
[case "$withval" in
KCC*) # KAI C++
cxx*)               # DEC C++
  echo "Configuring for DEC cxx"
  CXX_OPTIMIZE_FLAGS="-O4 -tune host"
  CXX_DEBUG_FLAGS="-g -msg_display_tag -DBZ_DEBUG"
  CXXFLAGS="-std strict_ansi -DBZ_DISABLE_XOPEN_SOURCE -ieee"
  CXXFLAGS="$CXXFLAGS -ptr \$(top_srcdir)/repository -ttimestamp"
egcs*|gcc*)              # gcc
*) AC_MSG_ERROR([ Known compilers are KCC, gcc, cxx])
echo ""
echo CXX = $CXX
echo "" ],
This script only recognizes a small set of compilers and platforms so far.
You will have to rerun this script with one of these options:
  --with-cxx=KCC    KAI C++ (
  --with-cxx=gcc    gcc (
  --with-cxx=cxx    DEC cxx 6.10 or better (
])] )

The problem is coming from the declaration of the CXXFLAGS for cxx
compiler. I need to declare a repository for instantiations of the
templates with -ptr <directory>. Since I have several subdirectories, I
need the templates to be instantiated in a known place.
Earlier I had set it 
  CXXFLAGS="$CXXFLAGS -ptr $PWD/repository -ttimestamp"

But I would like to take advantage of the $(top_srcdir) variable so that
each created Makefile contains not an instance but a variable.
It works fine and in each created Makefile I have
CXXFLAGS = -std strict_ansi -DBZ_DISABLE_XOPEN_SOURCE -ieee -ptr
$(top_srcdir)/repository -ttimestamp
The problem comes when I run configure to check whether the compiler works
then I get

% configure --with-cxx=cxx --with-blitz=/mn/sothi/u1/patrickg/src/blitz
checking for g++... cxx
checking whether the C++ compiler works... no
configure: error: C++ compiler cannot create executables

Looking at config.log I see that

configure:3583: result: cxx
configure:3632: checking whether the C++ compiler works
configure:3649: cxx -o conftest -std strict_ansi -DBZ_DISABLE_XOPEN_SOURCE
-ieee -ptr $(top_srcdir)/repository -ttimestamp  -DHDF
-I/mn/sothi/u1/patrickg/src/blitz -DFLOAT_FIELD
-L/mn/sothi/u1/patrickg/src/blitz/lib -lblitz
-L/astro/local/opt/HDF_4.1r3/4.1r3_digunix/lib -lmfhdf -ldf
/astro/local/opt/HDF_4.1r3/4.1r3_digunix/lib/libjpeg.a -lz
cxx: Severe: invalid directory for instantiation files:
cxx: Info: 1 catastrophic error detected in the compilation of
cxx: Info: Compilation terminated.
configure: failed program was:
#line 3635 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit (int);

main ()

  return 0;
configure:3669: result: no
The problem is when testing the tested command does not contain an
instance of $(top_srcdir) but $(top_srcdir) itself!
What do I do wrong? Do you have tips to remedy?


Patrick Guio

                                  Patrick Guio
                    Institute of Physics, University of Oslo
                      P.O. box 1048, Blindern, N-0316 Oslo
               Tel : (+47) 22 84 40 60 - Fax : (+47) 22 85 56 71
                        E-mail : address@hidden 
                          URL :

reply via email to

[Prev in Thread] Current Thread [Next in Thread]