[go-nuts] GCCGO instalation

185 views
Skip to first unread message

Karla Falcão

unread,
May 10, 2011, 11:50:05 AM5/10/11
to golan...@googlegroups.com
During the installation of gccgo was at last make command when he gave this error:

/usr/include/linux/errno.h:4:23: erro fatal: asm/errno.h: No such file or directory
compilation terminated.
make[3]: ** [_muldi3.o] Error 1
make[3]: Leaving directory `/home/karla/cvs/objdir/i686-pc-linux-gnu/libgcc'
make[2]: ** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/karla/cvs/objdir'
make[1]: ** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/karla/cvs/objdir'
make: ** [all] Error 2

I'll have to install the errno and restart the installation from scratch?

--Karla

Ian Lance Taylor

unread,
May 10, 2011, 12:24:03 PM5/10/11
to Karla Falcão, golan...@googlegroups.com
Karla Falcão <icgop...@gmail.com> writes:

Yes.

On Ubuntu /usr/include/asm/errno.h is in the linux-libc-dev package. On
Fedora it's in the kernel-headers package.

Ian

Karla Falcão

unread,
May 11, 2011, 6:24:12 PM5/11/11
to golan...@googlegroups.com
Ok, problem solved!

Now, there was another problem which I tried to solve by installing packages and reinstalling everything, but I did not progress:

/opt/gold/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[3]: ** [libgcc_s.so] Erro 1
make[3]: Saindo do diretório `/home/karla/cvs/objdir/i686-pc-linux-gnu/libgcc'
make[2]: ** [all-stage1-target-libgcc] Erro 2
make[2]: Saindo do diretório `/home/karla/cvs/objdir'
make[1]: ** [stage1-bubble] Erro 2
make[1]: Saindo do diretório `/home/karla/cvs/objdir'
make: ** [all] Erro 2

--Karla

2011/5/10 Ian Lance Taylor <ia...@google.com>
Karla Falcão <icgop...@gmail.com> writes:

> I already have installed this package, and yet on the installation failure

Does the file /usr/include/asm/errno.h exist on your system?

If not, you will need to figure out which package provides it for your
system.

Ian


> 2011/5/10 Ian Lance Taylor <ia...@google.com>

Ian Lance Taylor

unread,
May 12, 2011, 4:14:04 PM5/12/11
to Karla Falcão, golan...@googlegroups.com
Karla Falcão <icgop...@gmail.com> writes:

> Ok, problem solved!
>
> Now, there was another problem which I tried to solve by installing packages
> and reinstalling everything, but I did not progress:
>
> /opt/gold/bin/ld: cannot find -lc
> collect2: ld returned 1 exit status
> make[3]: ** [libgcc_s.so] Erro 1
> make[3]: Saindo do diretório
> `/home/karla/cvs/objdir/i686-pc-linux-gnu/libgcc'
> make[2]: ** [all-stage1-target-libgcc] Erro 2
> make[2]: Saindo do diretório `/home/karla/cvs/objdir'
> make[1]: ** [stage1-bubble] Erro 2
> make[1]: Saindo do diretório `/home/karla/cvs/objdir'
> make: ** [all] Erro 2

I assume you are building a native compiler, which is what happens by
default. The error "cannot find -lc" on GNU/Linux implies that you are
missing the file /usr/lib/libc.so. Does that file exist on your system?

Ian

Karla Falcão

unread,
May 12, 2011, 6:00:32 PM5/12/11
to Ian Lance Taylor, golan...@googlegroups.com
>>I assume you are building a native compiler, which is what happens by
>>default.  The error "cannot find -lc" on GNU/Linux implies that you are
>>missing the file /usr/lib/libc.so.  Does that file exist on your system?

The file /usr/lib/libc.so does not exist. How do I get it? I already have installed the package linux-libc-dev.

--Karla

2011/5/12 Ian Lance Taylor <ia...@google.com>

Ian Lance Taylor

unread,
May 12, 2011, 7:47:24 PM5/12/11
to Karla Falcão, golan...@googlegroups.com
Karla Falcão <icgop...@gmail.com> writes:

>>>I assume you are building a native compiler, which is what happens by
>>>default. The error "cannot find -lc" on GNU/Linux implies that you are
>>>missing the file /usr/lib/libc.so. Does that file exist on your system?
>
> The file /usr/lib/libc.so does not exist. How do I get it? I already have
> installed the package linux-libc-dev.

On my Ubuntu Lucid based system the file /usr/lib/libc.so is in the
libc6-dev package.

Ian

Karla Falcão

unread,
May 17, 2011, 1:43:06 PM5/17/11
to golan...@googlegroups.com


---------- Mensagem encaminhada ----------
De: Karla Falcão <icgop...@gmail.com>
Data: 17 de maio de 2011 14:42
Assunto: Re: [go-nuts] GCCGO instalation
Para: Ian Lance Taylor <ia...@google.com>


Which files that specify the semantics of Go in gccgo compiler?

--Karla


2011/5/13 Ian Lance Taylor <ia...@google.com>
Karla Falcão <icgop...@gmail.com> writes:

> Now ... If I change something, I'll have to make again? Where can I find a
> better specification about it?

If you change in something in the gccgo source code, then you have to
run make again to rebuild gccgo, yes.

I don't know what kind of specification you are looking for.  gccgo
works like the rest of gcc, and there is a lot of documentation about
gcc available.

Ian



Ian Lance Taylor

unread,
May 17, 2011, 2:04:14 PM5/17/11
to Karla Falcão, golan...@googlegroups.com
Karla Falcão <icgop...@gmail.com> writes:

> Which files that specify the semantics of Go in gccgo compiler?

The ones in gcc/go. In gcc/go/gofrontend you will find expressions.cc,
statements.cc, and types.cc.

Ian

Karla Falcão

unread,
May 25, 2011, 2:35:46 PM5/25/11
to golan...@googlegroups.com
Sorry, that I always click on the button to answer only ...

Thanks.

--Karla
2011/5/24 Ian Lance Taylor <ia...@google.com>
Karla Falcão <icgop...@gmail.com> writes:

> The full typechecker are types.cc and types.h files?

In general I would prefer that questions be asked on the mailing list
rather than to me directly.  Thanks.

No, type checking is done in the check_types pass, and each Statement
and Expression has its own appropriate implementation.

Ian


> 2011/5/17 Ian Lance Taylor <ia...@google.com>

Karla Falcão

unread,
May 25, 2011, 8:35:33 PM5/25/11
to golan...@googlegroups.com
What does this error :

-o generic-morestack-thread.o -MT generic-morestack-thread.o -MD -MP -MF generic-morestack-thread.dep -fexceptions -c ../../../gccgo/libgcc/generic-morestack-thread.c
../../../gccgo/libgcc/generic-morestack-thread.c: In the função ‘__wrap_pthread_create’:
../../../gccgo/libgcc/generic-morestack-thread.c:156:12: error: ‘EAGAIN’ undeclared (first use in this function)
../../../gccgo/libgcc/generic-morestack-thread.c:156:12: note: each undeclared identifier is reported only once for each function it appears in
make[3]: ** [generic-morestack-thread.o] Erro 1
make[3]: Leaving the directory `/home/karla/GCCGO/objdir/i686-pc-linux-gnu/libgcc'

make[2]: ** [all-stage1-target-libgcc] Erro 2
make[2]: Leaving the directory `/home/karla/GCCGO/objdir'

make[1]: ** [stage1-bubble] Erro 2
make[1]: Leaving the directory `/home/karla/GCCGO/objdir'

make: ** [all] Error 2

Thanks.

--Karla

Ian Lance Taylor

unread,
May 25, 2011, 8:58:29 PM5/25/11
to Karla Falcão, golan...@googlegroups.com
Karla Falcão <icgop...@gmail.com> writes:

> What does this error :
>
> -o generic-morestack-thread.o -MT generic-morestack-thread.o -MD -MP -MF
> generic-morestack-thread.dep -fexceptions -c
> ../../../gccgo/libgcc/generic-morestack-thread.c
> ../../../gccgo/libgcc/generic-morestack-thread.c: In the função
> ‘__wrap_pthread_create’:
> ../../../gccgo/libgcc/generic-morestack-thread.c:156:12: error: ‘EAGAIN’
> undeclared (first use in this function)
> ../../../gccgo/libgcc/generic-morestack-thread.c:156:12: note: each
> undeclared identifier is reported only once for each function it appears in
> make[3]: ** [generic-morestack-thread.o] Erro 1
> make[3]: Leaving the directory
> `/home/karla/GCCGO/objdir/i686-pc-linux-gnu/libgcc'
> make[2]: ** [all-stage1-target-libgcc] Erro 2
> make[2]: Leaving the directory `/home/karla/GCCGO/objdir'
> make[1]: ** [stage1-bubble] Erro 2
> make[1]: Leaving the directory `/home/karla/GCCGO/objdir'
> make: ** [all] Error 2

Looks like the file gcc/generic-morestack-thread.c should have the line

#include <errno.h>

right by the existing line

#include <pthread.h>

I guess on some versions of GNU/Linux <pthread.h> includes <errno.h>, or
something like that. Rather odd that nobody else has noticed this,
though, as this file is compiled for all languages, not just for Go.

Ian

Reply all
Reply to author
Forward
0 new messages