Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not build for RHEL 7.2 on s390x #679

Closed
djc2k opened this issue Sep 28, 2017 · 5 comments
Closed

Could not build for RHEL 7.2 on s390x #679

djc2k opened this issue Sep 28, 2017 · 5 comments

Comments

@djc2k
Copy link

djc2k commented Sep 28, 2017

Host operating system: output of uname -a

Linux rhel-7.2.novalocal 3.10.0-693.1.1.el7.s390x #1 SMP Thu Aug 3 08:17:56 EDT 2017 s390x s390x s390x GNU/Linux

ERROR from make

[root@rhel-7 node_exporter]# go version
go version go1.8.3 linux/s390x
[root@rhel-7 node_exporter]# lsb_release
LSB Version: :core-4.1-noarch:core-4.1-s390x:cxx-4.1-noarch:cxx-4.1-s390x:desktop-4.1-noarch:desktop-4.1-s390x:languages-4.1-noarch:languages-4.1-s390x:printing-4.1-noarch:printing-4.1-s390x
[root@rhel-7 node_exporter]# make

formatting code
vetting code
running staticcheck
building binaries
node_exporter

github.com/prometheus/node_exporter

/usr/lib/golang/pkg/tool/linux_s390x/link: running gcc failed: exit status 1
/bin/ld: cannot find -lpthread
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

!! command failed: build -o /data/src/github.com/prometheus/node_exporter/node_exporter -ldflags -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.Version=0.14.0 -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.Revision=3762191e66e309106e930ab11f9c080fb4428001 -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.Branch=master -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.BuildUser=root@rhel-7.2.novalocal -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.BuildDate=20170928-01:02:09 -extldflags '-static' -a -tags 'netgo static_build' github.com/prometheus/node_exporter: exit status 2
make: *** [build] Error 1

node_exporter version: output of node_exporter --version

node_exporter command line flags

Are you running node_exporter in Docker?

What did you do that produced an error?

What did you expect to see?

What did you see instead?

@bsocaciu
Copy link

bsocaciu commented Sep 28, 2017

Same for: Linux 3.10.0-693.el7.x86_64

@mdlayher
Copy link
Contributor

Interesting, do you have the usual gcc environment set up on these machines? I don't recall ever having to install a package for pthreads, but it's been ages since I did C.

Could also try CGO_ENABLED=0 and see if that helps.

@djc2k
Copy link
Author

djc2k commented Sep 28, 2017

I got it working after installing glibc-static.

Thanks,
Dave

@djc2k djc2k closed this as completed Sep 28, 2017
@bsocaciu
Copy link

bsocaciu commented Oct 2, 2017

Why is this not coming with CentOS ?
Good job finding the problem. It works for me too now.

@huangsam
Copy link

@djc2k I could not install glibc-static on RHEL. Did you need a RHEL subscription to enable it?

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

No branches or pull requests

4 participants