goprotobuf vs go+gccgo

90 views
Skip to first unread message

Albert Strasheim

unread,
Feb 12, 2012, 6:07:10 AM2/12/12
to golang-nuts
Hello all

I'm trying to build goprotobuf with gccgo using the go tool with Go at
tip, plus CL 5650066.

http://codereview.appspot.com/5650066/

I rearranged my goprotobuf source tree to follow the go conventions.
It looks like this:

src/code.google.com/p/goprotobuf/cmd/protoc-gen-go/doc.go
src/code.google.com/p/goprotobuf/cmd/protoc-gen-go/main.go
src/code.google.com/p/goprotobuf/compiler/descriptor/descriptor.pb.go
src/code.google.com/p/goprotobuf/compiler/descriptor/
descriptor.pb.golden
src/code.google.com/p/goprotobuf/compiler/generator/generator.go
src/code.google.com/p/goprotobuf/compiler/plugin/plugin.pb.go
src/code.google.com/p/goprotobuf/compiler/plugin/plugin.pb.golden
src/code.google.com/p/goprotobuf/compiler/testdata/
extension_base.proto
src/code.google.com/p/goprotobuf/compiler/testdata/
extension_extra.proto
src/code.google.com/p/goprotobuf/compiler/testdata/extension_test.go
src/code.google.com/p/goprotobuf/compiler/testdata/
extension_user.proto
src/code.google.com/p/goprotobuf/compiler/testdata/imp2.proto
src/code.google.com/p/goprotobuf/compiler/testdata/imp.pb.go.golden
src/code.google.com/p/goprotobuf/compiler/testdata/imp.proto
src/code.google.com/p/goprotobuf/compiler/testdata/main.go
src/code.google.com/p/goprotobuf/compiler/testdata/multi1.proto
src/code.google.com/p/goprotobuf/compiler/testdata/multi2.proto
src/code.google.com/p/goprotobuf/compiler/testdata/multi3.proto
src/code.google.com/p/goprotobuf/compiler/testdata/test.pb.go.golden
src/code.google.com/p/goprotobuf/compiler/testdata/test.proto
src/code.google.com/p/goprotobuf/proto/all_test.go
src/code.google.com/p/goprotobuf/proto/clone.go
src/code.google.com/p/goprotobuf/proto/clone_test.go
src/code.google.com/p/goprotobuf/proto/decode.go
src/code.google.com/p/goprotobuf/proto/decode.go.orig
src/code.google.com/p/goprotobuf/proto/encode.go
src/code.google.com/p/goprotobuf/proto/encode.go.orig
src/code.google.com/p/goprotobuf/proto/equal.go
src/code.google.com/p/goprotobuf/proto/equal_test.go
src/code.google.com/p/goprotobuf/proto/extensions.go
src/code.google.com/p/goprotobuf/proto/lib.go
src/code.google.com/p/goprotobuf/proto/message_set.go
src/code.google.com/p/goprotobuf/proto/properties.go
src/code.google.com/p/goprotobuf/proto/testdata/test.pb.go.golden
src/code.google.com/p/goprotobuf/proto/testdata/test.proto
src/code.google.com/p/goprotobuf/proto/text.go
src/code.google.com/p/goprotobuf/proto/text_parser.go
src/code.google.com/p/goprotobuf/proto/text_parser_test.go
src/code.google.com/p/goprotobuf/proto/text_test.go

I then add my toplevel goprotobuf directory GOPATH and run:

GC=gccgo go install ./...

which produces:

# code.google.com/p/goprotobuf/cmd/protoc-gen-go
gccgo: error: $WORK/code.google.com/p/goprotobuf/libproto.a: No such
file or directory
gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/
libdescriptor.a: No such file or directory
gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/libplugin.a:
No such file or directory
gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/
libgenerator.a: No such file or directory

at this point, pkg looks like this:

pkg/gccgo/linux_amd64/code.google.com/p/goprotobuf/compiler/
libdescriptor.a
pkg/gccgo/linux_amd64/code.google.com/p/goprotobuf/compiler/
libgenerator.a
pkg/gccgo/linux_amd64/code.google.com/p/goprotobuf/compiler/
libplugin.a
pkg/gccgo/linux_amd64/code.google.com/p/goprotobuf/libproto.a

What am I doing wrong?

Regards

Albert

David Symonds

unread,
Feb 12, 2012, 6:17:13 AM2/12/12
to Albert Strasheim, golang-nuts

We're working on it. It should be in a better shape later this week.

Dave.

Rob 'Commander' Pike

unread,
Feb 12, 2012, 6:17:35 AM2/12/12
to Albert Strasheim, golang-nuts
i hope to submit a CL in the next couple of days that puts the goprotobuf stuff back together, bless its black heart. i have the plugin and library working but there are issues packaging the compiler tests.

i have not tried to make it work with gccgo.

-rob

Rémy Oudompheng

unread,
Feb 12, 2012, 6:19:35 AM2/12/12
to Albert Strasheim, golang-nuts
On 2012/2/12 Albert Strasheim <ful...@gmail.com> wrote:
> Hello all
>
> I'm trying to build goprotobuf with gccgo using the go tool with Go at
> tip, plus CL 5650066.
>
> http://codereview.appspot.com/5650066/
>
> # code.google.com/p/goprotobuf/cmd/protoc-gen-go
> gccgo: error: $WORK/code.google.com/p/goprotobuf/libproto.a: No such
> file or directory
> gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/
> libdescriptor.a: No such file or directory
> gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/libplugin.a:
> No such file or directory
> gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/
> libgenerator.a: No such file or directory

"go build" works correctly, so I guess it comes from the cahnge to the
go tool in

http://code.google.com/p/go/source/detail?r=b6fc98fcfd70e7283290e4c5f16736990287e442

which seems was submitted unexpectedly.

Rémy.

Rémy Oudompheng

unread,
Feb 12, 2012, 6:25:22 AM2/12/12
to Albert Strasheim, golang-nuts
On 2012/2/12 Rémy Oudompheng <remyoud...@gmail.com> wrote:
> On 2012/2/12 Albert Strasheim <ful...@gmail.com> wrote:
>> Hello all
>>
>> I'm trying to build goprotobuf with gccgo using the go tool with Go at
>> tip, plus CL 5650066.
>>
>> http://codereview.appspot.com/5650066/
>>
>> # code.google.com/p/goprotobuf/cmd/protoc-gen-go
>> gccgo: error: $WORK/code.google.com/p/goprotobuf/libproto.a: No such
>> file or directory
>> gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/
>> libdescriptor.a: No such file or directory
>> gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/libplugin.a:
>> No such file or directory
>> gccgo: error: $WORK/code.google.com/p/goprotobuf/compiler/
>> libgenerator.a: No such file or directory

You may try this change but I'm not sure it's the correct one.

diff -r f7aed2bd4786 src/cmd/go/build.go
--- a/src/cmd/go/build.go Sun Feb 12 15:59:21 2012 +0900
+++ b/src/cmd/go/build.go Sun Feb 12 12:24:07 2012 +0100
@@ -1074,7 +1074,7 @@
if a.p != nil && !seen[a.p] {
seen[a.p] = true
if !a.p.Standard {
- afiles = append(afiles, a.target)
+ afiles = append(afiles, a.p.target)
}
ldflags = append(ldflags, a.p.CgoLDFLAGS...)
}

Albert Strasheim

unread,
Feb 12, 2012, 6:36:33 AM2/12/12
to Rémy Oudompheng, golang-nuts
Hello

Thanks, that fixed it.

Regards

Albert

On Sun, Feb 12, 2012 at 1:25 PM, Rémy Oudompheng


<remyoud...@gmail.com> wrote:
> On 2012/2/12 Rémy Oudompheng <remyoud...@gmail.com> wrote:
>> On 2012/2/12 Albert Strasheim <ful...@gmail.com> wrote:
>>> I'm trying to build goprotobuf with gccgo using the go tool with Go at
>>> tip, plus CL 5650066.

Reply all
Reply to author
Forward
0 new messages