CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

OpenFoam171: error /usr/bin/ld: cannot find -llduSolvers

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 2 Post By norman1981
  • 1 Post By Elol

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 31, 2011, 10:02
Default OpenFoam171: error /usr/bin/ld: cannot find -llduSolvers
  #1
New Member
 
Paolo Schito
Join Date: Apr 2009
Location: Milano, Italy
Posts: 3
Rep Power: 17
Schipper is on a distinguished road
Hallo,
I'm new to OpenFoam and also of Ubuntu_64.
I'm using OpenFoam-1.7.1 and I downloaded the Ubuntu/Debian_64 Pack Installation.
I'm trying to compile a solver that is a modification of simpleFoam. By the way, I already tryed to compile simpleFoam and it gives no problem at all.

When i try to compile my new solver I get the following error:
Code:
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3  -DNoRepository -ftemplate-depth-40 -I/opt/openfoam171/src/turbulenceModels     -I/opt/openfoam171/src/turbulenceModels/incompressible/RAS/RASModel     -I/opt/openfoam171/src/transportModels     -I/opt/openfoam171/src/transportModels/incompressible/singlePhaseTransportModel     -I/opt/openfoam171/src/finiteVolume/lnInclude     -I/opt/openfoam171/src/llduSolvers  -IlnInclude -I. -I/opt/openfoam171/src/OpenFOAM/lnInclude -I/opt/openfoam171/src/OSspecific/POSIX/lnInclude   -fPIC -Xlinker --add-needed Make/linux64GccDPOpt/actuatorDiskExplicitSimpleFoam.o Make/linux64GccDPOpt/actuatorDiskExplicit.o -L/opt/openfoam171/lib/linux64GccDPOpt \
         -lincompressibleTurbulenceModel     -lincompressibleRASModels     -lincompressibleTransportModels     -lfiniteVolume     -lmeshTools     -llduSolvers     -lstdio.h -lOpenFOAM -liberty -ldl   -lm -o /opt/openfoam171/applications/bin/linux64GccDPOpt/actuatorDiskExplicitSimpleFoam
/usr/bin/ld: cannot find -llduSolvers
 /usr/bin/ld: cannot find -lstdio.h
 collect2: ld returned 1 exit status
 make: *** [/opt/openfoam171/applications/bin/linux64GccDPOpt/actuatorDiskExplicitSimpleFoam] Error 1
When I try to look at the library lduSolvers or liblduSolvers.so I cannot find anything on my OpenFoam installation directory. I already installed all requested packages as:
Code:
sudo apt-get install binutils-dev
sudo apt-get install build-essential
sudo apt-get install binutils-dev blcr-dkms blcr-util csh libcr0 libibverbs-dev libibverbs1 libncurses5-dev libnuma1 libopenmpi-dev libopenmpi1.3 libreadline-dev libreadline6-dev libscotch-5.1 libscotch-dev openmpi-bin openmpi-checkpoint openmpi-common zlib1g-dev
but I got no visible improvement: the error I get is almost the same.

I post also the ./Make/options file that can give maybe some more informations about what I put as input:
Code:
EXE_INC = \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/llduSolvers 

EXE_LIBS = \
    -lincompressibleTurbulenceModel \
    -lincompressibleRASModels \
    -lincompressibleTransportModels \
    -lfiniteVolume \
    -lmeshTools \
    -llduSolvers \
    -lstdio.h
The other problem is that I cannot locate the stdio.h file, but this is a secondary problem, at first I would like to solve the llduSolvers problem.

Thank You in advance

Paolo
Schipper is offline   Reply With Quote

Old   June 1, 2011, 05:50
Default
  #2
Member
 
norman1981's Avatar
 
Norman Del Puppo
Join Date: Mar 2009
Location: Hinwil, CH
Posts: 57
Rep Power: 17
norman1981 is on a distinguished road
Hi Paolo,

a little hint that may help you.. take a look into OpenFOAM lib directory (type "lib" and go into your platform directory), then look for the lduSolvers library. I took a look at an OpenFOAM-1.7.0 "debian packed" installation I have in one of my workstations and that library doesn't exist as well as its sources. I don't know if it exists in OpenFOAM-1.7.1 since I am using OpenFOAM-1.6-ext, but maybe you are trying to compile a solver developed for another OpenFOAM version (in ex. lduSolvers lib and src are present in OpenFOAM-1.6-ext).

Regards

Norman
Tarak and jarpve like this.
norman1981 is offline   Reply With Quote

Old   June 1, 2011, 13:36
Default
  #3
New Member
 
Paolo Schito
Join Date: Apr 2009
Location: Milano, Italy
Posts: 3
Rep Power: 17
Schipper is on a distinguished road
Hi Norman,
thank You very much for Your answer.
As You mentioned, the code was written in OpenFOAM-1.5-dev and I tried to implement it in OpenFOAM-1.7.1.
As You confirmed me that it is not possible to find the lduSolvers library I tried to change my /Make/options file with a last try, by erasing the lines that refer to lduSolvers etc....
Now the code looks like:
Code:
EXE_INC = \
 -I$(LIB_SRC)/turbulenceModels \
 -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
 -I$(LIB_SRC)/transportModels \
 -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
 -I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \
 -lincompressibleTurbulenceModel \
 -lincompressibleRASModels \
 -lincompressibleTransportModels \
 -lfiniteVolume \
 -lmeshTools
and now everything works fine: OpenFOAM-1.7.1 does not need this library anymore, or the same informations are hidden somewhere else...

Anyway, thanks again Norman for Your help

Paolo
Schipper is offline   Reply With Quote

Old   November 14, 2012, 16:01
Default OpenFoam 2.1.x cannot find -llduSolvers
  #4
Member
 
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 16
aldo.iannetti is on a distinguished road
Hi,
I have had the same problem trying to compile a OpenFoam 1.6.x solver in OF 2.1.x, I deleted in option file the line refering -llduSolvers and now it works but the solver is not able to monitor calling libSimpleObjectFunction library. Do you have any idea on why it happens?

Cheers

Aldo



Quote:
Originally Posted by Schipper View Post
Hi Norman,
thank You very much for Your answer.
As You mentioned, the code was written in OpenFOAM-1.5-dev and I tried to implement it in OpenFOAM-1.7.1.
As You confirmed me that it is not possible to find the lduSolvers library I tried to change my /Make/options file with a last try, by erasing the lines that refer to lduSolvers etc....
Now the code looks like:
Code:
EXE_INC = \
 -I$(LIB_SRC)/turbulenceModels \
 -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/RASModel \
 -I$(LIB_SRC)/transportModels \
 -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
 -I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = \
 -lincompressibleTurbulenceModel \
 -lincompressibleRASModels \
 -lincompressibleTransportModels \
 -lfiniteVolume \
 -lmeshTools
and now everything works fine: OpenFOAM-1.7.1 does not need this library anymore, or the same informations are hidden somewhere else...

Anyway, thanks again Norman for Your help

Paolo
aldo.iannetti is offline   Reply With Quote

Old   November 15, 2012, 03:59
Default
  #5
New Member
 
Paolo Schito
Join Date: Apr 2009
Location: Milano, Italy
Posts: 3
Rep Power: 17
Schipper is on a distinguished road
Hi Aldo,

The code for sampling in OpenFoam-2.1.x is:

Quote:
functions
{
probes
{
type probes;
functionObjectLibs ("libsampling.so");
enabled true;
outputControl timeStep;
outputInterval 1;
probeLocations
(
( 0.004 0.018 0 )
( 0.006 0.0295 0 )
( 0 0.0295 0)
);

fields
(
U
p
);
}

forces
{
type forces;
functionObjectLibs ("libforces.so");
outputControl timeStep;
outputInterval 1;
patches ("airfoil");
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1; // Reference density, fluid
CofR (0.25 0 0); // Origin for moment calculations
}


forceCoeffs
{
type forceCoeffs;
functionObjectLibs ("libforces.so");
enabled true;
outputControl timeStep;
outputInterval 1;
patches ("airfoil");
pName p;
UName U;
rhoName rhoInf;
log true;
rhoInf 1;
CofR ( 0.25 0 0 );//Center of rotation for moment calcs
liftDir ( 0 1 0 );
dragDir ( 1 0 0 );
pitchAxis ( 0 0 1 );
magUInf 1;
lRef 1;
Aref 1;
}
}
Schipper is offline   Reply With Quote

Old   November 15, 2012, 15:13
Default
  #6
Member
 
Aldo Iannetti
Join Date: Feb 2010
Posts: 48
Rep Power: 16
aldo.iannetti is on a distinguished road
Thanks for the answer,
That's exacly what I write in controlDict, the problem is that the forces, forceCoeffs, etc folders do not appear afterwards during calculation, without any warning or error. It seems that the lib has not been hooked at all and I don't know how to check or solve...

Regards

Aldo



Quote:
Originally Posted by Schipper View Post
Hi Aldo,

The code for sampling in OpenFoam-2.1.x is:
aldo.iannetti is offline   Reply With Quote

Old   July 14, 2020, 09:19
Default Solver compiling issues
  #7
New Member
 
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6
Elol is on a distinguished road
Hi Foamers,

So right now I have a solver multiphasedriftFluxFoam which is written for an old version (I don't know) is not compiling. The files in Make folder as follow;

Code:
compressibleTurbulenceModels.C
multiphaseDriftFluxFoam.C

EXE = $(FOAM_USER_APPBIN)/multiphaseDriftFluxFoam
and options file as follow;
Code:
EXE_INC = \
    -I./multiphaseRelativeVelocityModels/lnInclude \
    -I./multiphaseDriftMixture/lnInclude \
    -I$(FOAM_SOLVERS)/multiphase/driftFluxFoam/mixtureViscosityModels/lnInclude \
    -I$(LIB_SRC)/transportModels \
    -I$(LIB_SRC)/transportModels/incompressible/lnInclude \
    -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
    -I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude

EXE_LIBS = \
    -lfiniteVolume \
    -lmeshTools \
    -lfvOptions \
    -lsampling \
    -lmultiphaseRelativeVelocityModels \
    -lmultiphaseDriftMixture \
    -lturbulenceModels \
    -lcompressibleTurbulenceModels \
    -lincompressibleTransportModels \
    -ldriftFluxTransportModels
I compile the multiphaseRelativeVelocityModel and multiphaseDriftMixture seperately before I compile the solver. After compiling they go the /platforms/linux64GccDPInt32Opt/ lib as ".so " format. when I start to compile the solver it gives me an erro as follow;

Code:
/usr/bin/ld: cannot find -lmultiphaseRelativeVelocityModels
/usr/bin/ld: cannot find -lmultiphaseDriftMixture
collect2: error: ld returned 1 exit status
I dont understand what is wrong here, The libraries are there why the compiler can't read it ?

Thanks in advance
Elol is offline   Reply With Quote

Old   July 20, 2020, 08:48
Smile
  #8
New Member
 
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6
Elol is on a distinguished road
So guys,

I managed to solve this issue as I compiled in the $FOAM_SOLVERS not the user directory. I think there was some how a problem with the linker during the compilation process. I still don't understand why but this how it was worked.
ngrsun001 likes this.
Elol is offline   Reply With Quote

Old   August 11, 2020, 13:29
Default
  #9
New Member
 
Y
Join Date: Mar 2020
Posts: 1
Rep Power: 0
ngrsun001 is on a distinguished road
@Elol : I would like to know what do you mean user directory and $FOAM_SOLVERS directory. how did you compile in user directory previously ?


I'm trying to copy the viscoelasticFluidFoam solver from foam-extend4.0 to my openFoam1812 . when I try to compile solver using "wmake" I got error

/usr/bin/ld: cannot find -lviscoelasticTransportModels
/usr/bin/ld: cannot find -llduSolvers


where can i find these files ?
ngrsun001 is offline   Reply With Quote

Old   August 26, 2020, 06:31
Default
  #10
New Member
 
Elol
Join Date: Feb 2020
Posts: 16
Rep Power: 6
Elol is on a distinguished road
Hi ngrsun001,

Sorry for the late answer. I hope you found the solution already however here is some tips to help;

To understand what is the meaning of a user directory I suggest to follow this simple tutorial which is compiling a new solver in user directory not in the original directory of compiled $FOAM_SOLVERS OpenFOAM .

https://openfoamwiki.net/index.php/H...ure_to_icoFoam

The $FOAM_SOLVERS is the orginal directory of the solvers come from OpenFOAM, You can also play with the solvers this and compile them aswell, However I not recommend that because somesolvers share some libraries which might affect each other if you try to compile them later.

For your case, I suggest do a recheck on the files on Make directory and try to see if these libraries exist in this version of OpenFOAM . If there are not exist, I suggest you compile them first in the $FOAM_SOLVERS to create these libraries in the platform directory of OpenFOAM. and later if you wnat to change the solver or play with it go to the user directory/applications/solvers/yoursolver/ and compile it there
Elol is offline   Reply With Quote

Reply

Tags
cannot find, collect2, lldusolvers


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where can I find description of SIMPLEC? Evgueny Kalabin Main CFD Forum 9 June 7, 2016 05:14
How can I find a free Fortran77 numerical library? Alberto Main CFD Forum 3 January 21, 2008 01:56
I want to know how to find out the latex in redhat KK Main CFD Forum 4 July 5, 2007 05:00
how to find the talor micro scale from DNS data hanman Main CFD Forum 0 March 8, 2006 05:51
Where can find airfoil data with pressure distribution or aerodynamic data Ahlo Main CFD Forum 5 January 12, 1999 23:45


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