CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (http://www.cfd-online.com/Forums/openfoam-installation/)
-   -   No rule to make target %60libsob (http://www.cfd-online.com/Forums/openfoam-installation/57754-no-rule-make-target-60libsob.html)

JLepolt (Jlepolt) February 15, 2005 14:46

I'm tring to compile OpenFOAM
 
I'm tring to compile OpenFOAM, and I'm starting at the very beginning going piece by piece. When trying to compile zlib-1.2.1, the wmake command is: make -f Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps libso
However, this gives me the error: make: *** No rule to make target `libso'. Stop.
Any help is appreciated, thanks!

Mattijs Janssens (Mattijs) February 15, 2005 15:14

My guess is you're picking up
 
My guess is you're picking up the zlib/Makefile instead of the one from wmake ($WM_DIR/Makefile).

Does it work if you do

wmake libso zlib-1.2.1

from one directory up?

Mattijs

JLepolt (Jlepolt) February 15, 2005 16:02

Unfortunately that did not so
 
Unfortunately that did not solve my problem. I made sure that that wmake was correctly using the ($WM_DIR/Makefile) file rather than the one located in the zlib directory. Is there a chance that I would need to modify the Makefile?

Thanks

Michael Conry (Conry) February 15, 2005 18:50

You should have no need to mo
 
You should have no need to modify the Makefile.

I suspect you're still not in fact running wmake. What works for me is to begin by changing directory into the directory OpenFOAM-1.0.2/src

When you type "ls" you should see that this directory contains the folder "zlib-1.2.1".

From this position, typing the command: "wmake libso zlib-1.2.1".

This call to the wmake command then invokes a script that changes into the zlib directory and runs the conventional configure script and invokes make on the resulting Makefile to produce a shared library.

[Don't take the above as gospel! I'm new to FOAM, but I do have some experience of compilation/installation].

JLepolt (Jlepolt) February 15, 2005 19:01

That is what I've been doing.
 
That is what I've been doing. In fact, I've verified it by looking at the wmake script and going step by step. I should probably be honest with you though...I'm trying to compile this on a Mac. Someone's gotta do it, right? I know that there are no Mac binaries available at this time...that's why I'm trying to come up with one myself. I'm trying to figure out the build process piece by piece and modify it as needed. I recently figured out my previous problem and have since found more issues. One is the fact that Macs don't use .so files, they use .dylib files. The current error I'm receiving when I try to do the "wmake libso zlib-1.2.1" is:

libso
/Users/lepolt/OpenFOAM/OpenFOAM-1.0.2/wmake/bashScripts/mkObjectDir libNULL
rm -f so_locations
cd Make/powerpcGccOpt ; \
g++ -L/Users/lepolt/OpenFOAM/OpenFOAM-1.0.2/lib/powerpcGccOpt -o libNULL.dylib
powerpc-apple-darwin7-g++-4.0.0: no input files
make: *** [libNULL.dylib] Error 1

It looks like the $MAKE_DIR variable is being set to something gooofy...and in the above when it tries to g++ there is nothing there. Any suggestions here?

Thanks

Mattijs Janssens (Mattijs) February 16, 2005 04:48

The libNULL should be libzlib
 
The libNULL should be libzlib (which comes from the 'LIB = $(FOAM_LIBBIN)/libz' setting in Make/files)

wmake is just a shell script which uses a $WM_DIR/Makefile. This in turn pulls in (using the 'include' statement)

- the compilation options from
$WM_DIR/rules/$WM_ARCH/c++
- the files to compile from the local Make/$WM_ARCH/files
- the local compilation and link lines from the local Make/$WM_ARCH/options
- and various other files in Make/$WM_ARCH/ which handle the dependencies

Having differently named .so extension can be handled by changing the 'SO' variable in the $WM_DIR/Makefile. Does changing that help?

Mattijs

JLepolt (Jlepolt) February 16, 2005 18:23

Thanks for your help, but I a
 
Thanks for your help, but I am still having problems. Let's go through this step by step, and maybe something will click for me.

You said:
- the compilation options from $WM_DIR/rules/$WM_ARCH/c++
--I have made appropriate changes here

- the files to compile from the local Make/$WM_ARCH/files
--This file is created, but empty

- the local compilation and link lines from the local Make/$WM_ARCH/options
--This file is created, but empty

- and various other files in Make/$WM_ARCH/ which handle the dependencies
--These files are all created, but contain no context

Any suggestions??? Thanks so much

Eugene de Villiers (Eugene) February 17, 2005 18:29

I'm not an expert, but neithe
 
I'm not an expert, but neither Make/$WM_ARCH/files nor Make/$WM_ARCH/options should be empty.

I suggest you follow the wmake script to figure out why it is failing.
I think the line:

make -f $WM_DIR/MakefileFiles allFiles

should be creating the missing entries so I would start there.


All times are GMT -4. The time now is 16:46.