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: 2005-05-31 20:44:03


The problem is definitely that it is not producing a valid fortran
executable because the test program fails to link due to a missing
symbol.

Did you get exactly the same error in the config.log when you used the
LIBS=-lSystemStubs flag to configure?

I'm afraid that I don't have a Tiger system with gfortran installed to
try this on. Here's what our test case does -- once you can get this
to compile, you should be able use the same flags to get LAM's
configure to work:

- create a C source file with the following (e.g., size.c)

#include <stdio.h>
#include <stdlib.h>

void sizeof_(char *a, char *b)
{
     int diff = (int) (b - a);
     FILE *f=fopen("conftestval", "w");
     if (!f) exit(1);
     fprintf(f, "%d\n", diff);
}

- create a Fortran source file with the following (e.g., main.f):

        program fsize
        external SIZE
        $1 x(2)
        call SIZE(x(1),x(2))
        end

- compile each of those into .o files, e.g.:

        gcc size.c -c
        gfortran main.f

- link these together into an executable

        gfortran main.o size.o -o main

The link step is what is failing due to a missing symbol. We had
another user who said that adding -lSystemStubs to the final link line
made it link for him, but I can't verify this. :-\

Can you try that?

On May 24, 2005, at 3:45 PM, Ben Heaps wrote:

> Hi Jeff,
>
> My solution and your solution both dont seem to work. Any other hints
> would be appreciated.
>
> Ben
>
>
> ----- Original Message -----
> From: "Jeff Squyres" <jsquyres_at_[hidden]>
> To: "General LAM/MPI mailing list" <lam_at_[hidden]>
> Sent: Saturday, May 21, 2005 6:46 AM
> Subject: Re: LAM: compile error during lam install
>
>
>> On May 20, 2005, at 6:10 PM, Ben Heaps wrote:
>>
>>> Im not too familiar with UNIX yet, but getting there.
>>>
>>> Hopefuly step 2 solves the problem, is adding -lSystemStubs to my
>>> libraries easy to do in a bash shell?
>>>
>>> I tried editing .bashrc and adding LDFLAGS = -lSystemStubs
>>
>> Did that work?
>>
>> I would recommend instead:
>>
>> ./configure LIBS=-lSystemStubs
>>
>> --
>> {+} Jeff Squyres
>> {+} jsquyres_at_[hidden]
>> {+} http://www.lam-mpi.org/
>>
>> _______________________________________________
>> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>>
>
> _______________________________________________
> This list is archived at http://www.lam-mpi.org/MailArchives/lam/
>

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