From: Alan W. I. <ir...@be...> - 2014-01-24 22:45:29
|
On 2014-01-24 09:01-0800 Alan W. Irwin wrote: > Would you be willing to write a README file at > https://github.com/hailiang/go-plplot/tree/master/c/check that would > help a Go Newbie like me to run your checker? Hi Hǎiliàng: I realized you could not respond immediately to that request because it is night time in your time zone, so here is what I have tried so far following what various go language tutorials have said. I eventually had partial success. Note, some of these steps are erroneous, but you (or I) could edit them for the README file into the successful subset of steps that need to be done to allow someone else to use your check code. I installed the gccxml and golang Debian stable packages. I then tried the following: irwin@raven> export GOPATH=/home/irwin/go irwin@raven> cd $GOPATH irwin@raven> go get github.com/hailiang/go-plplot/tree/master/c/check package github.com/hailiang/go-plplot/tree/master/c/check imports github.com/hailiang/go-plplot/tree/master/c/check imports github.com/hailiang/go-plplot/tree/master/c/check: import "github.com/hailiang/go-plplot/tree/master/c/check": cannot find package The "go get" command actually downloaded about ~100 files before that error, including, e.g., /home/irwin/go/src/pkg/github.com/hailiang/go-plplot/c/check/util.go /home/irwin/go/src/pkg/github.com/hailiang/go-plplot/c/check/main.go /home/irwin/go/src/pkg/github.com/hailiang/go-plplot/c/check/xmldoc.go At least one issue (I found later with 1.2) was the "tree/master" in the above "go get" command which should have been removed, but before I realized that issue, I thought maybe the trouble might be due to my old version (1.0.2) of the golang package from Debian stable so I used apt-src to build the Debian testing version of golang and installed all the go-related *.deb packages that were built by apt-src. That gives me access to 1.2, e.g., irwin@raven> go version go version go1.2 linux/amd64 With that version after removing everything in GOPATH I tried irwin@raven> cd $GOPATH irwin@raven> go get github.com/hailiang/go-plplot/c/check irwin@raven> go build github.com/hailiang/go-plplot/c/check with no issues, and $GOPATH/check was built as a result. However, I then tried following up on that nice success with irwin@raven> $GOPATH/bin/check \ -header=/home/software/plplot_svn/HEAD/plplot_allura/include/plplot.h \ -apixml=/home/software/plplot_svn/HEAD/plplot_allura/doc/docbook/src/api.xml plplot.h:36:22: error: plConfig.h: No such file or directory plplot.h:120:19: error: pldll.h: No such file or directory [...] where [...] stands for a whole host of error messages because of those missing configured headers. I then tried running the same command from the (PLplot build tree) directory where the configured plConfig.h and pldll.h are located, but still they cannot be found so the above error messages are still the result. Finally, I copied plplot.h from the source tree to the build tree location where plConfig.h and pldll.h are located and used -header=plplot.h from that directory ==> partial success! (Note, a more convenient method for finding the required files would simply be to allow the user to specify the top directories of the PLplot source tree and PLplot build tree, and then let the check programme figure out the correct locations of plplot.h, the configured headers, and api.xml from that information.) The check app I built as above ran OK, but I labelled it only as a partial success because it was the first version you created which errored out on the first count mismatch rather than continuing. Did you forget to commit your added work on check or do I have to change the location above (github.com/hailiang/go-plplot/c/check) to something else to get access to your latest version of check (which should continue past the count mismatch, compare the types, and possibly even implement the more convenient method I suggested above for finding the required files). Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |