I tested my docker command and it's not completely accurate. This works on
my Mac:

docker run -v $PWD:/go/src/github.com/mitchellh/packer -w /go/src/
github.com/mitchellh/packer golang:1.8 bash -c "XC_ARCH=amd64 XC_OS=windows
make dev"

It produces a windows binary in pkg/windows_amd64

I guess you need to adjust the variable ref ($PWD).

On 20 March 2017 at 09:42, Patrick van der Velde <
petrikvanderve...@gmail.com> wrote:

> Yeah I guess my environment is not correctly configured. I got docker for
> windows to work by the way but while it doesn't fail, it doesn't seem to
> produce a package either.
>
>
> On Monday, 20 March 2017 21:36:21 UTC+13, Rickard von Essen wrote:
>>
>> It should work to build on Windows, unfortunately I can't really help
>> with that. We build each commit in appveyor and that is green so I expect
>> there is something with you setup.
>>
>> On 20 March 2017 at 02:05, Patrick van der Velde <petrikva...@gmail.com>
>> wrote:
>>
>>> I was really hoping to avoid having to create a Linux machine to build
>>> Packer on, but if that's the only way then I guess I'll have to make one.
>>>
>>> On Sun, Mar 19, 2017 at 9:48 PM, Rickard von Essen <
>>> rickard....@gmail.com> wrote:
>>>
>>>> If you have Docker for Windows the simplest way might be cross compile
>>>> in a container.
>>>>
>>>> Go to the directory where you have packer checked out and run something
>>>> like:
>>>>
>>>> docker run -v %PWD%:/usr/src/packer -w /usr/src/packer golang:1.8 bash
>>>> -c XC_ARCH=amd64 XC_OS=windows make dev
>>>>
>>>> This should give you a Windows binary somewhere under pkg.
>>>>
>>>> I don't have access to a computer so I haven't tested the above but it
>>>> should be close to correct.
>>>>
>>>> On Mar 19, 2017 3:52 AM, "Patrick van der Velde" <petrikva...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi
>>>>>
>>>>> I'm trying to build a version of Packer from source code on windows 10
>>>>> for windows x64. I've followed the instructions on the github page but I'm
>>>>> having issues getting the build to work. So far I have:
>>>>>
>>>>> * Installed Go and set the GOPATH to the directory in which I want all
>>>>> my go code to appear
>>>>>
>>>>>         echo %GOPATH% returns E:\documents\Petrik\documents\
>>>>> software\go)
>>>>>
>>>>> * Got the source code via
>>>>>
>>>>>         go get github.com/mitchellh/packer
>>>>>
>>>>> * Executing make returns
>>>>>
>>>>>         go get github.com/mitchellh/gox
>>>>>         go get golang.org/x/tools/cmd/stringer
>>>>>         go get github.com/kardianos/govendor
>>>>>         govendor sync
>>>>>         process_begin: CreateProcess(NULL, govendor sync, ...) failed.
>>>>>         make (e=2): The system cannot find the file specified.
>>>>>         make: *** [deps] Error 2
>>>>>
>>>>> I have tried to use the Linux subsystem but that has a known bug which
>>>>> makes it not possible to execute go (see
>>>>> https://github.com/Microsoft/BashOnWindows/issues/349).
>>>>>
>>>>> All I'm trying to do is to build an x64 version of Packer so that I
>>>>> can test a single line change I think I need to make to the Hyper-V
>>>>> provider.
>>>>>
>>>>> Can anybody give me a hand shaving this compilation yak?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Petrik
>>>>>
>>>>> --
>>>>> This mailing list is governed under the HashiCorp Community Guidelines
>>>>> - https://www.hashicorp.com/community-guidelines.html. Behavior in
>>>>> violation of those guidelines may result in your removal from this mailing
>>>>> list.
>>>>>
>>>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>>>> IRC: #packer-tool on Freenode
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Packer" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to packer-tool...@googlegroups.com.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/packer-tool/8295aec7-c778-
>>>>> 4e81-8b9c-bcfb016e2175%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/packer-tool/8295aec7-c778-4e81-8b9c-bcfb016e2175%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>> --
>>>> This mailing list is governed under the HashiCorp Community Guidelines
>>>> - https://www.hashicorp.com/community-guidelines.html. Behavior in
>>>> violation of those guidelines may result in your removal from this mailing
>>>> list.
>>>>
>>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>>> IRC: #packer-tool on Freenode
>>>> ---
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "Packer" group.
>>>> To unsubscribe from this topic, visit https://groups.google.com/d/to
>>>> pic/packer-tool/oHAFgPP0QrM/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> packer-tool...@googlegroups.com.
>>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>>> gid/packer-tool/CALz9Rt_Vt-HMG9A0fifCJCoUPQdPyOXJnQFw-nAOwVQ
>>>> EYZ923A%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/packer-tool/CALz9Rt_Vt-HMG9A0fifCJCoUPQdPyOXJnQFw-nAOwVQEYZ923A%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>>> This mailing list is governed under the HashiCorp Community Guidelines -
>>> https://www.hashicorp.com/community-guidelines.html. Behavior in
>>> violation of those guidelines may result in your removal from this mailing
>>> list.
>>>
>>> GitHub Issues: https://github.com/mitchellh/packer/issues
>>> IRC: #packer-tool on Freenode
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Packer" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to packer-tool...@googlegroups.com.
>>> To view this discussion on the web visit https://groups.google.com/d/ms
>>> gid/packer-tool/CAHAN2bvjUu5Yav67fQDLqbtmHn5WByBnK5kacKA5x-
>>> AobJ383w%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/packer-tool/CAHAN2bvjUu5Yav67fQDLqbtmHn5WByBnK5kacKA5x-AobJ383w%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in
> violation of those guidelines may result in your removal from this mailing
> list.
>
> GitHub Issues: https://github.com/mitchellh/packer/issues
> IRC: #packer-tool on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Packer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to packer-tool+unsubscr...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/packer-tool/cc636ebf-0e98-47e1-9cff-5f69ead10926%40googlegroups.com
> <https://groups.google.com/d/msgid/packer-tool/cc636ebf-0e98-47e1-9cff-5f69ead10926%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/CALz9Rt-ak_LRLJM0Zx0wtpkV72ve2MFL7jqDexKXB8ko3hrmwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to