Re: [MPB-discuss] fortran won't play nice with C

2006-05-22 Thread Jethro Bell

Thank you for the help.  I think I was getting tripped up on the FLIBS
issue (I hadn't set FLIBS at all).  Now the environment looks like:
FLIBS=-L/sw/lib/gcc/powerpc-apple-darwin8.6.0/3.4.3
-L/sw/lib/gcc/powerpc-apple-darwin8.6.0/3.4.3/../../.. -lm -lfrtbegin
-lg2c -lSystem
LDFLAGS=-L/sw/lib
CPPFLAGS=-I/sw/include

./configure --with-lapack=/sw/lib/lapack.a --with-libctl=/sw/share/libctl

Now the error I get is:
checking for libctl dir... /sw/share/libctl
checking for gen-ctl-io... yes
checking for ctl_get_vector3 in -lctl... no
configure: error: Couldn't find the required libctl library.

I've also attempted to compile libctl from source, and attempted
PATH=$PATH:/Users/me/libctl_compiled/bin
LDFLAGS=-L/sw/lib -L/Users/me/libctl_compiled/lib
./configure --with-lapack=/sw/lib/lapack.a
--with-libctl=/Users/me/libctl_compiled/libctl/share

and trying to do this by hand results in the same error.

libctl.a does appear in the places where I think it is supposed to
(/sw/lib/libctl.a and /sw/lib/libctl.la).

Am I missing another flag somewhere?
Thank you very much,
--Jethro

___
mpb-discuss mailing list
mpb-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss


Re: [MPB-discuss] fortran won't play nice with C

2006-05-22 Thread Steven G. Johnson

On Mon, 22 May 2006, Jethro Bell wrote:

checking for ctl_get_vector3 in -lctl... no
configure: error: Couldn't find the required libctl library.
[...]
libctl.a does appear in the places where I think it is supposed to
(/sw/lib/libctl.a and /sw/lib/libctl.la).


You can look in the config.log file to find the exact compilation command 
and the exact error that caused linking to -lctl to fail.


___
mpb-discuss mailing list
mpb-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss


Re: [MPB-discuss] fortran won't play nice with C

2006-05-22 Thread Jethro Bell

So I find:

configure:8042: checking for ctl_get_vector3 in -lctl
configure:8079: cc -o conftest -g -O2 -Wall -W -Wbad-function-cast -Wcast-qual -
Wpointer-arith -Wcast-align -pedantic -I/sw/include -I/sw/include
-L/Users/me/libctl-301_compiled/lib -L/sw/lib conftest.c -lctl
-L/sw/lib -lguile -lm -lhd
f5 -lz /sw/lib/lapack.a -lblas -ldfftw -lm  -L/sw/lib/gcc/powerpc-apple-darwin8.
6.0/3.4.3 -L/sw/lib/gcc/powerpc-apple-darwin8.6.0/3.4.3/../../.. -lm -lfrtbegin
-lg2c -lSystem 5
/usr/bin/ld: warning multiple definitions of symbol _environ
/usr/lib/gcc/powerpc-apple-darwin8/4.0.0/../../../crt1.o definition of _environ
in section (__DATA,__data)
/sw/lib/libguile.dylib(posix.o) definition of _environ
/usr/bin/ld: Undefined symbols:
restFP
saveFP
collect2: ld returned 1 exit status
configure:8082: $? = 1

There's a little program that follows this.  I did a little cut+paste
and a `cut -c 3- conftest1.c   conftest.c` to get the pieces out, and
tried to compile it (by copying the gcc line out of the config.out
file).  I got the same error.  I had guessed it had something to do
with the crt1.o library, as it is in the errors above and mentioned in
the email from Greg.  So, I deleted the
-L/sw/lib/gcc/powerpc-apple-darwin8.6.0/3.4.3/../../.. and the
-L/sw/lib/gcc/powerpc-apple-darwin8.6.0/3.4.3 options out and it
compiled!  The executable, however, died with a Bus Error when I
tried to run it.

I went back, and changed the FLIBS variable, and it configured!  *victory dance*
So now it looks like:
FLIBS=-lm -lfrtbegin -lg2c -lSystem
LDFLAGS=-L/sw/lib
CPPFLAGS=-I/sw/include

./configure --with-lapack=/sw/lib/lapack.a --with-libctl=/sw/share/libctl

Compiling it throws out more warnings than I can follow, but I think
it compiled too!  *more victory*

It seems to have compiled (and executed, mpb-ctl/mpb runs), so I'm
going to go play with it, and if I have any more problems I'll come
back and cry.

Thank you all very much,
Jethro

On 5/22/06, Steven G. Johnson [EMAIL PROTECTED] wrote:


You can look in the config.log file to find the exact compilation command
and the exact error that caused linking to -lctl to fail.



___
mpb-discuss mailing list
mpb-discuss@ab-initio.mit.edu
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/mpb-discuss