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)

William Kunkel 01-03-2013 14:27

Re: Alternate GCC Toolchain
 
Does anyone know if there's support for C++11's new math functions, namely copysign()? It wasn't working for me, but that could just be on my end.

rbmj 01-03-2013 19:47

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by MaraschinoPanda (Post 1242069)
Does anyone know if there's support for C++11's new math functions, namely copysign()? It wasn't working for me, but that could just be on my end.

There should be. Again, there used to be a bug with c++11 support, which should be fixed when I release the new packages and builds (hopefully very soon). If you can paste the errors you are getting and the output of make VERBOSE=1 I can see if you are affected by this bug and the resolution.

codes02 01-03-2013 22:06

Re: Alternate GCC Toolchain
 
@wlmeng11 I've just built it successfully in a Ubuntu 12.04 64.

The "--64" indicates 64 bit, and I'm pretty sure it should be running /user/powerpc-wrs-vxworks/bin/powerpc-wrs-vxworks-as not /user/powerpc-wrs-vxworks/bin/as .

Are you sure you passed --target to both binutils & gcc's configure?

rbmj 01-03-2013 23:43

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by codes02 (Post 1242189)
@wlmeng11 I've just built it successfully in a Ubuntu 12.04 64.

The "--64" indicates 64 bit, and I'm pretty sure it should be running /user/powerpc-wrs-vxworks/bin/powerpc-wrs-vxworks-as not /user/powerpc-wrs-vxworks/bin/as .

Are you sure you passed --target to both binutils & gcc's configure?

/usr/bin/powerpc-wrs-vxworks-as should be a hard link to /usr/powerpc-wrs-vxworks/bin/as

Binutils is fine - as isn't supposed to take a --64 argument AFAIK. Can you post your config.log?

wlmeng11 02-03-2013 00:07

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by codes02 (Post 1242189)
@wlmeng11 I've just built it successfully in a Ubuntu 12.04 64.

The "--64" indicates 64 bit, and I'm pretty sure it should be running /user/powerpc-wrs-vxworks/bin/powerpc-wrs-vxworks-as not /user/powerpc-wrs-vxworks/bin/as .

Are you sure you passed --target to both binutils & gcc's configure?

I'm using the commands from the first post for configure.
Which version of GCC are you using and where did you get it? (official repos, PPA, or source)

William Kunkel 02-03-2013 01:13

Re: Alternate GCC Toolchain
 
The complete output of make VERBOSE=1 is as follows:
Quote:

/usr/bin/cmake -H/home/maraschinopanda/src/422-robot-2013 -B/home/maraschinopanda/src/422-robot-2013 --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /home/maraschinopanda/src/422-robot-2013/CMakeFiles /home/maraschinopanda/src/422-robot-2013/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory `/home/maraschinopanda/src/422-robot-2013'
make -f CMakeFiles/bin/422-robot-2013.dir/build.make CMakeFiles/bin/422-robot-2013.dir/depend
make[2]: Entering directory `/home/maraschinopanda/src/422-robot-2013'
cd /home/maraschinopanda/src/422-robot-2013 && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/maraschinopanda/src/422-robot-2013 /home/maraschinopanda/src/422-robot-2013 /home/maraschinopanda/src/422-robot-2013 /home/maraschinopanda/src/422-robot-2013 /home/maraschinopanda/src/422-robot-2013/CMakeFiles/bin/422-robot-2013.dir/DependInfo.cmake --color=
make[2]: Leaving directory `/home/maraschinopanda/src/422-robot-2013'
make -f CMakeFiles/bin/422-robot-2013.dir/build.make CMakeFiles/bin/422-robot-2013.dir/build
make[2]: Entering directory `/home/maraschinopanda/src/422-robot-2013'
/usr/bin/cmake -E cmake_progress_report /home/maraschinopanda/src/422-robot-2013/CMakeFiles 20
[ 5%] Building CXX object CMakeFiles/bin/422-robot-2013.dir/Commands/CheesyDrive.cpp.obj
/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
/home/maraschinopanda/src/422-robot-2013/Commands/CheesyDrive.cpp: In member function 'float CheesyDrive::truncateOutOfBounds(float)':
/home/maraschinopanda/src/422-robot-2013/Commands/CheesyDrive.cpp:113:35: error: 'copysign' was not declared in this scope
newValue = copysign( 1.0, value );
^
make[2]: *** [CMakeFiles/bin/422-robot-2013.dir/Commands/CheesyDrive.cpp.obj] Error 1
make[2]: Leaving directory `/home/maraschinopanda/src/422-robot-2013'
make[1]: *** [CMakeFiles/bin/422-robot-2013.dir/all] Error 2
make[1]: Leaving directory `/home/maraschinopanda/src/422-robot-2013'
make: *** [all] Error 2
I've not been using the binaries, by the way, so fixing them won't fix my problem. (Woo Gentoo!) But it's possible we made the same mistake. My version of GCC is 4.8.0

codes02 02-03-2013 01:50

Re: Alternate GCC Toolchain
 
I've been building either the gcc-master tarballs from github (ie: latest snapshot), or using the date marked snapshots from the gcc mirrors.

ie: all source, all upstream.

rbmj 02-03-2013 12:22

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by MaraschinoPanda (Post 1242266)
The complete output of make VERBOSE=1 is as follows:


I've not been using the binaries, by the way, so fixing them won't fix my problem. (Woo Gentoo!) But it's possible we made the same mistake. My version of GCC is 4.8.0

If you go to a clean build directory and run:
Code:

$ frcmake $SRCDIR -DCMAKE_CXX_FLAGS='-std=c++11 -fpermissive'
Then it should work. The use of -fpermissive is evil, but I seem to remember it being necessary, I think with WPILib doing something that is officially deprecated in C++11...

wlmeng11 02-03-2013 15:13

Quote:

Originally Posted by codes02 (Post 1242283)
I've been building either the gcc-master tarballs from github (ie: latest snapshot), or using the date marked snapshots from the gcc mirrors.

ie: all source, all upstream.

Are you also building all the other libraries from source? (gmp, mpfr, and mpc)

codes02 02-03-2013 15:16

Re: Alternate GCC Toolchain
 
@wlmeng11

yes. See the build script I use, more info in this post back on page 7:
http://www.chiefdelphi.com/forums/sh...1&postcount=86

rbmj 04-03-2013 07:52

Re: Alternate GCC Toolchain
 
UPDATE:

I've figured out how to get the repository to work, and I'm in the free tier for amazon s3. Thus, here's the link to a new FirstForge wiki page on how to set it up:

http://firstforge.wpi.edu/sf/wiki/do.../BinaryInstall

Currently, I only have packages for debian wheezy. I don't know if they will be binary-compatible with Ubuntu. The only binary library dependencies are libc and zlib, which are both pretty good with compatibility, bu you never know...

There's also instructions on how to build the packages here:

http://firstforge.wpi.edu/sf/wiki/do.../ManualInstall

I'll be putting more instructions on how to compile manually from source (for other distributions) on that last page. Hopefully I should finish updating soon!

wlmeng11 04-03-2013 15:09

Quote:

Originally Posted by rbmj (Post 1243274)
UPDATE:

I've figured out how to get the repository to work, and I'm in the free tier for amazon s3. Thus, here's the link to a new FirstForge wiki page on how to set it up:

http://firstforge.wpi.edu/sf/wiki/do.../BinaryInstall

Currently, I only have packages for debian wheezy. I don't know if they will be binary-compatible with Ubuntu. The only binary library dependencies are libc and zlib, which are both pretty good with compatibility, bu you never know...

There's also instructions on how to build the packages here:

http://firstforge.wpi.edu/sf/wiki/do.../ManualInstall

I'll be putting more instructions on how to compile manually from source (for other distributions) on that last page. Hopefully I should finish updating soon!

Thank you!
The PPA worked for me on Ubuntu 12.04.

rbmj 05-03-2013 19:02

Re: Alternate GCC Toolchain
 
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.

AlexBrinister 08-03-2013 18:08

Re: Alternate GCC Toolchain
 
I made a PKGBUILD for the 64-bit version of this toolchain. It is available on the AUR. If you have an AUR package installer (like yaourt), you can install it by simply doing:

Code:

yaourt -S vxworks-gcc-toolchain-bin
P.S: This is using binutils and GCC 4.8 snapshots from the 20th of January. I'm working on the i686 binary release and a source release

Alex Brinister

rbmj 09-03-2013 09:56

Re: Alternate GCC Toolchain
 
Quote:

Originally Posted by AlexBrinister (Post 1245275)
I made a PKGBUILD for the 64-bit version of this toolchain. It is available on the AUR. If you have an AUR package installer (like yaourt), you can install it by simply doing:

Code:

yaourt -S vxworks-gcc-toolchain-bin
P.S: This is using binutils and GCC 4.8 snapshots from the 20th of January. I'm working on the i686 binary release and a source release

Alex Brinister

Thanks! I'll update the wiki, which is finally getting semi-complete:

http://firstforge.wpi.edu/sf/go/proj..._toochain/wiki


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