installation

install ok, can't compile examples

Brandt Belson, 2009-02-12 14:29

I'm having trouble getting an example to compile. I have the channelflow-1.3.3 folder in /home/bbelson/channelflow-1.3.3 (my home directory). I had no problem using make, make test, and make install. I tried ./couette -h and it also worked, outputting what the documentation said it should. My problem came up when I tried to make the errorexamples.cpp. I ran “make ./errorexamples.dx” and the following resulted:

rainier:examples bbelson$ make ./errorexamples.dx
g++ -Wall -g -O1 -fno-inline -DDEBUG -I/home/bbelson/channelflow-1.3.3/include -o errorexamples.do -c errorexamples.cpp
errorexamples.cpp:3:29: error: channelflow/dns.h: No such file or directory
errorexamples.cpp:4:35: error: channelflow/flowfield.h: No such file or directory
errorexamples.cpp:7: error: expected namespace-name before ';' token
errorexamples.cpp:7: error: '<type error>' is not a namespace
errorexamples.cpp: In function 'int main()':
errorexamples.cpp:24: error: 'Real' does not name a type
errorexamples.cpp:25: error: 'Real' does not name a type
errorexamples.cpp:26: error: 'Real' does not name a type
errorexamples.cpp:27: error: 'Real' does not name a type
errorexamples.cpp:30: error: 'FlowField' was not declared in this scope
errorexamples.cpp:30: error: expected `;' before 'u'
errorexamples.cpp:31: error: expected `;' before 'v'
errorexamples.cpp:34: error: 'u' was not declared in this scope
errorexamples.cpp:37: error: 'Complex' was not declared in this scope
errorexamples.cpp:40: error: 'v' was not declared in this scope
errorexamples.cpp:19: warning: unused variable 'Nx'
errorexamples.cpp:21: warning: unused variable 'Nz'
make: *** [errorexamples.do] Error 1

I changed CHANNELDIR to be $(HOME)/channelflow-1.3.3 as well, but got the same message. The first error goes away if I simply change errorexamples.cpp to have #include ”../channelfl ow/dns.h” but that also creates many other errors because files are not found within dns.h. Milos Ilak, another grad student here who has used channelflow before, encountered the sa me error message when he tried it on his own computer (with a pre-existing installation of channelflow). Do you know what might be causing this? I'm sorry if this is a simple error, but neither Milos or I know how to fix it.

Thanks, Brandt

Discussion

John F. Gibson, 2009-02-12 14:31

What value did you give the –prefix option to the ./configure script?

The error messages suggest that the /home/bbelson/channelflow-1.3.3/include does not exist or that it does not contain the channelflow header files (e.g. dns.h).

The include/channelflow directory is created during “make install”, and its location is set by the value of the –prefix option of the ./configure script. So I'm guessing that you s et –prefix to something other than /home/bbelson/channelflow-1.3.3/.

Try this

./configure --prefix=/home/bbelson/channelflow-1.3.3
make
make install

Make sure that CHANNELDIR is set to /home/bbelson/channelflow-1.3.3 in examples/Makefile, and then run

make errorexamples.x

Also, please confirm for me that /home/bbelson/channelflow-1.3.3/include/channelflow does not exist. If it does and is filled with copies of /home/bbelson/channelflow-1.3.3/channelflow/*.h, something else must be wrong.

John

Brandt Belson, 2009-02-13 08:56

That fixed the problem. I had used ./config -prefix=/home/bbelson, which put the lib and include folders in my home directory rather than in /home/bbelson/channelflow-1.3.3 (which is where the code looked for them). So as you said, the include folder didn't exist in the right location. Reinstalling using .config -prefix=/home/bbelson/channelflow1.3.3 and editing the makefile to have CHANNDELDIR=$(HOME)/channelflow-1.3.3, errorexamples compiles and runs as expected. Thanks!

John F. Gibson, 2009-02-14 16:28

Good. I bet the instructions in installation for –prefix are inconsistent with the Makefile in examples/. I'll check and fix.

John

 
installation/install_ok_can_t_compile_examples.txt · Last modified: 2010-02-02 07:55 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki