I'm trying to compile gem5 on mac os.
I have solved 3 problem that faced until now, but i'm stopped at the last error.
The error says :
Undefined symbols for architecture x86_64:
"PyTrafficGen::start(pybind11::object)", referenced from:
module_init(pybind11::module&) in lib.o.partial
"typeinfo for PyTrafficGen", referenced from:
pybind11::detail::type_caster_base::cast(PyTrafficGen const*, pybind11::return_value_policy, pybind11::handle) in lib.o.partial
pybind11::class_<PyTrafficGen, BaseTrafficGen, std::1::unique_ptr<PyTrafficGen, pybind11::nodelete> >::class<>(pybind11::handle, char const*) in lib.o.partial
pybind11::class<PyTrafficGen, BaseTrafficGen, std::__1::unique_ptr<PyTrafficGen, pybind11::nodelete> >::init_instance(pybind11::detail::instance*, void const*) in lib.o.partial
_ZZN8pybind1112cpp_function10initializeIZNS0_C1INSt3__110shared_ptrI7BaseGenEE12PyTrafficGenJyEJNS_4nameENS_9is_methodENS_7siblingEEEEMT0_FT_DpT1_EDpRKT2_EUlPS7_yE_S6_JSL_yEJS8_S9_SA_EEEvOSC_PFSB_SE_ESK_ENKUlRNS_6detail13function_callEE_clESS in lib.o.partial
_ZZN8pybind1112cpp_function10initializeIZNS0_C1INSt3__110shared_ptrI7BaseGenEE12PyTrafficGenJyyyyyyhyEJNS_4nameENS_9is_methodENS_7siblingEEEEMT0_FT_DpT1_EDpRKT2_EUlPS7_yyyyyyhyE_S6_JSL_yyyyyyhyEJS8_S9_SA_EEEvOSC_PFSB_SE_ESK_ENKUlRNS_6detail13function_callEE_clESS in lib.o.partial
_ZZN8pybind1112cpp_function10initializeIZNS0_C1INSt3__110shared_ptrI7BaseGenEE12PyTrafficGenJyyyyyyhyjjjjjjEJNS_4nameENS_9is_methodENS_7siblingEEEEMT0_FT_DpT1_EDpRKT2_EUlPS7_yyyyyyhyjjjjjjE_S6_JSL_yyyyyyhyjjjjjjEJS8_S9_SA_EEEvOSC_PFSB_SE_ESK_ENKUlRNS_6detail13function_callEE_clESS in lib.o.partial
_ZZN8pybind1112cpp_function10initializeIZNS0_C1INSt3__110shared_ptrI7BaseGenEE12PyTrafficGenJyyyyyyhyjjjjjjjEJNS_4nameENS_9is_methodENS_7siblingEEEEMT0_FT_DpT1_EDpRKT2_EUlPS7_yyyyyyhyjjjjjjjE_S6_JSL_yyyyyyhyjjjjjjjEJS8_S9_SA_EEEvOSC_PFSB_SE_ESK_ENKUlRNS_6detail13function_callEE_clESS in lib.o.partial
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation).
Mac os High Sierra 10.13.6
clang version:
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Any solution?
I found the solution.
The changes in below link cause this error :
https://gem5-review.googlesource.com/c/public/gem5/+/11518/
You can revert changes in SConscript file at “gem5/src/cpu/testesr/traffic-gen/SConscript” and try co compile .
I could compile fine and run a spare benchmark with revert the changes in SConscript file like below :
Import('*')
Source('base.cc')
Source('base_gen.cc')
Source('dram_gen.cc')
Source('dram_rot_gen.cc')
Source('exit_gen.cc')
Source('idle_gen.cc')
Source('linear_gen.cc')
Source('random_gen.cc')
Source('stream_gen.cc')
DebugFlag('TrafficGen')
SimObject('BaseTrafficGen.py')
#if env['USE_PYTHON']:
# Source('pygen.cc', add_tags='python')
# SimObject('PyTrafficGen.py')
# Only build the traffic generator if we have support for protobuf as the
# tracing relies on it
if env['HAVE_PROTOBUF']:
SimObject('TrafficGen.py')
Source('trace_gen.cc')
Source('traffic_gen.cc')
Hope works fine for everyone who face same error.
Cheers ,
Belal.
Related
I have seen similar issues on here which has led me to believe i need to link binary files with library. However, i cannot figure out which ones i need, can any one help me with this ? I have macOS catalina 10.15.3, xcode 10.3, gamemaker 2.2.5.481 and runtime v2.2.5.378
here is my error message:
Undefined symbols for architecture x86_64:
"___isPlatformVersionAtLeast", referenced from:
UpdateIOSControllers() in libyoyo_interpreted.a(IOSGamepad.o)
_SetHomeIndicatorDeferOption in libyoyo_interpreted.a(RunnerViewController.o)
-[RunnerViewController viewDidLoad] in libyoyo_interpreted.a(RunnerViewController.o)
Achievement_TeamPlayerID() in libyoyo_interpreted.a(YoYo_GameCenter.o)
Achievement_GamePlayerID() in libyoyo_interpreted.a(YoYo_GameCenter.o)
PB_Challenges(HTTP_REQ_CONTEXT*, void*, int*) in libyoyo_interpreted.a(YoYo_GameCenter.o)
PB_PlayerPic(HTTP_REQ_CONTEXT*, void*, int*) in libyoyo_interpreted.a(YoYo_GameCenter.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Bluetooth gamepad support is added in iOS 13, which requires XCode 11 to work; you probably only need to upgrade xcode.
Reference:
https://forums.developer.apple.com/thread/123003
I am trying to update the DJI SDK of my app to the latest version (i.e. v4.10 for DJISDK/UXSDK and v1.5 for DJIWidget) in order for it to be compatible with Matrice 200 V2 series. I have come across an error which I was able to reproduce as well with the sample application from the DJI Mobile-UXSDK-iOS repo.
Basically when I try to archive the app it have this error showing up:
ld: warning: directory not found for option '-F/Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Frameworks'
ld: warning: directory not found for option '-F/Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/../DJIWidget'
ld: warning: ignoring file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-UXSDK-iOS/iOS_UXSDK/DJIUXSDK.framework/DJIUXSDK, missing required architecture armv7 in file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-UXSDK-iOS/iOS_UXSDK/DJIUXSDK.framework/DJIUXSDK (2 slices)
ld: warning: ignoring file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-SDK-iOS/iOS_Mobile_SDK/DJISDK.framework/DJISDK, missing required architecture armv7 in file /Users/nachocarnicero/git/Mobile-UXSDK-iOS/Sample Code/ObjcSampleCode/Pods/DJI-SDK-iOS/iOS_Mobile_SDK/DJISDK.framework/DJISDK (2 slices)
Undefined symbols for architecture armv7:
"_OBJC_CLASS_$_DUXBatteryWidget", referenced from:
_OBJC_CLASS_$_MyBatteryWidget in MyBatteryWidget.o
objc-class-ref in PanelsCollectionsViewController.o
"_OBJC_METACLASS_$_DUXDefaultLayoutViewController", referenced from:
_OBJC_METACLASS_$_DefaultLayoutViewController in DefaultLayoutViewController.o
"_OBJC_METACLASS_$_DUXBatteryWidget", referenced from:
_OBJC_METACLASS_$_MyBatteryWidget in MyBatteryWidget.o
"_OBJC_CLASS_$_DUXStatusBarViewController", referenced from:
objc-class-ref in PanelsCollectionsViewController.o
"_OBJC_CLASS_$_DUXDefaultLayoutViewController", referenced from:
_OBJC_CLASS_$_DefaultLayoutViewController in DefaultLayoutViewController.o
"_OBJC_CLASS_$_DJISDKManager", referenced from:
objc-class-ref in MainViewController.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Before this version everything worked fine, so I guess it is a problem with the newest DJI SDK version.
I am using the ObjectiveC sample code, and the app works fine in debug mode running it on an iPad Pro.
In case anyone is running into this problem, it seems that the new DJI SDK is not compatible with armv7 architectures, so the solution here is to go to the XCode Build Settings tab of your project and remove armv7 under Valid Architectures as it was done by this commit on the DJI Mobile-SDK-iOS repo.
I have a program in Qt creator that compiles and runs fine in a Windows machine. But as soon as I tried to compile it in a Mac OS X (10.9) I received these messages:
Undefined symbols for architecture x86_64:
"std::__1::__basic_string_common<true>::__throw_length_error() const", referenced from:
std::__1::enable_if<__is_forward_iterator<char*>::value, void>::type std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::__init<char*>(char*, char*) in libVolumeSelectorLib.a(NetCDFDataSource.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: *** [UI.app/Contents/MacOS/UI] Error 1
14:38:02: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project VVSIT (kit: Desktop Qt 5.4.0 clang 64bit)
When executing step "Make"
I have tried cleaning and compiling again in case some file built on Windows had made it to the Mac, but that is not the case, the problem continues happening.
I've checked these posts but their solutions didn't work:
Undefined symbols for architecture x86_64 in QT-creator
https://stackoverflow.com/questions/23806544/undefined-symbols-for-architecture-x86-64-in-qt-creator
Any idea how to solve this error?
After some research I found this thread: Qt5.1/Qt5.2 + XCode 5.0.2 + Mac OS 10.9 (Mavericks), Can’t link to the libraries
That link contains the solution that worked for me, I had to edit the file:
/Applications/Qt/5.4/clang_64/mkspecs/macx-clang/qmake.conf
And change the line that says:
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.7
to:
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.9
After that, I cleaned every subproject in my project, and compiled them again, and all is working fine now.
In case you wonder what does that change in the clang++ do, what it does is to change the parameter -mmacosx-version-min=10.7 to -mmacosx-version-min=10.9.
Trying to compile using libCorePlot for arm64. I copied the instructions from here Using Core Plot 2 in an Xcode 5 project
lipo libCorePlot-CocoaTouch.a -info
Architectures in the fat file: libCorePlot-CocoaTouch.a are: armv7 i386 x86_64 arm64
Undefined symbols for architecture arm64:
"_vDSP_minvD", referenced from:
-[CPTPlot plotRangeForField:] in libCorePlot-CocoaTouch.a(CPTPlot.o)
"_vDSP_maxvD", referenced from:
-[CPTPlot plotRangeForField:] in libCorePlot-CocoaTouch.a(CPTPlot.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
This is fixed in later Core Plot releases. Release 1.5.1 has been out since March 2014.
For users still experiencing this after downloading the latest release, simply link the
Accelerate.framework
to your app. The latest 2.2+ static library releases will now work properly.
I'm using Qt4.8 on OSX Leopard and instead of qmake+QtCreator I want to compile a very simple project using CMake on OSX to understand how to do a package.
While the very same project compiles and links smoothly under Linux, under my OSX box, this is the error message I always get in the linking phase:
ld warning: in /Library/Frameworks//QtGui.framework/QtGui, file is not of required architecture
ld warning: in /Library/Frameworks//QtCore.framework/QtCore, file is not of required architecture
Undefined symbols:
"QWidget::mousePressEvent(QMouseEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QObject::childEvent(QChildEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QWidget::actionEvent(QActionEvent*)", referenced from:
vtable for TestFormin moc_TestForm.cxx.o
"QCoreApplication::translate(char const*, char const*, char const*, QCoreApplication::Encoding)", referenced from:
etcetera etcetera.
This happens for every project I want to compile with cmake.
Any idea of what's going on?
Check what architecture (i386,x86_64) is being used by cmake (CMAKE_OSX_ARCHITECTURES). Try suggesting the architecture to cmake:
cmake -DCMAKE_OSX_ARCHITECTURES=x86_64