Skip to content
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

Make go-ncs compile on Mac OS #2

Merged
merged 1 commit into from Aug 23, 2018
Merged

Conversation

@milosgajdos
Copy link
Contributor

@milosgajdos milosgajdos commented Jun 29, 2018

When building the package against the NCSDK V1 API locally on macOS I encountered the following error:

~/go/src/github.com/hybridgroup/go-ncs (master)$ go build
# github.com/hybridgroup/go-ncs
In file included from ./ncs.go:5:
./ncs.h:11:3: error: unknown type name 'uint'; did you mean 'int'?
  uint length;
  ^~~~
  int
1 error generated.

This was due to missing header file when compiling on macOS platform which this commit includes in the ncs.h file.

When building the package against the NCSDK V1 API locally on macOS I
encountered the following error:

./ncs.h:12:3: error: unknown type name 'uint'; did you mean 'int'?

This was due to missing header file which this commit includes
@deadprogram
Copy link
Member

@deadprogram deadprogram commented Jun 29, 2018

That is very cool @milosgajdos83 thanks for this. Also, how did you go about installing the SDK on macOS?

@milosgajdos
Copy link
Contributor Author

@milosgajdos milosgajdos commented Jun 29, 2018

I deleted my old comment @deadprogram as it turned into a complete mess. Here are the correct links to my forks that I made to get the NCSDK API working on my macOS:

I only got the API working so far -- in fact I haven't spent much time getting the rest of the toolkit working on macOS, so can't really say if it can even be done at the moment.

I forked the official SDK repo and made a few hacks on my macos-V1 branch here.

Everything compiles fine besides a few warnings that dont seem to be that important from the looks of it. Test examples seem to work.

I also tested the example program in this repo and it works perfectly fine too:

go run main.go
NCS: 8
Opening NCS device 8...
Closing NCS device 8...

I also have a few hacks to get the API V2 compiled on macOS on macos-V2 branch, but it seems the API V2 is broken and no one at Intel seems to be paying attention to their forums as you can see in my comment here.

Nevertheless, I have started hacking on poring API V2 to Go with a goal to then push it to this repo once I get something working here. I got device part of the API V2 building i.e. compiling - but sadly not working with movidius stick yet due to the errors I mentioned earlier (also listed in the README on macos-V2 fork)

@marktheunissen
Copy link

@marktheunissen marktheunissen commented Aug 6, 2018

@milosgajdos83 Hi, are you still working on the 2.0 API bindings for Go? This is something I might be interested in, too.

@milosgajdos
Copy link
Contributor Author

@milosgajdos milosgajdos commented Aug 7, 2018

Hi @marktheunissen I stopped for a bit as I was finishing my last freelance gig and wrapping things up.

I'll be picking it up this week -- there might be one thing which might prevent me from making more progress: APIv2 was broken on my work environment which is virtualbox. Intel claim to be aware of this as you can read here.

Some people suggested upgrading virtualbox and extensions - I'll be attempting that today and see if I can make it work so I can invest proper hacking time into it. I'll update the thread here.

@deadprogram
Copy link
Member

@deadprogram deadprogram commented Aug 7, 2018

Oh yeah pretty please! A number of people need this... like me!

@milosgajdos
Copy link
Contributor Author

@milosgajdos milosgajdos commented Aug 8, 2018

Ok so I made a bit of progress with this today. I've upgraded the virtualbox on my Mac to the latest available version along with extension packs.

After the upgrade I could run the basic examples shipped with the NCS SDK, however there is still some weird error being returned by SDK libraries. See my comments on the official forum. The example apps do work as they should though ¯_(ツ)_/¯

I have also tested the new virtualbox setup with my V2 bindings and it seems, ignoring the weird error I mentioned in the forum:

E: [         0] dispatcherEventReceive:200	dispatcherEventReceive() Read failed -1

that the communication with the NCS works and there should hopefully be nothing preventing me from restarting my work on this 🤞🤞🤞

@deadprogram
Copy link
Member

@deadprogram deadprogram commented Aug 23, 2018

Tested this with both El Capitan and also High Sierra. Works great, now merging. Thanks @milosgajdos83

@deadprogram deadprogram merged commit 4f61ca4 into hybridgroup:master Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.