Glickfeld lab support - Xcode error when compiling labjack bundle

Jennifer Li's Avatar

Jennifer Li

19 Mar, 2021 12:49 PM

Hi Chris,

My name is Jenny and I'm a grad student in Lindsey's lab. I am setting up Mworks on a new computer in the lab, and when trying to run the Labjack plugin project in Xcode, I've been coming across this error. The file exists though, in the liblabjackusb folder. Have you had this issue in the past and do you know how to resolve it?

On another note, I first tried to compile it with a newer version of Xcode (12, now using 10.2 instead) and had some separate issues. Do you expect there to be a version-dependence for running this? Just for my future reference.

Thanks in advance for your help.

Best
Jenny

  1. Support Staff 1 Posted by Christopher Sta... on 19 Mar, 2021 01:19 PM

    Christopher Stawarz's Avatar

    Hi Jenny,

    Assuming you're building the source code from the LabJackU6_Plug-in repository, it sounds like you need to install the Exodriver package. Among other things, that will create the file /usr/local/include/labjackusb.h, which is what Xcode needs. (The copy in liblabjackusb isn't actually used.)

    (FYI, I see that a pull request I submitted a while ago still hasn't been merged. Without this, the plugin will fail to build against MWorks 0.10 and nightly builds from the past year or so.)

    As for Xcode version, the latest (currently 12.4) is almost always the right choice. That said, if you're trying to compile a plugin against an MWorks version that's more than a year or two old, you may run in to issues when using the latest Xcode. If you want to send me the details of the issues your were having with Xcode 12, I can try to sort them out.

    Cheers,
    Chris

  2. 2 Posted by Jennifer Li on 19 Mar, 2021 04:27 PM

    Jennifer Li's Avatar

    Hi Chris,

    Thanks for your quick reply. I've already downloaded the exodriver package and also merged the pull request you mentioned. However, I am still running into the same issue.

    After talking to people at LabJack, it seems that it's actually some issue with Xcode finding the labjackusb.h file. Maybe something to do with folder permissions?

    For example, when I originally built the U6 example program in terminal as indicated here<https://labjack.com/support/software/installers/exodriver>, it gave me the same issue, which was that it could not find the labjackusb.h file. However, when I ran it as "sudo make" instead, it was able to do it just fine. I'm wondering whether this is the same issue in Xcode, although I am not sure how to resolve it.

    Thanks again.

    Jenny

  3. Support Staff 3 Posted by Christopher Sta... on 19 Mar, 2021 06:19 PM

    Christopher Stawarz's Avatar

    Hi Jenny,

    when I originally built the U6 example program in terminal as indicated here, it gave me the same issue, which was that it could not find the labjackusb.h file. However, when I ran it as "sudo make" instead, it was able to do it just fine.

    That does sound like a permissions issue. Try running the following commands in Terminal:

    sudo chmod go+rx /usr/local /usr/local/include /usr/local/lib
    sudo chmod go+r /usr/local/include/labjackusb.h
    

    Hopefully that will resolve the problem. If not, please let me know!

    Chris

  4. 4 Posted by Jennifer Li on 19 Mar, 2021 06:27 PM

    Jennifer Li's Avatar

    Worked this time. Thanks so much!

  5. Support Staff 5 Posted by Christopher Sta... on 19 Mar, 2021 06:53 PM

    Christopher Stawarz's Avatar

    Great!

  6. Christopher Stawarz closed this discussion on 24 Mar, 2021 08:22 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac