public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* Re: elfutils build error
@ 2016-02-26 20:09 phi gcc
  0 siblings, 0 replies; 10+ messages in thread
From: phi gcc @ 2016-02-26 20:09 UTC (permalink / raw)
  To: elfutils-devel

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

Thanx Mark it was this.

Now I am chasing another one, my intent is to build objdump (-g) and I
bump into this

CU82$ ldd src/objdump
        linux-vdso.so.1 =>  (0x00007ffe859fe000)
        libasm.so.1 => not found <=============
        libelf.so.1 => /usr/lib/x86_64-linux-gnu/libelf.so.1 (0x00007ff3a4447000
)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff3a4243000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff3a3e7e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ff3a465d000)

CU82$ ll libasm/libasm.so*
-rwxrwxr-x 1 phi phi 171197 Feb 26 20:40 libasm/libasm.so
lrwxrwxrwx 1 phi phi      9 Feb 26 20:40 libasm/libasm.so.1 -> libasm.so

Sounds like this is built yet it doen't find/use it.


Cheers,
Phi

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

* Re: elfutils build error
@ 2016-03-02 14:20 Mark Wielaard
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Wielaard @ 2016-03-02 14:20 UTC (permalink / raw)
  To: elfutils-devel

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

On Sun, 2016-02-28 at 08:40 +0100, phi gcc wrote:
> HI Mark and All
> 
> I am pretty happy with readelf for what I am doing, yet I got one more
> question is there a way to build readelf linked -archive with
> ../libelf ../libdw
> 
> I build readelf -g as well as the ../lib* and I need to debug all that.
> 
> I am asking for a 'normal' ay of doing this, i.e is there a "make
> something" that I should do.

If you are asking whether elfutils supports static linking then then the
answer is currently no. The tools, libdw and libasm that rely on libebl
load the backend code for the various arches through ldopen. See
eblopenbackend.c.

If you are asking how to debug a non-installed version of an elfutils
tool then doing the following should just work:
LD_LIBRARY_PATH=backends:libelf:libdw:libasm gdb --args src/readelf ...

Cheers,

Mark

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

* Re: elfutils build error
@ 2016-02-28  8:56 phi gcc
  0 siblings, 0 replies; 10+ messages in thread
From: phi gcc @ 2016-02-28  8:56 UTC (permalink / raw)
  To: elfutils-devel

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

For the time being I am patching the Makefile uncommenting the .a
lines let me know if there is a more standard way may be to
./configure saying we want archive building.

Cheers,
Phi

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

* Re: elfutils build error
@ 2016-02-28  7:40 phi gcc
  0 siblings, 0 replies; 10+ messages in thread
From: phi gcc @ 2016-02-28  7:40 UTC (permalink / raw)
  To: elfutils-devel

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

HI Mark and All

I am pretty happy with readelf for what I am doing, yet I got one more
question is there a way to build readelf linked -archive with
../libelf ../libdw

I build readelf -g as well as the ../lib* and I need to debug all that.

I am asking for a 'normal' ay of doing this, i.e is there a "make
something" that I should do.

Else I will do a final LD manually.

Cheers,
Phi

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

* Re: elfutils build error
@ 2016-02-26 21:31 phi gcc
  0 siblings, 0 replies; 10+ messages in thread
From: phi gcc @ 2016-02-26 21:31 UTC (permalink / raw)
  To: elfutils-devel

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

readelf seems to do the dwarf dump I used to do objdump... that's fine

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

* Re: elfutils build error
@ 2016-02-26 21:04 phi gcc
  0 siblings, 0 replies; 10+ messages in thread
From: phi gcc @ 2016-02-26 21:04 UTC (permalink / raw)
  To: elfutils-devel

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

LD_LIBRARY_PATH saved me, since I dont install no need for prefix and
I can run from src (i.e src/objdump)

Now to my grand surprise no dwarf option in this 'latest' objdump,

My intent was to rebuilf objdump -g so I can debug it and see why it
barf on my a.out debug infos.

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

* Re: elfutils build error
@ 2016-02-26 20:16 Mark Wielaard
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Wielaard @ 2016-02-26 20:16 UTC (permalink / raw)
  To: elfutils-devel

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

On Fri, 2016-02-26 at 21:11 +0100, phi gcc wrote:
> I didn't made a make install on purpose may I shoul but I don't want
> to push things built here on my system...
> Whant to build pure local under the tar xv dir

I would recommend using something like configure
--prefix=/usr/local/elfutils --program-prefix=eu-
to install under /usr/local/elfutils and have all programs start with
eu-... so they don't clash with any existing ones.

If you do want to run the programs in the build directory you'll have to
set the LD_LIBRARY_PATH.
LD_LIBRARY_PATH=backends:libelf:libdw:libasm src/objdump --help


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

* Re: elfutils build error
@ 2016-02-26 20:11 phi gcc
  0 siblings, 0 replies; 10+ messages in thread
From: phi gcc @ 2016-02-26 20:11 UTC (permalink / raw)
  To: elfutils-devel

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

I didn't made a make install on purpose may I shoul but I don't want
to push things built here on my system...
Whant to build pure local under the tar xv dir

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

* Re: elfutils build error
@ 2016-02-26 19:51 Mark Wielaard
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Wielaard @ 2016-02-26 19:51 UTC (permalink / raw)
  To: elfutils-devel

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

On Fri, 2016-02-26 at 19:45 +0100, phi gcc wrote:
> I grabbed the elfutils-0.165.tar.bz2
> CU82$ tar xf elfutils-0.165.tar.bz2
> CU82$ cd elfutils-0.165
> CU82$ configure
> ...
> =====================================================================
>         elfutils: 0.165 (eu_version: 165)
> =====================================================================
> 
>     Prefix                             : /usr/local
>     Program prefix ("eu-" recommended) : NONE
>     Source code location               : .
>     Maintainer mode                    :
>     libebl modules subdirectory        : elfutils
>     build arch                         : x86_64-unknown-linux-gnu
> 
>   RECOMMENDED FEATURES (should all be yes)
>     gzip support                       : yes
>     bzip2 support                      : yes
>     lzma/xz support                    : yes
>     libstdc++ demangle support         : yes
>     File textrel check                 : yes
>     Symbol versioning                  : yes
> 
>   NOT RECOMMENDED FEATURES (should all be no)
>     Experimental thread safety         : no
> 
>   OTHER FEATURES
>     Deterministic archives by default  : false
>     Native language support            : yes
> 
>   EXTRA TEST FEATURES (used with make check)
>     have bunzip2 installed (required)  : yes
>     debug branch prediction            : no
>     gprof support                      : no
>     gcov support                       : no
>     run all tests under valgrind       : no
>     gcc undefined behaviour sanitizer  : no
>     use rpath in tests                 : no
>     test biarch                        : no
> 
> 
> CU82$ make
> make --no-print-directory all-recursive
> Making all in config
> ...
> 
> ldgeneric.o: In function `ld_generic_open_outfile':
> /home/phi/elfutils-0.165/src/ldgeneric.c:2669: warning: the use of `mktemp' is d
> angerous, better use `mkstemp' or `mkdtemp'
>   CC       elflint.o
>   CCLD     elflint
> ./ld: unrecognized option '--sysroot=/'
> Try `ld --help' or `ld --usage' for more information.
> collect2: error: ld returned 64 exit status
> make[2]: *** [elflint] Error 1
> rm i386_ld.o
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
> ========================
> 
> Am I doing something obviously wrong ?

I think what is happening is that you have "." (the current directory)
in your PATH. So when the build is in src/ it picks up the just build
src/ld program. Which isn't really ready, and doesn't understand
--sysroot. Best to remove "." from your PATH.

Cheers,

Mark

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

* elfutils build error
@ 2016-02-26 18:45 phi gcc
  0 siblings, 0 replies; 10+ messages in thread
From: phi gcc @ 2016-02-26 18:45 UTC (permalink / raw)
  To: elfutils-devel

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

Hi All,

I grabbed the elfutils-0.165.tar.bz2
CU82$ tar xf elfutils-0.165.tar.bz2
CU82$ cd elfutils-0.165
CU82$ configure
...
=====================================================================
        elfutils: 0.165 (eu_version: 165)
=====================================================================

    Prefix                             : /usr/local
    Program prefix ("eu-" recommended) : NONE
    Source code location               : .
    Maintainer mode                    :
    libebl modules subdirectory        : elfutils
    build arch                         : x86_64-unknown-linux-gnu

  RECOMMENDED FEATURES (should all be yes)
    gzip support                       : yes
    bzip2 support                      : yes
    lzma/xz support                    : yes
    libstdc++ demangle support         : yes
    File textrel check                 : yes
    Symbol versioning                  : yes

  NOT RECOMMENDED FEATURES (should all be no)
    Experimental thread safety         : no

  OTHER FEATURES
    Deterministic archives by default  : false
    Native language support            : yes

  EXTRA TEST FEATURES (used with make check)
    have bunzip2 installed (required)  : yes
    debug branch prediction            : no
    gprof support                      : no
    gcov support                       : no
    run all tests under valgrind       : no
    gcc undefined behaviour sanitizer  : no
    use rpath in tests                 : no
    test biarch                        : no


CU82$ make
make --no-print-directory all-recursive
Making all in config
...

ldgeneric.o: In function `ld_generic_open_outfile':
/home/phi/elfutils-0.165/src/ldgeneric.c:2669: warning: the use of `mktemp' is d
angerous, better use `mkstemp' or `mkdtemp'
  CC       elflint.o
  CCLD     elflint
./ld: unrecognized option '--sysroot=/'
Try `ld --help' or `ld --usage' for more information.
collect2: error: ld returned 64 exit status
make[2]: *** [elflint] Error 1
rm i386_ld.o
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
========================

Am I doing something obviously wrong ?

Cheers,
Phi

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

end of thread, other threads:[~2016-03-02 14:20 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-26 20:09 elfutils build error phi gcc
  -- strict thread matches above, loose matches on Subject: below --
2016-03-02 14:20 Mark Wielaard
2016-02-28  8:56 phi gcc
2016-02-28  7:40 phi gcc
2016-02-26 21:31 phi gcc
2016-02-26 21:04 phi gcc
2016-02-26 20:16 Mark Wielaard
2016-02-26 20:11 phi gcc
2016-02-26 19:51 Mark Wielaard
2016-02-26 18:45 phi gcc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).