Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Alternate GCC Toolchain (http://www.chiefdelphi.com/forums/showthread.php?t=109385)

AlexBrinister 10-03-2013 11:53

Re: Alternate GCC Toolchain
 
@MaraschinoPanda

Looks like you're not specifying -std=gnu++11 on the gcc command line

This is one of your compile lines:

Code:

/usr/local/bin/powerpc-wrs-vxworks-g++ -c /home/maraschinopanda/src/422-robot-2013/Commands/CheesyDrive.cpp -o CMakeFiles/bin/422-robot-2013.dir/Commands/CheesyDrive.cpp.obj -isystem /usr/local/powerpc-wrs-vxworks/include/WPILib -mcpu=603 -mstrict-align -mlongcall -nostdlib -Wall -DCPU=PPC603 -DTOOL_FAMILY=gnu -DTOOL=gnu -D_WRS_KERNEL
If you edit the frcmake shell script, you can add the following

Code:

CXX_FLAGS="'-std=gnu++11'"
and where it says exec ... , add "-DCMAKE_CXX_FLAGS=$CXX_FLAGS"

This should fix your problem.

Also, I would advise not installing in local if you're using a package manager. Install to /usr.

Alex Brinister

djdaugherty 10-03-2013 13:21

Re: Alternate GCC Toolchain
 
I'm not sure if this is the correct thread to ask this question, but my team is having issues starting a script automatically on our Odroid that is running Ubuntu. Can anyone give them some pointers?

Thank you!

AlexBrinister 10-03-2013 13:31

Re: Alternate GCC Toolchain
 
What kind of script is it? When do you want it to start?

If you want it to start on start-up, you can make a rc.local file in /etc/init.d. Then, you should do the following:

Code:

sudo ln -s /etc/init.d/rc.local /etc/rc<default runlevel number>.d/S99zlocal
That should do it.

Alex Brinister

djdaugherty 10-03-2013 13:50

Re: Alternate GCC Toolchain
 
Okay - they did that with a cron job using @reboot and the location of the pythin and the location of the script. The problem seems to be with network tables. The Odroid is coming up before the cRio and when the Odroid tries to connect with Network Tables on the cRio before it's up, the cRio never boots. They were getting around this problem earlier by adding a wait before they connect to the Network Tables, but that isn't going to work for autonomous mode. Is there a way to check Network Tables to see if they are running?

AlexBrinister 10-03-2013 14:04

Re: Alternate GCC Toolchain
 
I think you should start a new thread concerning this as your problem is not related to this thread. Also, I'm not familiar with NetworkTables. I assume you are using this for vision processing. Our team uses C++ and we also just have our own server and client running on an Intel NUC and the cRIO, respectively.

Alex Brinister

djdaugherty 10-03-2013 14:19

Re: Alternate GCC Toolchain
 
Okay - thank you. I have posted in a Networktables thread. I appreciate your help.

AlexBrinister 10-03-2013 15:12

Re: Alternate GCC Toolchain
 
@rbmj

From the frc-buildscripts repo, where do the powerpc-wrs-vxworks-* binaries go? /usr/powerpc-wrs-vxworks/bin or /usr/bin?

Also, I use a different frcmake in my package. Mine looks like this:

Code:

#!/bin/bash

CMAKE="cmake"
TOOLCHAIN_ROOT="/usr/powerpc-wrs-vxworks"
TOOLCHAIN_FILE="$1"
CXX_FLAGS="$2"

exec "$CMAKE" "-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN_FILE" "-DCMAKE_INSTALL_PREFIX=$TOOLCHAIN_ROOT" "_DCMAKE_CXX_FLAGS=$CXX_FLAGS" "$3"

We can't have two version of this if we want to standardized? Should I remove mine and replace it with yours?

Alex Brinister

CodeYeti 11-03-2013 15:47

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by CodeYeti (Post 1233640)
Has anybody gotten the gcc-4.8 source package from experimental to build for powerpc-wrs-vxworks? It should work with a custom tarball but I want to know if anybody's done it before I delve into it and write a tutorial for no reason.

I thought I would get going on it since I just recently built my toolchain for arm-linux-gnueabihf.

I've managed to get at least the binutils to build for powerpc-wrs-vxworks with just the source package straight out of wheezy. I'll do some more testing when I get home, but as far as I can tell, the only major difference is going to be that internalization is enabled.

If anybody would like to help me out, I'll attach the binary package so you can give it a shot. Keep in mind that its not signed or anything as I'm not quite sure how that works yet.

If this does work with the rest of the toolchain, then we could update the dependencies for the other packages and deprecate the use of the custom package unless there's something that I'm missing.

http://temp-share.com/show/FHKdR60U6

Hi everyone, just wondering if anybody had bothered to give this a shot before I go at it tonight. No reason to solve problems that have already been solved.

byteit101 11-03-2013 16:28

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by AlexBrinister (Post 1246006)
@rbmj

From the frc-buildscripts repo, where do the powerpc-wrs-vxworks-* binaries go? /usr/powerpc-wrs-vxworks/bin or /usr/bin?

Alex Brinister

both

/usr/bin/powerpc-wrs-vxworks-gcc and /usr/powerpc-wrs-vxworks/bin/gcc are symlinked to each other

William Kunkel 12-03-2013 20:12

Re: Alternate GCC Toolchain
 
Have the issues remedied in the new mandatory update for C++ been addressed in rbmj's version of WPILib? Or were they even there to begin with?

agartner01 12-03-2013 20:26

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by MaraschinoPanda (Post 1247310)
Have the issues remedied in the new mandatory update for C++ been addressed in rbmj's version of WPILib? Or were they even there to begin with?

Yes.

Quote:

Originally Posted by rbmj (Post 1244137)
The new required C++ update to WPILib has been incorporated into the git repo of WPILib and the builds have been uploaded. Let me know if you have any issues. For anyone using the repo, a standard aptitude update && aptitude upgrade should do the trick.

As always, let me know of any issues that arise.

https://github.com/rbmj/wpilib/commi...bd2a05ca432d16
https://github.com/rbmj/wpilib/commi...f078440561da01

AlexBrinister 12-03-2013 20:41

Re: Alternate GCC Toolchain
 
I wanted to ask if we should have a specific version of GCC/binutils that we use for these builds. I'm using binutils 2.23.1 and GCC-HEAD for my builds. Should I revert to using binutils 2.22?

Alex Brinister

codes02 13-03-2013 01:47

Re: Alternate GCC Toolchain
 
Why would you choose to build an old version of binutils if a newer released version exists? (In other words, I'm in favor of 2.23.1).

AlexBrinister 13-03-2013 12:24

Re: Alternate GCC Toolchain
 
Because I'm pretty sure Ubuntu uses 2.22 as the default. Arch has been on 2.23 for a while so that's why I'm asking.

Alex Brinister

AlexBrinister 13-03-2013 23:00

Re: Alternate GCC Toolchain
 
Quote:

EDIT 2: To anybody that's thinking of dealing with WPILib, I suggest adding the following flag in CMAKE_CXX_FLAGS to filter out all the deprecated string literal warnings. There's no way that anybody is going to go through the whole library and convert it to using std::string unless that have absolutely no life.

-Wno-write-strings
Or you can use const_cast<char*>(string).

Going through and C++'ing WPILib sounds like something I'm going to do over the summer lol.

Alex Brinster


All times are GMT -5. The time now is 01:33.

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