-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
symbol not found in flat namespace '_ompi_mpi_byte' #91
Comments
Hi, It looks like architecture mix. By make rules were made for
While Homebrew-installed |
Hi, Thanks for you reply. I tired to put arm64 instead of x86_64 in wmake/rules/darwin64Clang/c++ and wmake/rules/darwin64Clang/c and then recomplied. But i get some error message during ./Allwmake ``` /Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/word.HIn file included from :/Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/string.H42::
error: In file included from /Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/string.H51:51:
reference to unresolved using declarationIn file included from :
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string
In file included from :/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string527::
527:
_VSTD::memcpy(&__r, __p, sizeof(__r));/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/hash.h::37 ^37:
:1212:: error: error: reference to unresolved using declarationreference to unresolved using declaration
In file included from 99/Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/wchar.h:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwd:In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__mbstate_t.h:29:
:99/Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/wchar.h:
:62In file included from :/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__mbstate_t.h4262:::29 42:
: /Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/wchar.herror: :error: no type named 'wstring' in namespace 'std'62:42:no type named 'wstring' in namespace 'std'
error: no type named 'wstring' in namespace 'std'
Ostream& operator<<(Ostream&, const std::wstring&);
Ostream& operator<<(Ostream&, const std::wstring&); ~~~~~^
Ostream& operator<<(Ostream&, const std::wstring&); ~~~~~^
~~~~~^
/Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/string.HIn file included from :/Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/int32.H51:error: :
43In file included from :
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/stringIn file included from reference to unresolved using declaration:/Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/word.H529:
:
42In file included from :
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__ios/fpos.hIn file included from :/Users/liqiaoqiao/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/string.H:typedef fpos<mbstate_t> streampos;51
14 ^:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwdIn file included from :230/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__mbstate_t.h:::4414:529:1:
:In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__ios/fpos.h:error: 14note: :
using declaration annotated with 'using_if_exists' here/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/iosfwdreference to unresolved using declaration:
230:14: using ::mbstate_t _LIBCPP_USING_IF_EXISTS;
typedef fpos<mbstate_t> streampos;error:
^
^reference to unresolved using declaration
In file included from UPstream.C:26/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__mbstate_t.h:
:typedef fpos<mbstate_t> streampos;44
:1 ^:
In file included from /Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/UPstream.H :/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__mbstate_t.hnote: 42:
In file included from :/Users/OpenFOAM/OpenFOAM-5.x/src/OpenFOAM/lnInclude/labelList.H44using declaration annotated with 'using_if_exists' here
::471: I am try to compile OpenFOAM-5.x-7f7d351b7.patch, i am not sure where i did wrong. Should i try other patches to see if there is same error? Many thanks. |
Well, it seems, we need more information. Could you post output of:
|
Hi,
Many thank for your reply. Regards, |
Things are a bit complicated, cause I do not have access to Apple's ARM platform, and I have never tried to compile 5.x with current compiler. So, I would propose:
|
You should be able to fix this by installing Xcode and the Command line Tools before building OpenFOAM. Then wmake/rules/darwin64Clang/c++ and wmake/rules/darwin64Clang/c will reference -m64 and not x86-64 |
FYI, I also have this issue on my M3 Mac. I am not sure of the cause of the problem, but I suspect it is related to linking to libPstream or libmpi. I will post here if I progress, but I am happy to hear about others' experiences. |
The
I am not sure why this symbol is not found, if mpi is being linked correctly, which it seems to be... |
Problem solved: your solution here works. That is, in However, this leads to an error when compiling
and comment lines 215 and 216
Everything now works correctly, including in parallel. Creating a dedicated |
Thank you for the feedback. Yes, commented-out parts are Intel-specific. OpenFOAM.com solved problem of sigFPE on ARM-based Macs. I will try to add the solution to OpenFOAM.org patches, though I won't be able to test them. As soon as I update the patches, I will create an issue for testing. |
Hi,
I have successfully build Openfoam-5.x in M2, but when i try to run simplefoam or blockmesh i get this message:
%simpleFoam
dyld[1343]: symbol not found in flat namespace '_ompi_mpi_byte'
zsh: abort simpleFoam
%blockMesh
dyld[1654]: symbol not found in flat namespace '_ompi_mpi_byte'
zsh: abort blockMesh
Can you help me to solve this problem. Many thanks.
The text was updated successfully, but these errors were encountered: