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

display all entries - hosty show command without parameters #4

Closed
c-nv-s opened this issue Aug 23, 2021 · 10 comments
Closed

display all entries - hosty show command without parameters #4

c-nv-s opened this issue Aug 23, 2021 · 10 comments

Comments

@c-nv-s
Copy link

c-nv-s commented Aug 23, 2021

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

it would be nice to be able to just type "hosty show" (without parameters) and receive all the current host file entries
or type "hosty show --json" and receive all the current entries in json format

@areYouLazy
Copy link
Owner

I'm working on it

@areYouLazy
Copy link
Owner

areYouLazy commented Aug 26, 2021

Implemented in v1.1.0

@c-nv-s
Copy link
Author

c-nv-s commented Aug 26, 2021

not sure if you built the latest release on a new operating system but you seem to have introduced a dependency:

hosty: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by hosty)

which I don't think is installed by default on ubuntu <= groovy or debian <= 11

@areYouLazy
Copy link
Owner

areYouLazy commented Aug 26, 2021

lol! if I wanted to do it on purpose I wouldn't know how!
I'm going to take my other laptop to rebuild the packages

@areYouLazy areYouLazy reopened this Aug 26, 2021
@areYouLazy
Copy link
Owner

Ok should be fixed here
@c-nv-s Can you confirm the unwanted dep is gone?

@c-nv-s
Copy link
Author

c-nv-s commented Aug 27, 2021

@areYouLazy can confirm fixed.
could you please advise what the issue was because I have seen this in another project too.
perhaps I can pass on the knowledge in future

@areYouLazy
Copy link
Owner

I really don't know, all I can tell you is the "bad" package as been built on a fresh Ubuntu 21.04 installation with golang from ppa, while the "working" one has been built on a macOS 11.3.1 with golang from brew

@c-nv-s
Copy link
Author

c-nv-s commented Aug 28, 2021

ok thanks,
it would be interesting to see the difference if you installed golang on the 21.04 machine by downloading it directly from golang.org/dl and extracting it, then build a release and see if that glibc issue still exists when running the binary on older operating systems.

by the way, feel free to close this issue

@areYouLazy
Copy link
Owner

I downloaded golang from the website and compile hosty with it but the link to libc.so.6 seems to be there..

root@testmachine:~/go/src/github.com/areYouLazy/hosty|master ⇒ ldd hosty-test 
	linux-vdso.so.1 (0x00007fff84915000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f50ac241000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f50ac055000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f50ac278000)

@areYouLazy
Copy link
Owner

Going further, I think it's a static/dynamic compilation problem. While compiling directly to ubuntu (with go build) generates a dynamic linked executable, the one ported from the macOS (also done with go build) is not a dynamic executable:

root@testmachine:~/Downloads|⇒  ldd /usr/sbin/hosty 
	not a dynamic executable

So I think the cross-compilation from macOS generates a static binary, while the native compilation on Ubuntu generates a dynamic-linked binary. And NOW I can close the issue!

Thanks for your help!

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

2 participants