mjl- / duit

pure go, cross-platform, MIT-licensed ui toolkit for developers
MIT License
951 stars 38 forks source link

build failing on OSX #7

Closed ghost closed 3 years ago

ghost commented 6 years ago

Its a bit confusing what with the repathing. Cant find it expects "devdraw".. .. Is it in the 9fans.net/go/draw gopath ?

make build
cd /Users/apple/workspace/go/src/github.com/mjl-/duit/examples/basic/ && go build main.go && ./main
2018/04/19 10:04:54 new duit: drawfcall.New: exec: "devdraw": executable file not found in $PATH
make: *** [build] Error 1

My Make file:

# Duit is a Desktop Gui sysem for golang.

LIBPATH=github.com/mjl-/duit
LIBGOPATH=$(GOPATH)/src/$(LIBPATH)

PLAN9_LIBPATH=github.com/9fans/plan9
PLAN9_LIBGOPATH=$(GOPATH)/src/$(PLAN9_LIBPATH)

PLAN9A_LIBPATH=9fans.net/go/draw
PLAN9A_LIBGOPATH=$(GOPATH)/src/$(PLAN9A_LIBPATH)

print:
    @echo LIBPATH $(LIBPATH)
    @echo LIBGOPATH $(LIBGOPATH)

    @echo PLAN9_LIBPATH $(PLAN9_LIBPATH)
    @echo PLAN9_LIBGOPATH $(PLAN9_LIBGOPATH)

    # check plan9 path is correct
    stat $(PLAN9A_LIBGOPATH)

dep:
    # duit
    go get -u -d $(LIBPATH)
    cd $(LIBGOPATH) && dep ensure

    # plan9
    mkdir -p  $(PLAN9_LIBGOPATH) 
    cd $(PLAN9_LIBGOPATH)/../ && rm -rf plan9 && git clone https://github.com/9fans/plan9port plan9

dep-clean:
    rm -rf $(LIBGOPATH)
    rm -rf $(PLAN9_LIBGOPATH)

build-all:

    cd $(LIBGOPATH) && make

build:
    cd $(LIBGOPATH)/examples/basic/ && go build main.go && ./main
mjl- commented 6 years ago

did you install plan9port, and add its bin/ directory to your $PATH? it's currently a requirement for duit. see https://9fans.github.io/plan9port/, and follow their installation instructions.

as a side note: i've been thinking of making a smaller repo with just devdraw in it, to make it easier to onboard new user. but it would be an in-between solution, it's better to not need devdraw at all.

tectiv3 commented 6 years ago

I've faced the same problem after installing plan9port via brew. ln -s /usr/local/opt/plan9port/libexec/bin/devdraw /usr/local/bin/devdraw fixed it without adding whole plan9 to the PATH

mjl- commented 6 years ago

tectiv3: you are probably still missing fontsrv in that case, that's also in the plan9port bin directory.

and could you check your devdraw is using native macos drawing? not x11. i've heard before from a user with plan9port-through-brew who ended up thinking they needed an x11 server (not the case on macos). not sure what happened there, and if everyone installing through brew would say that. hopefully it was a one-off.

ghost commented 6 years ago

@mjl- yes i installed it. See the dep task of my make file.

It should be compiled Or its a compile take package that is linked to ?

mjl- commented 3 years ago

if people find this in the future: devdraw is a separate binary, that is part of plan9ports. so plan9ports needs to be installed first.