Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Error happens while running go build #88

Open
jinchihe opened this issue Jul 11, 2019 · 6 comments
Open

Error happens while running go build #88

jinchihe opened this issue Jul 11, 2019 · 6 comments

Comments

@jinchihe
Copy link
Member

jinchihe commented Jul 11, 2019

/kind bug

What steps did you take and what happened:
Hello, when I trying to setting up metadata, make build finished, and make test all passed. But hit the below problem while go build how to work around this? Thanks a lot!

[root@jinchi1 metadata]# go build ./...
# ml_metadata/metadata_store/metadata_store_go_wrap
metadata_store_go_swig.cc:300:55: fatal error: ml_metadata/metadata_store/metadata_store.h: No such file or directory
 #include "ml_metadata/metadata_store/metadata_store.h"
                                                       ^
compilation terminated.

What did you expect to happen:

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • Metadata version: master
  • Kubeflow version: 0.5.1
  • Minikube version:
  • Kubernetes version: (use kubectl version): v1.11.1+icp
  • OS (e.g. from /etc/os-release): Redhat 7.6
@jinchihe
Copy link
Member Author

Seems there is metadata_store.h but how to use that? under the derectory, no link to there ... sorry not familar with bazel :-(

[root@jinchi1 metadata]# find /root/ -name "metadata_store.h" -print
/root/.cache/bazel/_bazel_root/fcb7a544947ed52711e3660d8265b57b/external/google_ml_metadata/ml_metadata/metadata_store/metadata_store.h

@zhenghuiwang
Copy link
Contributor

Thanks for raising this issue. Which Go version do you use?

You have to enable export GO111MODULE=on

https://github.com/golang/go/wiki/Modules

@jinchihe
Copy link
Member Author

@zhenghuiwang Thanks for you help. I'm using go1.12.5, But after enabled that, the problem still can be reproduced. I'm running on redhat 7.6 and baze 0.24.1, see below for more information.

[root@jinchi1 metadata]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
[root@jinchi1 metadata]# go version
go version go1.12.5 linux/amd64
[root@jinchi1 metadata]# bazel version
Starting local Bazel server and connecting to it...
Build label: 0.24.1
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Apr 2 16:29:26 2019 (1554222566)
Build timestamp: 1554222566
Build timestamp as int: 1554222566
[root@jinchi1 metadata]# go env |grep -i gomod
GOMOD="/opt/kubeflow/shared/metadata/go.mod"

@zhenghuiwang
Copy link
Contributor

/cc @neuromage

We haven't tried the build process on Redhat. It is possible that our SWIG generation may not work well on Redhat.

@jinchihe
Copy link
Member Author

Yes, that works fine on Mac.

@jtfogarty
Copy link

/area engprod
/priority p2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants