Go on L4: Difference between revisions

From TUDOS-Wiki
Jump to navigationJump to search
BjoernD (talk | contribs)
No edit summary
BjoernD (talk | contribs)
Line 3: Line 3:
== Preparation ==
== Preparation ==


Go on L4 works in conjunction with the gccgo compiler which you need to set up yourself beforehand. There is a detailed description available on the [http://golang.org/doc/gccgo_install.html Go homepage]. In short:
Go on L4 works in conjunction with the gccgo compiler which you need to set up yourself beforehand.


* gccgo requires some libraries to be available on your system. On Ubuntu do:
  sudo apt-get install libmpc-dev libmpfr-dev libgmp3-dev
* For building gccgo, a detailed description is available on the [http://golang.org/doc/gccgo_install.html Go homepage]. In short:
   # create gccgo dir
   # create gccgo dir
   mkdir gccgo
   mkdir gccgo
Line 15: Line 18:
   mkdir binutils
   mkdir binutils
    
    
  # GOLD linker
   cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src login
   cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src login
   [password is "anoncvs"]
   [password is "anoncvs"]
Line 20: Line 24:
   mkdir obj
   mkdir obj
   cd obj
   cd obj
   ../src/configure --enable-gold --prefix=/home/doebel/local
   ../src/configure --enable-gold --prefix=/home/user/gccgo/install
  make
  make install
 
  # GCCGO
  svn checkout svn://gcc.gnu.org/svn/gcc/branches/gccgo gccgo
  mkdir obj
  cd obj
  ../gccgo/configure --enable-languages=c,c++,go --with-ld=/home/doebel/src/gccgo/install/bin/ld --prefix=/home/user/gccgo/install
   make
   make
   make install
   make install

Revision as of 16:01, 23 August 2011

The runtime for the Go programming language has been ported to L4Re (and will be released soon).

Preparation

Go on L4 works in conjunction with the gccgo compiler which you need to set up yourself beforehand.

  • gccgo requires some libraries to be available on your system. On Ubuntu do:
 sudo apt-get install libmpc-dev libmpfr-dev libgmp3-dev
  • For building gccgo, a detailed description is available on the Go homepage. In short:
 # create gccgo dir
 mkdir gccgo
 cd gccgo
 
 # install dir for the local build
 mkdir install
 
 # this is where binutils go
 mkdir binutils
 
 # GOLD linker
 cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src login
 [password is "anoncvs"]
 cvs -z 9 -d :pserver:anoncvs@sourceware.org:/cvs/src co binutils
 mkdir obj
 cd obj
 ../src/configure --enable-gold --prefix=/home/user/gccgo/install
 make
 make install
 
 # GCCGO
 svn checkout svn://gcc.gnu.org/svn/gcc/branches/gccgo gccgo
 mkdir obj
 cd obj
 ../gccgo/configure --enable-languages=c,c++,go --with-ld=/home/doebel/src/gccgo/install/bin/ld --prefix=/home/user/gccgo/install
 make
 make install

Troubleshooting

libtool version mismatch

Q: When building libgo from source, I get an error like this:

 libtool: Version mismatch error.  This is libtool 2.2.6b Debian-2.2.6b-2ubuntu3, but the
 libtool: definition of this LT_INIT comes from libtool 2.2.7a.
 libtool: You should recreate aclocal.m4 with macros from libtool 2.2.6b Debian-2.2.6b-2ubuntu3
 libtool: and run autoconf again.

A: Remove gccgo/libgo/config/ltversion.m4 and gccgo/libgo/config/ltmain.m4. Continue build process.