error occurred compiling gcc from source code
Right now the gcc and g++ on my ubuntu 15.10 machine is version 5.2.1. I need to install v4.4 of them for some reason. I downloaded the source code of gcc4.4.7 and configure with this:../configure \...
View Articleassert() with message
I saw somewhere assert used with a message in the following way:assert(("message", condition)); This seems to work great, except that gcc throws the following warning:warning: left-hand operand of...
View Article"Illegal opcode" when using valgrind with a hdf5 application
When i use valgrind on a very simple hdf5 application:#include <stdio.h> #include <hdf5.h> int main() { const char sFileName[] = "test1.qdf"; hid_t hFile = H5Fcreate(sFileName,...
View Articlegtk3 change button bg color
Today I start programming in GTK3, and I have a problem. I can't change the button background color, I want to change it after a click on the button. Here is my code:void pushButton( GtkWidget* button...
View ArticleOne thread counting, other thread does a job and measurement
I would like to implement a 2 thread model where 1 is counting (infinitely increment a value) and the other one is recording the first counter, do the job, record the second recording and measure the...
View ArticleHow to link file without additional sections at the end?
I build a .bin file from one .c file with some constant arrays, which contain a website, I would like to flash to my STM32M7 using the arm-none-eabi-toolchain. While linking the .o file together with a...
View ArticleGCC code that seems to break inline assembly rules but an expert believes...
I was engaged with an expert who allegedly has vastly superior coding skills than myself who understands inline assembly far better than I ever could. One of the claims is that as long as an operand...
View ArticleWhat's wrong with using data from C++ in asm with compiling by gcc? [duplicate]
This question already has an answer here:How to access C variable for inline assembly manipulation? 2 answersmanipulating c variable via inline assembly [duplicate] 1 answerLooping over arrays with...
View Articlepython module 'signal' has no attribute 'SIGHUP' and other signals
C02TPARXG8WN:fal$ python Python 3.6.9 (default, Nov 10 2019, 01:00:31) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.10.44.4)] on darwin Type "help", "copyright", "credits" or "license" for more...
View ArticleHow to use C++ data in asm with Intel syntax and compiling by gcc? [duplicate]
This question is an exact duplicate of:What's wrong with using data from C++ in asm with compiling by gcc? [duplicate]I have C++ code with asm input for working with string. How can I use them from...
View ArticleGCC cant find GMP, MPFR and MPC libraries
I am trying to cross-compile GCC on Mac OS 10.5.7. I used this command to configure GCC after installing GMP, MPFR, and MPC:../gcc-4.5.0/configure --target=$i586-elf --prefix=/usr/local/cross \...
View ArticleGCC optimizer generating error in nostdlib code
I have the following code:void cp(void *a, const void *b, int n) { for (int i = 0; i < n; ++i) { ((char *) a)[i] = ((const char *) b)[i]; } } void _start(void) { char buf[20]; const char m[] =...
View Articletherubyracer - Gem::Ext::BuildError: ERROR: Failed to build gem native extension
I'm trying to install the following gem versions on Maverickslibv8 (3.16.14.3)therubyracer (0.12.1)Obviously therubyracer gems depends on libv8.1) Installing libv8What is libv8? My bit of research...
View ArticleHow to specify new GCC path for CMake
My OS is centos which has a default gcc in path /usr/bin/gcc. But it is old, I need a new version of gcc. So I install a new version in a new path /usr/local/bin/gcc.But when I run cmake, it still uses...
View Articlewhy is c++ std::max_element so slow?
I need to find the max element in the vector so I'm using std::max_element, but I've found that it's a very slow function, so I wrote my own version and manage to get x3 better performance, here is the...
View ArticleError with package: glibc-header in FEDORA 30
I am using fedora 30. In order to install Madagascar (a seismic package), there is a ./configure code, which one test a several requirements.there is an error with glibc-headers:Needed package:...
View ArticleIs there a way to optimize std algorithms?
Searching any information about std algorithms performance, I've found the Stack Overflow question about performance difference between std::max_element() and self-written function. I've tested the...
View Articlecmake install error : not running ./bootstrap
Thanks All!![sohyeon@theochem11 cmake-3.15.3]$ export PATH=./:~/GCC-7.3.0/bin/:$PATH [sohyeon@theochem11 cmake-3.15.3]$ gcc --version gcc (GCC) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc....
View ArticleI add header files but not add corresponding libraries, unexpectedly it...
I use eclipse to compile C++ project.There are some functions that are external interfaces.I add header files but not add corresponding libraries, unexpectedly it compiles successfully.Using ldd...
View ArticleHow to fix "dangerous relocation: unsupported relocation"
I'm compiling linux-4.19(gcc-8.2 bintutils-2.31), however it always fails with errors like:aarch64-oe-linux-ld.bfd: drivers/platform/gsi/gsi.o: relocation R_AARCH64_ABS32 against...
View Article