nigifabio / go9p

Automatically exported from code.google.com/p/go9p
Other
0 stars 0 forks source link

doesn't install with goinstall #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. goinstall go9p.googlecode.com/hg/p/ #works fine
   goinstall go9p.googlecode.com/hg/p/clnt

2. error:
goinstall: === cd 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt; gomake -f- 
install
8g -o _go_.8 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/clnt.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/close.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/write.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stat.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_http.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/walk.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/open.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/read.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/remove.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_none.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/mount.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/pool.go 
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_none.go:3: 
statsRegister redeclared in this block
    previous declaration at /home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_http.go:10
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_none.go:6: 
*Clnt·statsRegister redeclared in this block
    previous declaration at /home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_http.go:29
/home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_none.go:9: 
*Clnt·statsUnregister redeclared in this block
    previous declaration at /home/johnny/dev/golang/src/pkg/go9p.googlecode.com/hg/p/clnt/stats_http.go:33
make: *** [_go_.8] Error 1
--- exit status 2
goinstall: installing go9p.googlecode.com/hg/p/clnt: running gomake: exit 
status 2

3. same thing for p/srv

What is the expected output? What do you see instead?
Expected p/clnt and p/srv to install properly

What version of the product are you using? On what operating system?
latest mercurial revision of both golang and go9p

Original issue reported on code.google.com by sor...@gmail.com on 24 Sep 2010 at 2:56

GoogleCodeExporter commented 9 years ago
The problem is that goinstall compiles stats_http aswell as stats_none for some 
reason.
 - first fix is that http.HandleFunc passes a http.ResponseWriter argument as first argument (see http://code.google.com/r/sorosj-go9p/source/detail?r=d76e80d6a7a6cc6334c430e7b45a736bc1c1a4a1 )
 - second is to unify the stats modules so the functions aren't declared twice, i have a rudimentary fix here http://code.google.com/r/sorosj-go9p/source/detail?r=c8567ff204f3ca8735dd52846065d94cf19aa1d1
The problem was that goinstall was trying to compile both stats_http and 
stats_none. I'm not sure the second fix is pretty, but at least it compiles and 
installs with goinstall

Original comment by sor...@gmail.com on 3 Oct 2010 at 2:58

GoogleCodeExporter commented 9 years ago
there are several other problems, including bugs with missing loggers.

Original comment by mirtchov...@gmail.com on 19 Oct 2010 at 3:09

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 47d7b289cc.

Original comment by mirtchov...@gmail.com on 29 Oct 2010 at 7:02

GoogleCodeExporter commented 9 years ago
still doesn't install with goinstall, the commands i am trying are:
1, goinstall go9p.googlecode.com/hg/p (this works)
2, goinstall go9p.googlecode.com/hg/p/clnt (this doesn't work)
3, goinstall go9p.googlecode.com/hg/p/srv (this doesn't work either)

Original comment by sor...@gmail.com on 26 Nov 2010 at 4:48

GoogleCodeExporter commented 9 years ago
this is mainly due to incorrect use of the logging package: change all the 
log.Stderr calls to log.Println and the package compiles (haven't tested with 
goinstall since the repo is not in my control and i'm too lazy to fork it right 
now ;)
Diffs attached

Original comment by sor...@gmail.com on 26 Nov 2010 at 6:02

Attachments:

GoogleCodeExporter commented 9 years ago
there are no more calls to log.Stderr in go9p. are you sure you've updated to 
the latest revision?

Original comment by mirtchov...@gmail.com on 26 Nov 2010 at 6:24

GoogleCodeExporter commented 9 years ago
you're right, i had a stale hg repo hanging around. sorry.
well, both clnt and srv still fail goinstall with similar errors, dunno how 
important (or possible) it is for you to make go9p compatible with goinstall. 
The errors are attached.

Original comment by sor...@gmail.com on 26 Nov 2010 at 6:40

Attachments:

GoogleCodeExporter commented 9 years ago
ok, that particular bug is due to goinstall not using our makefile. i've 
reintroduced a fix.

Original comment by mirtchov...@gmail.com on 26 Nov 2010 at 6:56