-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
C++11 / Ubuntu 12.04 #65
Comments
Not with gcc compiler errors. However the language/library features I intend to use for master branch in late C++0x found in GCC an CLang releases the past few years. So 4.6 should be ok, and I'll add an option to enable c++0x and add tests as needed. |
Ok thank you, I'll follow the commits :) |
The "--enable-c++0x" option has been committed. |
Thank you, tried it and it works great. I had to update 3 parameters in my rtorrent.rc use_udp_trackers (found the new params in .sed file) Thank you for all :) |
Hello,
I'm currently using Ubuntu 12.04 with GCC 4.6.4.
If I'm right, there is no support of C++11 with GCC 4.6.4
There is no GCC 4.8 on Ubuntu 12.04, only a PPA 4.8.1 with the following bug : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57899
So I tried to compile GCC 4.8.3 directly from sources... (I probably did something wrong...)
Default GCC :
/svn/git/libtorrent$ gcc -v12.04' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnuUsing built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.4-1ubuntu1
Thread model: posix
gcc version 4.6.4 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)
Default G++ :
/svn/git/libtorrent$ g++ -v12.04' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnuUsing built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.4-1ubuntu1
Thread model: posix
gcc version 4.6.4 (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04)
I built 4.8.3 and installed it, and updated alternatives :
GCC 4.8.3 :
~/svn/git/libtorrent$ gcc -v
Utilisation des specs internes.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8.3/lto-wrapper
Target: x86_64-linux-gnu
Configuré avec: ../configure -v --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8.3 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8.3 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-gmp=/usr/local/lib --with-mpc=/usr/lib --with-mpfr=/usr/lib --disable-checking
Modèle de thread: posix
gcc version 4.8.3 (GCC)
G++ 4.8.3 :
:~/svn/git/libtorrent$ g++ -v
Utilisation des specs internes.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8.3/lto-wrapper
Target: x86_64-linux-gnu
Configuré avec: ../configure -v --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8.3 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8.3 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-gmp=/usr/local/lib --with-mpc=/usr/lib --with-mpfr=/usr/lib --disable-checking
Modèle de thread: posix
gcc version 4.8.3 (GCC)
But when I try to build libtorrent/rtorrent I always have the following error :
checking C++11 support... configure: error: No support for C++11 found.
I found on google how to check C++11 :
g++ -E -dM -std=c++11 -x c++ /dev/null >b
with GCC 4.6.4 :
$ g++ -E -dM -std=c++11 -x c++ /dev/null >b
cc1plus: error: unrecognized command line option ‘-std=c++11’
With GCC 4.8.3 :
$ g++ -E -dM -std=c++11 -x c++ /dev/null >b
$
(no error)
Could you help me ?
Thank you
The text was updated successfully, but these errors were encountered: