Go to Post I love math... :D - Eric W. Jones [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 09-01-2017, 11:53
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 203
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Error while trying to setup NetworkTables on PC

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
Reply With Quote
  #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,100
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
  #3   Spotlight this post!  
Unread 09-01-2017, 15:12
jreneew2's Avatar
jreneew2 jreneew2 is offline
Alumni of Team 2053 Tigertronics
AKA: Drew Williams
FRC #2053 (TigerTronics)
Team Role: Programmer
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Vestal, NY
Posts: 203
jreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura aboutjreneew2 has a spectacular aura about
Re: Error while trying to setup NetworkTables on PC

Quote:
Originally Posted by Thad House View Post
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.
Thanks! I figured it out with your help!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:13.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi