So based on your command line I tried the following:
Go to the GOPATH directory
cd e:\documents\Petrik\documents\src\go
Then run
docker run -v %cd%:/usr/src/go -w
/usr/src/go/src/github.com/mitchellh/packer golang:1.8 bash -c
"GOPATH=/usr/src/go XC_ARCH=amd64 XC_OS=windows make dev"
That gets me
go get github.com/mitchellh/gox
go get golang.org/x/tools/cmd/stringer
go get github.com/kardianos/govendor
govendor sync
make: govendor: Command not found
Makefile:31: recipe for target 'deps' failed
make: *** [deps] Error 127
Which is progress! So now I need to figure out why govendor isn't a command.
On Monday, 20 March 2017 22:03:03 UTC+13, Rickard von Essen wrote:
>
> 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 <[email protected]
> <javascript:>> 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 <[email protected]>
>>> 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 <
>>>> [email protected]> 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" <
>>>>> [email protected]> 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 [email protected].
>>>>>> 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/topic/packer-tool/oHAFgPP0QrM/unsubscribe.
>>>>> To unsubscribe from this group and all its topics, send an email to
>>>>> [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/packer-tool/CALz9Rt_Vt-HMG9A0fifCJCoUPQdPyOXJnQFw-nAOwVQEYZ923A%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 [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/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 [email protected] <javascript:>.
>> 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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/packer-tool/7b97949a-d7f7-4e88-af17-ea9d7b73d089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.