Issue with LabJack on New Mac/iOS

Hi Chris,

I hope you are well. I am a graduate student in Mark Histed’s lab and I’ve been using MWorks to design my behavioral experiments. MWorks has been fantastic, thank you so much for running the project!

Recently, we’ve run into a small hitch related to running software on newer Macs with new operating systems, specifically Ventura. We’d like to be able to use the LabJack driver with both Intel and Apple hardware eventually, but to start, we are hoping to get it working while just compiling for Intel using Ventura. Here are our errors:

Ld /Users/friedmanng/Repositories/LabJackU6-hist/build/Development/LabJackU6Plugin.bundle/Contents/MacOS/LabJackU6Plugin normal (in target 'LabJackU6Plugin' from project 'LabJackU6Plugin')
    cd /Users/friedmanng/Repositories/LabJackU6-hist
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -Xlinker -reproducible -target x86_64-apple-macos10.14.6 -bundle -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -L/Users/friedmanng/Repositories/LabJackU6-hist/build/EagerLinkingTBDs/Development -L/Users/friedmanng/Repositories/LabJackU6-hist/build/Development -L/Library/Application\ Support/MWorks/Developer/lib/x86_64 -F/Users/friedmanng/Repositories/LabJackU6-hist/build/EagerLinkingTBDs/Development -F/Users/friedmanng/Repositories/LabJackU6-hist/build/Development -F/Library/Application\ Support/MWorks/Frameworks -F/Library/Frameworks -filelist /Users/friedmanng/Repositories/LabJackU6-hist/build/LabJackU6Plugin.build/Development/LabJackU6Plugin.build/Objects-normal/x86_64/LabJackU6Plugin.LinkFileList -Xlinker -object_path_lto -Xlinker /Users/friedmanng/Repositories/LabJackU6-hist/build/LabJackU6Plugin.build/Development/LabJackU6Plugin.build/Objects-normal/x86_64/LabJackU6Plugin_lto.o -stdlib\=libc++ -lusb-1.0 -framework MWorksCore -framework CoreFoundation -framework IOKit -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/friedmanng/Repositories/LabJackU6-hist/build/LabJackU6Plugin.build/Development/LabJackU6Plugin.build/Objects-normal/x86_64/LabJackU6Plugin_dependency_info.dat -o /Users/friedmanng/Repositories/LabJackU6-hist/build/Development/LabJackU6Plugin.bundle/Contents/MacOS/LabJackU6Plugin
ld: warning: dylib (/Library/Application Support/MWorks/Frameworks/MWorksCore.framework/MWorksCore) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(core.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(descriptor.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(hotplug.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(io.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(strerror.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(sync.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(events_posix.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(threads_posix.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
ld: warning: object file (/Library/Application Support/MWorks/Developer/lib/x86_64/libusb-1.0.a(darwin_usb.o)) was built for newer macOS version (11.0) than being linked (10.14.6)
Undefined symbols for architecture x86_64:
  "_SecTaskCopyValueForEntitlement", referenced from:
      _darwin_detach_kernel_driver in libusb-1.0.a(darwin_usb.o)
  "_SecTaskCreateFromSelf", referenced from:
      _darwin_detach_kernel_driver in libusb-1.0.a(darwin_usb.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
       Ld /Users/friedmanng/Repositories/LabJackU6-hist/build/Development/LabJackU6Plugin.bundle/Contents/MacOS/LabJackU6Plugin normal (in target 'LabJackU6Plugin' from project 'LabJackU6Plugin')
(1 failure)

We see the same error with the BlochSoundPlugin:

Undefined symbols for architecture x86_64:
  "mworks_boost::filesystem::detail::status(mworks_boost::filesystem::path const&, mworks_boost::system::error_code*)", referenced from:
      mw::BlochSound::BlochSound(mw::Map<mw::ParameterValue> const&) in BlochSound.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **


The following build commands failed:
       Ld /Users/friedmanng/Repositories/BlochSoundPlugin/build/UninstalledProducts/macosx/BlochSoundPlugin.bundle/Contents/MacOS/BlochSoundPlugin normal (in target 'BlochSoundPlugin' from project 'BlochSoundPlugin')
(1 failure)
(base) friedmanng@ns02261282md BlochSoundPlugin % xcodebuild -arch x86_64

Again, thank you, and let me know what you think.

Nina

Hi Nina,

The LabJack plugin’s Xcode project needed a small update. I’ve submitted a pull request with the change.

(Unrelatedly, I don’t understand why you’re building for macOS 10.14.6. That could be a problem, since, as the linker notes, the version of MWorks you’re compiling against was built for macOS 11.0. Maybe you need to get a clean copy of the plugin source code from GitHub?)

I’m not familiar with the BlochSound plugin. Is the code available somewhere I can see it?

Thanks,
Chris

Hi Chris,

Thank you so much! I will try again after we have merged the pull request.

Concerning the macOS- it didn’t look like there were builds for 10.14.6 yet so we tried building for 11.0, 13.3(newest option available), and using the automatic build option (“recommended macosx deployment target”). Maybe with the update there is a compatible version.

Here is the BlochSound plugin.

Thanks again!

Nina

Hi Nina,

If you’re running on macOS 10.14.6, you’ll have to use MWorks 0.11, which is the last MWorks release that supported that OS.

I think the GitHub repository for the BlochSound plugin must be private, as I’m not able to view it. If you’d like to me to look at the code, someone will need to give me access.

Thanks,
Chris

Hi Chris,

I hope you are well.

I wanted to close the thread here. The BlochSound plugin turned out to be an internal issue. Everything is working well currently with the LabJack.

Thanks for your help! But stay tuned for a separate issue in a moment :blush:

Nina