-
Notifications
You must be signed in to change notification settings - Fork 43
goracle incompatible with gomods #104
Comments
Or just forget the vendoring, and use it as a module - that works!
Federico Paolinelli <notifications@github.com> ezt írta (időpont: 2018.
szept. 27., Cs, 17:52):
… If I try to use the new go 1.11 dependency management (go mods) I get the
same
fatal error: dpiImpl.h: No such file or directory
error referenced in #80 <#80>
The reason for this is that go modules do not vendor non package
directories, and there is no workaround as per golang/go#26366
<golang/go#26366>
The suggested solution is to *put all the files needed to build a package
inside the package dir* , which I guess means throwing all the .c / .h
files in a package dir.
That is also referenced in the cgo documentation
https://golang.org/cmd/cgo/ where it says "*so all non-Go source code for
the package should be stored in the package directory, not in
subdirectories.*"
A possible workaround proposed in golang/go#26366
<golang/go#26366> is to "package-ize" the
c-sources folder in order to have it vendored by adding a dummy .go file
and referencing the package as not used (with _ import).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#104>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAPoSlnS9ypmHGvDNb9-Y5jzSz2HA8XLks5ufPQmgaJpZM4W89eH>
.
|
Not sure I understand what you mean.
Could you elaborate?
Il gio 27 set 2018, 19:15 Tamás Gulácsi <notifications@github.com> ha
scritto:
… Or just forget the vendoring, and use it as a module - that works!
Federico Paolinelli ***@***.***> ezt írta (időpont: 2018.
szept. 27., Cs, 17:52):
> If I try to use the new go 1.11 dependency management (go mods) I get the
> same
> fatal error: dpiImpl.h: No such file or directory
> error referenced in #80 <#80
>
>
> The reason for this is that go modules do not vendor non package
> directories, and there is no workaround as per golang/go#26366
> <golang/go#26366>
>
> The suggested solution is to *put all the files needed to build a package
> inside the package dir* , which I guess means throwing all the .c / .h
> files in a package dir.
>
> That is also referenced in the cgo documentation
> https://golang.org/cmd/cgo/ where it says "*so all non-Go source code
for
> the package should be stored in the package directory, not in
> subdirectories.*"
>
> A possible workaround proposed in golang/go#26366
> <golang/go#26366> is to "package-ize" the
> c-sources folder in order to have it vendored by adding a dummy .go file
> and referencing the package as not used (with _ import).
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <#104>, or mute the thread
> <
https://github.com/notifications/unsubscribe-auth/AAPoSlnS9ypmHGvDNb9-Y5jzSz2HA8XLks5ufPQmgaJpZM4W89eH
>
> .
>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMPcOQBnes7__oj6JPPBmBcLZebCZUMks5ufQeygaJpZM4W89eH>
.
|
Use GO111MODULE=on and do not use "go mod vendor", just "go build". BTW, I've added "dummy.go" into each subdirectory (v2.8.1), but |
Thanks for your reply! If I create a new project outside the gopath, something along the line of
and run
|
Where does goracle v2.1.14 coming from? The current version is v2.8.1 - add it with
|
Interesting! Sorry for the interruption, I will close the issue. |
It erases it because you also have to "use" the package, even with a _ import |
Doesn't work:
as it wants to compile it without cgo... |
If I try to use the new go 1.11 dependency management (go mods) I get the same
fatal error: dpiImpl.h: No such file or directory
error referenced in #80
The reason for this is that go modules do not vendor non package directories, and there is no workaround as per golang/go#26366
The suggested solution is to put all the files needed to build a package inside the package dir , which I guess means throwing all the .c / .h files in a package dir.
That is also referenced in the cgo documentation https://golang.org/cmd/cgo/ where it says "so all non-Go source code for the package should be stored in the package directory, not in subdirectories."
A possible workaround proposed in golang/go#26366 is to "package-ize" the c-sources folder in order to have it vendored by adding a dummy .go file and referencing the package as not used (with _ import).
The text was updated successfully, but these errors were encountered: