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

Weird Problem while compiling new library

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By ashish.vinayak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 22, 2019, 07:38
Default Weird Problem while compiling new library
  #1
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Hello everyone,

I am trying to compile $FOAM_SRC/transportModels separately since I want to rewrite the $FOAM_SRC/transportModels/interfaceProperties library. I created $WM_PROJECT_USER_DIR/src folder and copied $FOAM_SRC/transportModels to it.

The library seems to compile correctly and is present in $FOAM_USER_LIBBIN. I then copied interFOAM to $WM_PROJECT_USER_DIR/applications to compile the solver based on this "new" libraries. Changed all the required data in Make/options as well. However, when I try to compile interFOAM using these "new" libraries, I get undefined references. I have attached the error report for the solver compilation. Has someone faced this or a similar kind of problem?

I can provide all the information required, if someone is able to help me !

PS. OpenFOAM-5.x
ashish.vinayak is offline   Reply With Quote

Old   February 22, 2019, 08:37
Default
  #2
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Okay, I seem to have solved the problem myself. Turns out that wmake does not return any error if it does not find the correct file in the linking process.

For future reference:
ldd libname.so
can be used to find which files are not linked correctly and then the correct links can be established.
Daniel_Khazaei likes this.
ashish.vinayak is offline   Reply With Quote

Old   March 14, 2019, 09:46
Default
  #3
New Member
 
Join Date: Jul 2017
Posts: 4
Rep Power: 8
dviam is on a distinguished road
Quote:
Originally Posted by ashish.vinayak View Post
Okay, I seem to have solved the problem myself. Turns out that wmake does not return any error if it does not find the correct file in the linking process.

For future reference:
ldd libname.so
can be used to find which files are not linked correctly and then the correct links can be established.
Can you expound on the steps you took to get the linking done properly? I am having a similar issue where my new library compiles properly but when I try to compile the solver using wmake, I am getting undefined references errors. To my knowledge, the Make options file is correctly pointing to the new library.
dviam is offline   Reply With Quote

Old   March 15, 2019, 10:39
Default
  #4
Member
 
Ashish Vinayak
Join Date: Mar 2015
Location: Wuppertal, Germany
Posts: 50
Rep Power: 11
ashish.vinayak is on a distinguished road
Quote:
Originally Posted by dviam View Post
Can you expound on the steps you took to get the linking done properly? I am having a similar issue where my new library compiles properly but when I try to compile the solver using wmake, I am getting undefined references errors. To my knowledge, the Make options file is correctly pointing to the new library.
I would suggest you look if all the supported libraries are linked properly. Use

>> ldd libname.so

where libname is the library in the USER OpenFOAM directory (OpenFOAM/usrname/platforms/linuxXYZOpt/libs/libname.so) and post the output so that I could help you debug.
ashish.vinayak is offline   Reply With Quote

Reply

Tags
library solver linking

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Problem in compiling fluent UDF lunched from MATLAB cfdman10 Fluent UDF and Scheme Programming 16 December 5, 2019 05:32
Problem linking library AlmostSurelyRob OpenFOAM Programming & Development 19 March 1, 2017 09:59
Compiling library changes Stephen Waite OpenFOAM Programming & Development 4 August 26, 2016 19:41
Compiling library and linking it to a solver criolla OpenFOAM 2 July 27, 2016 03:13
Problem compiling custom boundary condition as a library leroyv OpenFOAM Programming & Development 2 January 21, 2014 10:44


All times are GMT -4. The time now is 00:59.