View Single Post
  #2   Spotlight this post!  
Unread 09-01-2017, 14:32
Thad House Thad House is online now
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,106
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Error while trying to setup NetworkTables on PC

Quote:
Originally Posted by jreneew2 View Post
Hello all, I have been trying to compile ntcore and cscore on a raspberry pi 3 and can not figure out the issue. Whenever I compile with

Code:
g++ -std=c++0x -I/home/pi/ntcore/include -lwpilibutil -lntcore test.cpp -o test `pkg-config --cflags --libs opencv`
The error I get is:

Code:
fatal error: llvm/ArrayRef.h: No such file or directory
I was able to successfully build the ntcore libs by doing

Code:
./gradlew :arm:build
All I have in the cpp file is #include<ntcore.h> and #include<networktables/NetworkTable.h>

Any help is appreciated
You need to add the wpiutil include path "wpiutil/include" to your build command as well. Also you need to be linking with wpiutil, not wpilibutil.

One thing to note is that roborio builds built with ./gradlew :arm:ntcore:build will NOT work with a raspberry pi. They are completely separate architectures. We provide some (untested) artifacts for pi and other hf devices on our maven repo. Our recommendation for Pi is to download the 3 artifacts (cscore, wpiutil and ntcore) from our maven repo, and build locally on the Pi using those artifacts. You can find more information here regarding which artifacts to use and how to find the right ones for your specific device.

If you do want to build your own builds, download the repositories and run "./gradlew :arm:ntcore:build -PcompilerPrefix=" on the pi itself with nothing specified after the compiler prefix. That will trick the build system into building the arm artifacts with the built in compiler.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote