OpenMP's symbols not found? - openmp

I have a problem about a make to install a software called ‘URANIE’, which is a scientific computing platform. By the way, I am on macOS Catalina 10.15.4.
When I did the make, here is what the terminal said :
*[ 64%] Linking CXX shared library libUranieModeler.so
ld: warning: -L path '/usr/lib/libxml2.dylib' is not a directory
Undefined symbols for architecture x86_64:
"___kmpc_for_static_fini", referenced from:
_.omp_outlined. in TkNN.cxx.o
_.omp_outlined..36 in TkNN.cxx.o
_.omp_outlined..49 in TkNN.cxx.o
"___kmpc_for_static_init_4", referenced from:
_.omp_outlined. in TkNN.cxx.o
_.omp_outlined..36 in TkNN.cxx.o
_.omp_outlined..49 in TkNN.cxx.o
"___kmpc_fork_call", referenced from:
URANIE::Modeler::TkNN::estimate_cpu(char const*) in TkNN.cxx.o
URANIE::Modeler::TkNN::LSort(int, double*, int*, int) in TkNN.cxx.o
"___kmpc_global_thread_num", referenced from:
_.omp_outlined. in TkNN.cxx.o
_.omp_outlined..36 in TkNN.cxx.o
_.omp_outlined..49 in TkNN.cxx.o
"_omp_set_num_threads", referenced from:
URANIE::Modeler::TkNN::estimate_cpu(char const*) in TkNN.cxx.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [meTIER/modeler/souRCE/libUranieModeler.4.3.0.so] Error 1
make[1]: *** [meTIER/modeler/souRCE/CMakeFiles/UranieModeler.dir/all] Error 2
make: *** [all] Error 2*
My computer skills are limited so I don't really understand this error. I already did some research about it, but did not find any solution to my issue. I only understood that these symbols that aren’t found have a connection with OpenMP, if I am not mistaken. I installed open-mpi with brew and libopenmpt too. I also checked if open-mpi was well linked and it's the case, but I don't know if this information can help.
If someone can help me about this problem or can give me some advice to understand this error, I would appreciate it a lot.
If you need further information don't hesitate to reach me,, thanks in advance.

Related

Build failure, due to undefined symbol for architecture i386

I am not sure what changes in the app code, and I started seeing this build failures
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_ProfileViewController", referenced from:
objc-class-ref in LoginViewController.o
"_OBJC_CLASS_$_SystemViewController", referenced from:
objc-class-ref in LoginViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The code was building and running fine with iOS7.1 or 6.0, with Xcode 5. However, I was not sure of the changes, so I reverted everything. But still I am seeing this failure. It is pointing to the three classes, but at this point there is no changes in the thress classes,
ProfileViewController, SystemViewController, LoginViewController
Any help will be appreciated ! Thanks in advance !

multiple errors with my audio toolbox

i have 3 errors and one warning when trying to play sound on my app. i am fairly new to xcode.
ld: warning: ignoring file /Users/harrisschrick/Documents/Test app/AudioToolbox.framework/AudioToolbox, missing required architecture x86_64 in file /Users/harrisschrick/Documents/Test app/AudioToolbox.framework/AudioToolbox (3 slices)
Undefined symbols for architecture x86_64:
"_AudioServicesCreateSystemSoundID", referenced from:
-[humordepotViewController viewDidLoad] in humordepotViewController.o
"_AudioServicesPlaySystemSound", referenced from:
-[humordepotViewController PlayAudioButton:] in humordepotViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
any help at all would be amazing!

Xcode error - Undefined symbols for architecture x86_64:

I have this error in XCode:
Undefined symbols for architecture x86_64:
"Parser::Parser(char const*)", referenced from:
___cxx_global_var_init in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Very common reason is using a static library that is compiled for 32 bit only.

Trying build OpenNI samples with CMakeLists.txt but getting error

I have mad my own CMakeLists.txt file to build OpenNI samples. I successfully build NiSimpleViewer. But when try with NiUserTracker I get this error:
35 warnings generated.
Linking CXX executable main
ld: warning: path '/usr/lib/libOpenNI.dylib' following -L not a directory
Undefined symbols for architecture x86_64:
"DrawDepthMap(xn::DepthMetaData const&, xn::SceneMetaData const&)", referenced from:
glutDisplay() in main.cpp.o
"MyPoseInProgress(xn::PoseDetectionCapability&, char const*, unsigned int, XnPoseDetectionStatus, void*)", referenced from:
_main in main.cpp.o
"MyCalibrationInProgress(xn::SkeletonCapability&, unsigned int, XnCalibrationStatus, void*)", referenced from:
_main in main.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [main] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2
This is the CMakeLists I use. Plese tell me what's wrong with it?
http://pastebin.com/SMYjjU35
The contents of folder outside build/ are
CMakeLists.txt Libs build opengles.cpp
GL SceneDrawer.cpp glh opengles.h
GLES SceneDrawer.h main.cpp
I guess, it's because of this line:
link_directories(${OPENNI_LIBRARY})
The link_directories() command sets path where libraries should be searched for, so you need something like ${OPENNI_LIBRARY_DIRS} there.

Compiling C/C++ application using SDL in OS X, linking problem

I'm trying to compile a C/C++ program that uses SDL on a OS X 10.6.8 but I'm having some errors on the linking stage, the code compiles but fails to like due to some missing symbols. The error is:
Undefined symbols for architecture x86_64:
"_CFBundleGetMainBundle", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
_main in libSDLmain.a(SDLMain.o)
"_CFBundleCopyBundleURL", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFURLCreateCopyDeletingLastPathComponent", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFURLGetFileSystemRepresentation", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
"_CFRelease", referenced from:
-[SDLMain setupWorkingDirectory:] in libSDLmain.a(SDLMain.o)
...
"_OBJC_CLASS_$_NSAutoreleasePool", referenced from:
objc-class-ref in libSDLmain.a(SDLMain.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make: *** [dist/linwarrior] Error 1
I checked with the file command and the libraries are either x86_64 only or universal with both i386 and x86_64 versions.
Is there a way for me to determine what exactly is causing this error? A way to check the libs that are being included or any way to help debug the problem?
I don't know if it helps but this is what my Makefile creates, I removed file names to make it short, and the KNT flag is just something I'm using for preprocessor conditions:
/opt/local/bin/g++-mp-4.5 -DKNT=1 -Wp,-M,-MP,-MT,-MF, -std=c++0x -Wall -I source -O1 -funroll-loops -c -o
Thanks.

Resources