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

20050110: problem building udunits on freebsd 4.7-RELEASE



Neil,

You did the right thing.  Your work shows that the individual steps of
the configure(1) script can be manually executed yet the configure(1),
itself, fails.

This is Very Strange to say the least.   

Try replacing that section of the configure(1)-script code with
the following (which does the test, exits, but doesn't remove the
test-file):

         echo $ac_n "checking for Fortran integer type equivalent to C 
    pointer""... $ac_c
    " 1>&6
    echo "configure:2288: checking for Fortran integer type equivalent to C 
    pointer" >&5
         cat << EOF >conftest.c
    #include <stdio.h>
    int main()
    {
         printf("%d\n", sizeof(char*));
         exit(0);
    }
    EOF
         doit='$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} 
    conftest.c ${LIBS-}'
         if { (eval echo configure:2298: \"$doit\") 1>&5; (eval $doit) 2>&5; 
    }; then
             if type='integer*'`./conftest`; then
                 echo "$ac_t""$type" 1>&6
                 UD_POINTER=$type

                 unset type
             else
                 { echo "configure: error: Test program execution failure" 
    1>&2; exit 1;
    }
             fi
         else
             { echo "configure: error: Test program build failure" 1>&2; 
    exit 1; }
         fi
    exit
    #    rm conftest*

Then, re-execute the configure(1) script.  It will, undoubtably fail.

Then, execute the following commands manually:

    CC=/usr/bin/gcc
    CFLAGS=-O
    CPPFLAGS=-Df2cFortran
    doit='$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} conftest.c 
${LIBS-}'
    if { (eval $doit) 2>&1; }; then
        echo success
    else
        echo failure
    fi

It will, probably, succeed.  It then because a matter of figuring out 
why one fails and the other succeeds.  I hope you're up-to-it.

If you're not, is there some way I can log onto the system in question 
(I can't duplicate your problem on our FreeBSD 4.7 system)?

Regards,
Steve Emmerson

------- Original Message

Date:    Tue, 11 Jan 2005 14:23:09 -0600
From:    Neil Smith <address@hidden>To:      Steve Emmerson <address@hidden
          idata.ucar.edu>
Subject: Re: 20050110: problem building udunits on freebsd 4.7-RELEASE 

Steve,
I exited at what I think is the appropriate point in ./configure. Here 
is the relevant section:

=============
     echo $ac_n "checking for Fortran integer type equivalent to C 
pointer""... $ac_c
" 1>&6
echo "configure:2288: checking for Fortran integer type equivalent to C 
pointer" >&5
     cat << EOF >conftest.c
#include <stdio.h>
int main()
{
     printf("%d\n", sizeof(char*));
     exit(0);
}
EOF
     doit='$CC -o conftest ${CFLAGS-} ${CPPFLAGS-} ${LDFLAGS-} 
conftest.c ${LIBS-}'
echo -- neils insert
echo $doit
echo -- neils insert exiting
exit

     if { (eval echo configure:2298: \"$doit\") 1>&5; (eval $doit) 2>&5; 
}; then
         if type='integer*'`./conftest`; then
             echo "$ac_t""$type" 1>&6
             UD_POINTER=$type

             unset type
         else
             { echo "configure: error: Test program execution failure" 
1>&2; exit 1;
}
         fi
     else
         { echo "configure: error: Test program build failure" 1>&2; 
exit 1; }
     fi
     rm conftest*
=============

After running configure again, I have a conftest.c:
=============
#include <stdio.h>
int main()
{
     printf("%d\n", sizeof(char*));
     exit(0);
}
=============

and then I
 > /usr/bin/gcc -o conftest -O -Df2cFortran  conftest.c
with no error. There is then a conftest executable which I run with:
 > ./conftest
4
 > echo $?
0

Does this not satisfy the 'if' block in that section of the configure 
script?

FYI, I can ./configure and make all for udunits-1.11.7 with the same 
environment without failure. Just have the usual perl module install 
issues on 'make install'.

Thanks,
-Neil

On Jan 10, 2005, at 4:02 PM, Steve Emmerson wrote:

> Neil,
>
>> Date: Mon, 10 Jan 2005 15:42:51 -0600
>> From: Neil Smith <address@hidden>
>> Organization: Texas A&M University
>> To: Steve Emmerson <address@hidden>
>> Subject: Re: 20050110: problem building udunits on freebsd 4.7-RELEASE
>> Keywords: 200501102105.j0AL52v2014190 UDUNITS FreeBSD
>
> The above message contained the following:
>
>> OK. But still have failure.
>> Now with:
>>
>> CC=/usr/bin/gcc
>> CPPFLAGS=-Df2cFortran
>> CFLAGS=-O
>> PERL=/usr/bin/perl
>> FC=g77
>> F90=
>> FFLAGS=-O
>> CXXFLAGS=-O
>> CXX=/usr/bin/g++
>> CPP=/usr/bin/gcc -E
>>
>>> cat configure.log
>> creating cache ./config.cache
>> checking type of operating system... freebsd
>> checking for catman... catman
>> checking for manual-page index command... catman -w -M $(MANDIR)
>> checking for C compiler... /usr/bin/gcc
>> checking for dependency generation mechanism... /usr/bin/gcc -M
>> checking how to run the C preprocessor... /usr/bin/gcc -E
>> checking the C preprocessor... works
>> checking for C const... yes
>> checking for C volatile... yes
>> checking for C signed... yes
>> checking for C function prototypes... yes
>> checking for standard C variadic functions... yes
>> checking for standard C string generation... yes
>> checking for standard C token pasting... yes
>> checking C void pointer... yes
>> checking for ar... ar
>> checking for tar flags... -chof
>> checking for ranlib... ranlib
>> checking binary distribution directory... system: not found
>> /home/ftp/pub/binary/dummy_system
>> checking the installation prefix... /unidata/upc/udunits-1.12.2
>> checking the installation exec-prefix... /unidata/upc/udunits-1.12.2
>> checking for neqn... neqn
>> checking for tbl... tbl
>> checking for ar... (cached) ar
>> checking for yacc library...
>> checking for yyerror() in default library(s)... no
>> checking for yyerror() in -ly... yes
>> checking for C math library...
>> checking for return sin(0.0) != 0 in default library(s)... no
>> checking for return sin(0.0) != 0 in -lm... yes
>> checking style for cfortran.h... Standard
>> checking for Fortran integer type equivalent to C pointer... 
>> configure:
>> error: Test program build failure
>
> The reason for this failure should be in the file "config.log":
>
>> configure:2288: checking for Fortran integer type equivalent to C
>> pointer
>> configure:2298: /usr/bin/gcc -o conftest -O -Df2cFortran  conftest.c
>> gcc: : No such file or directory
>
> Unfortunately, the last error-message above isn't very helpful.
>
> This failure is very strange and should not have occurred.  It's not
> obvious what the problem is, although I suspect a problem with your
> development environment.
>
> I suggest editing the "configure" script.  Have the script exit at the
> point where it fails (search for "Fortran integer type equivalent")
> without removing the test file "conftest.c".  Then, manually execute 
> the
> command
>
>     /usr/bin/gcc -o conftest -O -Df2cFortran  conftest.c
>
> and see if you can determine the cause of the "No such file or
> directory" error-message.
>
> Regards,
> Steve Emmerson
>
>
------------------
Neil R. Smith                           address@hidden
Comp.Sys.Mngr.                  (979)845-6272
Dept. Atmospheric Sciences/Texas A&M University

------- End of Original Message


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.