unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* How to use elfutils? bash: eu-strip: command not found
@ 2021-01-17  9:04 znavko--- via
  2021-01-17 10:59 ` Pierre Neidhardt
  2021-01-17 19:04 ` znavko
  0 siblings, 2 replies; 7+ messages in thread
From: znavko--- via @ 2021-01-17  9:04 UTC (permalink / raw)
  To: help-guix

Hello! I have an error with some binary and I wish to check
its interpreter, but elfutils package is not so easy for me.

$ ./projectbinary-qt
bash: ./projectbinary-qt: No such file or directory

$ readelf --all ./projectbinary-qt | grep interpreter
bash: readelf: command not found

$ guix search readelf | grep name
name: elfutils

$ guix install elfutils
The following package will be installed:
 elfutils 0.176

The following derivation will be built:
 /gnu/store/dg558rpz3yklhsy8rh7d7wv122hwi1k8-profile.drv

building CA certificate bundle...
building fonts directory...
generating GLib schema cache...
creating GTK+ icon theme cache...
building cache files for GTK+ input methods...
building directory of Info manuals...
building database for manual pages...
building XDG desktop file cache...
building XDG MIME database...
building profile with 47 packages...
$

$ eu-readelf
bash: eu-readelf: command not found

$ eu-strip
bash: eu-strip: command not found

$ whereis elfutils
elfutils:
Please, how to use it? May be only under root?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to use elfutils? bash: eu-strip: command not found
  2021-01-17  9:04 How to use elfutils? bash: eu-strip: command not found znavko--- via
@ 2021-01-17 10:59 ` Pierre Neidhardt
  2021-01-17 11:04   ` Vincent Legoll
  2021-01-17 19:04 ` znavko
  1 sibling, 1 reply; 7+ messages in thread
From: Pierre Neidhardt @ 2021-01-17 10:59 UTC (permalink / raw)
  To: znavko, help-guix

[-- Attachment #1: Type: text/plain, Size: 230 bytes --]

Hi!

You need to install the "bin" output:

  guix install elfutils:bin

If you want to fix your executable interpreter (and probably the RPATH
too), you can use `patchelf'.

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to use elfutils? bash: eu-strip: command not found
  2021-01-17 10:59 ` Pierre Neidhardt
@ 2021-01-17 11:04   ` Vincent Legoll
  2021-01-17 11:41     ` Pierre Neidhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Vincent Legoll @ 2021-01-17 11:04 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: help-guix

Hello,

On Sun, Jan 17, 2021 at 12:00 PM Pierre Neidhardt <mail@ambrevar.xyz> wrote:
> You need to install the "bin" output:
>
>   guix install elfutils:bin

Maybe some hint like that should be added to description.

WDYT ?

> If you want to fix your executable interpreter (and probably the RPATH
> too), you can use `patchelf'.

And maybe a "see also" too.

-- 
Vincent Legoll


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to use elfutils? bash: eu-strip: command not found
  2021-01-17 11:04   ` Vincent Legoll
@ 2021-01-17 11:41     ` Pierre Neidhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Pierre Neidhardt @ 2021-01-17 11:41 UTC (permalink / raw)
  To: Vincent Legoll; +Cc: help-guix

[-- Attachment #1: Type: text/plain, Size: 472 bytes --]

Vincent Legoll <vincent.legoll@gmail.com> writes:

>>   guix install elfutils:bin
>
> Maybe some hint like that should be added to description.

Maybe, but "bin" output is a rather conventional thing in Guix, so a
better place to put it would be in the manual

>> If you want to fix your executable interpreter (and probably the RPATH
>> too), you can use `patchelf'.
>
> And maybe a "see also" too.

Agreed!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to use elfutils? bash: eu-strip: command not found
  2021-01-17  9:04 How to use elfutils? bash: eu-strip: command not found znavko--- via
  2021-01-17 10:59 ` Pierre Neidhardt
@ 2021-01-17 19:04 ` znavko
  2021-01-17 21:54   ` Pierre Neidhardt
  2021-01-18  8:09   ` znavko
  1 sibling, 2 replies; 7+ messages in thread
From: znavko @ 2021-01-17 19:04 UTC (permalink / raw)
  To: Pierre Neidhardt, help-guix

Thank you very much!

Can you give me another lesson where to find ld-linux in Guix?

$ eu-readelf --all ./projectbinary-qt | grep interpreter
	[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

I've found with duckduckgo on 10-th page of this document:
https://guix.gnu.org/guix-fosdem-packaging-20170205.pdf

"/gnu/store/m9vxvh...-glibc-2.23/lib/ld-linux-x86-64.so.2"

So, I installed as I can understand glibc:

$ guix install glibc
...ok

$ whereis ld-linux
ld-linux:
$ 

# find / -type d -name "*ld-linux*"
find: ‘/run/user/1000/gvfs’: Permission denied
#


Where to find ld-linux for that program I want to run?


Also, can you advise something if that program is qt?
Will it be enough package 'qt', or need to install smth else?


January 17, 2021 10:59 AM, "Pierre Neidhardt" <mail@ambrevar.xyz> wrote:

> Hi!
> 
> You need to install the "bin" output:
> 
> guix install elfutils:bin
> 
> If you want to fix your executable interpreter (and probably the RPATH
> too), you can use `patchelf'.
> 
> -- 
> Pierre Neidhardt
> https://ambrevar.xyz


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to use elfutils? bash: eu-strip: command not found
  2021-01-17 19:04 ` znavko
@ 2021-01-17 21:54   ` Pierre Neidhardt
  2021-01-18  8:09   ` znavko
  1 sibling, 0 replies; 7+ messages in thread
From: Pierre Neidhardt @ 2021-01-17 21:54 UTC (permalink / raw)
  To: znavko, help-guix

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]

Frankly, it's easier to get your program to run if you can compile it
from source.
It's going to be quite tricky to patch the ELF.

The linker is in the "lib" folder of the glibc package.

> "/gnu/store/m9vxvh...-glibc-2.23/lib/ld-linux-x86-64.so.2"

This is correct.

> So, I installed as I can understand glibc:
>
> $ guix install glibc
> ...ok
>
> $ whereis ld-linux
> ld-linux:

I don't use whereis, my guess is that it's not looking in the right
location.
Note that the linker is a .so file in a /lib folder, which is maybe why
whereis cannot find it.

>
> # find / -type d -name "*ld-linux*"
> find: ‘/run/user/1000/gvfs’: Permission denied

You are looking for folder here, this cannot work.  You need to use
`-type f' instead.

Hope that helps!

-- 
Pierre Neidhardt
https://ambrevar.xyz/

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 511 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: How to use elfutils? bash: eu-strip: command not found
  2021-01-17 19:04 ` znavko
  2021-01-17 21:54   ` Pierre Neidhardt
@ 2021-01-18  8:09   ` znavko
  1 sibling, 0 replies; 7+ messages in thread
From: znavko @ 2021-01-18  8:09 UTC (permalink / raw)
  To: Pierre Neidhardt, help-guix

Yes, Pierre, you are right.

I have found glibc folder and there was that file in subfolder lib/ 

$ ls /gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31/lib | grep ld-l
ld-linux-x86-64.so.2

You said, that it's better to compile program from sources
instead of patching elf. Ok. 

I've read an article about Bitcoin legal status in the USA.
And understood that may be guix already has bitcoin-core in repository.
And finally I've installed it with

$ guix install bitcoin-core

Thank you!



January 17, 2021 9:54 PM, "Pierre Neidhardt" <mail@ambrevar.xyz> wrote:

> Frankly, it's easier to get your program to run if you can compile it
> from source.
> It's going to be quite tricky to patch the ELF.
> 
> The linker is in the "lib" folder of the glibc package.
> 
>> "/gnu/store/m9vxvh...-glibc-2.23/lib/ld-linux-x86-64.so.2"
> 
> This is correct.
> 
>> So, I installed as I can understand glibc:
>> 
>> $ guix install glibc
>> ...ok
>> 
>> $ whereis ld-linux
>> ld-linux:
> 
> I don't use whereis, my guess is that it's not looking in the right
> location.
> Note that the linker is a .so file in a /lib folder, which is maybe why
> whereis cannot find it.
> 
>> # find / -type d -name "*ld-linux*"
>> find: ‘/run/user/1000/gvfs’: Permission denied
> 
> You are looking for folder here, this cannot work. You need to use
> `-type f' instead.
> 
> Hope that helps!
> 
> --
> Pierre Neidhardt
> https://ambrevar.xyz


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-18  8:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-17  9:04 How to use elfutils? bash: eu-strip: command not found znavko--- via
2021-01-17 10:59 ` Pierre Neidhardt
2021-01-17 11:04   ` Vincent Legoll
2021-01-17 11:41     ` Pierre Neidhardt
2021-01-17 19:04 ` znavko
2021-01-17 21:54   ` Pierre Neidhardt
2021-01-18  8:09   ` znavko

unofficial mirror of help-guix@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guix-user/0 guix-user/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-user guix-user/ https://yhetil.org/guix-user \
		help-guix@gnu.org
	public-inbox-index guix-user

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.user
	nntp://news.gmane.io/gmane.comp.gnu.guix.user


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git