CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Windows Installation BugsComments on Petrbs patch (https://www.cfd-online.com/Forums/openfoam-installation/57658-windows-installation-bugscomments-petrbs-patch.html)

pvita March 3, 2006 05:38

Brooks, I compiled on my rig L
 
Brooks, I compiled on my rig LAM that is part of OpenFOAM distribution as well as libPstream against it without problems. All one needs to get LAM compiled is in OpenFOAM-1.2\src\Allwmake change usage of gmake to make and set WM_MPLIB=LAM.

I didn't made futher compilation as I found that addition of -L$(FOAM_LIBBIN)/dummy flag in Make\options files that patch provides will ignore my new library. I am poundering now how to conquer the world and how to solve it with some elegant way. My idea is to let .bashrc create a symbolic link to the right libPstream.dll based on WM_MPLIB variable. What you think about it?

brooksmoses March 3, 2006 06:07

Good news about LAM compiling!
 
Good news about LAM compiling!

I think, rather than relying on symbolic links, it might be cleaner to do this with environment variables, since the relevant one should already exist -- on my Linux machine (with LAM compiled), it appears that $FOAM_MPI_LIBBIN points to the correct location. The only problem is that it's not defined when the "dummy" Pstream library is used.

Thus, how about replacing the -L$(FOAM_LIBBIN)/dummy flags with -L$(FOAM_MPI_LIBBIN), and changing line 232 of .bashrc from

AddLib $FOAM_LIBBIN/dummy

to

export FOAM_MPI_LIBBIN=$FOAM_LIBBIN/dummy
AddLib $FOAM_MPI_LIBBIN

in order to properly account for the no-MPI case?

pierrot March 3, 2006 09:33

Dear OpenFoamer Friends I w
 
Dear OpenFoamer Friends

I want to compile, for example turbFoam with mpich-1.2.6 and not with LAM_MPI because I had some troubles between LAM_MPI and PBSPRO.
So I build libPstream.so with mpich-1.2.6 and try to compile turbFoam.
After typing : wmake turboFoam
I received this message :

wmake turbFoam
make: Nothing to be done for `allFiles'.
make: `Make/linuxAMD64Gcc4Opt/dependencies' is up to date.

/u12/maruzews/OpenFOAM/OpenFOAM-1.2/wmake/tcshScripts/mkObjectDir /u12/maruzews/OpenFOAM/OpenFOAM-1.2/applications/bin/linuxAMD64Gcc4Opt/turbF
oam
g++ -m64 -DlinuxAMD64 -Wall -W -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -ffast-math -DNoRepository -ftemplate-depth-30 -I/u1
2/maruzews/OpenFOAM/OpenFOAM-1.2/src/cfdTools/incompressible -I/u12/maruzews/OpenFOAM/OpenFOAM-1.2/src/cfdTools/general/lnInclude -I/u12/maruz
ews/OpenFOAM/OpenFOAM-1.2/src/turbulenceModels -I/u12/maruzews/OpenFOAM/OpenFOAM-1.2/src/transportModels -I/u12/maruzews/OpenFOAM/OpenFOAM-1.2
/src/OpenFOAM/lnInclude -IlnInclude -I. -fPIC Make/linuxAMD64Gcc4Opt/turbFoam.o -L/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt
\
-lincompressibleTurbulenceModels -lincompressibleTransportModels -lcfdTools -lmeshTools -lOpenFOAM -lm -o /u12/maruzews/OpenFOAM/OpenFO
AM-1.2/applications/bin/linuxAMD64Gcc4Opt/turbFoam
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_open'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_lookaside_alloc'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_destroy_hash'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_unknown'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_set_acceptable_sizes'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_directed_send_with_callback'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_dma_free'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `memset.pathscale.opteron'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_create_lookaside'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_destroy_lookaside'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_deregister_memory'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_node_id_to_unique_id'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_insert'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_crc'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_ticks'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_receive'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_strerror'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_dma_malloc'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_bcopy'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_allow_remote_memory_access'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_send_with_callback'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_provide_receive_buffer'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_close'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_perror'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_compare_ptrs'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_hash_ptr'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `GM_PAGE_LEN'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_lookaside_free'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_remove'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_node_id_to_host_name'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_register_memory'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_bzero'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_blocking_receive'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_num_receive_tokens'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_hash_find'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_unique_id_to_node_id'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_get_host_name'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_get_node_id'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_create_hash'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_blocking_receive_no_spin'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_num_send_tokens'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_drop_sends'
/u12/maruzews/OpenFOAM/OpenFOAM-1.2/lib/linuxAMD64Gcc4Opt/mpich-1.2.6/libPstream .so: undefined reference to `gm_provide_receive_buffer_with_ta
g'
collect2: ld returned 1 exit status
make: *** [/u12/maruzews/OpenFOAM/OpenFOAM-1.2/applications/bin/linuxAMD64Gcc4Opt/turbFoam ] Error 1


BUT these gm_... are only used by LAM_MPI and I won't use it.

So can you explain the cleaner way to compile OpenFoam with mpich-1-2-6.

Thanks a lot,

Mail you soon,

Pierre

mattijs March 3, 2006 11:37

- only the Pstream library nee
 
- only the Pstream library needs to be recompiled. All mpp stuff is fully contained within that library.

To recompile Pstream for a different mpp:
- in the .OpenFOAM-1.2/bashrc set the WM_MPLIB variable (mpich probably is already there and just needs to be uncommented)
- in the OpenFOAM-1.2/.bashrc make sure it picks up the correct mpich paths.
- re'source' the bashrc etc.
- recompile libpstream.so:

cd $FOAM_SRC/Pstream/mpi
wclean
wmake libso

- now `ldd turbFoam` should pick up this new libPstream.so

- if you get any missing symbols relating to mpi specific system libs just add them to $WM_DIR/rules/$WM_ARCH/mplib$WM_MPLIB

pierrot March 6, 2006 11:43

Thanks Mattijs, I did it.
 
Thanks Mattijs,

I did it.
But after `ldd turbFoam` I received libincompressibleTurbulenceModels.so: Command not found.

So where I must add the share libraries before doing ldd

Pierre

mattijs March 6, 2006 14:34

Sorry wrote incorrectly. Do
 
Sorry wrote incorrectly.

Do

ldd `which turbFoam`

and check which libPstream.so is used.

ceradi March 21, 2006 10:49

Dear experienced OpenFOAMers .
 
Dear experienced OpenFOAMers ...

I'm beginner with OpenFOAM and only windows 2000 user (Unix is unknown for me, just some experience in C programming under DOS 15 years ago).

I would like to install OpenFOAM with Cygwin.

I've downloaded OpenFOAM from the "Unofficial OpenFOAM Cygwin Port" from Brooks Moses. I did as right as possible what's described there and on the Official OpenFOAM web site.

My different problems :

1) In the bashrc from .OpenFOAM-1.2 at the line :
export WM_ARCH=cygwin the "=" is missed.

2) After sourcing the .OpenFOAM-1.2/apps/paraview/bashrc, I have the following message : bash : '[' : missing ']'
I looked in the file, but I can't see the problem... It must have some consequences but I don't know...

3) I must run "./Allwmake" many times to be able to bild the Objetcs files. Normal? I suppose yes.

4) I get the following warning :
ld : unrecognised emulation mode : elf_i386
emulation supported : i386pe.
Why? Must I change .../rules/cygwin/general and .../rules/cygwinGcc4/general to i386pe ?

5) No linking work : here is what I can read for the last linking :

g++ -m32 -Dcygwin -Wall -W -Wno-unused-parameter Wold-style-cast -03 -ffast-math -DnoRepository -ftemplate-depth-30 -I/home/Administrateur/OpenFOAM/OpenFOAM-1.2/src/OpenFOAM/lInclude -IlnInclude -I. -L/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib/cygwinGcc4Opt \
-lOpenFOAM -lm -o OpenFOAM.exe
/usr/bin/ld: cannot find -lOpenFOAM
collect2:ld returned 1 exit status
make: *** [OpenFOAM.exe] Error 1


Thanks for help, even if it look a little stupid for you...

Philippe

brooksmoses March 22, 2006 02:00

Philippe - First, thanks mu
 
Philippe -

First, thanks much for trying out the port, and for reporting how it worked. These aren't stupid questions at all -- it should just work, and if it doesn't, it probably means I did something wrong.

(One of the things I just realized I did "wrong" was that I never tested the bash scripts; I use tcsh, and only tested those. Mea culpa, and this means you're probably the first person to test them, which is probably why it's not working for you.)

As to your specific questions:

1) Yup, you're right. The line after it needs an "=" at the end, too. Thanks for catching that!

2) I don't immediately see what's causing that either. I'll work on tracking it down tomorrow.

3) That's definitely not normal; it should only need to be run once.

I wonder if the bash error about "missing ']'" means that it's not loading everything properly. (Also, one big thing to be aware of with the ./Allwmake scripts is that they keep going even if one of the steps doesn't work, which tends to hide the errors that really matter. If it doesn't work the first time, it's probably most useful to open the Allwmake script in a text editor, and run each line by hand.)

Hopefully, if I can fix the "missing ']'" issue, this will work right.

4) Yes, something is definitely wrong here -- this is probably a good part of why Allwmake isn't working.

Changing the /general files is probably worth trying (and I suspect it is indeed an error in the files), but I don't think it will help. I have the same ld on my system (which doesn't support elf_i386) and the same /general files, and it works for me, so I'm guessing the line in /general shouldn't actually affect anything -- perhaps the option is overwritten somewhere else.

5) This is almost certainly because of the previous errors. Is there a libOpenFOAM.dll file in the OpenFOAM-1.2\lib\cygwinGcc4Opt directory?

(Incidentally, did you retype the error message by hand, or cut-and-paste it? The first -I option ends with OpenFOAM/lInclude, and that should be lnInclude, and I'm wondering where the mistake came in -- if that typo is in the build scripts, that could be part of the problem!)

...

So, sometime in the next day or so I'll work on testing on the bash scripts, to see if I can duplicate your problems and find out what's causing them.

In the meantime, could you try doing a compilation under tcsh instead of bash to see if that works? (I don't think Cygwin installs tcsh by default, so you might have to go through Cygwin setup to install it first. And of course you source the cshrc scripts rather than the bashrc ones.) That should at least tell us whether it's a problem with the bash scripts, or with something else.

(And, if you don't mind, please try changing the "-melf_i386" to "-mi386pe" in the two /general files to see if that helps, just in case it does work.)

Also, did you install the binary package, or just the source package? (It should work either way; I'm just curious, and it might make a difference to tracking down the error.)

pvita March 22, 2006 04:15

Greetings! It seems it is
 
Greetings!

It seems it is time I should install from scratch with Mose's patch version and to check it under my Cygwin/Win2000. Well, I would suggest to fix bashrc first as it sets path as well, so the compiler problem could be dependent on it.

Petr

ceradi March 22, 2006 05:50

Thanks to Brooks and Petr for
 
Thanks to Brooks and Petr for helping me!

I will install tcsh and try...
I don't have to work with bash, if tcsh work ... I'll work with it!

For the specific questions :

4) I tryed to change indeed, but with no changes except the warning message wich disappear.

5) There isn't a libOpenFOAM.dll
(Yup !! I retype the message indeed and forgot the "n", sorry!)
By the way, is there a ".log" file created with all the messages somewhere? If not I can't paste...

I'm downloading the binary package now to try and see...

You're more into the code than me, but I can help by telling some more details, may be important...

- running the foamSystemCheck fail with 2 errors :
a) no support for cygwin
b) retyping the error message :

Checking networking...
************
Ping_ceradi : Ping_not_installed_in_usual_path
Ping_localHost : Ping_not_installed_in_usual_path
Test_rsh: No_telnet_running:cannot_check*
Test_ssh: No_telnet_running:cannot_check*
FATAL ERROR : No remote shell available.
Foam2.3 environnement requires passwordless
'ssh' and/or 'rsh' to the current host.
Contact your system administrator.

- To Petr,

I don't understand exactly what you mean by "to fix bashrc first as it sets path" but it remember me something may be interesting to help :
After unpacking OpenFOAM-1.2.cygwin-src-0.6.tar.gz and gcc-4.0.2.cygwin-OpenFOAM.tar.gz, sourcing the bashrc, when running ./Allwmake, it couldn't find the compiler...
I restarted the machine and it find it after...

So I'll continue the investigations before my childrens comes from school...

Philippe

ceradi March 22, 2006 07:17

I just unpacked the binaries i
 
I just unpacked the binaries in a FOAM directory.
made a copy of the tutorials as described in the user's manual tutorial.

Typed in : FoamX

The following message appear :

Can't find JDK at /cygdrive/c/WINNT/System32. Please set the JAVA_PATH to the JDK installation directory.

Well, java isn't on the machine I want to run OpenFOAM. This machine isn't connected to the internet for secured virus reasons.

It seem I must install java on the machine. Right? I must search internet for this.

Now I must switch to tcsh with cygwin and continuing the trials...

Philippe

pvita March 22, 2006 08:51

Well Philippe! First you sh
 
Well Philippe!

First you should know, that our patch allows to compile non-parallel part of OpenFOAM for number crushing. Parallel stuff and GUI was not on the list of changes as it was not important for us. Simply said, FoamX is not working at all. Forget it for now. It is in any case just tool to set some parameters in case files you can do manually as well.

Speaking about compiler and bashrc. When you start Cygwin terminal, you will execute bashrc. This should include OpenFOAM startup scripts that will set paths and other environment variables to those needed. These OpenFOAM stratup scripts change as well path to supported version of compiler. After a restart you simply executed these scripts, therefore those errors about compiler are gone.

I will try that bash stuff tomorrow.

Petr

ceradi March 22, 2006 11:42

Thanks... Yup, you're right
 
Thanks...

Yup, you're right I noted this in a corner of my sheet of paper about FoamX and paraFoam. But forgot it at the time to try... sorry

I unpacked the binaries in $HOME/foam. You'll find trivial that it could not work there without environment changes. So I've copied the directories "applications" and "lib" to $HOME/OpenFOAM/$(LOGNAME)-1.2.
Now the applications are known but can't run because they can't find the .dll. In the error message, no "lib" directory was pointed to.
So, I copied the files from the directory "lib" and "lib/dummy" in $HOME/OpenFOAM/OpenFOAM-1.2/applications/bin/cygwinGcc4Opt.

I've runned the first example and it works!

For more investigations, I must learn myself! I'm new here...

About tcsh, I tried with it to compile the package. There is no error in the cshrc but the compilation keep the same problem.

The tricky mount I had to do give me some ideas to solve the compilation problem but you probably will find this easier than me.

brooksmoses March 22, 2006 15:10

Hmm. Sounds like you still mi
 
Hmm. Sounds like you still might be having some path problems. What do the following commands return?

echo $PATH

echo $path

echo $WM_PROJECT_DIR

echo $WM_PROJECT_USER_DIR

echo $WM_ARCH

echo $WM_COMPILER_DIR

which gcc

Also, when you unpacked the source files, what directory did you put them in? Are they in $HOME/OpenFOAM or $HOME/foam?

ceradi March 23, 2006 05:37

Yes, I feeld this too... But ?
 
Yes, I feeld this too... But ??

I only used $HOME/foam for the binaries because the $HOME/OpenFOAM allready existed for the sources and I wanted to have it independently.

So I well copied your file OpenFOAM-1.2.cygwin-src-0.6.tar.gz in $HOME/OpenFOAM and unpacked it there.

I uninstalled the gcc from the cygwin package to be sure using the good one.

I copied your file gcc-4.0.2.cygwin-OpenFOAM.tar.gz in $HOME/OpenFOAM/cygwin and unpacked it there.

Environment variables (retyped) :
PATH :
/home/Administrateur/OpenFOAM/cygwin/gcc-4.0.2/bin:/home/Administrateur/OpenFOAM /Administrateur-1.2/applications/bin/cygwinGcc4Opt:/home/Administrateur/OpenFOAM /OpenFOAM-1.2/applications/bin/cygwinGcc4Opt:/home/Administrateur/OpenFOAM/OpenF OAM-1.2/wmake:/home/Administrateur/OpenFOAM/OpenFOAM-1.2/bin:/usr/local/bin:/usr /bin:/bin:/usr/X11R6/bin:/cygdrive/c/WINNT/system32:/cygdrive/c/WINNT:/cygdrive/ c/WINNT/System32/Wbem:/usr/lib/lapack

path : (nothing)

WM_PROJECT_DIR :
/home/Administrateur/OpenFOAM/OpenFOAM-1.2

WM_PROJECT_USER_DIR :
/home/Administrateur/OpenFOAM/Administrateur-1.2

WM_ARCH :
cygwin

WM_COMPILER_DIR :
/home/Administrateur/OpenFOAM/cygwin/gcc-4.0.2

MAKE_MODE :
unix

FOAM_LIB :
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib

FOAM_LIBBIN :
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib/cygwinGcc4Opt

FOAM_USER_APPBIN :
/home/Administrateur/OpenFOAM/Administrateur-1.2/applications/bin/cygwinGcc4Opt

FOAM_USER_LIBBIN :
/home/Administrateur/OpenFOAM/Administrateur-1.2/lib/cygwinGcc4Opt


Philippe

brooksmoses March 26, 2006 07:32

Thanks! That's helpful; it lo
 
Thanks! That's helpful; it looks like everything is ok except the $PATH is incomplete. But I know why it's doing that.

There's one more problem in the .OpenFOAM-1.2/bashrc file, which is causing that path problem. Specifically, the line fifth from the end of the file should say:

if [ "$WM_ARCH" = "cygwin" ]; then

The space before the closing "]" character is missing. This causes the "missing ']'" error, and causes bash not to execute the following commands, which add the library paths to the overall path. (Cygwin uses PATH, not LD_LIBRARY_PATH, when looking for .dll files, so this is needed; that's why you couldn't run the programs until you put the .dll files in the "bin" directory. This should fix that.)

Now, ok. If you make that change to the .OpenFOAM-1.2/bashrc file, and the changes to the two "general" files in the wmake cygwin directories, that should fix all the bugs I know of so far.

That should make things work the same under bash as they do under tcsh. However, you say that things under tcsh aren't working either, so there must still be something wrong....

My next guess is that running Allwmake with the buggy version of bashrc caused something to be messed up. In any case, it's probably useful to go through the steps that Allwmake goes through, by hand, and see where things are next going wrong.

So, once you've made the above changes, try the following (in bash, once you've properly loaded the .OpenFOAM-1.2/bashrc file) and see what happens:

* run "echo $PATH" and make sure it's got some .../lib directories in it, as well as the .../bin ones.

* go into the wmake directory, and run "makeWmake".

* Check to make sure dirToString.exe and wmkdep.exe exist in wmake/rules/cygwinGcc4.

* go into the src directory, and run "wmake libso zlib-1.2.1".

* Check to make sure that libz.dll exists in the lib/cygwinGcc4Opt directory.

* in the src directory, run "wmake libso foamUser".

* Check to make sure that libfoamUser.dll exists in the lib/cygwinGcc4Opt directory.

* in the src/OpenFOAM directory, run "wmakeLnInclude".

* in the applications/utilities/miscellaneous directory, run "wmake exe foamFlex", then run "cp foamFlex/FlexLexer.h $FOAM_SRC/OpenFOAM/lnInclude"

* in the src/Pstream directory, run "wmake libso dummy".

* Check to make sure that libPstream.dll exists in the lib/cygwinGcc4Opt/dummy directory.

If you get that far without getting any errors, then everything should be working correctly. Go back to the main OpenFOAM directory, and run ./Allwmake.

If you do get an error (or one of the files doesn't exist), stop and report back what it is, and I'll try to figure out how to fix it!

...

Oh, and one more thing -- if you right-click on the icon that you use to launch your CygWin window, select "Properties" from the pop-up menu, and select the "Options" tab in the dialog box, that should have a checkbox for "QuickEdit mode". If you check that, then you can copy text out of the Cygwin window by selecting it with the mouse and then clicking the right mouse button on it. That should be a lot easier than retyping everything! (You can also now paste text into the Cygwin window just by right-clicking.)

ceradi March 27, 2006 05:33

Thanks, The problems with t
 
Thanks,

The problems with the bashrc are fixed now.

I cleaned the directories an begun from zero.

Here is what happened :

Administrateur@ceradi ~/openfoam/openfoam-1.2
$ cd wmake

Administrateur@ceradi ~/openfoam/openfoam-1.2/wmake
$ makewmake
gcc -m32 -Wall -O3 -fPIC dirToString.c -o /home/Administrateur/OpenFOAM/OpenF
OAM-1.2/wmake/rules/cygwinGcc4/dirToString
dirToString.c:1: warning: -fPIC ignored for target (all code is position indepen
dent)
flex wmkdep.l ; gcc -m32 -Wall -O3 -fPIC lex.yy.c -o /home/Administrateur/Ope
nFOAM/OpenFOAM-1.2/wmake/rules/cygwinGcc4/wmkdep
lex.yy.c:1: warning: -fPIC ignored for target (all code is position independent)

lex.yy.c:1405: warning: 'yyunput' defined but not used


At this point the files dirToString.exe and wmkdep.exe exist in wmake/rules.cygwinGcc4. (created on 03-27-06)


Administrateur@ceradi ~/openfoam/openfoam-1.2/src
$ dir
Allwmake edgeMesh lam-7.1.1 thermophysicalModels
Gstream engine malloc topoFvMesh
LESmodels errorEstimation meshTools transportModels
ODE finiteArea mico-2.3.11 triSurface
OpenFOAM finiteElement movingFvMesh turbulenceModels
Pstream foamUser postProcessing zlib-1.2.1
cfdTools foamUtil randomProcesses
dynamicMesh lagrangian sampling

Administrateur@ceradi ~/openfoam/openfoam-1.2/src
$ wmake libso zlib-1.2.1
/bin/sh: /bin/cpp: No such file or directory
make: *** [cygwinGcc4Opt/files] Error 127
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/wmake/wmake: cannot make, file Make/c
ygwinGcc4Opt/objectFiles was not created successfully


Hoopping it will help you... (I am in dark...)


Thanks for your help for copy/paste!

Philippe

pvita March 27, 2006 06:29

Well, dirToString.exe and wmkd
 
Well, dirToString.exe and wmkdep.exe are just tools necessary for wmake based compilation. It is ok. But I would check your variable WM_MPLIB is empty. It seems you are compiling with LAM (parallel stuff) what is not supported in the patch yet. I would like to do it probably first with OpenFOAM 1.3 that is announced.

brooksmoses March 27, 2006 19:10

A good thought, Petr, but if z
 
A good thought, Petr, but if zlib isn't compiling, he's not even to the point in the process where WM_MPLIB has been checked; this all preceeds compiling Pstreams.

This "/bin/cpp: No such file or directory" error seems to be coming from the first line of wmake/rules/cygwinGcc4Opt/general and wmake/rules/cygwin/general. That's accidentally referencing the system version of cpp, in /bin/cpp, instead of the one in the local gcc installation. I never noticed the problem, because I had Cygwin's gcc installed as well (and, luckily, using the wrong cpp didn't cause problems). Since you've removed your Cygwin gcc installation, /bin/cpp doesn't exist on your system.

(So your idea of removing the Cygwin gcc installation, to make sure to avoid any confusion, was a good idea!)

To fix this, replace the first line of wmake/rules/cygwinGcc4Opt/general and wmake/rules/cygwin/general with:

CPP = cpp -D$(WM_ARCH)

That should fix this problem.

So, once you've fixed that, try the "wmake libso zlib-1.2.1" again, and so on down the list; hopefully it will work this time!

ceradi March 28, 2006 06:54

To Petr, I checked WM_MPLIB It
 
To Petr, I checked WM_MPLIB It well empty.

It would be too easy... if it worked...

Here are the results :

Administrateur@ceradi ~/openfoam/openfoam-1.2/src
$ wmake libso zlib-1.2.1
make: `lnInclude/uptodate' is up to date.
Dropping import dependency files
libso
/home/Administrateur/OpenFOAM/OpenFOAM-1.2/wmake/bashScripts/mkObjectDir libNULL

rm -f so_locations
cd Make/cygwinGcc4Opt; \
g++ -m32 -Dcygwin -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -ffas
t-math -DNoRepository -ftemplate-depth-30 -I/home/Administrateur/OpenFOAM/Open
FOAM-1.2/src/OpenFOAM/lnInclude -IlnInclude -I. -shared -Wl,--dll -Wl,-mi386p
e -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--no-undefined -Wl,--no-
allow-shlib-undefined -Wl,--enable-runtime-pseudo-reloc -Wl,--out-implib,libNULL
.a -Wl,--whole-archive \
-Wl,--no-whole-archive -L/home/Administrateur/OpenFOAM/OpenFOAM-1.2/lib/cy
gwinGcc4Opt \
-o libNULL.dll
Creating library file: libNULL.a
`libNULL.dll' is up to date.

NO MORE ....

I have a libNULL.a and libNULL.dll in zlib-1.2.1/Make/cygwinGcc4Opt.

But no libz.dll anywhere in OpenFOAM

When running "wmake libso zlib-1.2.1" once again I get the following line in more at the begining :

make: Nothing to be done for `allFiles'.

I tried to look into wmake's codes and the wmake/makefilefiles.

I'm supprised that zlib-1.2.1/make/cygwinGcc4Opt/files is empty but the zlib-1.2.1/make/files
define the files in zlib-1.2.1 !

What must I do? Pray God or Brooks and Petr?

Thanks for your further help...

Philippe


All times are GMT -4. The time now is 03:09.