Questions tagged [gcc5]

Version 5.x of GCC (GNU Compiler Collection).

Filter by
Sorted by
Tagged with
1 vote
1 answer
148 views

nvcc (cuda8, gcc 5.3) no longer compiles with -O1 on Ubuntu 22.04

I have a CUDA-8 program which compiled (nvcc) well 7 months ago on Ubuntu 22.04, following this procedure, the underlying compiler being gcc (Ubuntu 5.3.1-14ubuntu2) 5.3.1 20160413. After (not sure ...
ferdymercury's user avatar
0 votes
0 answers
25 views

My GCC compiler didn't identify the PlaySound function [duplicate]

I'm kinda confused when having the PlaySound function in my code. I did a double check the syntax and pretty sure I used the necessary library. I'm using GCC version 5.1.0 and I had my WAV file in the ...
Jin's user avatar
  • 1
-1 votes
1 answer
206 views

How to prevent GCC from generating x86_64 kmov instructions?

I am using a third party x86_64 assembler that do not recognise kmov instructions (it only supports a subset of the x86_64 instruction set). The assembler is fed assembly files generated by GCC 5.1 (I ...
Karim Manaouil's user avatar
-1 votes
1 answer
231 views

Two equivalent codes giving different run time on GeeksforGeeks platform?

I was solving a question on GeeksforGeeks regarding finding the total number of triangles possible using the three different array elements as sides of the triangle from an unsorted array arr[] of ...
Saurav 's user avatar
-3 votes
1 answer
170 views

Difference between gcc5 and gcc8 with respect to return values of a function

I have two tools: gcc5 and gcc8. Following is the snippet code bool foo() { int var; var = 1; printf("var=%d\n", var); } int calling_foo() { foo(); } If I compile and run w/ gcc5, foo() ...
Suresh's user avatar
  • 27
1 vote
2 answers
1k views

why does it compile error when i only #include<math.h>

i upgrade gcc to 5.4, it seems to be ok except math.h when i write a hello.cpp like the following: #include<math.h> int main(){return 0;} then i compile the above cpp with gcc 5.4, g++ 5.4 g+...
wallace000's user avatar
0 votes
1 answer
753 views

How does one install wxmaxima?

I entered sudo port install maxima and got Error: Failed to build libgcc-devel: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports....
Kevin Cahill's user avatar
0 votes
1 answer
778 views

Compiling GCC-5.0 OS X Lion dyld: Symbol not found: __ZNKSt11logic_error4whatEv

I'm trying to install gcc-5.0 from source on my OS X 10.7.5 using the (Apple built) /usr/bin/gcc-4.2 and the appropriate versions of gcc dependencies (gmp,mpfr,mpc) which are installed at /usr/local. ...
Terry's user avatar
  • 1,216
0 votes
0 answers
904 views

How to ignore unused static variables in gcc 5.x?

I'm using an external library which has one particular header file that has around 50 static variables in it's header that are unused. I'm using gcc 5.5.0, cmake and c++14. When I try to compile I'm ...
Gio's user avatar
  • 3,272
1 vote
0 answers
904 views

How to fix gcc include path search order problem (input/output error)?

One of our Ubuntu 16.04 systems (gcc 5.4.0) is failing a compilation that previously succeeded. The failure is: $ g++ -c -std=c++14 -Wall -pedantic -m64 -march=native -I../Kernel -I/net/simdata/...
DavidA's user avatar
  • 2,127
4 votes
1 answer
659 views

Searching for recent GCC GIMPLE grammar

For my finale year project I'm learning about compiler techniques, and currently I'm trying to experiment with the GCC intermediate representation (raw GIMPLE) and getting the control flow graphs from ...
user7724084's user avatar
9 votes
3 answers
5k views

uint8_t not rollover to 0 after reaching 255 not working properly

I am new to the C-Headers - stdint.h and inttypes.h. I was trying out some code to get an inkling of how uint8_t works. But, it seems to have encountered a problem. I have declared 4 uint8_t integers ...
TejasKhajanchee's user avatar
0 votes
2 answers
87 views

Direct inclusion of template slower than separate instantiation

I have a simple template header containing 3 templated functions (no declarations, just definitions and marked static inline), two of these functions being 5000 lines long. These long functions are ...
rfabbri's user avatar
  • 245
0 votes
0 answers
246 views

Affdex SDK Compilation error with undefined reference to `Visualizer::Visualizer()'

I wish to setup Affectiva SDK 4.0.0 for Linux and hence, have started working on example apps from https://github.com/Affectiva/cpp-sdk-samples I have Ubunutu 16.04, OpenCV 2.4.11, Boost 1.63, cmake ...
Mudra's user avatar
  • 36
0 votes
1 answer
430 views

"collect2: error: ld returned 1 exit status" on Codeblocks (Raspberry Pi 3b/GCC 5.4.0)

Currently I'm learning how to create games (at a low level) at my degree. I'm programming on Ubuntu mate 16.04, Codeblocks 13.12 and this happen: -------------- Build: Debug in s04 (compiler: GNU ...
Genya_LC's user avatar
0 votes
1 answer
129 views

how to compile Ignite application on CMake?

I did compile Ignite Application successfully. but The Binary didn't work. /tmp/tmp.Nw0IPD6ru3/cmake-build-debug-local-container/planet_engine: error while loading shared libraries: libjvm.so: cannot ...
Theodoros from arctic's user avatar
11 votes
1 answer
2k views

Output data type of sizeof() operator

I am using Ubuntu 16.04.5 and GCC version 5.4.0. I was playing with sizeof() operator, wrote the code below: #include <stdio.h> int main(int argc, char *argv[]){ long int mylint = ...
Adhamzhon Shukurov's user avatar
0 votes
0 answers
2k views

Undefined references in libfftw3_mpi.a with gcc-5

I am new to fftw library. I recently downloaded a simple mpi-fftw code from here. I have some undefined references to mpi functions from libfftw3_mpi.a when I compile the code on Ubuntu 18.04 as ...
user avatar
0 votes
1 answer
61 views

std::string class inheritance and tedious c++ overload resolution #2

Previous question: std::string class inheritance and tedious c++ overload resolution In steps after the previous question i have tried to test operator+ over the raw string pointer: "aaa" + ...
Andry's user avatar
  • 2,330
7 votes
1 answer
563 views

std::string class inheritance and tedious c++ overload resolution

I need to extend std::basic_string to work over path strings and different operator+: #include <string> template <class t_elem, class t_traits, class t_alloc> class path_basic_string : ...
Andry's user avatar
  • 2,330
1 vote
1 answer
1k views

std::thread weak when using -static-libstdc++, thus causing crash at runtime

I need to build a portable shared object, which is a plugin for another software on Linux. I did some amount of reading on the subject, came down to the conclusion, that I should build a sysrooted gcc ...
Rudolfs Bundulis's user avatar
0 votes
0 answers
298 views

CRTP undefined reference with GCC only, -fpermissive

I've had good success using the Curiously Recurring Template Pattern for the Subject Observer pattern in my library. I compile with gcc and Visual Studio 2017. This code has been used for months on ...
Tyson Hilmer's user avatar
4 votes
1 answer
1k views

AVX512 intrinsics header produces many errors after distro upgrades GCC to 5.5.0

My Linux distribution upgraded my GCC version to 5.5.0 (damned if I know why). Now, when I try to build code which includes avx512fintrin.h, I get a slew of compiler errors: /usr/lib/gcc/x86_64-linux-...
einpoklum's user avatar
  • 121k
0 votes
1 answer
411 views

Error with boost::thread::try_join_for() function

I am trying to use boost::thread::try_join_for() function but I am getting the following compile time error: "'class boost::thread' has no member named 'try_join_for' I am able to use boost::...
Arpit's user avatar
  • 767
-1 votes
1 answer
983 views

Compile c++11 in a docker gcc:5 image

My Dockerfile uses FROM gcc:5, runs apt-get update and installs CMake v3.9 via wget. My top-level CMakeLists.txt has set(CMAKE_CXX_STANDARD 11) but that doesn't seem to convince gcc to compile using C+...
Pejman's user avatar
  • 1,338
1 vote
1 answer
341 views

Using archive file for compiled object seems to break compilation

I have a large project with a custom Makefile building everything. This is for an ARM Cortex-M0. One of the steps is to compile a Newlib syscalls.c into syscalls.c.o. That gets dumped into an archive ...
Cameron Tacklind's user avatar
0 votes
1 answer
219 views

Assignment of a struct in a for loop error with gcc and not with clang [closed]

Hello I got this warning with gcc(version 5.4.0) on a C11 program compiled with the following command: $ gcc -g -Wall -std=c11 main.c -o minishell main.c: In function ‘process_new’: main.c:184:10: ...
Darnuria's user avatar
  • 166
12 votes
1 answer
915 views

Is my fma() broken?

In using double fma(double x, double y, double z); I'd expect a non-zero d in the output lines below marked with '?'. It appears to internally only use long double precision rather than infinite ...
chux - Reinstate Monica's user avatar
1 vote
1 answer
4k views

error: 'log2' is not a member of 'std'

I'm not sure what I am seeing here. The test results below are from an old PowerMac G5 running OS X 10.5.8. Its still around for testing under the big-endian PowerPC cpu. The compiler is GCC 5.4, and ...
jww's user avatar
  • 98.8k
0 votes
1 answer
191 views

wxWidgets deprecated constructor

I'm trying to compile following code using wxWidgets 3.0 library: foo.h #ifdef __GNUC__ #include <wx/version.h> #if wxMAJOR_VERSION >= 3 #pragma GCC diagnostic push #pragma GCC ...
Дмитрий Евсеев's user avatar
3 votes
1 answer
2k views

CXX11 undefined references with GCC 6.2.0

We have manually installed GCC 6.2.0 on a Scientific Linux machine. The compilation of a C++ application seems fine but we get lots of undefined references to CXX11 at linking time file.cpp:(.text+...
Manolete's user avatar
  • 3,471
2 votes
0 answers
480 views

Misunderstanding of C switch statement or gcc bug?

The following code seems to be correctly executed when compiled with GCC 4.4.7 and LLVM 6.1. Yet i don't think it correctly compiles with gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4). ...
Luke's user avatar
  • 934
1 vote
1 answer
261 views

Can there be conflict between `-march` and instruction set switches?

I am compiling an example program with the following command: $ gcc -march=i386 -mtune=i386 -mmmx -msse4 -m3dnow -m32 -o hello.exe hello.c Questions: Why doesn't GCC complain that the switches for ...
user7023624's user avatar
5 votes
1 answer
191 views

Why does it help to assign a const& scalar value to a const before a loop?

In GCC 5.4.0's stl_algobase.h we have: template<typename _ForwardIterator, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, void>::__type ...
einpoklum's user avatar
  • 121k
0 votes
1 answer
616 views

Install GCC5 in Linux Mint LMDE 2

I'm new in Linux and I would like to unistall gcc 4.9 which is installed in my distro Linux Mint LMDE 2 and install gcc 5. I tried to used the following command: sudo apt-get install gcc5 but it ...
JOrG's user avatar
  • 49
2 votes
1 answer
1k views

gtkmm undefined reference to certain gtk::builder function add_from_file

I am using eclipse, mingw-w64, gtkmm2.4, glade to compile some simple program. I can compile hello world gtkmm examples, following a tutorial to, however when it comes to glade came a little strange ...
Jimmy Chi Kin Chau's user avatar
1 vote
0 answers
171 views

Homebrew GCC5 Installation error on Mac OSX 10.9.3

I'm trying to install gcc5 on OSX 10.9.3 (Mavericks) using homebrew (brew install gcc5 ) and getting the following errors. I'm able to install the same on OSX 10.11.1 (El Capitan) on a separate ...
Pal's user avatar
  • 1,009
0 votes
1 answer
60 views

Making GCC 5.1.0 work with CUDA 7.5 as non-root user

I've done the rounds through Google unsuccessfully. My question is a bit unique - I have a big chunk of code that has a lot of C++11 dependencies, which runs just fine when I compile with GCC 5.1.0 ...
darel's user avatar
  • 128
8 votes
1 answer
1k views

Build Proxygen under Ubuntu 16.04

I would like to build Facebook's Proxygen c++ http libraries out of github with Ubuntu 16.04. Here's the environment I set up along with the deps.sh command to install dependencies: gcc --version ...
moodboom's user avatar
  • 6,393
2 votes
1 answer
3k views

gcc - openacc - Compiled program does not function properly

Recently, there have been some efforts in GCC community to support OpenACC in their compiler. So, I wanted to try it out. Using this step-by-step tutorial (tutorial), which was close to the main ...
mgNobody's user avatar
  • 738
6 votes
1 answer
3k views

Invoking constructors during virtual inheritance with C++

This is a question I encountered while reading this section on learncpp.com. I used the code listed here, then made slight alterations for testing. Background Virtual inheritance creates a common ...
Ryan B's user avatar
  • 83
0 votes
1 answer
974 views

Ubuntu undefined reference error

I'm trying to compile a program written on C++. I got this message error: undefined reference to `escapeXMLChars(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<...
PhuongLM's user avatar
17 votes
2 answers
1k views

The program runs 3 times slower when compiled with g++ 5.3.1 than the same program compiled with g++ 4.8.4, the same command

Recently, I've started to use Ubuntu 16.04 with g++ 5.3.1 and checked that my program runs 3 times slower. Before that I've used Ubuntu 14.04, g++ 4.8.4. I built it with the same commands: CFLAGS = -...
Alex Novikov's user avatar
1 vote
1 answer
426 views

gcc Compiler Segmentation Fault When Assigning from Value Captured Variable to Lambda Parameter

I was working on this answer and wrote the code: bool generate(vector<int>& temp, int& target, const size_t width, const size_t i) { const auto replacement = temp[i]; const auto ...
Jonathan Mee's user avatar
  • 38.1k
1 vote
0 answers
48 views

Compiling LLVM 3.3 with GCC5, undefined references to c11 type signatures

I'm having trouble compiling my project to use LLVM 3.3* with GCC5. I get undefined references, such as `llvm::sys::getDefaultTargetTripleabi:cxx11' The abi tag indicates it's an issue of mismatched ...
edA-qa mort-ora-y's user avatar
0 votes
1 answer
105 views

Lvalue istringstream Required for istream_iterator?

Given a string foo in Visual Studio I can break the words into a vector by doing: vector fooVec{ istream_iterator<string>(istringstream(foo)), istream_iterator<string>() }; But this won'...
Jonathan Mee's user avatar
  • 38.1k
1 vote
1 answer
534 views

Install GCC 5.X on Xcode 6

I need to use/integrate GCC 5.X (in my case 5.3, and it is already installed) on Xcode 6.2. I've found a lot of outdated tutorials about GCC 4.X and Xcode 5 (or lower), but all of them are outdated ...
FiReTiTi's user avatar
  • 5,657
0 votes
3 answers
78 views

Porting from MSVC2015 Update 2 to GCC 5.3 - SFINAE Errors

I'm currently porting my library, but my dark template magic won't get compiled with GCC 5.3 This fragment works as expected when compiled with MSVC2015 Update 2 template<typename vreal = ...
user avatar
31 votes
2 answers
15k views

Valgrind Unrecognised instruction

I have the following code: #include <iostream> #include <random> int main() { std::mt19937_64 rng(std::random_device{}()); std::cout << std::uniform_int_distribution<>...
nwp's user avatar
  • 9,753
1 vote
1 answer
2k views

How to configure Qt to build all modules?

I am following the guide to build Qt from sources, but the build seems to be incomplete, I am building with the following configuration: configure -prefix E:\Qt57b_static_mingw5_64 -release -...
IvanB's user avatar
  • 121