LAM/MPI logo

LAM/MPI General User's Mailing List Archives

  |   Home   |   Download   |   Documentation   |   FAQ   |   all just in this list

From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2003-10-10 12:37:13


We conversed a bit about this off the list. The weird thing is that
this appears to be a problem with the spaces in the -D token (as
suggested by Tim Mattox). I have no problems running a simple command
such as:

        gcc hello.c -c -o hello.o "-DFOO=\"foo bar\""

on lots of different platforms. But this user can't run it -- his gcc
spits out the [misleading] error.

So even though I don't understand exactly *why* this is happening, it
seems to be a bug in the command line parser of at least some versions
of gcc. So we'll just move these -D's into lam_config.h and avoid the
whole problem. This will be included in the next public release of
LAM/MPI.

  (Sidenote: someone else reported this same problem either on the
   list or to me directly right around when 7.0.2 was released, but it
   was with the Portland compilers, and again, I was unable to
   reproduce the error. The person who reported it did not reply to
   my e-mail, so I never followed up on it. Doh!)

The workaround for the currently released versions of LAM is to edit
the share/etc/Makefile that is generated (i.e., after configure is
run) and change the value of the macro LAM_CONFIGURE_DATE to either
not include spaces (e.g., s/ /-/g) or delete the majority of its value
so that it's an empty C string ("").

Fixes will be committed to CVS (both the head and the 7.0 branch) by
this afternoon.

On Thu, 9 Oct 2003, Harshu wrote:

> > What happens if you run this manually?
>
> I get the same error
>
> [harshu_at_dummy:etc$] gcc -DHAVE_CONFIG_H -I. -I. -I../../share/include
> -DLAM_SYSCONFDIR=\"/usr/etc\" -DLAM_PREFIX=\"/usr\"
> -DLAM_CONFIGURE_USER=\"harshu\" -DLAM_CONFIGURE_HOST=\"dummy.host\"
> "-DLAM_CONFIGURE_DATE=\"Thu Oct 9 17:43:09 EDT 2003\""
> -I../../share/ssi/include -I../../share/include -DLAM_BUILDING=1 -O3
> -pthread -c T.c -Wp,-MD,.deps/T.TPlo -o T.o
> gcc: cannot specify -o with -c or -S and multiple compilations

-- 
{+} Jeff Squyres
{+} jsquyres_at_[hidden]
{+} http://www.lam-mpi.org/