[ https://issues.apache.org/jira/browse/THRIFT-5291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17216022#comment-17216022 ]
Yuxuan Wang commented on THRIFT-5291: ------------------------------------- [~emcp] no you don't need to build thrift source if you already have the compiler binary installed (e.g. from package manager) for building your own go implementations. But the tutorial does kind of require the automake toolchain and building from source, because tutorial is part of thrift's source code. If you want to avoid that for the tutorial, you can also just manually run the thrift compiler on the [tutorial thrift file|https://github.com/apache/thrift/blob/master/tutorial/tutorial.thrift], and then just run the [go tutorial source files|https://github.com/apache/thrift/tree/master/tutorial/go/src] directly from go toolchain. You do need some extra work to make the go toolchain able to find the thrift compiled code (the "tutorial" import from the source files: https://github.com/apache/thrift/blob/64c2a4b87ab356e05033045492e51f1ad73a795b/tutorial/go/src/server.go#L26). This is handled automatically by the automake toolchain, but if you skipped that you need to refer to go's documentation on it: https://golang.org/doc/gopath_code.html > golang tutorial seems broken > ---------------------------- > > Key: THRIFT-5291 > URL: https://issues.apache.org/jira/browse/THRIFT-5291 > Project: Thrift > Issue Type: Bug > Components: Go - Library > Affects Versions: 0.13.0 > Environment: Mac OS, Ubuntu 20.04 > Reporter: Erik > Priority: Minor > Attachments: image-2020-10-07-23-13-17-967.png > > > I admit, I am a bit new to golang... but not new to thrift. I am using > thrift Servers written in C#, Python, Java... but I would LOVE to look into > golang. > I first started with my own teams .thrift file... but soon realized that I > didn't understand golang enough to create the Handler... got lots of errors. > Plan B - well just spin up the tutorial, right? Not quite. I see in the > golang tutorial a Makefile.am ... I have tried `autoreconf` `cmake` `make -f` > .. none of these worked and there is no getting started read me or hint as to > what tool makes this tutorial come together... which would help me then > understand what I need to do to finish my own teams .thrift server. > > {code} > cmake . > CMake Error: The source directory "~/go" does not appear to contain > CMakeLists.txt. > Specify --help for usage, or press the help button on the CMake GUI. > autoreconf > autoreconf: 'configure.ac' or 'configure.in' is required > make -f Makefile.am > make: *** No rule to make target `/tutorial/tutorial.thrift', needed by > `gen-go/tutorial/calculator.go'. Stop. > {code} > folder structure is as follows > > -- This message was sent by Atlassian Jira (v8.3.4#803005)