compiling with gccgo from packaged binaries

358 views
Skip to first unread message

kortschak

unread,
Apr 28, 2012, 2:13:22 AM4/28/12
to golan...@googlegroups.com
This is really an ubuntu issue, but I thought I'd ask here since I'm likely to get a better answer, faster.

I've installed gccgo from debs from the ubuntu 12.04 repositories, but gccgo fails with:

/usr/bin/ld: cannot find -lgcc_s
collect2: error: ld returned 1 exit status

No gcc package for 4.7 provides libgcc_s as far as I can see. Have other people tried this? What is a solution?

thanks

kortschak

unread,
Apr 28, 2012, 6:11:20 AM4/28/12
to golan...@googlegroups.com
Resolved:

go build -compiler gccgo -gccgoflags '-static-libgcc'

Ian Lance Taylor

unread,
Apr 29, 2012, 12:16:03 AM4/29/12
to kortschak, golan...@googlegroups.com
kortschak <dan.ko...@adelaide.edu.au> writes:

> No gcc package for 4.7 provides libgcc_s as far as I can see.

On my Ubuntu Lucid system, it's in the libgcc1 package. I don't know if
it has moved around since then.

(I saw that you resolved your issue anyhow.)

Ian

Dan Kortschak

unread,
Apr 29, 2012, 2:02:46 AM4/29/12
to Ian Lance Taylor, golan...@googlegroups.com
Yes, it seems that libgcc_s is provided for gcc <= 4.6, but not 4.7. The
fix I found was explained as due to the absence of dynamically linked
libraries with gccgo-4.7:

(https://bugs.launchpad.net/ubuntu/+source/gccgo-4.7/+bug/966570)
Reply all
Reply to author
Forward
0 new messages