Dear Developers,

It is unfortunate that I am facing this issue and to my bad luck, I do not
see an answer on google as well.

Problem:

I have downloaded and compiled GCC 4.8.1 with the below configure options
on SLES 12 and post installation, created soft links cc c++ gcc and g++ to
point to gcc-4.8.1 and g++-4.8.1 .

./configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man
--libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-checking=release
--enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/
--with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap
--with-slibdir=/lib64 --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.8.1
--enable-linux-futex --without-system-libunwind --with-cpu=generic
--build=x86_64-suse-linux --disable-multilib --enable-languages=c,c++

A simple .c program would copilte which has a simple print with the new
compiler, but not the below one.

Program:
++++++++++
#include <stdio.h>
#include <sys/resource.h>

int main () {

printf("TRAP_BRKPT is: %d\n", TRAP_BRKPT);

return 0;
}
+++++++

ecomdev:/tmp # cc test.c
test.c: In function ‘main’:
test.c:6:31: error: ‘TRAP_BRKPT’ undeclared (first use in this function)
 printf("TRAP_BRKPT is: %d\n", TRAP_BRKPT);
                               ^
test.c:6:31: note: each undeclared identifier is reported only once for
each function it appears in
ecomdev:/tmp #

The cc include path is,
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib64/gcc/x86_64-suse-linux/4.8/include/
 /usr/lib64/gcc/x86_64-suse-linux/4.8/include-fixed
 /usr/lib64/gcc/x86_64-suse-linux/4.8.1/include
 /usr/lib64/gcc/x86_64-suse-linux/4.8.1/include-fixed
 /usr/local/include
 /usr/local/private-gcc/include
 /usr/include
End of search list.
# 1 "<stdin>"
# 1 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 1 "<command-line>" 2
# 1 "<stdin>"
ecomdev:/tmp #


Could you please guide as to what went wrong and help me out with the
compilation. I am super frustrated, having this issue around

Thanks and Regards,
Vinaya D R

Reply via email to