tags:

views:

230

answers:

1

Hi

I am trying to compile go file using gccgo , i installed on my ubuntu 9.10 machine . when i compiled

 $gccgo -c hello.go

hello.o file is generated , while trying to link and to form an executable

$gccgo -o hello hello.o

i get the following error

 /usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/../../../libgo.so: undefined reference to `__sync_fetch_and_add_4'
/usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0/../../../libgo.so: undefined reference to `__sync_bool_compare_and_swap_4'
collect2: ld returned 1 exit status

Am i missing something ? , i have also set my LD_LIBRARY_PATH in my environment . Thanks

A: 

Maybe try following the advice in this post and pass -march=i486 to the compiler? (or -march=i686)

Suppressingfire
@Supressingfire Thanks it did help to some extent , i have shared my experience in installing gccgo on ubuntu on my blog http://gotiny.co.cc/google-gccgo .Hope this helps for the needy
YetAnotherCoder