public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* compilation error
@ 2011-06-08 12:25 Rony Paul
  2011-06-08 13:31 ` Jonathan Wakely
  2011-06-08 13:47 ` Ian Lance Taylor
  0 siblings, 2 replies; 24+ messages in thread
From: Rony Paul @ 2011-06-08 12:25 UTC (permalink / raw)
  To: gcc-help

Dear All,

could you please tell me what type of error is the following code returning?

make[5]: Entering directory `/home/kosarker/Work/build-gcc/gcc'
/home/kosarker/Work/build-gcc/./gcc/xgcc
-B/home/kosarker/Work/build-gcc/./gcc/ -B/usr/local/spu/bin/
-B/usr/local/spu/lib/ -isystem /usr/local/spu/include -isystem
/usr/local/spu/sys-include    -O2 -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include  -I.
-I/home/kosarker/Work/build-gcc/spu/mea64/libgcc -I../../gcc-4.5.0/gcc
-I../../gcc-4.5.0/gcc//home/kosarker/Work/build-gcc/spu/mea64/libgcc
-I../../gcc-4.5.0/gcc/../include
-I../../gcc-4.5.0/gcc/../libcpp/include
-I../../gcc-4.5.0/gcc/../libdecnumber
-I../../gcc-4.5.0/gcc/../libdecnumber/dpd -I../libdecnumber    -g -O2
-mea64 -g0 -finhibit-size-directive -fno-inline -fno-exceptions
-fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize
-Dinhibit_libc  \
	  -c ../../gcc-4.5.0/gcc/crtstuff.c -DCRT_BEGIN \
	  -o /home/kosarker/Work/build-gcc/spu/mea64/libgcc/crtbegin.o
../../gcc-4.5.0/gcc/crtstuff.c:249:1: internal compiler error:
Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[5]: *** [/home/kosarker/Work/build-gcc/spu/mea64/libgcc/crtbegin.o] Error 1
make[5]: Leaving directory `/home/kosarker/Work/build-gcc/gcc'
make[4]: *** [gcc-extra-parts] Error 2
make[4]: Leaving directory `/home/kosarker/Work/build-gcc/spu/mea64/libgcc'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/home/kosarker/Work/build-gcc/spu/libgcc'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/home/kosarker/Work/build-gcc/spu/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/home/kosarker/Work/build-gcc'
make: *** [all] Error 2


----------------------------------------------------------------------------------------------------------------------------------------------
what I did that in the file c-typeck.c I have added some code, like following :

previously it was :

else if (codel == POINTER_TYPE && coder == INTEGER_TYPE)
    {
      /* An explicit constant 0 can convert to a pointer,
	 or one that results from arithmetic, even including
	 a cast to integer type.  */
	
		WARN_FOR_ASSIGNMENT (location, 0,
			     G_("passing argument %d of %qE makes "
				"pointer from integer without a cast"),
			     G_("assignment makes pointer from integer "
				"without a cast//// konica diff address space"),
			     G_("initialization makes pointer from "
				"integer without a cast"),
			     G_("return makes pointer from integer "
				"without a cast"));
			
		}



I have replaced it with :


else if (codel == POINTER_TYPE && coder == INTEGER_TYPE)
    {
      /* An explicit constant 0 can convert to a pointer,
	 or one that results from arithmetic, even including
	 a cast to integer type.  */

             tree ttl = TREE_TYPE (type);
	      tree ttr = TREE_TYPE (rhstype);
	      tree mvl = ttl;
	      tree mvr = ttr;
	      bool is_opaque_pointer;
	      int target_cmp = 0;   /* Cache comp_target_types () result.  */
	      addr_space_t asl;
	      addr_space_t asr;

   	      asl = TYPE_ADDR_SPACE (ttl);
	      asr = TYPE_ADDR_SPACE (ttr);

		if (asr != asl )
		{
		
		    WARN_FOR_ASSIGNMENT (location, 0,
			     G_("passing argument %d of %qE makes "
				"pointer from integer without a cast"),
			     G_("assignment makes pointer from integer "
				"without a cast"),
			     G_("initialization makes pointer from "
				"integer without a cast"),
			     G_("return makes pointer from integer "
				"without a cast"));
			
		}

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: Configuration Error
@ 2012-08-15 15:43 Jonathan Wakely
  2012-08-15 17:49 ` B B
  0 siblings, 1 reply; 24+ messages in thread
From: Jonathan Wakely @ 2012-08-15 15:43 UTC (permalink / raw)
  To: ron.stubbs; +Cc: gcc-help

On 15 August 2012 13:39, Ron Stubbs wrote:
> Hi,
>
> I get the following configuration error message when configuring GCC 4.8
> on an x86_64 suystem running Scientific linux 6.2.
>
> checking for the correct version of gmp.h... yes
> checking for the correct version of mpfr.h... yes
> checking for the correct version of mpc.h... yes
> checking for the correct version of the gmp/mpfr/mpc libraries... no
> configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC
> 0.8.0+.
> Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
>
> Although the version check for the .h files succeeds, the library check
> fails.
>
> The installed version are required libraries:
> gmp-4.3.1-7.el6_2.2.x86_64
> mpfr-2.4.1-6.el6.x86_64
> mpc-0.8.2
>
> I've tried with both ./configure and /configure --with-gmp=/usr/lib64
> --with-mpfr=/usr/lib64  --with-mpc=/usr/local/lib

1) Don't use ./configure, as documented at
http://gcc.gnu.org/install/configure.html and
http://gcc.gnu.org/wiki/FAQ#configure and
http://gcc.gnu.org/wiki/InstallingGCC you should build outside the
source directory.

2) /usr/lib64 is a library path, not the installation prefix. You
would want to use --with-gmp-lib=/usr/lib64 or --with-gmp=/usr but the
compiler will always look in /usr/lib64 anyway so you shouldn't need
to use any --with-xxx options for gmp, mpfr and mpc if they're
installed in /usr

For more specific information on what fails you will need to look in
the config.log file.

^ permalink raw reply	[flat|nested] 24+ messages in thread
* compilation error
@ 2006-10-07 18:58 ranjith kumar
  2006-10-07 19:36 ` Tim Prince
  0 siblings, 1 reply; 24+ messages in thread
From: ranjith kumar @ 2006-10-07 18:58 UTC (permalink / raw)
  To: gcc-help

Hi,
-------------------------------------------------------
#include <mmintrin.h>
int  main()
{
   __m64 m1 = 0x00ff00a300bc00ae;
   __m64 m2 = 0x0001000100010001;
 __m64 m3;
   unsigned char *data;
   unsigned char ch;
   int i;
//asm ("pmaddwd m1,m2\n\t");
   m3 =_mm_madd_pi16 (m1, m2);
   printf("value is %x%x\n", m1);
   printf("value is %x%x\n", m2);
   printf("value is %x%x\n", m3);
data = (char *)&m3;
   for ( i = 0; i < 8; i++)
        {
        printf("Element %d value is %x\n", i,
data[i]);
        }
   return;
}
------------------------------------------------------
I got the following error when I compiled the above
program with gcc 4.0.0 compiler on pentium4 processor.
The compilation command :
 gcc -march=pentium4 sample.c
----------------------------------------------
sample.c: In function `main':
sample.c:7: invalid initializer
sample.c:8: invalid initializer
----------------------------------------------
Can anyone help me.
Thanks in advance. 



		
___________________________________________________________ 
Try the all-new Yahoo! Mail. "The New Version is radically easier to use" – The Wall Street Journal 
http://uk.docs.yahoo.com/nowyoucan.html

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Compilation error..
@ 2005-07-18  4:24 Oleg Kotsyurbiy
  2005-07-18  5:51 ` Ian Lance Taylor
  0 siblings, 1 reply; 24+ messages in thread
From: Oleg Kotsyurbiy @ 2005-07-18  4:24 UTC (permalink / raw)
  To: gcc-help

Good day!
Tell, please, what am I doing wrong for correct compilation:
in Fedora Core 4 Linux I'm trying to compile GCC 3.2.3 version.
At some point I'm getting this error:
=====================================================================
In file included from /distr/gcc-3.2.3/gcc/rtl.c:24:
/distr/gcc-3.2.3/gcc/rtl.h:125: warning: type of bit-field &#8216;code&#8217; is a GCC extension
/distr/gcc-3.2.3/gcc/rtl.h:128: warning: type of bit-field &#8216;mode&#8217; is a GCC extension
gcc -c -DIN_GCC    -g  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H -DGENERATOR_FILE    -I. -I. -I/distr/gcc-3.2.3/gcc -I/distr/gcc-3.2.3/gcc/. -I/distr/gcc-3.2.3/gcc/config -I/distr/gcc-3.2.3/gcc/../include /distr/gcc-3.2.3/gcc/read-rtl.c -o read-rtl.o
In file included from /distr/gcc-3.2.3/gcc/read-rtl.c:24:
/distr/gcc-3.2.3/gcc/rtl.h:125: warning: type of bit-field &#8216;code&#8217; is a GCC extension
/distr/gcc-3.2.3/gcc/rtl.h:128: warning: type of bit-field &#8216;mode&#8217; is a GCC extension
/distr/gcc-3.2.3/gcc/read-rtl.c: In function &#8216;fatal_with_file_and_line&#8217;:
/distr/gcc-3.2.3/gcc/read-rtl.c:62: warning: traditional C rejects ISO C style function definitions
/distr/gcc-3.2.3/gcc/read-rtl.c: In function &#8216;read_rtx&#8217;:
/distr/gcc-3.2.3/gcc/read-rtl.c:662: error: invalid lvalue in increment
make[2]: *** [read-rtl.o] Error 1
make[2]: Leaving directory `/distr/compiled/gcc'
make[1]: *** [stage1_build] Error 2
make[1]: Leaving directory `/distr/compiled/gcc'
make: *** [bootstrap] Error 2
=============================================================================================

Thank you!

With the best regards,
Oleg Kotsyurbiy

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Compilation error
@ 2000-02-21 10:27 Jose Miguel A.C.Pires
  2000-02-21 10:39 ` llewelly
  2000-04-01  0:00 ` Jose Miguel A.C.Pires
  0 siblings, 2 replies; 24+ messages in thread
From: Jose Miguel A.C.Pires @ 2000-02-21 10:27 UTC (permalink / raw)
  To: help-gcc

*This message was transferred with a trial version of CommuniGate(tm) Pro*
Hello

I'm trying to compile this simple program

#include <stdio.h>
#include <math.h>

int main(void)
{
  float r=2;

  printf("A raiz de %2.0f e' %.6f", r, sqrt(r));

  return 0;
}

but i get the following errors.

/tmp/cca110161.o: In function `main':
/tmp/cca110161.o(.text+0x17): undefined reference to `sqrt'

I belive it's easy to solve but i have no one nearby to help
me. Thanks in advance.

J. M. Correia Pires


-- 
------------------------------------------------------------------------

Jose' Miguel A. Correia Pires
Departamento de Fisica - Universidade do Minho
Largo do Paco
PT-4700-320 BRAGA (PORTUGAL)
Phone: 351-253604320  Fax: 351-253678981
e-mail: jmcp@ci.uminho.pt

-------------------------------------------------------------------------

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

end of thread, other threads:[~2012-08-17  0:12 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-08 12:25 compilation error Rony Paul
2011-06-08 13:31 ` Jonathan Wakely
2011-06-08 13:47 ` Ian Lance Taylor
  -- strict thread matches above, loose matches on Subject: below --
2012-08-15 15:43 Configuration Error Jonathan Wakely
2012-08-15 17:49 ` B B
2012-08-15 17:57   ` Jonathan Wakely
2012-08-15 18:03     ` Compilation Error Ron Stubbs
2012-08-15 18:14       ` Marc Glisse
2012-08-15 18:46       ` B B
     [not found]         ` <CAH6eHdRV5NLCO-+iJw1FHqw+6EV-LSCNkhF-SJ0jZUPtdbwFKQ@mail.gmail.com>
2012-08-15 19:25           ` Jonathan Wakely
2012-08-15 19:36     ` Ron Stubbs
2012-08-16  3:59       ` Marc Glisse
2012-08-16 13:29         ` Ron Stubbs
2012-08-16 15:15           ` Tim Prince
2012-08-16 20:06           ` Marc Glisse
2012-08-17  0:12             ` Ron Stubbs
2012-08-17  7:23               ` Marc Glisse
2012-08-17  8:23                 ` Jonathan Wakely
2006-10-07 18:58 compilation error ranjith kumar
2006-10-07 19:36 ` Tim Prince
2005-07-18  4:24 Compilation error Oleg Kotsyurbiy
2005-07-18  5:51 ` Ian Lance Taylor
2005-07-18  7:45   ` Arturas Moskvinas
2000-02-21 10:27 Jose Miguel A.C.Pires
2000-02-21 10:39 ` llewelly
2000-04-01  0:00   ` llewelly
2000-04-01  0:00 ` Jose Miguel A.C.Pires

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).