On my system default gcc version is 4.4.7 , But i want to build glib library with gcc 6.3 version.
For that i tried running ./configure from glib source as shown below:
../configure CC="/version/global/pkgs/gcc/v6.3.0/bin/gcc" CFLAGS='-fPIC' CXXFLAGS='-fPIC' --enable-static=yes --prefix=/home/kallel/glib_63/glib-2.56.1/new_glib63 --enable-libmount=no --with-pcre=/home/kallel/pcre_lib/pcre-8.20/pcre_library
Once after building glib library. To see on which gcc compiler version it got built with following command:-
strings -a libglib-2.0.so.0.5600.1 | grep "GCC: ("
o/p:-
GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-9)
GCC: (Synopsis) 6.3.0
GCC: (GNU) 4.4.7 20120313 (Red Hat 4.4.7-4)
I could not understand why it is still showing output with 4.4.7, Please help me in understanding the output. Is there anything wrong in my ./configure command? How do we make sure that library was built with gcc 6.3
I could not understand why it is still showing output with 4.4.7
Your library contains object code that you built, as well as parts of GLIBC that are required to support shared libraries (crti.o, crtn.o, etc.).
These parts will continue to show whatever GCC they were built with, regardless of what you build glib code with.
Related
According to the gFortran docs in order to enable OpenACC support it is necessary to use the -fopenacc switch. However, this does not seem to work.
gfortran: error: unrecognized command line option ‘-fopenacc’
gFortran version is GNU Fortran (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28).
What is the correct way to compile Fortran code with OpenACC support?
Your version is WAY too old. The currently supported versions of GCC are 7, 8 and 9.
The version specific manuals are available at https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gfortran/OpenACC.html#OpenACC Change the version number in the address to see other versions.
The option appears to be added in version 5 but the support in more recent versions is likely to be much better.
How to find which gcc version the installed boost library is using ? So I can find which version of C++, my HPX library is using. HPX library depend on boost library hugely. I actually forgot how I (using which version of gcc) built boost library a year ago.
Thanks
If it's layout verioned when you built boost, the lib name must like: libboost_wave-gcc48-mt-s-1_65.a, so gcc48 (gcc 4.8.x) is your version.
More accurate : Run following command:
strings libboost_wave-gcc48-mt-s-1_65.a | egrep -ie "GCC.*([0-9]\.[0-9]\.[0-9])"
You'll get the exact gcc version 4.8.5 from the output:
GCC: (GNU) 4.8.5 20150623 (Red Hat 4.8.5-11)
I am currently in the process of compiling graph-tool v1.13 from the Git version. I have managed to generate the configure file from autogen.sh but am now running into trouble.
Running ./configure I receive the message:
checking whether g++ supports C++14 features by default... no
checking whether g++ supports C++14 features with -std=gnu++14... no
checking whether g++ supports C++14 features with -std=gnu++0x... no
configure: error: *** A compiler with support for C++14 language features is required.
I have checked gcc -v and g++ -v and receive the response gcc version 4.9.3 (Ubuntu 4.9.3-8ubuntu2~14.04). To my knowledge this should support C++14 so where am I going wrong? I am running Ubuntu 14.04.
Try perhaps
./configure CXX='g++-5'
after having installed some GCC 5
gcc 4.9.3 supports C++14, but the correct compiler flag is '-std=c++14'
When using mingw, the compiler adds a lot of version strings in the .rdata section. For instance in linux:
GCC: (Gentoo Hardened 4.8.1-r1 p1.2, pie-0.5.7) 4.8.1
GCC: (Gentoo Hardened 4.8.1-r1 p1.2, pie-0.5.7) 4.8.1
GCC: (Gentoo Hardened 4.8.1-r1 p1.2, pie-0.5.7) 4.8.1
...
Or in windows:
GCC: (GNU) 4.8.1
GCC: (GNU) 4.8.1
GCC: (GNU) 4.8.1
...
Is there a way to remove them, or at least to put them into a separate section (such as .comment)?
Thanks!
propper solution: recompile your toolchain without --with-pkgversion flag.
hacky solution: open g++ in hex editor, find said string, replace with 0x00s
I have GCC 4.1.2 and like to build CLANG / LLVM using this GCC compiler version ony. I need source to source translation library so that I can modify my existing source code for some requirement.
Initially I faced issues regarding usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found during LLVM / CLANG make. So in downloaded and build GCC 4.5.0 and installed at a local path. I found that libstdc++.so.6 of GCC 4.5.0 has GLIBCXX_3.4.9 version. Since I wanted to compile using GCC 4.1.2 I set my dynamic library path as:
setenv LD_LIBRARY_PATH /local/gcc-4.5.0/lib64:$LD_LIBRARY_PATH
And stated the make again after 'make clean'. Now that error did not occur.
However I am facing issues while compiling 'Compiler-RT' modules. I am not sure for which purpose Compiler-RT module is required but it seems LLVM and CLANG has compiled well.
Is it possible that I can exclude Compiler-RT from download , build and installation:
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
Build LLVM and Clang only
Is it right to set my shared library path to use libstdc++.so.6 of GCC 4.5.0 and is Compiler-RT is a madatory step to download and build it with CLANG / LLVM
I found this sample code here - do I require Compiler-RT - I don't see reference to same but just wanted to confirm?