/usr/bin/ld: cannot find -lgcc_s

Bug #966570 reported by Benjamin Drung
56
This bug affects 11 people
Affects Status Importance Assigned to Milestone
gccgo-4.7 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

I tried to compile a simple hello world go application, but it fails to link:

$ gccgo -o Go hello-world.go
/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status

I found /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so shipped by gcc-4.6, but gccgo is based on GCC 4.7 and there is no gcc-4.7 in Ubuntu 12.04 (precise).

Revision history for this message
Benjamin Drung (bdrung) wrote :

Here's hello-world.go.

Revision history for this message
Benjamin Drung (bdrung) wrote :

gccgo-4.7 4.7.0-0ubuntu3 still has this problem.

Revision history for this message
Matthias Klose (doko) wrote :

expected. gccgo-4.7 only comes with the static runtime libraries, so please use -static-libgcc

Changed in gccgo-4.7 (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Matt Joiner (anacrolix) wrote :

This can be passed via `go build -compiler gccgo -gccgoflags '-static-libgcc'`, see http://stackoverflow.com/a/10597279/149482.

Revision history for this message
Xan (dxpublica) wrote :

@Matthias:
Does we can put -static-libgcc as "default" when we call gccgo?

Revision history for this message
shawnlandden (shawnlandden) wrote :

why does debian unstable gccgo work?

Revision history for this message
hdante (hdante) wrote :

Then make gccgo come with dynamic libraries.

Revision history for this message
Matthias Klose (doko) wrote :

gccgo is built without restrictions in quantal. closing the issue. I'll eventually update the ubuntu-toolchain-r PPA with a 4.7.2 gcc-4.7 build too.

Changed in gccgo-4.7 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.