Giter Club home page Giter Club logo

Comments (5)

jhead avatar jhead commented on August 24, 2024

Hey @timnolte, did you try modifying the Makefile and setting GOARCH=386 with an appropriate GOOS?

ref: https://golang.org/doc/install/source#environment

from phantom.

timnolte avatar timnolte commented on August 24, 2024

@jhead when I try that I end up with the following failure:

minecraft@minecraft:~/downloads/minecraftbe-server/phantom-0.1.1$ make bin/phantom-linux
GOOS=linux GOARCH=386 go build -o bin/phantom-linux cmd/proxy.go
cmd/proxy.go:8:2: cannot find package "github.com/jhead/phantom/internal/proxy" in any of:
        /usr/lib/go-1.10/src/github.com/jhead/phantom/internal/proxy (from $GOROOT)
        /opt/minecraft/go/src/github.com/jhead/phantom/internal/proxy (from $GOPATH)
Makefile:14: recipe for target 'bin/phantom-linux' failed
make: *** [bin/phantom-linux] Error 1

After coping the contents of the internal directory to /opt/minecraft/go/src/github.com/jhead/phantom/internal/ and trying to make I got the following:

mkdir -p bin
GOOS=linux GOARCH=386 go build -o bin/phantom-linux cmd/proxy.go
cmd/proxy.go:8:2: use of internal package not allowed
Makefile:8: recipe for target 'bin/phantom-linux' failed
make: *** [bin/phantom-linux] Error 1

from phantom.

timnolte avatar timnolte commented on August 24, 2024

So I actually ended up doing this:

  1. Copied the cmd directory also to /opt/minecraft/go/src/github.com/jhead/phantom/.
  2. cd /opt/minecraft/go/src/github.com/jhead/phantom.
  3. Executed: go build -o ~/downloads/minecraftbe-server/phantom-0.1.1/bin/phantom-linux cmd/proxy.go

And that actually worked and built the binary file. I tried it out but my clients failed to connect. So I'm not sure If I broke something when building it that way.

from phantom.

jhead avatar jhead commented on August 24, 2024

Hm, golang expects a very specific directory structure. Copying certainly works but you should check out the official docs: https://golang.org/doc/code.html#Workspaces

What error/message do you see when connecting? Does it show up on the list at all?

I rebuilt it for linux + i386 on my machine and attached it, lmk if it works.
phantom-linux-i386.zip

from phantom.

jhead avatar jhead commented on August 24, 2024

Gonna close this one out since I was able to build it for i386 on Linux. Let me know if you aren't able to get it working.

from phantom.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.