Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with compiling #10

Open
mostanad opened this issue Sep 27, 2021 · 8 comments
Open

Problem with compiling #10

mostanad opened this issue Sep 27, 2021 · 8 comments

Comments

@mostanad
Copy link

mostanad commented Sep 27, 2021

Hi Zhang
What is this error mentioning?
cellenumerator.cpp:(.text+0x369): undefined reference to `Foam::meshSearch::findNearestCell(Foam::Vector const&, int, bool) const'
collect2: error: ld returned 1 exit status
Makefile:49: recipe for target 'sdfibm' failed
make: *** [sdfibm] Error 1

It's my error after I installed OF6. Then through your three commands, it shows the error.

@shashanktiwari619
Copy link

Hi Zhang
What is this error mentioning?
cellenumerator.cpp:(.text+0x369): undefined reference to `Foam::meshSearch::findNearestCell(Foam::Vector const&, int, bool) const' collect2: error: ld returned 1 exit status Makefile:49: recipe for target 'sdfibm' failed make: *** [sdfibm] Error 1
It's my error after I installed OF6. Then through your three commands, it shows the error.

this generally happens when your older links of functions and types are there in the old .so file,

better delete old .so files and recompile

@mostanad
Copy link
Author

Thanks or your reply. What .so file do you mean? There are so many of them in /lib or /usr/lib.

@mostanad
Copy link
Author

Still can't figure out what the problem is. I hope you can make it clear.

@shashanktiwari619
Copy link

To begin with...

  1. Tell us what Linux system are you using (also in case it is Linux running on WSL, mention it)?
  2. Have you checked that your OF6 is compiled correctly?
  3. Let us know the GCC version that you are using. You can check this using 'gcc -v'.

@mostanad
Copy link
Author

OK.
1- Ubuntu 16.04
2- Yes. I checked it through icoFoam -help. It works properly
3- This is the output of gcc command:
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/5/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 5.4.0-6ubuntu116.04.12' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1
16.04.12)

@mostanad
Copy link
Author

Still no opinion? I truly need to test our solver.

@lekhindia
Copy link

I encountered an error while installing, does anyone have a solution for this issue?

In file included from main.cpp:9:0:
createFields.h: In function ‘int main(int, char**)’:
createFields.h:7:20: error: invalid use of ‘Foam::solution::solution’
setRefCell(p, mesh.solution().dict().subDict("PISO"), pRefCell, pRefValue);
^~~~~~~~
Makefile:56: recipe for target 'main.o' failed
make: *** [main.o] Error 1

@hamedsedighi563
Copy link

Dear Zhang,
Thank you for “sdfibm” code. I successfully installed “sdfibm” solver and soft-linked it to a system-wide path. I also tested “OpenFOAM v9” by running the cavity case in both serial and parallel mode. I tried different “./Allrun” files to compile the code. None of them works. Can you please guide me how you already compile your solver? Is it possible to couple this solver to others solver for adding IBM to other computational and boundary condition? Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants