public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* GCC 4.8.1 unable to compile a .c File
@ 2019-03-23 15:14 Vinaya Dandur
  2019-03-23 16:22 ` Jonathan Wakely
  0 siblings, 1 reply; 9+ messages in thread
From: Vinaya Dandur @ 2019-03-23 15:14 UTC (permalink / raw)
  To: gcc

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-03-26 13:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-23 15:14 GCC 4.8.1 unable to compile a .c File Vinaya Dandur
2019-03-23 16:22 ` Jonathan Wakely
2019-03-23 16:25   ` Vinaya Dandur
2019-03-23 16:46     ` Paul Smith
2019-03-23 17:08     ` Jonathan Wakely
2019-03-23 17:25       ` Vinaya Dandur
2019-03-23 18:24         ` Paul Smith
2019-03-24  0:50           ` Vinaya Dandur
2019-03-26 13:07           ` Vinaya Dandur

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).