CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   Version 15 on Mac OS X (https://www.cfd-online.com/Forums/openfoam-installation/57216-version-15-mac-os-x.html)

podallaire March 2, 2009 15:49

Thanks, really appriciated ! I
 
Thanks, really appriciated ! I will give it a try

PO

podallaire March 2, 2009 19:14

Bernhard, the patch worked,
 
Bernhard,

the patch worked, thanks ! I just want to confirm 2 things :

1) In metis, when building GKlib, I havd this error :

trunk/dlmalloc.c:84: error: conflicting types for 'sbrk'
/usr/include/unistd.h:559: error: previous declaration of 'sbrk' was here
make: *** [Make/darwinIntelDPOpt/dlmalloc.o] Error 1

I commented the declaration of sbrk in dlmalloc.c:84 since it's defined in unistd.h/ does it sound ok ?

2) The error in libhoard comes from :

lnInclude/cpuinfo.h:216: error: cast from '_opaque_pthread_t*' to 'int' loses precision - any suggestion ?

Best regards

PO

gschaider March 3, 2009 04:41

Hi PO! 1. Yes 2. Redefine
 
Hi PO!

1. Yes
2. Redefine the lvalue variable and the cast to long

Bernhard

7islands April 6, 2009 21:24

Salvaging two posts from the old forum
 
Hi,
As suggested by the forum admin, I am salvaging two posts that were not transferred from the old forum to this new forum thread, both of which I think are important. Note that these posts are not mine but the credits and authorships goes to the respective authors.

Takuya

Between #8 and #9 on this new forum thread:
Quote:

By Pierre-Olivier Dallaire on Saturday, July 19, 2008 - 06:40 pm: Edit Post
Good evening,

I'm sending the detailled procedure that I used to compile OpenFOAM-1.5 on an Intel Mac running under Leopard using Bernhard's patches. Hope this can help:

0) Install some packages :
- The latext XCodeTools ou your machine (download from Apple website) - current version is xcode31_2199 which includes GCC4.2
- Pre-compiled Doxygen binary
- In ~/.profile, add export PATH=$PATH:/Applications/Doxygen.app/Contents/Resources

1) Copy Bernhard's patches in OpenFoam-1.5 and ThirdParty directories

2) Apply those patches in each directory:
patch -p0 <OpenFOAM-1_5-Mac-v1_patch
patch -p0 <ThirdParty1_5-Mac-v1.patch

************************************************** **************
*** Only if you want to use gcc-4.2 instead of gcc-4.0***
Since gcc_select is not anymore available in 10.5, modify some files in wmake/darwinPpc/
- in c, replace gcc with gcc-4.2
- in c++, replace g++ with g++-4.2
- in general, replace cpp with cpp-4.2
************************************************** **************

3) Copy rules (if needed from powerpc to intel architecture):
cp -r OpenFOAM-1.5/wmake/rules/darwinPpc OpenFOAM-1.5/wmake/rules/darwinIntel

4) Modify OpenFOAM-1.5/etc/settings.sh to use current openmpi implementation from Mac OS X (lines 144-146)
mpi_version=openmpi-1.2.3
export MPI_HOME=/usr
export MPI_ARCH_PATH=$MPI_HOME

5) Modify OpenFOAM-1.5/etc/bashrc line 164
MACOSX_DEPLOYMENT_TARGET="10.5"

6) Modify Allwmake in ThirdParty, comment lines 18 to 134 since OpenMPI 1.2.3 is already built-in Leopard

7) Modify line 69 of OpenFOAM-1.5/src/OpenFOAM/primitives/uint/uintIO.C and replace with (as suggested by Bernhard):
i = (unsigned int)(t.labelToken());

8) To build OpenFOAM-1.5:
source etc/bashrc and from OpenFOAM-1.5 :
./Allwmake

9) Build Doxygen doc -> from doc directory :
./Allwwmake

Everything built without problem. I made some quick tests and so far so good. I tried to compile with gcc-4.0 but cht-solver did not make it ...

I did not compile PV3FoamReader since I prefer to download the ParaView3 cvs version and to apply the patch made by Takuya :

http://www.cfd-online.com/OpenFOAM_D...tml?1216503048

Good evening,

Pierre-Olivier

ps : Bernhard, is funkySetfields ready for OF-1.5 ?
Between #80 and #81:
Quote:

By Bernhard Gschaider on Monday, March 02, 2009 - 01:45 pm: Edit Post
I noticed (the Messageboard seems to hate my patches). The patch comes below (hope the messageboard doesn'T mess it up to much)

I remember that I did something about hoard, but I can't remember what.Try

./Allwmake 2>&1 | tee compile.log

and have a look at the start of the log-file (you can stop the compilation as soon as the errors you described above appear)

Index: src/OSspecific/Unix/printStack.C
================================================== =================
--- src/OSspecific/Unix/printStack.C (Revision 932)
+++ src/OSspecific/Unix/printStack.C (Arbeitskopie)
@@ -238,7 +238,7 @@
unsigned valid=0;
bool ok=true;

- for(int level=0;level<maxAddrs;level++) {
+ for(unsigned int level=0;level<maxAddrs;level++) {
if(ok) {
bt[level]=getStackAddress(level);

@@ -265,6 +265,6 @@
int result=dladdr(bt[i],&info);

char tmp[1000];
- sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned int)bt[i]-(unsigned int)info.dli_saddr),bt[i]);
+ sprintf(tmp,"%s(%s+%p) [%p]",info.dli_fname,info.dli_sname,(void *)((unsigned long)bt[i]-(unsigned long)info.dli_saddr),bt[i]);
strings[i]=(char *)malloc(strlen(tmp)+1);
strcpy(strings[i],tmp);

Index: etc/bashrc
================================================== =================
--- etc/bashrc (Revision 932)
+++ etc/bashrc (Arbeitskopie)
@@ -145,10 +145,6 @@
WM_ARCH=linuxIA64
export WM_COMPILER=I64
;;
- Darwin)
- WM_ARCH=darwin
- export WM_COMPILER=
- ;;
*)
echo Unknown processor type `uname -m` for Linux
;;
@@ -156,22 +152,35 @@
;;

Darwin)
+ export WM_COMPILER=
+ export WM_MPLIB=OPENMPI
+
case `uname -p` in
powerpc)
export WM_ARCH=darwinPpc
;;
i386)
- export WM_ARCH=darwinIntel
+ export WM_ARCH=darwinIntel
+ case $WM_ARCH_OPTION in
+ 32)
+ ;;
+ 64)
+ export WM_COMPILER="64"
+ export WM_CFLAGS='-m64 -fPIC'
+ export WM_CXXFLAGS='-m64 -fPIC'
+ export WM_LDFLAGS='-m64'
+ ;;
+ *)
+ echo Unknown WM_ARCH_OPTION $WM_ARCH_OPTION, should be 32 or 64
+ ;;
+ esac
;;
*)
- echo "This seems to be an Intel-Mac please tell me the output of 'uname -p'. Bernhard."
- export WM_ARCH=darwinIntel
+ echo "This seems to be neither an Intel-Mac nor a PowerPC please tell me the output of 'uname -p'. Bernhard."
+ export WM_ARCH=darwinNone
;;
esac

- export WM_COMPILER=
- export WM_MPLIB=OPENMPI
-
MACOSX_DEPLOYMENT_TARGET="10.4"
;;
*) # an unsupported operating system


prjohnston April 7, 2009 06:56

Hello,

I am trying to compile OpenFOAM under Mac OS 10.5 on an intel MacBook Pro. I have followed the instructions like those given, applied the four patches and OpenFOAM compiles and seems to run OK. All the files were placed in directories darwinIntelDPOpt. Also I downloaded cmake 2.6 and Qt 4.5 and was able to build paraview using the buildParaView3.3-cvs. This created files under $HOME/OpenFOAM/Thirdparty/ParaView3.3-cvs/platforms/darwinIntel. In the bin subdirectory of this, the build script created paraview.app. Everything seemed to build OK. My problem is that when I run paraFoam I get the following error message:

/Users/peter/OpenFOAM/OpenFOAM-1.5/bin/paraFoam: line 100: paraview: command not found

I can't find which script file to edit which would fix this problem. Surely, paraFoam must look for Thirdparty/ParaView3.3-cvs/platforms/darwinIntel/bin/paraview.app/Contents/MacOS/paraview. I also realise that this problem had been mentioned before, but I couldn't find a resolution.

Any insights would be appreciated.

Thank you,

Peter Johnston.

bigphil April 29, 2009 07:40

Quote:

Originally Posted by prjohnston (Post 212192)

/Users/peter/OpenFOAM/OpenFOAM-1.5/bin/paraFoam: line 100: paraview: command not found

I have got OpenFOAM 1.5 working as well but I also get the same error when I try run paraFoam.


Philip C

prjohnston April 29, 2009 18:50

Dear Philip,

I did find a work around to this for the Mac. When paraview is built it is placed below a directory structure paraview.app (like most Mac applications) in the directory OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/darwinIntel/bin. The script that drives paraFoam is a unix type shell script which expects the executable file paraview to exist in the above directory. However, on the Mac the executable lives in the directory paraview.app/Contents/MacOS. To overcome this I simply created a softlink:

ln -s paraview.app/Contents/MacOS/paraview paraview

in OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/darwinIntel/bin. It all seemed to work after that.

I hope this helps. Please ask again if this is unclear.

Good luck,

Peter.

bigphil April 30, 2009 05:50

Hi Peter,

Thanks for your help.

As it turns out, I hadn't compiled Paraview corectly.

Just to sum up the steps, I need to take to compile Paraview:

I downloaded and installed cmake 2.6 (for mac),

Then I downloaded and installed Qt SDK (for mac),

Then I did the following:
• cd $FOAM_INST_DIR/ThirdParty
• rm -rf ParaView3.3-cvs/platforms
• buildParaView3.3-cvs

But Then it seems to get stuck - see below. It stays like this for 20 mins, and then I cancel it. The activity monitor says 'cmake' is doing quite a bit.

• Building ParaView3.3-cvs
• MPI support : OFF
• Python support : OFF
• MESA support : OFF
• Source : //Volumes/OpenFOAM/ThirdParty/ParaView3.3-cvs
• Target : //Volumes/OpenFOAM/ThirdParty/ParaView3.3-cvs/platforms/darwinIntel


Where am I going wrong?

Philip.

bigphil April 30, 2009 06:17

I also tried to follow the steps at:
http://paraview.org/Wiki/ParaView:Build_And_Install

But when I get to using 'ccmake', 'ccmake' displays 'cache empty' with no files to configure.

:confused:

prjohnston May 1, 2009 00:37

I'm not sure what your problem is. I just rebuilt my paraview this morning. It does take a long time, ~45 minutes. Are you some how running you build script in silent mode? (I'm not sure how this could be the case.) Does anyone else have any ideas?

When using ccmake, I realise that it comes up with 'cache empty', but what happens when you type c for configure? There should be a lot of text run through a coloured line at the bottom of the window. At various stages it gives a percentage of how far through the configuration it is.

Which version of Qt do you have?

I can't think of anything else at the moment, but I would be interested to know how you get on.

BTW, does anyone know how to build paraview-3.4 or paraview-3.5 for use with OpenFOAM? That is, paraFoam would use one of these versions of paraview instead of paraview3.3-cvs.

Thanks,

Peter.

bigphil May 1, 2009 06:55

Quote:

Originally Posted by prjohnston (Post 214831)
When using ccmake, I realise that it comes up with 'cache empty', but what happens when you type c for configure? There should be a lot of text run through a coloured line at the bottom of the window. At various stages it gives a percentage of how far through the configuration it is.

Peter,

I am using cmake 2.6-patch 1 and QMake version 2.01a Using Qt version 4.5.1.

When I open ccmake, empty cache comes up, then I press 'c' to configure. At the bottom of the screen it says "Configuring, please wait..." but nothing runs across the bottom of the screen.:confused:

Maybe there's something wrong with cmake, which version of cmake did you use?

Thanks for your assistance,
Philip :)

prjohnston May 1, 2009 18:33

Dear Philip,

You sure are having problems. I used ccmake version 2.6-patch 3 and qmake version 2.01a, but I only had Qt version 4.5.0.

I have discovered one problem and that is that paraview assumes that you have Qt version 4.3. If you don't have version 4.3 then the compilation will stop, but usually with an error message. However, since I couldn't find Qt version 4.3 (I could only find the most recent version on the Qt website) I made a change on line 92 of the file CMakeLists.txt file in OpenFOAM/ThirdParty/ParaView3.3-cvs. I had to change the regexp "^4\\.3\\.[0-9]+" to "^4\\.5\\.[0-9]+". It now won't complain if you have version 4.5 of Qt instead of version 4.3.

I'm not sure even this will solve your problem.

A few random thoughts: Are you using a bash shell (things seem to work better than under a [t]csh shell)? Have you employed the patches provided by Bernhard? Have you tried to compile a more recent version of paraview from the paraview site?

I'm not sure if I have been much help, but keep trying.

Peter.

bigphil May 4, 2009 08:21

Peter,

Paraview compiled! :)

I reinstalled cmake, and then ccmake ran fine.
Paraview opens fine now.
Thanks for your help.

Now the final thing, is getting the 'PV3FoamReader' to compile.


When I execute 'Allwclean' then './Allwmake' in the 'postprocessing/graphics/PV3FoamReader/' directory, I get:


./Allwmake
+ '[' -d //Volumes/OpenFOAM/ThirdParty/ParaView3.3-cvs//platforms/darwinIntel -a -r //Volumes/OpenFOAM/ThirdParty/ParaView3.3-cvs//platforms/darwinIntel ']'
+ case "$ParaView_VERSION" in
+ wmake libso vtkPV3Foam
wmakeLnInclude: linking include files to //Volumes/OpenFOAM/OpenFOAM-1.5-dev/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/lnInclude
Making dependency list for source file vtkPV3Foam.C
Making dependency list for source file vtkPV3FoamAddVolumeMesh.C
could not open file FieldField.H for source file vtkPV3Foam.C
could not open file lduInterfaceFieldPtrsList.H for source file vtkPV3Foam.C
could not open file GeometricFieldI.H for source file vtkPV3Foam.C
could not open file GeometricField.C for source file vtkPV3Foam.C


Even though, the files which could not be open (such as FieldField.H) are in 'OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude'.

Why can it not open these files? Is it looking in the wrong place? Is it permissions?
Where does 'wmake' look for the dependencies? Or where does one set where it looks for dependencies?

Any ideas are really appreciated,
Philip

prjohnston May 17, 2009 22:13

Dear Phil,

Sorry to have not replied for so long. I seem to have been swamped recently. Have you solved your problem?

My only thought is that you are using v1.5-dev, whereas I was using the
not-so-up-to-date v1.5. I do know that other people are experiencing various problems with the dev version.

Sorry I can't be of more help.

Regards,

Peter.

bigphil May 18, 2009 06:54

Peter,

I haven't resolved the issue yet, but it is fine for the moment as I just use 'foamToVTK' to convert the files and then view them with paraview.

Thanks you for your help,

I haven't spent much time on it recently, but I will let you know if I figure it out.


Best Regards,
Philip

ottbot June 15, 2009 05:05

Hello, thanks a lot for your work with the patches and documentation.

It's been mostly painless so far, but I can't get ParaView to find PV3FoamReader..

It built without error, but there's the following warning during compilation:

Code:

CMake Warning at /Volumes/OpenFOAM/ThirdParty/ParaView3.3-cvs/CMake/ParaViewPlugins.cmake:583 (ADD_LIBRARY):
  Cannot generate a safe linker search path for target PV3FoamReader because
  files in some directories may conflict with libraries in implicit
  directories:

    link library [libz.dylib] in /usr/lib may be hidden by files in:
      /Volumes/OpenFOAM/OpenFOAM-1.5/lib/darwinIntelDPOpt

  Some of these libraries may not be found correctly.
Call Stack (most recent call first):
  CMakeLists.txt:43 (ADD_PARAVIEW_PLUGIN)

I'm wondering if this indicates why paraview can't find the plugin, or should I be copying it somewhere or doing something else?

When pavaview opens the cavity demo, it asks me which reader to use.. I'm assuming if the PV3FoamReader was working correctly, it would automatically choose it.. Is it in the list in a non obvious name? The "OpenFOAM files" option crashed (as described earlier in this thread)


Thanks again!

------------------------------
update:
I ran the following commands again:

blockMesh
icoFoam

After this, paraview is finding the reader..

Bynn September 1, 2009 04:15

Hey all, I´m new to this forum and to OpenFOAM..

I´m having a bit of a problem using the step by step guide found on http://www.ifdmavt.ethz.ch/education...foam/of-macosx <Installation guide>

http://www.ifdmavt.ethz.ch/education.../index#testing
<Testing guide>

When I come to the last part of the testing guide were I´m re-compiling some of OF with wmake I get the following printout:
http://pastebin.com/m19fd8a7f

It´s a long one, but the problem is logically enough on the bottom.

Hope someone can help me, I´m hoping to use OF in my master thesis ;)

I´m on SnowLeopard, but hoping it won´t fuck it up :rolleyes:

gschaider September 1, 2009 10:14

Quote:

Originally Posted by Bynn (Post 228094)
Hey all, I´m new to this forum and to OpenFOAM..

I´m having a bit of a problem using the step by step guide found on http://www.ifdmavt.ethz.ch/education...foam/of-macosx <Installation guide>

http://www.ifdmavt.ethz.ch/education.../index#testing
<Testing guide>

When I come to the last part of the testing guide were I´m re-compiling some of OF with wmake I get the following printout:
http://pastebin.com/m19fd8a7f

It´s a long one, but the problem is logically enough on the bottom.

No it is not. Just near the top in line 41 it says:

ld: warning: in /Users/bjorn/OpenFOAM/OpenFOAM-1.5/lib/darwinIntelDPOpt/libOpenFOAM.dylib, file is not of required architecture

and, as Elvis once sang, "That's where the heartache begins"

Test with the command
file /Users/bjorn/OpenFOAM/OpenFOAM-1.5/lib/darwinIntelDPOpt/libOpenFOAM.dylib

whether you didn't accidentally install the wrong binaries

Quote:

Originally Posted by Bynn (Post 228094)
Hope someone can help me, I´m hoping to use OF in my master thesis ;)

I´m on SnowLeopard, but hoping it won´t fuck it up :rolleyes:

The binaries are still from the images you downloaded, right? Maybe a complete recompilation of OF would help. Don't know if this is a SnowLeopard-issue (can't imagine why it should be)

Bernhard

Bynn September 1, 2009 11:25

Hey Bernard!

I ran the command and got the following output:
Code:

/Users/bjorn/OpenFOAM/OpenFOAM-1.5/lib/darwinIntelDPOpt/libOpenFOAM.dylib: Mach-O dynamically linked shared library i386
That was what I was worried about and forgot to tell you in my last post;
my achitecture is i386 and I couldn´t find a solution to it regarding the setup_foam editing...

I´m on a (brand new:D ) macbook pro 17" running, as I said, SnowLeopard.

EDIT: Ups, well, just saw that I had read that the arch setting in setup_foam was supposed to be ppc, i386 OR Intel ;)
Then I´m back to squar one..

gschaider September 2, 2009 07:35

Quote:

Originally Posted by Bynn (Post 228136)
Hey Bernard!

I ran the command and got the following output:
Code:

/Users/bjorn/OpenFOAM/OpenFOAM-1.5/lib/darwinIntelDPOpt/libOpenFOAM.dylib: Mach-O dynamically linked shared library i386
That was what I was worried about and forgot to tell you in my last post;
my achitecture is i386 and I couldn´t find a solution to it regarding the setup_foam editing...

I´m on a (brand new:D ) macbook pro 17" running, as I said, SnowLeopard.

Well. That's an awkward situation:
- first time installing OF on a Mac
- living on the bleeding edge (doing it on a system that nobody else tried yet)


Quote:

Originally Posted by Bynn (Post 228136)
EDIT: Ups, well, just saw that I had read that the arch setting in setup_foam was supposed to be ppc, i386 OR Intel ;)
Then I´m back to squar one..

Can't comment on that as setup_foam seems to be specific to the distro you downloaded

Bernhard

jhoepken October 24, 2009 07:44

Hi!

After I've been able to compile 1.5 on my 10.5 (intel) system half a year ago or something, I'm now running into serious problems with compiling the 1.5-dev. At first I cannot apply the patches, provided by Bernhard on the first two pages of this thread any more. God knows why, I don't ;) Is there anybody, who managed to apply those patches to the 1.5-dev sources? Are they needed for the 1.5-dev? I'm asking because there are plenty of Mac architecture rules available in the wmake/rules of the svn.

Secondly, if I try to run ./Allwmake, gcc is not able to find most of the files, though they are available and I have a case-sensitive partition. It seems to crash when he tries to do a wmake libso for src/Pstream/dummy.

Jens

Code:

+ cd .
+ cd wmake/src
+ make
make: Nothing to be done for `all'.
+ cd /Volumes/OpenFOAM/ThirdParty
+ ./Allwmake
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ wmake libso zlib-1.2.3
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libz.so' is up to date.
+ cd malloc
+ ./Allwmake
+ wmake libso hoard
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libhoard.so' is up to date.
+ wmake libo fbsdmalloc
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libfbsdmalloc.o' is up to date.
+ cd metis-5.0pre2
+ wmake libso GKlib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libGKlib.so' is up to date.
+ wmake libso libmetis
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libmetis.so' is up to date.
+ '[' -d /usr ']'
+ cd ParMetis-3.1
+ wmake libso METISLib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/openmpi-1.2.3/libmetis-parmetis.so' is up to date.
+ wmake libso ParMETISLib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/openmpi-1.2.3/libparmetis.so' is up to date.
+ wmake libso ParMGridGen-1.0/MGridGen/IMlib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libIMlib.so' is up to date.
+ wmake libso ParMGridGen-1.0/MGridGen/Lib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libMGridGen.so' is up to date.
+ cd src
+ ./Allwmake
+ cd OpenFOAM
+ wmakeLnInclude .
+ cd Pstream
+ ./Allwmake
+ wmake libso dummy
SOURCE=Pstream.C ;  g++-4.2 -DdarwinIntel -DDP -DFOAM_DEV_REVISION_NUMBER=1475 -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40  -IlnInclude -I. -I/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude  -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelGccDPOpt/Pstream.o
In file included from Pstream.C:27:
/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Pstream.H:45:23: error: labelList.H: No such file or directory
In file included from /Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/List.H:44,
                from /Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/DynamicList.H:47,
                from /Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Pstream.H:46,
                from Pstream.C:27:
/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UList.H:46:19: error: label.H: No such file or directory
/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UList.H:47:18: error: bool.H: No such file or directory


hjasak October 26, 2009 07:05

I am running and regularly recompiling 1.5-dev without any patching on my big Mac at home: it should compile out of box. This is a machine used for some (long, transient) runs and some effort has been made to make sure it runs properly.

Hrv

gschaider October 27, 2009 12:37

[QUOTE=jhoepken;233887]
After I've been able to compile 1.5 on my 10.5 (intel) system half a year ago or something, I'm now running into serious problems with compiling the 1.5-dev. At first I cannot apply the patches, provided by Bernhard on the first two pages of this thread any more. God knows why, I don't ;) Is there anybody, who managed to apply those patches to the 1.5-dev sources? Are they needed for the 1.5-dev? I'm asking because there are plenty of Mac architecture rules available in the wmake/rules of the svn.
[CODE]
No. They should not be needed. The contents of the patch were added some time ago to the repository and probably improved in the meantime
Quote:

Originally Posted by jhoepken (Post 233887)
Secondly, if I try to run ./Allwmake, gcc is not able to find most of the files, though they are available and I have a case-sensitive partition. It seems to crash when he tries to do a wmake libso for src/Pstream/dummy.
Code:

+ cd .
+ cd wmake/src
+ make
make: Nothing to be done for `all'.
+ cd /Volumes/OpenFOAM/ThirdParty
+ ./Allwmake
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ wmake libso zlib-1.2.3
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libz.so' is up to date.
+ cd malloc
+ ./Allwmake
+ wmake libso hoard
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libhoard.so' is up to date.
+ wmake libo fbsdmalloc
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libfbsdmalloc.o' is up to date.
+ cd metis-5.0pre2
+ wmake libso GKlib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libGKlib.so' is up to date.
+ wmake libso libmetis
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libmetis.so' is up to date.
+ '[' -d /usr ']'
+ cd ParMetis-3.1
+ wmake libso METISLib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/openmpi-1.2.3/libmetis-parmetis.so' is up to date.
+ wmake libso ParMETISLib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/openmpi-1.2.3/libparmetis.so' is up to date.
+ wmake libso ParMGridGen-1.0/MGridGen/IMlib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libIMlib.so' is up to date.
+ wmake libso ParMGridGen-1.0/MGridGen/Lib
'/Volumes/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libMGridGen.so' is up to date.
+ cd src
+ ./Allwmake
+ cd OpenFOAM
+ wmakeLnInclude .
+ cd Pstream
+ ./Allwmake
+ wmake libso dummy
SOURCE=Pstream.C ;  g++-4.2 -DdarwinIntel -DDP -DFOAM_DEV_REVISION_NUMBER=1475 -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3  -DNoRepository -ftemplate-depth-40  -IlnInclude -I. -I/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude  -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelGccDPOpt/Pstream.o
In file included from Pstream.C:27:
/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Pstream.H:45:23: error: labelList.H: No such file or directory
In file included from /Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/List.H:44,
                from /Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/DynamicList.H:47,
                from /Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/Pstream.H:46,
                from Pstream.C:27:
/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UList.H:46:19: error: label.H: No such file or directory
/Volumes/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude/UList.H:47:18: error: bool.H: No such file or directory


Strange. Have a look into the OpenFOAM/lnInclude. If there is no symbolic link label.H then remove the directory. The next wmake should rebuild it. This problem occurs if during a previous run of wmake the script was Ctrl-C-ed during the generation of that directory (something similar occurs if you interrupt the creation of a .dep-file). It is not specific to the dev-version

Bernhard

jhoepken October 28, 2009 04:37

Thank you Hrv and Bernhard for your help. As far as I can tell, the sources are compiling at the moment :)

bigphil November 1, 2009 14:17

metis-5.0pre2 compilation error - thread-local storage not supported
 
Hi,

I am compiling OpenFOAM-1.5-dev on my intel macbook pro. I have created a case-sensitive image. I downloaded OpenFOAM-1.5-dev and ThirdParty from http://powerlab.fsb.hr/ped/kturbo/openfoam/release/.

It's nearly all compiled, but I get an error when I compile metis-5.0pre2 in the $WM_THIRD_PARTY_DIR. I get the error below about 'thread-local storage not supported'. I have tried my best trawling the web trying to figure out it out but to no avail, and there doesn't seem to be anything on the forum about this error.

Code:

87-198-25-219:metis-5.0pre2 philipcardiff$ wmake libso GKlib
SOURCE=trunk/b64.c ;  gcc-4.2  -DdarwinIntel -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -O3  -IlnInclude -I. -I//Volumes/OpenFOAM//OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I//Volumes/OpenFOAM//OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude  -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/b64.o
SOURCE=trunk/blas.c ;  gcc-4.2  -DdarwinIntel -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -O3  -IlnInclude -I. -I//Volumes/OpenFOAM//OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I//Volumes/OpenFOAM//OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude  -fPIC -Ddarwin -c $SOURCE -o Make/darwinIntelDPOpt/blas.o
In file included from lnInclude/GKlib.h:62,
                from trunk/b64.c:14:
lnInclude/gk_externs.h:18: error: thread-local storage not supported for this target
make: *** [Make/darwinIntelDPOpt/b64.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from lnInclude/GKlib.h:62,
                from trunk/blas.c:18:
lnInclude/gk_externs.h:18: error: thread-local storage not supported for this target
make: *** [Make/darwinIntelDPOpt/blas.o] Error 1

I tried downloading metis-5.0pre2 from http://glaros.dtc.umn.edu/gkhome/metis/metis/download and copying the Make files into it, but I still get the same error.

I hope someone can help,
Philip Cardiff

EDIT: Here is the gk_externs.h file:
Code:

/*!
\file gk_externs.h
\brief This file contains definitions of external variables created by GKlib

\date  Started 3/27/2007
\author George
\version\verbatim $Id: gk_externs.h 1277 2007-03-27 21:17:33Z karypis $ \endverbatim
*/

#ifndef _GK_EXTERNS_H_
#define _GK_EXTERNS_H_


/*************************************************************************
* Extern variable definition. Hopefully, the __thread makes them thread-safe.
**************************************************************************/
#ifndef _GK_ERROR_C_
extern __thread jmp_buf gk_return_to_entry; /* declared in error.c */
#endif

#endif


hjasak November 3, 2009 01:40

Ust remove the bit of the header that throws an error and recompile. We are not threaded yet in that part, so there's no danger.

Once the threaded support is complete we will have to resolve this properly.

Enjoy (for the moment),

Hrv

bigphil November 3, 2009 08:04

Hrv,

I commented out all the lines that were getting a compilation error - quite a few different files.
It has now compiled. :)

Thanks very much for your help,
much appreciated,
Philip Cardiff

richpaj November 22, 2009 11:47

OpenFoam 1.5-dev compilation errors on latest revision
 
Latest revision (1504) yields the following when "wmake libso OpenFOAM" is issued:

-----------------------------------begin-----------------------------------------------

SOURCE=global/global.Cver ; sed s/WM_PROJECT_VERSION/\"1.5-dev\"/ $SOURCE > Make/darwinIntelGccDPOpt/global.C ; g++-4.2 -DdarwinIntel -DDP -DFOAM_DEV_REVISION_NUMBER= -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/rich/OpenFOAM/ThirdParty/zlib-1.2.3 -IlnInclude -I. -I/Users/rich/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/Users/rich/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -Ddarwin -c Make/darwinIntelGccDPOpt/global.C -o Make/darwinIntelGccDPOpt/global.o
svn: '/Users/rich/OpenFOAM' is not a working copy
ld: warning: in dimensionedConstants.o, file is not of required architecture
ld: warning: in argList.o, file is not of required architecture
ld: warning: in clock.o, file is not of required architecture
ld: warning: in bool.o, file is not of required architecture
ld: warning: in boolIO.o, file is not of required architecture
ld: warning: in charIO.o, file is not of required architecture
ld: warning: in intIO.o, file is not of required architecture
ld: warning: in uintIO.o, file is not of required architecture
ld: warning: in longIO.o, file is not of required architecture
ld: warning: in longLongIO.o, file is not of required architecture
ld: warning: in ulongIO.o, file is not of required architecture
ld: warning: in label.o, file is not of required architecture
ld: warning: in doubleScalar.o, file is not of required architecture
ld: warning: in floatScalar.o, file is not of required architecture
ld: warning: in scalar.o, file is not of required architecture
ld: warning: in labelVector.o, file is not of required architecture
ld: warning: in vector.o, file is not of required architecture
ld: warning: in vector2D.o, file is not of required architecture
ld: warning: in sphericalTensor.o, file is not of required architecture
ld: warning: in symmTensor.o, file is not of required architecture
ld: warning: in labelSphericalTensor.o, file is not of required architecture
ld: warning: in labelSymmTensor.o, file is not of required architecture
ld: warning: in complex.o, file is not of required architecture
ld: warning: in complexVector.o, file is not of required architecture
ld: warning: in string.o, file is not of required architecture
ld: warning: in stringIO.o, file is not of required architecture
ld: warning: in word.o, file is not of required architecture
ld: warning: in wordIO.o, file is not of required architecture
ld: warning: in fileName.o, file is not of required architecture
ld: warning: in fileNameIO.o, file is not of required architecture
ld: warning: in HashTableName.o, file is not of required architecture
ld: warning: in StaticHashTableName.o, file is not of required architecture
ld: warning: in ParSortableListName.o, file is not of required architecture
ld: warning: in PackedListName.o, file is not of required architecture
ld: warning: in SLListBase.o, file is not of required architecture
ld: warning: in DLListBase.o, file is not of required architecture
ld: warning: in boolList.o, file is not of required architecture
ld: warning: in labelIOList.o, file is not of required architecture
ld: warning: in scalarList.o, file is not of required architecture
ld: warning: in vectorList.o, file is not of required architecture
ld: warning: in sphericalTensorList.o, file is not of required architecture
ld: warning: in symmTensorList.o, file is not of required architecture
ld: warning: in wordIOList.o, file is not of required architecture
ld: warning: in tokenIO.o, file is not of required architecture
ld: warning: in IOstream.o, file is not of required architecture
ld: warning: in versionNumber.o, file is not of required architecture
ld: warning: in Istream.o, file is not of required architecture
ld: warning: in IOprint.o, file is not of required architecture
ld: warning: in IOcheck.o, file is not of required architecture
ld: warning: in Ostream.o, file is not of required architecture
ld: warning: in ISread.o, file is not of required architecture
ld: warning: in ISnextValid.o, file is not of required architecture
ld: warning: in ISreadToken.o, file is not of required architecture
ld: warning: in readHexLabel.o, file is not of required architecture
ld: warning: in OSwrite.o, file is not of required architecture
ld: warning: in Sprint.o, file is not of required architecture
ld: warning: in prefixOSwrite.o, file is not of required architecture
ld: warning: in prefixOSprint.o, file is not of required architecture
ld: warning: in gzstream.o, file is not of required architecture
ld: warning: in IFstream.o, file is not of required architecture
ld: warning: in OFstream.o, file is not of required architecture
ld: warning: in ITread.o, file is not of required architecture
ld: warning: in Tprint.o, file is not of required architecture
ld: warning: in StringStreamPrint.o, file is not of required architecture
ld: warning: in Pstream.o, file is not of required architecture
ld: warning: in PstreamCommsStruct.o, file is not of required architecture
ld: warning: in IPread.o, file is not of required architecture
ld: warning: in OPwrite.o, file is not of required architecture
ld: warning: in Pprint.o, file is not of required architecture
ld: warning: in IPreadToken.o, file is not of required architecture
ld: warning: in dictionary.o, file is not of required architecture
ld: warning: in dictionaryIO.o, file is not of required architecture
ld: warning: in entry.o, file is not of required architecture
ld: warning: in entryIO.o, file is not of required architecture
ld: warning: in primitiveEntry.o, file is not of required architecture
ld: warning: in primitiveEntryIO.o, file is not of required architecture
ld: warning: in dictionaryEntry.o, file is not of required architecture
ld: warning: in dictionaryEntryIO.o, file is not of required architecture
ld: warning: in functionEntry.o, file is not of required architecture
ld: warning: in includeEntry.o, file is not of required architecture
ld: warning: in inputModeEntry.o, file is not of required architecture
ld: warning: in removeEntry.o, file is not of required architecture
ld: warning: in IOdictionaryIO.o, file is not of required architecture
ld: warning: in IOMapName.o, file is not of required architecture
ld: warning: in IOobjectIO.o, file is not of required architecture
ld: warning: in IOobjectReadHeader.o, file is not of required architecture
ld: warning: in IOobjectWriteHeader.o, file is not of required architecture
ld: warning: in functionObject.o, file is not of required architecture
ld: warning: in CallbackRegistryName.o, file is not of required architecture
ld: warning: in dlLibraryTable.o, file is not of required architecture
ld: warning: in Switch.o, file is not of required architecture
ld: warning: in SwitchIO.o, file is not of required architecture
ld: warning: in TimePaths.o, file is not of required architecture
ld: warning: in scalarRange.o, file is not of required architecture
ld: warning: in dimensionSet.o, file is not of required architecture
ld: warning: in dimensionSetIO.o, file is not of required architecture
ld: warning: in dimensionSets.o, file is not of required architecture
ld: warning: in dimensionedScalar.o, file is not of required architecture
ld: warning: in dimensionedSphericalTensor.o, file is not of required architecture
ld: warning: in scalarConstraint.o, file is not of required architecture
ld: warning: in scalarMatrix.o, file is not of required architecture
ld: warning: in lduAddressing.o, file is not of required architecture
ld: warning: in lduInterface.o, file is not of required architecture
ld: warning: in GAMGInterface.o, file is not of required architecture
ld: warning: in line.o, file is not of required architecture
ld: warning: in intersection.o, file is not of required architecture
ld: warning: in patchIdentifier.o, file is not of required architecture
ld: warning: in polyBoundaryMeshEntries.o, file is not of required architecture
ld: warning: in commSchedule.o, file is not of required architecture
ld: warning: in mapAddedPolyMesh.o, file is not of required architecture
ld: warning: in labelField.o, file is not of required architecture
ld: warning: in scalarField.o, file is not of required architecture
ld: warning: in scalarIOField.o, file is not of required architecture
ld: warning: in vectorIOField.o, file is not of required architecture
ld: warning: in vector2DIOField.o, file is not of required architecture
ld: warning: in sphericalTensorIOField.o, file is not of required architecture
ld: warning: in bandCompression.o, file is not of required architecture
ld: warning: in preservePatchTypes.o, file is not of required architecture
ld: warning: in SutherlandHodgman.o, file is not of required architecture
ld: warning: in HormannAgathos.o, file is not of required architecture
ld: warning: in /Users/rich/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libOSspecific.o, file is not of required architecture
ld: warning: in /Users/rich/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/dummy/libPstream.so, file is not of required architecture
'/Users/rich/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libOpenFOAM.so' is up to date.

-----------------------------------end-----------------------------------------------

after which a chain of errors (undefines) are produced when attempting to compile the solvers and mesh utilities.

The platform is Mac OSX 10.6.2 using gcc 4.2.1.

I wonder, are these problems unique to what I have? The above warnings
suggest some option has not been set by a possible mistake though.

Regards,

Richard K.

gschaider November 23, 2009 13:55

Quote:

Originally Posted by richpaj (Post 237247)
Latest revision (1504) yields the following when "wmake libso OpenFOAM" is issued:

-----------------------------------begin-----------------------------------------------

SOURCE=global/global.Cver ; sed s/WM_PROJECT_VERSION/\"1.5-dev\"/ $SOURCE > Make/darwinIntelGccDPOpt/global.C ; g++-4.2 -DdarwinIntel -DDP -DFOAM_DEV_REVISION_NUMBER= -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/Users/rich/OpenFOAM/ThirdParty/zlib-1.2.3 -IlnInclude -I. -I/Users/rich/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/Users/rich/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -Ddarwin -c Make/darwinIntelGccDPOpt/global.C -o Make/darwinIntelGccDPOpt/global.o
svn: '/Users/rich/OpenFOAM' is not a working copy
ld: warning: in dimensionedConstants.o, file is not of required architecture
ld: warning: in argList.o, file is not of required architecture
<snip>
ld: warning: in SutherlandHodgman.o, file is not of required architecture
ld: warning: in HormannAgathos.o, file is not of required architecture
ld: warning: in /Users/rich/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libOSspecific.o, file is not of required architecture
ld: warning: in /Users/rich/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/dummy/libPstream.so, file is not of required architecture
'/Users/rich/OpenFOAM/OpenFOAM-1.5-dev/lib/darwinIntelGccDPOpt/libOpenFOAM.so' is up to date.

-----------------------------------end-----------------------------------------------

after which a chain of errors (undefines) are produced when attempting to compile the solvers and mesh utilities.

The platform is Mac OSX 10.6.2 using gcc 4.2.1.

I wonder, are these problems unique to what I have? The above warnings
suggest some option has not been set by a possible mistake though.

Regards,

Richard K.

Is the following chain of events correct:
1. Installation/compilation of OF-15-dev
2. Upgrade to Mac OS X from 10.5.x to 10.6
3. svn update and trying to recompile -> error

The problem is that with 10.6 OS X 64-bit binaries became the default. The compiler now produces 64-bit object-files by default. When linking these objects with 32-bit objects from "before the flood" it chokes in the way you described above (to test this hypothesis use the command "file <someObjectFile>" to see whether the files he complains about are 32-bit (and some newer files are 64-bit))

I'd recommend remove ALL the object-files from your installation and recompiling. Or force the compiler to generate 32-binaries with the -m32 flag

Bernhard

richpaj November 23, 2009 20:14

Is the following chain of events correct:
1. Installation/compilation of OF-15-dev
2. Upgrade to Mac OS X from 10.5.x to 10.6
3. svn update and trying to recompile -> error

The problem is that with 10.6 OS X 64-bit binaries became the default. The compiler now produces 64-bit object-files by default. When linking these objects with 32-bit objects from "before the flood" it chokes in the way you described above (to test this hypothesis use the command "file <someObjectFile>" to see whether the files he complains about are 32-bit (and some newer files are 64-bit))

I'd recommend remove ALL the object-files from your installation and recompiling. Or force the compiler to generate 32-binaries with the -m32 flag


-----------------------------------------------------------------------------------

Yes, well done, the events 1. -> 3. as you list them are exactly what happened.

I just confirmed that the compilation proceeds smoothly on another
pre-10.6 intel Mac (same revision number, 1504)

The post-10.6 machine is 600Km away at the moment and I won't be able to try "file <someObjectFile>" until the week-end.

Am otherwise pretty sure though you're spot on, I forgot that all apps now default to 64bit with 10.6.

Many thanks indeed,

Richard K.

bigphil December 1, 2009 13:56

OpenFOAM-1.4.1-dev flex++ FlexLexer.h error
 
Hi again,

My OF-1.5-dev works nicely on my Mac, but I'd like to compile OF-1.4.1-dev on it too (I realise this thread is for OF-1.5 but this is probably the best place to put this question).

So I've been trying my best for the last few days and there is one error with flex++ that I can't fix (I have battled with flex++ in the past compiling on OpenSUSE but the same fixes don't seem to be helping).

I have flex and flex++ version 2.5.4 in '/sw/bin'.

OK, when flex++ is set to 'Ltoo = flex++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -DYY_SKIP_YYWRAP -c $*.C -o $@' in 'wmake/rules/General/flex++' and 'wmake/rules/darwin/flex++' (I change both files cause Im not sure which to change), I get this error (I couln't fit the whole compilation output in the thread but i can upload it if it might help):

Code:

dhcp-892b97dc:src philipcardiff$ wmake libso triSurface
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/darwin/flex++:10: warning: overriding commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/General/flex++:10: warning: ignoring old commands for target `.L.dep'
...
warnings
...

SOURCE=triSurface/interfaces/STL/readSTLASCII.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/darwinDPOpt/readSTLASCII.C ; g++ -Ddarwin -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -ffast-math  -DNoRepository -ftemplate-depth-30  -IlnInclude -I. -I/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude  -fPIC -DYY_SKIP_YYWRAP -c Make/darwinDPOpt/readSTLASCII.C -o Make/darwinDPOpt/readSTLASCII.o
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:65: error: ‘yy_create_buffer’ declared as a ‘virtual’ field
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:65: error: expected ‘;’ before ‘(’ token
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:67: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:72: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-

...
errors
...

dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: note: candidates are: yyFlexLexer::yyFlexLexer(const yyFlexLexer&)
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: note:                yyFlexLexer::yyFlexLexer()
lex.yy.cc: In member function ‘int STLLexer::lex()’:
lex.yy.cc:5464: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5472: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5472: error: ‘yy_create_buffer’ was not declared in this scope
lex.yy.cc:5491: warning: use of old-style cast
lex.yy.cc:5491: warning: use of old-style cast
lex.yy.cc:5507: warning: use of old-style cast
lex.yy.cc:5721: warning: use of old-style cast
lex.yy.cc:5739: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5812: error: ‘yyin’ was not declared in this scope
triSurface/interfaces/STL/readSTLASCII.L:208: warning: unused variable ‘endPtr’
lex.yy.cc: At global scope:
lex.yy.cc:5847: error: prototype for ‘yyFlexLexer::yyFlexLexer(std::istream*, std::ostream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: error: candidates are: yyFlexLexer::yyFlexLexer()
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: error:                yyFlexLexer::yyFlexLexer(const yyFlexLexer&)
lex.yy.cc: In constructor ‘yyFlexLexer::yyFlexLexer(std::istream*, std::ostream*)’:
lex.yy.cc:5849: error: ‘yyin’ was not declared in this scope
lex.yy.cc: At global scope:
lex.yy.cc:5882: error: prototype for ‘void yyFlexLexer::switch_streams(std::istream*, std::ostream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:118: error: candidate is: virtual void yyFlexLexer::switch_streams(int*, std::ostream*)
lex.yy.cc: In member function ‘void yyFlexLexer::switch_streams(std::istream*, std::ostream*)’:
lex.yy.cc:5887: error: ‘yy_create_buffer’ was not declared in this scope
lex.yy.cc: In member function ‘virtual int yyFlexLexer::LexerInput(char*, int)’:
lex.yy.cc:5900: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5915: error: ‘yyin’ was not declared in this scope
lex.yy.cc: In member function ‘int yyFlexLexer::yy_get_next_buffer()’:
lex.yy.cc:5970: warning: use of old-style cast
lex.yy.cc:5997: warning: use of old-style cast
lex.yy.cc:6010: warning: use of old-style cast
lex.yy.cc:6011: warning: use of old-style cast
lex.yy.cc:6032: warning: use of old-style cast
lex.yy.cc:6043: error: ‘yyin’ was not declared in this scope
lex.yy.cc: In member function ‘yy_state_type yyFlexLexer::yy_get_previous_state()’:
lex.yy.cc:6080: warning: use of old-style cast
lex.yy.cc:6080: warning: use of old-style cast
lex.yy.cc: In member function ‘void yyFlexLexer::yyunput(int, char*)’:
lex.yy.cc:6141: warning: use of old-style cast
lex.yy.cc:6142: warning: use of old-style cast
lex.yy.cc:6150: warning: use of old-style cast
lex.yy.cc: In member function ‘int yyFlexLexer::yyinput()’:
lex.yy.cc:6194: error: ‘yyin’ was not declared in this scope
lex.yy.cc:6204: error: no matching function for call to ‘yyFlexLexer::yyrestart(<type error>)’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:115: note: candidates are: virtual void yyFlexLexer::yyrestart(int*)
lex.yy.cc:6219: warning: use of old-style cast
lex.yy.cc: At global scope:
lex.yy.cc:6228: error: prototype for ‘void yyFlexLexer::yyrestart(std::istream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:115: error: candidate is: virtual void yyFlexLexer::yyrestart(int*)
lex.yy.cc: In member function ‘void yyFlexLexer::yyrestart(std::istream*)’:
lex.yy.cc:6231: error: ‘yyin’ was not declared in this scope
lex.yy.cc:6231: error: ‘yy_create_buffer’ was not declared in this scope
lex.yy.cc:6233: error: no matching function for call to ‘yyFlexLexer::yy_init_buffer(yy_buffer_state*&, std::istream*&)’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:129: note: candidates are: void yyFlexLexer::yy_init_buffer(yy_buffer_state*, int*)
lex.yy.cc: In member function ‘void yyFlexLexer::yy_load_buffer_state()’:
lex.yy.cc:6267: error: ‘yyin’ was not declared in this scope
lex.yy.cc: At global scope:
lex.yy.cc:6272: error: no ‘yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)’ member function declared in class ‘yyFlexLexer’
lex.yy.cc: In member function ‘yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)’:
lex.yy.cc:6276: warning: use of old-style cast
lex.yy.cc:6285: warning: use of old-style cast
lex.yy.cc:6291: error: no matching function for call to ‘yyFlexLexer::yy_init_buffer(yy_buffer_state*&, std::istream*&)’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:129: note: candidates are: void yyFlexLexer::yy_init_buffer(yy_buffer_state*, int*)
lex.yy.cc: In member function ‘virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)’:
lex.yy.cc:6303: warning: use of old-style cast
lex.yy.cc:6306: warning: use of old-style cast
lex.yy.cc:6308: warning: use of old-style cast
lex.yy.cc: At global scope:
lex.yy.cc:6313: error: prototype for ‘void yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:129: error: candidate is: void
...
warnings and errors
...
lex.yy.cc:5317: warning: ‘void yy_pop_state()’ declared ‘static’ but never defined
lex.yy.cc:5320: warning: ‘int yy_top_state()’ declared ‘static’ but never defined
make: *** [Make/darwinDPOpt/readSTLASCII.o] Error 1


When flex++ is set to 'Ltoo = foamFlex++ -f $$SOURCE ; mv lex.yy.cc $*.C ; $(CC) $(c++FLAGS) -c $*.C -o $@ ' in 'wmake/rules/General/flex++' and 'wmake/rules/darwin/flex++', I get the following error:

Code:

dhcp-892b97dc:src philipcardiff$ wmake libso triSurface
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/darwin/flex++:10: warning: overriding commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/General/flex++:10: warning: ignoring old commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/darwin/flex++:10: warning: overriding commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/General/flex++:10: warning: ignoring old commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/darwin/flex++:10: warning: overriding commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/General/flex++:10: warning: ignoring old commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/darwin/flex++:10: warning: overriding commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/General/flex++:10: warning: ignoring old commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/darwin/flex++:10: warning: overriding commands for target `.L.dep'
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/wmake/rules/General/flex++:10: warning: ignoring old commands for target `.L.dep'
SOURCE=triSurface/interfaces/STL/readSTLASCII.L ; foamFlex++ -f $SOURCE ; mv lex.yy.cc Make/darwinDPOpt/readSTLASCII.C ; g++ -Ddarwin -DDP -Wall -W -Wno-unused-parameter -Wold-style-cast -O3 -ffast-math  -DNoRepository -ftemplate-depth-30  -IlnInclude -I. -I/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude  -fPIC -c Make/darwinDPOpt/readSTLASCII.C -o Make/darwinDPOpt/readSTLASCII.o
dyld: Symbol not found: __ZN4Foam8OPstream5writeEPKc
  Referenced from: /Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/lib/darwinDPOpt/openmpi-1.3.3/libPstream.dylib
  Expected in: dynamic lookup

/bin/sh: line 1: 56341 Trace/BPT trap          foamFlex++ -f $SOURCE
mv: lex.yy.cc: No such file or directory
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:65: error: ‘yy_create_buffer’ declared as a ‘virtual’ field
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:65: error: expected ‘;’ before ‘(’ token
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:67: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:72: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:80: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:108: error: expected `)' before ‘*’ token
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:113: error: expected ‘;’ before ‘(’ token
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:115: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:118: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:129: error: ‘istream’ has not been declared
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:144: error: ISO C++ forbids declaration of ‘istream’ with no type
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:144: error: expected ‘;’ before ‘*’ token
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/IOstream.H:61: error: ‘istream’ is already declared in this scope
triSurface/interfaces/STL/readSTLASCII.L: In constructor ‘STLLexer::STLLexer(std::istream*, Foam::label)’:
triSurface/interfaces/STL/readSTLASCII.L:137: error: no matching function for call to ‘yyFlexLexer::yyFlexLexer(std::istream*&)’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: note: candidates are: yyFlexLexer::yyFlexLexer(const yyFlexLexer&)
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: note:                yyFlexLexer::yyFlexLexer()
lex.yy.cc: In member function ‘int STLLexer::lex()’:
lex.yy.cc:5464: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5472: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5472: error: ‘yy_create_buffer’ was not declared in this scope
lex.yy.cc:5491: warning: use of old-style cast
lex.yy.cc:5491: warning: use of old-style cast
lex.yy.cc:5507: warning: use of old-style cast
lex.yy.cc:5721: warning: use of old-style cast
lex.yy.cc:5739: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5812: error: ‘yyin’ was not declared in this scope
triSurface/interfaces/STL/readSTLASCII.L:208: warning: unused variable ‘endPtr’
lex.yy.cc: At global scope:
lex.yy.cc:5847: error: prototype for ‘yyFlexLexer::yyFlexLexer(std::istream*, std::ostream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: error: candidates are: yyFlexLexer::yyFlexLexer()
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:104: error:                yyFlexLexer::yyFlexLexer(const yyFlexLexer&)
lex.yy.cc: In constructor ‘yyFlexLexer::yyFlexLexer(std::istream*, std::ostream*)’:
lex.yy.cc:5849: error: ‘yyin’ was not declared in this scope
lex.yy.cc: At global scope:
lex.yy.cc:5882: error: prototype for ‘void yyFlexLexer::switch_streams(std::istream*, std::ostream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:118: error: candidate is: virtual void yyFlexLexer::switch_streams(int*, std::ostream*)
lex.yy.cc: In member function ‘void yyFlexLexer::switch_streams(std::istream*, std::ostream*)’:
lex.yy.cc:5887: error: ‘yy_create_buffer’ was not declared in this scope
lex.yy.cc: In member function ‘virtual int yyFlexLexer::LexerInput(char*, int)’:
lex.yy.cc:5900: error: ‘yyin’ was not declared in this scope
lex.yy.cc:5915: error: ‘yyin’ was not declared in this scope
lex.yy.cc: In member function ‘int yyFlexLexer::yy_get_next_buffer()’:
lex.yy.cc:5970: warning: use of old-style cast
lex.yy.cc:5997: warning: use of old-style cast
lex.yy.cc:6010: warning: use of old-style cast
lex.yy.cc:6011: warning: use of old-style cast
lex.yy.cc:6032: warning: use of old-style cast
lex.yy.cc:6043: error: ‘yyin’ was not declared in this scope
lex.yy.cc: In member function ‘yy_state_type yyFlexLexer::yy_get_previous_state()’:
lex.yy.cc:6080: warning: use of old-style cast
lex.yy.cc:6080: warning: use of old-style cast
lex.yy.cc: In member function ‘void yyFlexLexer::yyunput(int, char*)’:
lex.yy.cc:6141: warning: use of old-style cast
lex.yy.cc:6142: warning: use of old-style cast
lex.yy.cc:6150: warning: use of old-style cast
lex.yy.cc: In member function ‘int yyFlexLexer::yyinput()’:
lex.yy.cc:6194: error: ‘yyin’ was not declared in this scope
lex.yy.cc:6204: error: no matching function for call to ‘yyFlexLexer::yyrestart(<type error>)’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:115: note: candidates are: virtual void yyFlexLexer::yyrestart(int*)
lex.yy.cc:6219: warning: use of old-style cast
lex.yy.cc: At global scope:
lex.yy.cc:6228: error: prototype for ‘void yyFlexLexer::yyrestart(std::istream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:115: error: candidate is: virtual void yyFlexLexer::yyrestart(int*)
lex.yy.cc: In member function ‘void yyFlexLexer::yyrestart(std::istream*)’:
lex.yy.cc:6231: error: ‘yyin’ was not declared in this scope
lex.yy.cc:6231: error: ‘yy_create_buffer’ was not declared in this scope
lex.yy.cc:6233: error: no matching function for call to ‘yyFlexLexer::yy_init_buffer(yy_buffer_state*&, std::istream*&)’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:129: note: candidates are: void yyFlexLexer::yy_init_buffer(yy_buffer_state*, int*)
lex.yy.cc: In member function ‘void yyFlexLexer::yy_load_buffer_state()’:
lex.yy.cc:6267: error: ‘yyin’ was not declared in this scope
lex.yy.cc: At global scope:
lex.yy.cc:6272: error: no ‘yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)’ member function declared in class ‘yyFlexLexer’
lex.yy.cc: In member function ‘yy_buffer_state* yyFlexLexer::yy_create_buffer(std::istream*, int)’:
lex.yy.cc:6276: warning: use of old-style cast
lex.yy.cc:6285: warning: use of old-style cast
lex.yy.cc:6291: error: no matching function for call to ‘yyFlexLexer::yy_init_buffer(yy_buffer_state*&, std::istream*&)’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:129: note: candidates are: void yyFlexLexer::yy_init_buffer(yy_buffer_state*, int*)
lex.yy.cc: In member function ‘virtual void yyFlexLexer::yy_delete_buffer(yy_buffer_state*)’:
lex.yy.cc:6303: warning: use of old-style cast
lex.yy.cc:6306: warning: use of old-style cast
lex.yy.cc:6308: warning: use of old-style cast
lex.yy.cc: At global scope:
lex.yy.cc:6313: error: prototype for ‘void yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)’ does not match any in class ‘yyFlexLexer’
/Volumes/OpenFOAM/OpenFOAM-1.4.1-dev/src/OpenFOAM/lnInclude/FlexLexer.h:129: error: candidate is: void yyFlexLexer::yy_init_buffer(yy_buffer_state*, int*)
lex.yy.cc: In member function ‘void yyFlexLexer::yy_init_buffer(yy_buffer_state*, std::istream*)’:
lex.yy.cc:6318: error: cannot convert ‘std::istream*’ to ‘istream*’ in assignment
lex.yy.cc: In member function ‘void yyFlexLexer::yy_push_state(int)’:
lex.yy.cc:6372: warning: use of old-style cast
lex.yy.cc:6376: warning: use of old-style cast
lex.yy.cc:6376: warning: use of old-style cast
lex.yy.cc: In function ‘void* yy_flex_alloc(yy_size_t)’:
lex.yy.cc:6478: warning: use of old-style cast
lex.yy.cc: In function ‘void* yy_flex_realloc(void*, yy_size_t)’:
lex.yy.cc:6496: warning: use of old-style cast
lex.yy.cc:6496: warning: use of old-style cast
lex.yy.cc: In member function ‘virtual int yyFlexLexer::LexerInput(char*, int)’:
lex.yy.cc:5922: warning: control reaches end of non-void function
lex.yy.cc: At global scope:
lex.yy.cc:5310: warning: ‘yy_start_stack_ptr’ defined but not used
lex.yy.cc:5311: warning: ‘yy_start_stack_depth’ defined but not used
lex.yy.cc:5312: warning: ‘yy_start_stack’ defined but not used
lex.yy.cc:5314: warning: ‘void yy_push_state(int)’ declared ‘static’ but never defined
lex.yy.cc:5317: warning: ‘void yy_pop_state()’ declared ‘static’ but never defined
lex.yy.cc:5320: warning: ‘int yy_top_state()’ declared ‘static’ but never defined
make: *** [Make/darwinDPOpt/readSTLASCII.o] Error 1

After making the changes to the 'wmake/rules/General/flex++' and 'wmake/rules/darwin/flex++', I './Allwmake' in the OpenFOAM-1.4.1-dev directory (twice just in case).


Also as Hrv sugegsted in a previous post, I copied FlexLexer.H from the foamFlex directory to the one of the others (I cannot remember off-hand and I cannot seem to re-find the post), but this didn't seem to make a difference.

And the warnings at the start of the compilation appear for other libraries that seem to compile fine.

Hopefully someone has a few thoughts or ideas that might help,


Philip

...I think flex doesn't like me.

richpaj December 1, 2009 20:07

I think there's some related commentary on this issue at:

http://www.cfd-online.com/Forums/ope...n-104-a-5.html

though perhaps you've already scanned that.

Richard

bigphil December 2, 2009 07:38

Richard,

Thanks somehow I missed that,

I will go through it and hopefully find a solution,

Philip

bigphil December 2, 2009 10:23

OK great, triSurface is compiling now!

Basically, I downloaded the sources again from https://openfoam-extend.svn.sourcefo...OAM-1.4.1-dev/, which was recommended on the OF-1-4 Mac thread.

Then there were just a few fixes required to get it all working, like those mentioned previously in the OF-1.4 thread.

Thanks,
Philip


All times are GMT -4. The time now is 20:12.