-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Mumble should set a specific -std=c++XX instead of relying on the compiler default #2494
Comments
Needs a 1.2.17 backport as well. |
In MumblePAHelper I added |
So uh. Can we actually do EDIT: I take that back. I guess I was thinking about the experimental TL;DR: I think we have to stick to c++03 for the time being. Imho at least till 12.04 LTS is no longer supported which is april next year. |
I guess this would be resolved with #2582 ? |
Yes |
This is an offshoot of Debian bug #831184. (See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831184) Basically, G++6 now defaults to C++11 (or greater) mode. We haven't explicitly passed a C++ standard C(XX)FLAG, so until now, we've built against the g++/clang's default, which until now was C++98 or C++03. Now, Mumble itself doesn't really care what C++ mode it's built in. We build fine in C++11 mode. However, on Debian/Ubuntu, libraries such as ZeroC Ice provide separate C++11 and C++03 .so's with different ABIs. The default version in system's lib dir is the C++03 version, but the ABI that is targeted when building with "g++ -lIce [...]" (that is, without explicitly specifying a default C++ mode) is the C++11 variant -- because G++6 defaults to C++11 mode. This puts us in a situation where we have to *know* which C++ version we're built against, to be able to select the correct Ice libraries on Debian/Ubuntu. Debian's C++11 Ice libraries live in `/usr/lib/$TRIPLE/c++11`, and the C++03 versions live in `/usr/lib/$TRIPLE/`. (Actually, the C+11 libraries in `/usr/lib/$TRIPLE/c++11` are symlinks to .so files in /usr/lib/$TRIPLE with a '++11' suffix. Which makes sense: this way, /usr/lib/$TRIPLE/c++11 is only a developer detail, and not part of the default library search path of the system.) This commit does a few things to patch things up: - We now explicitly pass a `-std=` flag to the compiler. - By default, we build with `-std=c++03`, but if CONFIG(c++11) is specified (either by being the default in modern Qt 5 versions, or explicitly via user action), we use `-std=c++11`. - When CONFIG(c++11) is specified, we ensure QMAKE_LIBDIR includes `/usr/lib/$TRIPLE/c++11` such that we link against the correct libraries. Fixes mumble-voip#2494
This is an offshoot of Debian bug #831184. (See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831184) Basically, G++6 now defaults to C++11 (or greater) mode. We haven't explicitly passed a C++ standard C(XX)FLAG, so until now, we've built against the g++/clang's default, which until now was C++98 or C++03. Now, Mumble itself doesn't really care what C++ mode it's built in. We build fine in C++11 mode. However, on Debian/Ubuntu, libraries such as ZeroC Ice provide separate C++11 and C++03 .so's with different ABIs. The default version in system's lib dir is the C++03 version, but the ABI that is targeted when building with "g++ -lIce [...]" (that is, without explicitly specifying a default C++ mode) is the C++11 variant -- because G++6 defaults to C++11 mode. This puts us in a situation where we have to *know* which C++ version we're built against, to be able to select the correct Ice libraries on Debian/Ubuntu. Debian's C++11 Ice libraries live in `/usr/lib/$TRIPLE/c++11`, and the C++03 versions live in `/usr/lib/$TRIPLE/`. (Actually, the C+11 libraries in `/usr/lib/$TRIPLE/c++11` are symlinks to .so files in /usr/lib/$TRIPLE with a '++11' suffix. Which makes sense: this way, /usr/lib/$TRIPLE/c++11 is only a developer detail, and not part of the default library search path of the system.) This commit does a few things to patch things up: - We now explicitly pass a `-std=` flag to the compiler. - By default, we build with `-std=c++03`, but if CONFIG(c++11) is specified (either by being the default in modern Qt 5 versions, or explicitly via user action), we use `-std=c++11`. - When CONFIG(c++11) is specified, we ensure QMAKE_LIBDIR includes `/usr/lib/$TRIPLE/c++11` such that we link against the correct libraries. Fixes mumble-voip#2494 [Backported from master e99b0c9]
See also:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=831184
The text was updated successfully, but these errors were encountered: