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

Consider adding glibc-static as a prerequisite #693

Closed
bsocaciu opened this issue Oct 9, 2017 · 4 comments
Closed

Consider adding glibc-static as a prerequisite #693

bsocaciu opened this issue Oct 9, 2017 · 4 comments

Comments

@bsocaciu
Copy link

bsocaciu commented Oct 9, 2017

Hi,

It would be a good idea to add a line in the main readme.md file specifying the need to install glibc-static on CentOS.

I am using CentOS Linux release 7.4.1708 (Core), the minimal installation, and glibc-static doesn't seem to be installed by default. This results in make exiting with the following error:

[root@localhost node_exporter]# make
>>formatting code
>>vetting code
>>running staticcheck
>>building binaries
>node_exporter
# github.com/prometheus/node_exporter
/usr/lib/golang/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lpthread
/usr/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status

!! command failed: build -o /root/go/src/github.com/prometheus/node_exporter/node_exporter -ldflags -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.Version=0.15.0 -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.Revision=6e2053c557f96efb63aef3691f15335a70baaffd -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=[email protected] -X github.com/prometheus/node_exporter/vendor/github.com/prometheus/common/version.BuildDate=20171009-12:26:18 -extldflags '-static' -a -tags 'netgo static_build' github.com/prometheus/node_exporter: exit status 2
make: *** [build] Error 1

Thanks you,
Bogdan

@SuperQ
Copy link
Member

SuperQ commented Oct 9, 2017

Sure, this sounds like a good idea.

@huangsam
Copy link

huangsam commented Nov 29, 2017

Currently trying to install glibc-static via yum but it doesn't look like it works for me. Is there a repository that has this package available?

root•~» yum install glibc-static                                                                                                                                                                                                                                     [0:05:34]
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package glibc-static available.

FYI the machine I'm running this command on is RHEL 7.2 release. I heard from this SO post that it's not possible without subscription-manager to install the package. Wondering if there's another way to do so.

@bsocaciu
Copy link
Author

bsocaciu commented Nov 29, 2017

RHEL is a paid product and you can get a 30-day evaluation subscription from here to install any package using RHEL repositories: https://access.redhat.com/products/red-hat-enterprise-linux/evaluation
What does "yum repolist all" say? I think you can get glibc-static from a non-RHEL repository.

@huangsam
Copy link

huangsam commented Dec 1, 2017

@SCBbestof I didn't check any further as I realized I could simply download the linux-amd64 tar archive from the v0.15.1 release notes.

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

3 participants