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

arm-frc-linux-gnueabi-gcc: init at 4.9.4 #24578

Closed
wants to merge 17 commits into from
Closed

arm-frc-linux-gnueabi-gcc: init at 4.9.4 #24578

wants to merge 17 commits into from

Conversation

colescott
Copy link
Contributor

@colescott colescott commented Apr 2, 2017

Motivation for this change

This adds support for FIRST Robotics Competition compiling to nix by adding a cross compiler and all necessary packages. Normally the compiler will take a lot of work to build in the userspace, but with this package it is all automated and compatible with nix.

This package is based on the arch version of the package: https://aur.archlinux.org/packages/arm-frc-linux-gnueabi-gcc/

DOES NOT SUPPORT MACOS
Support for macOS can be found here: http://first.wpi.edu/FRC/roborio/toolchains/

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@colescott, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zimbatm, @zraexy and @vcunat to be potential reviewers.

[
./minorSOname.patch
./no-nested-deprecated-warnings.patch
./format-error-fix.patch
Copy link
Member

@Mic92 Mic92 Apr 2, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would have been to just disable format warnings hardeningDisable = [ "format" ]; as the patch is relatively big. But I have no strong opinion here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to update it to include that and remove the patch. No need for all the extra file size on the repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@colescott
Copy link
Contributor Author

colescott commented Apr 2, 2017

Travis build failed due to 4MB log limit >.<

Is there a way to fix this? I would like to keep all the log output because it helps the user know the long compile is indeed working...

@colescott
Copy link
Contributor Author

colescott commented Apr 3, 2017

Just for reference this is the "error" that is killing the build:

The log length has exceeded the limit of 4 MB (this usually means that the test suite is raising the same exception over and over).

The job has been terminated

@Mic92
Copy link
Member

Mic92 commented Apr 3, 2017

yes, just keep the log as it is. Travis is only used here for pull requests.

@colescott
Copy link
Contributor Author

colescott commented Apr 3, 2017

Could a macOS person test this please? I don't have access to osx atm

Edit: mac isn't having this whole ar thing. I'll mark it as a linux only package

@colescott
Copy link
Contributor Author

macOS support removed because toolchain is available for OSX at http://first.wpi.edu/FRC/roborio/toolchains/

ar and tar were a bit of a pain here.

I think it is ready to be merged

@colescott
Copy link
Contributor Author

@Mic92 It won't pass Travis due to log size but it is ready to be merged.

@Mic92
Copy link
Member

Mic92 commented Apr 8, 2017

I rebased the patches here: https://github.com/Mic92/nixpkgs/commits/frc
If everything is still working for you, I would push this to master.

@Mic92 Mic92 closed this in ff1e372 Apr 8, 2017
@matthewbauer
Copy link
Member

So this is a pretty big build. I'm wondering if we can replace it with the new GCC cross compilation stuff? I definitely don't want to break anything if people are using this but our build farm can only build so much. These can take quite a while especially on Aarch64:

https://hydra.nixos.org/build/58556003

/cc @Ericson2314

@Ericson2314
Copy link
Member

Yeah, this cross compiliation infra should allow this to be removed.

@matthewbauer
Copy link
Member

matthewbauer commented Apr 11, 2018

Is there a way we can do a compatibility alias for this? Not sure what the "equivalent" would be for arm-frc-linux-gnueabi-gcc.

@Ericson2314
Copy link
Member

Ericson2314 commented Apr 11, 2018

@matthewbauer Yes, we can do it like pkgsi686Linux and xbursttools. See https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L20-L28 and the use of nixpkgsFun to recur. Also see https://github.com/NixOS/nixpkgs/blob/master/pkgs/top-level/all-packages.nix#L5640-L5665 for xbursttools and cross in particular. I was hoping to get rid of nixpkgsFun eventually, but I suppose the compat alias will only be temporary.

@matthewbauer
Copy link
Member

Just reverted. Don't have time to test the alias. If this breaks anyone's workflow, we can definitely add it though.

@Ericson2314
Copy link
Member

Ericson2314 commented Apr 12, 2018

It's like exactly a year so maybe that competition is about to begin again anew! haha. As penance for laughing at breaking an interface, I offer this: Ping me, o robotics wizzard whoever you may be, if you need an alias, and I will make one.

@matthewbauer
Copy link
Member

Lol- I think FIRST starts in January though

@colescott
Copy link
Contributor Author

Yeah, I made this as a post-season project last year but I'm not especially interested in supporting it after I have stopped doing FIRST. It's probably best to leave it reverted and if someone new wants to add it they know where to start from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants