CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Installation (https://www.cfd-online.com/Forums/openfoam-installation/)
-   -   usrbinld cannot find (https://www.cfd-online.com/Forums/openfoam-installation/57266-usrbinld-cannot-find.html)

doug May 18, 2007 12:57

Hi all- As I've tried to co
 
Hi all-

As I've tried to compile specific applications, a common error continues to emerge:

/usr/bin/ld: cannot find

The error says it cannot find -lfiniteVolume or -lcfdTools or -lwhatever. I've seen this problem on other posts, but haven't found a remedy to the problem. Does anyone know the root cause of the problem? I'm sure it's a simple fix in the options file of the make folder of the application, but I'm not sure what I'm doing wrong and what I ought to change. And, it seems to be a common problem as I compile many applications. Is there a way to solve the problem for all of the applications at once?

Thanks in advance for your help.
I'm running on Ubuntu, 32bit.

-doug

rmorgans May 18, 2007 23:11

Hmmm - ran into this problem y
 
Hmmm - ran into this problem yesterday on a students computer...

Havent fixed it yet, but

http://translate.google.com/translate?hl=en&sl=it&u=http://mavimo.netsons.org/op enfoam_14_su_ubuntu_704&sa=X&oi=translate&resnum=1 0&ct=result&prev=/search%3Fq%3 Dopenfoam%2Bubuntu%26hl%3Den%26rlz%3D1B3GGGL_enAU2 19AU219%26pwst%3D1

says try

sudo apt-get install build-essential

I know on 64 bit ubuntu binutils libiberty requires binutils-dev

http://ubuntuforums.org/showthread.php?p=2339143

Cheers

Rick

doug May 19, 2007 19:29

Rick- Thank you! I found th
 
Rick-

Thank you! I found that it was a library build problem and remedied it with binutils as you alluded to above. I ran wmake libso OpenFOAM in the src directory and it worked great. However, when I go back up to the main directory and do ./Allwmake, I get the new following error:

doug@dell-neng-usu-edu:~/OpenFOAM/OpenFOAM-1.4$ ./Allwmake
+ cd wmake
+ ./makeWmake
make: Nothing to be done for `all'.
+ cd src
+ ./Allwmake
+ cd /home/doug/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM
+ wmakeLnInclude .
+ wmake libso zlib-1.2.1
`/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libz.so' is up to date.
+ wmake libso foamUser
`/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libfoamUser.so' is up to date.
+ '[' LAM = OPENMPI -a '!' -r /lib/libmpi.a -a '!' -r /lib/libmpi.so ']'
+ '[' LAM = LAM -a '!' -r /home/doug/OpenFOAM/OpenFOAM-1.4/src/lam-7.1.2/platforms/linuxGcc4DPOpt/lib/libm pi.a -a '!' -r /home/doug/OpenFOAM/OpenFOAM-1.4/src/lam-7.1.2/platforms/linuxGcc4DPOpt/lib/libm pi.so ']'
+ '[' LAM = MPICH -a '!' -r /lib/libmpich.a -a '!' -r /lib/libmpich.so ']'
+ cd Pstream
+ ./Allwmake
+ wmake libso dummy
`/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/dummy/libPstream.so' is up to date.
+ '[' LAM = LAM -o LAM = OPENMPI -o LAM = MPI -o LAM = MPICH -o LAM = MPICH-GM ']'
+ export WM_OPTIONS=linuxGcc4DPOptLAM
+ WM_OPTIONS=linuxGcc4DPOptLAM
+ wmake libso mpi
`/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/lam-7.1.2/libPstream.so' is up to date.
+ wmake libso OpenFOAM
`/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libOpenFOAM.so' is up to date.
+ wmake libso lagrangian/basic
`/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/liblagrangian.so' is up to date.
+ wmake libso triSurface
SOURCE=triSurface/interfaces/STL/readSTLASCII.L ; flex++ -f $SOURCE ; mv lex.yy.cc Make/linuxGcc4DPOpt/readSTLASCII.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/doug/OpenFOAM/OpenFOAM-1.4/src/OpenFOAM/lnInclude -fPIC -pthread -c Make/linuxGcc4DPOpt/readSTLASCII.C -o Make/linuxGcc4DPOpt/readSTLASCII.o
/bin/sh: flex++: command not found
mv: cannot stat `lex.yy.cc': No such file or directory
g++: Make/linuxGcc4DPOpt/readSTLASCII.C: No such file or directory
g++: no input files
make: *** [Make/linuxGcc4DPOpt/readSTLASCII.o] Error 1
+ wmake libso edgeMesh
`/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libedgeMesh.so' is up to date.
+ wmake libso meshTools
/usr/bin/ld: cannot find -ltriSurface
collect2: ld returned 1 exit status
make: *** [/home/doug/OpenFOAM/OpenFOAM-1.4/lib/linuxGcc4DPOpt/libmeshTools.so] Error 1
+ wmake libso finiteVolume

I've never heard of flex++, but it seems like I don't have some utility installed that contains flex++.

Any ideas anyone?

Thanks.

-doug

mattijs May 22, 2007 17:35

flex++ is usually the same exe
 
flex++ is usually the same executable as flex (on my machine it is a softlink to flex). It produces a parser using C++ instead of C.

bastil September 25, 2008 07:20

I also get lots of these: /
 
I also get lots of these:

/usr/bin/ld: cannot find

messages during compiling OF 1.5.x. The script contiunues with some of them but finally stops with another of these errors.
I have binutils installed on my Gentoo x86_64 System. The wiki tells to rerun ./Allwmake in the source directory once more. If I do this without running "wcleanAll" before I get lots of errors. If I run "wcleanAll" I am struggeling with exactly the same errors. Any ideas?

alexandrepereira January 1, 2009 22:02

Hi ppl I am running into th
 
Hi ppl

I am running into the same kindo of probls, trying to compile OF-1.5.x... my ThirdParty folder is the default of OF-1.5, I have binutils and flex installed... I am running allwmake in a Ubuntu 7.10... the last lib to be built was libKineticTheoryModel.so... before build errors started appearing...


What is wrong with OF-1.5.x...?

I successfully compiled OF-1.5-dev...

Best regards

Alex

NickG February 18, 2010 10:22

Does anyone know how to get round this problem? I have it on 64bit Ubuntu when trying to install the OpenFOAM-1.5-dev.General_2009-12-11.tgz
from http://powerlab.fsb.hr/ped/kturbo/OpenFOAM/release/ I've successfully installed all the third party apps have flex, flex++, binutils, etc, etc but still no luck. I know it's to do with the ld linker but don't know how to fix it

gwierink February 19, 2010 07:29

Hi Nick,

I just successfully installed OF-1.5-dev on 64 bit Ubuntu 9.10 and had some similar problem at first. It turned out I forgot to install binutils-dev. Are you sure you have that package as well?

NickG February 23, 2010 07:24

Thanks Gijsbert

Compiled with no errors! There's a first time for everything...

blaise October 7, 2010 10:24

Trouble with compiling 1.5-dev
 
Hi Foamers,

I see some people had this kind of trouble before, but none of the solutions seems to suit my case.
I am trying to compile the same package as NickG and run into the same linker errors saying

...blah
-lfiniteVolume -lOpenFOAM -liberty -ldl -lm -o /home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt/sonicLiquidFoam
/usr/bin/ld: cannot find -lfiniteVolume
collect2: ld returned 1 exit status

I am running a CentOS cluster with 2.6.18-128.4.1.el5 kernel and had no problems with later versions of OF (like 1.6.x or 1.7.1).
I have binutils and binutils-devel-2.17.50.0.6-14.el5.x86_64 installed, I use gcc-4.4 (freshly compiled). I fixed the strange <<<<<... entries in the etc/bashrc and put a softlink in the ThirdParty directory so that openmpi-1.3.3 redirects to the actually existing openmpi-1.2.6. $PATH looks like this:

/bin:/home/ofuser/OpenFOAM/ThirdParty-1.5-dev/openmpi-1.3.3/platforms/linux64GccDPOpt/bin:/home/ofuser/OpenFOAM/ofuser-1.5-dev/applications/bin/linux64GccDPOpt:/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/applications/bin/linux64GccDPOpt:/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/wmake:/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/opt/ofed/bin:/opt/ofed/sbin:/home/ofuser/bin

When I follow the hint to run Allwmake in the source directory again, I get this:

...(snippet)...
+ wmake libo OSspecific/Unix
SOURCE=signals/sigFpe.C ; g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/sigFpe.o
signals/sigFpe.C: In static member function ���static void* Foam::sigFpe::my_malloc_hook(size_t, const void*)���:
signals/sigFpe.C:85: error: ���uint64_t��� does not name a type
signals/sigFpe.C:89: error: ���uint64_t��� was not declared in this scope
signals/sigFpe.C:89: error: ���dPtr��� was not declared in this scope
signals/sigFpe.C:89: error: expected type-specifier before ���uint64_t���
signals/sigFpe.C:89: error: expected ���>��� before ���uint64_t���
signals/sigFpe.C:89: error: expected ���(��� before ���uint64_t���
signals/sigFpe.C:89: error: expected primary-expression before ���>��� token
signals/sigFpe.C:89: error: expected ���)��� before ���;��� token
signals/sigFpe.C:93: error: ���sNAN��� was not declared in this scope
make: *** [Make/linux64GccDPOpt/sigFpe.o] Error 1
+ wmake libso OpenFOAM
SOURCE=global/global.Cver ; sed s/WM_PROJECT_VERSION/\"1.5-dev\"/ $SOURCE > Make/linux64GccDPOpt/global.C ; g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/ofuser/OpenFOAM/ThirdParty-1.5-dev/zlib-1.2.3 -IlnInclude -I. -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c Make/linux64GccDPOpt/global.C -o Make/linux64GccDPOpt/global.o
g++: /home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOSspecific.o: No such file or directory
make: *** [/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libOpenFOAM.so] Error 1
...(snippet end)...

After this, some outputs states that things are all well again, like:

+ wmake libso lduSolvers
'/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/liblduSolvers.so' is up to date.
+ wmake libso lagrangian/basic
'/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/liblagrangian.so' is up to date.

Then again compilation of meshTools causes trouble:

...(snippet)...
+ wmake libso meshTools
SOURCE=triSurface/surfaceFeatures/surfaceFeatures.C ; g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/triSurface/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/lagrangian/basic/lnInclude -IlnInclude -I. -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/surfaceFeatures.o
triSurface/surfaceFeatures/surfaceFeatures.C: In member function ���Foam::Map<int> Foam::surfaceFeatures::nearestSamples(const Foam::labelList&, const Foam::pointField&, const Foam::scalarField&) const���:
triSurface/surfaceFeatures/surfaceFeatures.C:770: error: conflicting declaration ���Foam::octreeDataPoint samples���
triSurface/surfaceFeatures/surfaceFeatures.C:769: error: ���samples��� has a previous declaration as ���Foam::treeBoundBox samples���
triSurface/surfaceFeatures/surfaceFeatures.C: In member function ���Foam::Map<int> Foam::surfaceFeatures::nearestSamples(const Foam::labelList&, const Foam::pointField&, const Foam::scalarField&, const Foam::scalarField&, Foam::scalar) const���:
triSurface/surfaceFeatures/surfaceFeatures.C:871: error: conflicting declaration ���Foam::octreeDataPoint samples���
triSurface/surfaceFeatures/surfaceFeatures.C:870: error: ���samples��� has a previous declaration as ���Foam::treeBoundBox samples���
make: *** [Make/linux64GccDPOpt/surfaceFeatures.o] Error 1
+ wmake libso finiteVolume
/usr/bin/ld: cannot find -lmeshTools
collect2: ld returned 1 exit status
make: *** [/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/libfiniteVolume.so] Error 1
...(snippet end)...

and so on!

What am I missing? I am completely lost with this trouble!

Thanks a lot!

Cheers,

Pascal.

wyldckat October 7, 2010 18:42

Greetings Pascal,

I've got a feeling that your gcc 4.4 is not visible to your OpenFOAM 1.5-dev :( I don't see any path to it the PATH variable!
Where exactly is your gcc 4.4?
What does "gcc --version" output?

Best regards,
Bruno

blaise October 8, 2010 10:22

Hi Bruno,

yeah, would have been a nice bummer! ;-)

The gcc -dumpversion gives 4.4.5, and it is under /usr/local/bin, which is confirmed by "which" command.

When I do all the commands in Allwmake by hand, things start to fail when processing the stuff in the src directory. The following errors come up immediately:

....... (snippet) .........
SOURCE=signals/sigFpe.C ; g++ -m64 -Dlinux64 -DDP -DFOAM_DEV_REVISION_NUMBER=exported -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -march=opteron -O3 -DNoRepository -ftemplate-depth-40 -IlnInclude -I. -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OpenFOAM/lnInclude -I/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/src/OSspecific/Unix/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/sigFpe.o
signals/sigFpe.C: In static member function ���static void* Foam::sigFpe::my_malloc_hook(size_t, const void*)���:
signals/sigFpe.C:85: error: ���uint64_t��� does not name a type
signals/sigFpe.C:89: error: ���uint64_t��� was not declared in this scope
signals/sigFpe.C:89: error: ���dPtr��� was not declared in this scope
signals/sigFpe.C:89: error: expected type-specifier before ���uint64_t���
signals/sigFpe.C:89: error: expected ���>��� before ���uint64_t���
signals/sigFpe.C:89: error: expected ���(��� before ���uint64_t���
signals/sigFpe.C:89: error: expected primary-expression before ���>��� token
signals/sigFpe.C:89: error: expected ���)��� before ���;��� token
signals/sigFpe.C:93: error: ���sNAN��� was not declared in this scope
make: *** [Make/linux64GccDPOpt/sigFpe.o] Error 1

............ (snippet end) ..........

Is there something wrong with some 64-bit libraries on my system?

A bit later the following files cannot be created:
libOSspecific.o
libfiniteVolume.so
libdynamicMesh.so
libfvMotionSolver.so
libfaceDecompositionMotionSolver.so
libsampling.so
libdynamicFvMesh.so
libengine.so
libODE.so
librandomProcesses.so
libbasicThermophysicalModels.so
liblaminarFlameSpeedModels.so
libchemistryModel.so
libradiation.so

and some more, which seems to be caused by the absence of "-lfiniteVolume" or "-ldynamicMesh" or "-lmeshTools" (at least the linker cannot find them). Nevertheless, there are quite a lot of shared object files in the respective directory
/home/ofuser/OpenFOAM/OpenFOAM-1.5-dev/lib/linux64GccDPOpt/

So, something in the build of those libraries goes wrong. But what??????????????

Thanks a lot for the input!

Best regards,

Pascal.

wyldckat October 8, 2010 10:53

Hi Pascal,

There are only a few possibilities left, as far as I can tell:
  • some specific header in gcc's lookup paths is damaged, or is picking up the old header; but this is odd if you already managed to build OpenFOAM 1.6.x and 1.7.x with this very same gcc version and system.
  • the SVN version of 1.5-dev that you pulled could be seriously damaged! SVN might be changing some characters for compatibility or something like that. Try retrieving a tarball straight from openfoam-extend's websvn.
    I say this because you mention some weird "<<<" in bashrc and the code you pasted has some strange black background diamond-like questions marks.
Additionally, you can use the ThirdParty 1.6 folder from OpenFOAM 1.6 with OpenFOAM 1.5-dev without any problems :) This way you can save up a bit of space and have an updated OpenMPI to 1.3.3.
I don't say 1.7's ThirdParty, because with 1.7 things are a bit different and would require some additional tweaking.

Best regards,
Bruno

tcarrigan October 8, 2010 11:39

Digging around I found the solution to this problem.

If using Ubuntu, install these packages: gcc, binutils-dev, flex, build-essential, python-dev, libqt4-dev, libreadline5-dev, zlib1g-dev, cmake

If using CentOS (RHEL), install the following: gcc, gcc-c++, bison, ncurses-devel, binutils-devel, tix.x86_64, glibc-devel, flex, flex-devel, zlib-devel, libXt-devel

Everything seems to work afterward.

N. A. November 1, 2010 09:54

Hi Bruno and Others,

I am getting a similar ld compileing error. Few weeks back our cluster creashed and they installed new operating system. I was able to run some cases in OF1.6. Yesterday I tried to compile some of the solvers and I ran into this ld exit problem that all are talking about.
Do you know what could be done to rectify this error.

my gcc version is 4.4.3

Eorror:
_______________
NA@emerald:~/OpenFOAM/NA-1.6/applications/solvers/gasificationFoam$ wmake
Making dependency list for source file gasificationFoam.C
SOURCE=gasificationFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/compressible/turbulenceModel -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/basic/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/intermediate/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/coalCombustion/lnInclude -I/home/NA/OpenFOAM/NA-1.6/src/mycoalCombustion/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/pdfs/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/basic/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/liquids/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/liquidMixture/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/solids/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/solidMixture/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/thermophysicalFunctions/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/reactionThermo/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/chemistryModel/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/radiation/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/ODE/lnInclude -IlnInclude -I. -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gasificationFoam.o
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/compressible/turbulenceModel -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/basic/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/intermediate/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/coalCombustion/lnInclude -I/home/NA/OpenFOAM/NA-1.6/src/mycoalCombustion/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/pdfs/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/basic/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/liquids/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/liquidMixture/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/solids/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/solidMixture/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/thermophysicalFunctions/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/reactionThermo/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/chemistryModel/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/radiation/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/ODE/lnInclude -IlnInclude -I. -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64GccDPOpt/gasificationFoam.o -L/home/NA/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt \
-lfiniteVolume -lmeshTools -lcompressibleRASModels -lcompressibleLESModels -llagrangian -llagrangianIntermediate -L/home/NA/OpenFOAM/NA-1.6/lib/linux64GccDPOpt -lmycoalCombustion -lspecie -lbasicThermophysicalModels -lliquids -lliquidMixture -lsolids -lsolidMixture -lthermophysicalFunctions -lreactionThermophysicalModels -lchemistryModel -lradiation -lODE -lOpenFOAM -liberty -ldl -lm -o /home/NA/OpenFOAM/NA-1.6/applications/bin/linux64GccDPOpt/gasificationFoam
/usr/bin/ld: cannot find -liberty
collect2: ld returned 1 exit status
make: *** [/home/NA/OpenFOAM/NA-1.6/applications/bin/linux64GccDPOpt/gasificationFoam] Error 1
________________

Thanks,
Nir

wyldckat November 1, 2010 12:06

Hi Nir,

Quote:

Originally Posted by N. A. (Post 281665)
/usr/bin/ld: cannot find -liberty

You have two choices:
  1. Either install the binutils development package (binutils-dev in Ubuntu/Debian).
  2. Or remove "-liberty" from the file "OpenFOAM/OpenFOAM-1.7.1/wmake/rules/linux64Gcc/general".
Best regards,
Bruno

N. A. November 1, 2010 17:35

Hi Bruno,

Thanks. I tired option#2 that you suggested, but it some I am getting a kind of error that is trying to recosgnize some unkown characters when I compile the solver and both the source code (in OpenFOAM-1.6 version).

Strangely the error remains even if I keep the "-liberty" option in the ~wmake/rules/linxGcc/general.

Following is the error:
common_file_compress.c:62:18: error: zlib.h: No such file or directory
common_file_compress.c: In function ‘fileCompressGz’:
common_file_compress.c:283: error: ‘gzFile’ undeclared (first use in this function)
common_file_compress.c:283: error: (Each undeclared identifier is reported only once
common_file_compress.c:283: error: for each function it appears in.)
common_file_compress.c:283: error: expected ‘;’ before ‘gzfile’
common_file_compress.c:286: error: ‘gzfile’ undeclared (first use in this function)
common_file_compress.c:286: warning: implicit declaration of function ‘gzdopen’
common_file_compress.c:290: warning: implicit declaration of function ‘gzsetparams’
common_file_compress.c:290: error: ‘Z_DEFAULT_STRATEGY’ undeclared (first use in this function)
common_file_compress.c:293: warning: implicit declaration of function ‘gzwrite’
common_file_compress.c:301: warning: implicit declaration of function ‘gzclose’
make: *** [Make/linux64GccDPOpt/common_file_compress.o] Error 1


These " †" kind of cahrates appear for during whol of compilation (both the source code and the solvers". Can you suggest what this error could be and how I can rectify it?

Thanks,
Nir

N. A. November 1, 2010 21:00

Hi Bruno,

So I have a new error in compiling solvers, which I was able to do before. I am not sure what happened? Can you please point me to what could be the source of this error. I am guessing this is not related to the -liberty option with general file (of the wmake/rules/linux64Gcc) directory as irrespective of that I see there is a compilation error:

Error:
________
SOURCE=gasificationFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/meshTools/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/compressible/turbulenceModel -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/basic/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/intermediate/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/lagrangian/coalCombustion/lnInclude -I/home/NA/OpenFOAM/NA-1.6/src/mycoalCombustion/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/pdfs/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/basic/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/liquids/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/liquidMixture/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/solids/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/solidMixture/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/thermophysicalFunctions/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/reactionThermo/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/chemistryModel/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/radiation/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/ODE/lnInclude -IlnInclude -I. -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/NA/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/gasificationFoam.o
In file included from gasificationFoam.C:101:
hEqn.H: In function ‘int main(int, char**)’:
hEqn.H:9: error: no match for ‘operator+’ in ‘Foam:perator/(const Foam::GeometricField<double, PatchField, GeoMesh>&, const Foam::GeometricField<double, PatchField, GeoMesh>&) [with PatchField = Foam::fvPatchField, GeoMesh = Foam::volMesh](((const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&)((const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>*)(& rho)))) + Foamerator/(const Foam::tmp<Foam:imensionedField<double, GeoMesh> >&, const Foam:imensionedField<double, GeoMesh>&) [with GeoMesh = Foam::volMesh](((const Foam:imensionedField<double, Foam::volMesh>&)((const Foam:imensionedField<double, Foam::volMesh>*)(& rho.Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::<anonymous>))))’
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dictionary.H:450: note: candidates are: Foam::dictionary Foamerator+(const Foam::dictionary&, const Foam::dictionary&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionSet.H:250: note: Foam::dimensionSet Foamerator+(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionedScalar.H:50: note: Foam::dimensionedScalar Foamerator+(const Foam::dimensionedScalar&, Foam::scalar)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionedScalar.H:51: note: Foam::dimensionedScalar Foamerator+(Foam::scalar, const Foam::dimensionedScalar&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:78: note: Foam::tmp<Foam::Field<double> > Foamerator+(const Foam::scalar&, const Foam::UList<double>&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:78: note: Foam::tmp<Foam::Field<double> > Foamerator+(const Foam::scalar&, const Foam::tmp<Foam::Field<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:78: note: Foam::tmp<Foam::Field<double> > Foamerator+(const Foam::UList<double>&, const Foam::scalar&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:78: note: Foam::tmp<Foam::Field<double> > Foamerator+(const Foam::tmp<Foam::Field<double> >&, const Foam::scalar&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/labelField.H:54: note: Foam::tmp<Foam::Field<int> > Foamerator+(const Foam::label&, const Foam::UList<int>&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/labelField.H:54: note: Foam::tmp<Foam::Field<int> > Foamerator+(const Foam::label&, const Foam::tmp<Foam::Field<int> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/labelField.H:54: note: Foam::tmp<Foam::Field<int> > Foamerator+(const Foam::UList<int>&, const Foam::label&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/labelField.H:54: note: Foam::tmp<Foam::Field<int> > Foamerator+(const Foam::tmp<Foam::Field<int> >&, const Foam::label&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude/specieI.H:150: note: Foam::specie Foamerator+(const Foam::specie&, const Foam::specie&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/specie/lnInclude/perfectGasI.H:110: note: Foam:erfectGas Foam:perator+(const Foam:erfectGas&, const Foam:erfectGas&)
hEqn.H:12: error: no match for ‘operator/’ in ‘Foam::radiation::radiationModel::Sh(((Foam::bas icThermo&)(&((Foam::hCombustionThermo*)thermo)->Foam::hCombustionThermo::<anonymous>.Foam::basicP siThermo::<anonymous>))) / rho’
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/fileName.H:183: note: candidates are: Foam::fileName Foamerator/(const Foam::string&, const Foam::string&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionSet.H:268: note: Foam::dimensionSet Foamerator/(const Foam::dimensionSet&, const Foam::dimensionSet&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/dimensionedScalar.H:57: note: Foam::dimensionedScalar Foamerator/(Foam::scalar, const Foam::dimensionedScalar&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:82: note: Foam::tmp<Foam::Field<double> > Foamerator/(const Foam::UList<double>&, const Foam::UList<double>&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:82: note: Foam::tmp<Foam::Field<double> > Foamerator/(const Foam::UList<double>&, const Foam::tmp<Foam::Field<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:82: note: Foam::tmp<Foam::Field<double> > Foamerator/(const Foam::tmp<Foam::Field<double> >&, const Foam::UList<double>&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:82: note: Foam::tmp<Foam::Field<double> > Foamerator/(const Foam::tmp<Foam::Field<double> >&, const Foam::tmp<Foam::Field<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:84: note: Foam::tmp<Foam::Field<double> > Foamerator/(const Foam::scalar&, const Foam::UList<double>&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/scalarField.H:84: note: Foam::tmp<Foam::Field<double> > Foamerator/(const Foam::scalar&, const Foam::tmp<Foam::Field<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:59: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::UList<double>&, const Foam::UList<Foam::SphericalTensor<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:59: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::UList<double>&, const Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:59: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::tmp<Foam::Field<double> >&, const Foam::UList<Foam::SphericalTensor<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:59: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::tmp<Foam::Field<double> >&, const Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:60: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::scalar&, const Foam::UList<Foam::SphericalTensor<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:60: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::scalar&, const Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:60: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::UList<double>&, const Foam::sphericalTensor&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/sphericalTensorField.H:60: note: Foam::tmp<Foam::Field<Foam::SphericalTensor<double > > > Foamerator/(const Foam::tmp<Foam::Field<double> >&, const Foam::sphericalTensor&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:79: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foamerator/(const Foam::UList<Foam::Vector<double> >&, const Foam::UList<Foam::Tensor<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:79: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foamerator/(const Foam::UList<Foam::Vector<double> >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:79: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foamerator/(const Foam::tmp<Foam::Field<Foam::Vector<double> > >&, const Foam::UList<Foam::Tensor<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:79: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foamerator/(const Foam::tmp<Foam::Field<Foam::Vector<double> > >&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:80: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foamerator/(const Foam::vector&, const Foam::UList<Foam::Tensor<double> >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:80: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foamerator/(const Foam::vector&, const Foam::tmp<Foam::Field<Foam::Tensor<double> > >&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:80: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam:perator/(const Foam::UList<Foam::Vector<double> >&, const Foam::tensor&)
/home/NA/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude/tensorField.H:80: note: Foam::tmp<Foam::Field<Foam::Vector<double> > > Foam:perator/(const Foam::tmp<Foam::Field<Foam::Vector<double> > >&, const Foam::tensor&)
make: *** [Make/linux64GccDPOpt/gasificationFoam.o] Error 1
_____________

(*note: Foamerator if Foam: Operator above. Due to smiley's Op is removed)

Thanks,
Nir

wyldckat November 2, 2010 17:50

Hi Nir,

Quote:

Originally Posted by N. A. (Post 281737)
common_file_compress.c:62:18: error: zlib.h: No such file or directory

The problem here is that zlib is missing. If you look in the folder gcc-4.3.3 in ThirdParty-1.6, you will find the folder zlib. The files "Make/files" and "Make/options" for zlib can be found in the ThirdParty for OpenFOAM 1.5. For example, see here; at the end of that link, you can find a "Download GNU tarball" which allows you to download the whole zlib package.

As for the other problem with gasificationFoam, try:
Code:

wclean
wmake

A final note: please use the "#" button when posting code here on the forum; it's available in "advanced mode" and it will make it easier to read the code you post!

Best regards,
Bruno

N. A. November 4, 2010 14:15

Bruno,

Thanks. I think the -liberty option works great.

-Nir


All times are GMT -4. The time now is 13:27.