commit | b3a057e2281409bcb58fa12efe3ee08386aaafbc | [log] [tgz] |
---|---|---|
author | Philipp Schrader <philipp.schrader@gmail.com> | Sat Mar 10 18:59:40 2018 -0800 |
committer | Austin Schuh <austin.linux@gmail.com> | Wed Aug 01 19:57:24 2018 -0700 |
tree | b32f6fae147abb652705de457a471740eea946c5 | |
parent | da04721ac5b5e27d71645ff423fcb7f90741f5ad [diff] |
Don't link against explicit instances of libm, librt, etc.. The current way adds unnecessary RPATH entries into the binaries that aren't helpful. This patch just adds linkopts to the apprpriate targets to let the linker decide what to do. This should allow us to run binaries on Debian 8 that were compiled on Debian 9 with a sandboxed compiler. Change-Id: Icdec2ffbd12f83b72a4ab678b8fcbbb2adc12bc5
This is FRC Team 971's main code repository. There are README*
files throughout the source tree documenting specifics for their respective folders.
The main central location for our code is our Gerrit server at https://robotics.mvla.net/gerrit. To get a copy of the code on your computer to work with, follow these steps:
clone with commit-msg hook
command will save you trouble later.To learn more about git, see git(1) (man git
or git(1) (especially the NOTES section).
We want all code to at least have a second person look over it before it gets merged into the master
branch. Gerrit has extensive documentation on starting reviews. TL;DR: git push origin HEAD:refs/for/master
and then click on the link to add reviewers. If you just upload a change without adding any reviewers, it might sit around for a long time before anybody else notices it. git-review can make the upload process simpler.
The currently supported operating system for building the code is amd64 Debian Jessie. It is likely to work on any x86_64 GNU/Linux system, but that's not at all well-tested.
We use Bazel to build the code. Bazel has extensive docs and does a nice job with fast, correct increment rebuilds.
/etc/apt/sources.list.d/
.apt-get install -t jessie-backports openjdk-8-jdk apt-get install python libpython-dev bazel ruby clang-format-3.5 clang-3.6 gfortran libblas-dev liblapack-dev python-scipy python-matplotlib
doc/frc971.conf
.bazel test //... bazel build --cpu=roborio //...
bazel build --cpu=roborio --compilation_mode=opt //y2018/...
# First add a host entry in your ~/.ssh/known_hosts file for the roboRIO. # Do this by ssh'ing into the machine. If you problems doing this, see # the notes below for more information on how to connect to the roboRIO. ssh admin@roboRIO-971-frc.local # If you see an error like: # subprocess.CalledProcessError: Command '['rsync' ... # ERROR: Non-zero return code '1' from command: Process exited with status 1 # The above "ssh admin@roboRIO-971-frc.local" step has not been sucessfully completed. # If the roboRIO has been configued to use a static IP address like 10.9.71.2, # set the laptop to have an IP address on the 10.9.71.x subnet with a netmask # of 255.0.0.0. The ".x" is different than the .2 for the roboRIO or any other # device on the network. The driver station uses .5 or .6 so avoid those. # The radio uses .1 or .50 so avoid those too. If you are at the school, # disconnect from the student wireless network or try setting your netmask to # 255.255.255.0 if you want to be on both networks. The student wireless # network is on a 10.?.?.? subnet which can cause problems with connecting to # the robot. bazel run --cpu=roborio --compilation_mode=opt //y2018:download -- admin@roboRIO-971-frc.local # If this does not work, try bazel run --cpu=roborio --compilation_mode=opt //y2018:download -- admin@10.9.71.2 # If this does not work, it probably means that the robot and laptop are on # different subnets. They need to be on the same subnet for the laptop to # connect to the robot. Connecting can be confirmed by using ping. ping roboRIO-971-frc.local # or ping 10.9.71.2 # If this does not work, perhaps the roboRIO has not been configured to have # a static IP address. Use a USB cable to connect from a Windows laptop to # the roboRIO and use Internet Explorer (IE) to configure the roboRIO # to have a static IP address of 10.9.71.2. Inside IE, browse to # http://roborio-971-frc.local or http://172.22.11.2. Click on the "Ethernet" # icon on the left, select "Static" for the "Configure IPv4 Address" option. # Set the "IPv4 Address" to 10.9.71.2. Set the "Subnet Mask" to "255.0.0.0". # Finally click on "Save" at the bottom of the screen. If you have trouble # using an Ethernet cable, try using a USB cable. USB cables are much # more reliable for connecting than using a Ethernet cabe. USB cables work # for connecting to the robot on Windows and Linux computers. # Another option is to configure the laptop to have a link-local connection # by going using the "Network Settings" GUI. The laptop will then be on the # same subnet in the address range of 169.254.0.0 to 169.254.255.255. # James thinks this will only work over Ethernet (i.e., not USB; he is not # sure what will happen if you attempt this over USB), and if the robot # does *not* have a static IP address set and there is no DHCP server # assigning an IP address to the roboRIO. James says to also note that this # implies that the roboRIO will also have a 169.254.*.* IP addresss, and # that the only simple way to figure it out is to use mDNS. #
# Freshly imaged roboRIOs need to be configured to run the 971 code # at startup. This is done by using the setup_roborio.sh script. setup_roborio.sh roboRIO-971-frc.local
apt-get update apt-get install git subversion ruby python vim-gtk3 subversion-tools apt-get install vim-doc git-doc git-gui git-svn exim4-doc-html ruby apt-get install python python-scipy python-matplotlib libpython-dev apt-get install bazel clang-format-3.8 clang-3.8 openjdk-8-jdk apt-get install gfortran libblas-dev liblapack-dev avahi-daemon
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add - apt-get update
apt-get install apt-file apt-file update
apt-file search 'boost/property_tree/ptree.hpp' apt-get install libboost1.62-dev
apt-get install sysstat
iostat -dx 1
apt-get install gitg
sed -i -e 's/clang-format-3.5/clang-format-3.8/' aos/build/queues/compiler.rb
diff --git a/aos/build/queues/compiler.rb b/aos/build/queues/compiler.rb index 51646702..6a273ae9 100644 --- a/aos/build/queues/compiler.rb +++ b/aos/build/queues/compiler.rb @@ -77,7 +77,7 @@ def parse_args(globals,args) end def format_pipeline(output) read_in, write_in = IO.pipe()
sed -e 's?clang/3.6.2?clang/3.8.1?'
-e 's/clang-3.6/clang-3.8/'
-e 's/clang_3.6/clang_3.8/'
-e 's/llvm-3.6/llvm-3.8/'
-e 's?clang/3.6?clang/3.8?'
-i tools/cpp/CROSSTOOL
diff --git a/tools/cpp/CROSSTOOL b/tools/cpp/CROSSTOOL index d4e7fbb1..caa2f633 100644 --- a/tools/cpp/CROSSTOOL +++ b/tools/cpp/CROSSTOOL @@ -83,7 +83,7 @@ toolchain { tool_path { name: "compat-ld" path: "/usr/bin/ld" } tool_path { name: "cpp" path: "/usr/bin/cpp" } tool_path { name: "dwp" path: "/usr/bin/dwp" }
@@ -104,10 +104,10 @@ toolchain { cxx_builtin_include_directory: '/usr/include/x86_64-linux-gnu/c++/4.9' cxx_builtin_include_directory: '/usr/include/c++/4.9/backward' cxx_builtin_include_directory: '/usr/local/include'
cxx_builtin_include_directory: '/usr/lib/clang/3.8.1/include'
linker_flag: "-lstdc++" linker_flag: "-B/usr/bin/" @@ -535,7 +535,7 @@ toolchain { }
toolchain {
abi_version: "clang_3.8" abi_libc_version: "glibc_2.19" builtin_sysroot: "" compiler: "clang" @@ -578,7 +578,7 @@ toolchain {
compiler_flag: "-nostdinc" compiler_flag: "-isystem"
cxx_builtin_include_directory: '/usr/lib/clang/3.8/include'
linker_flag: "-target" linker_flag: "armv7a-arm-linux-gnueabif"
wget http://ftp.us.debian.org/debian/pool/main/i/isl/libisl10_0.12.2-2_amd64.deb dpkg -i libisl10_0.12.2-2_amd64.deb
time bazel build --cpu=roborio --compilation_mode=opt //y2018:download