{"action":"created","issue":{"url":"https://api.github.com/repos/namhyung/uftrace/issues/205","repository_url":"https://api.github.com/repos/namhyung/uftrace","labels_url":"https://api.github.com/repos/namhyung/uftrace/issues/205/labels{/name}","comments_url":"https://api.github.com/repos/namhyung/uftrace/issues/205/comments","events_url":"https://api.github.com/repos/namhyung/uftrace/issues/205/events","html_url":"https://github.com/namhyung/uftrace/issues/205","id":269295073,"number":205,"title":"Fail to build for ARM. Error: cannot find 'libelf' (from elfutils)","user":{"login":"kuzminrobin","id":9372582,"avatar_url":"https://avatars3.githubusercontent.com/u/9372582?v=4","gravatar_id":"","url":"https://api.github.com/users/kuzminrobin","html_url":"https://github.com/kuzminrobin","followers_url":"https://api.github.com/users/kuzminrobin/followers","following_url":"https://api.github.com/users/kuzminrobin/following{/other_user}","gists_url":"https://api.github.com/users/kuzminrobin/gists{/gist_id}","starred_url":"https://api.github.com/users/kuzminrobin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuzminrobin/subscriptions","organizations_url":"https://api.github.com/users/kuzminrobin/orgs","repos_url":"https://api.github.com/users/kuzminrobin/repos","events_url":"https://api.github.com/users/kuzminrobin/events{/privacy}","received_events_url":"https://api.github.com/users/kuzminrobin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-28T08:02:09Z","updated_at":"2017-11-01T01:10:58Z","closed_at":null,"author_association":"NONE","body":"---------- Forwarded message ----------\r\nFrom: Honggyu Kim <>\r\nDate: Fri, Oct 27, 2017 at 6:13 PM\r\nSubject: Re: Trying uftrace.\r\nTo: Robin Kuzmin <>\r\nHi Robin,\r\nThanks for using uftrace. But I'm currently outside so cannot answer right now. Could you please write the same one in github issue?\r\nNamhyung may answer for that.\r\n\r\nThanks,\r\nHonggyu\r\n\r\n\r\nOn Sat, 28 Oct 2017 at 8:22 AM Robin Kuzmin <> wrote:\r\nI'm trying to cross-build for ARM. And I get a 'libelf' error. What do I miss?\r\nI do:\r\n\r\n**$pwd**\r\n/mnt/extra_disk/dev/3rdparty_tools/uftrace\r\n\r\n$**env | grep CROSS**\r\nCROSS_COMPILE=/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-\r\n\r\n$**ls /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-* **\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-addr2line  /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-gcc        /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-objcopy\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-ar         /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-gcc-4.6.1  /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-objdump\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-as         /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-gcov       /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-ranlib\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-c++        /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-gdb        /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-readelf\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-c++filt    /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-gdbtui     /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-size\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-cpp        /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-gprof      /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-sprite\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-elfedit    /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-ld         /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-strings\r\n/opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-g++        /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-nm         /opt/CodeSourcery/arm-2011.09/bin/arm-none-linux-gnueabi-strip\r\n\r\n$**./configure ARCH=arm CFLAGS='--sysroot /srv/zoom'**\r\nError: cannot find 'libelf' (from elfutils): Please install it first.\r\n\r\n$**find /srv/zoom -name \"libelf*\"**\r\n/srv/zoom/usr/lib/libelf.a\r\n/srv/zoom/usr/lib/libelf.so.0\r\n/srv/zoom/usr/lib/libelf.so.0.8.5\r\n/srv/zoom/usr/lib/libelf.so\r\n/srv/zoom/usr/share/locale/de/LC_MESSAGES/libelf.mo\r\n/srv/zoom/usr/include/libelf\r\n/srv/zoom/usr/include/libelf/libelf.h\r\n/srv/zoom/usr/include/libelf.h\r\n\r\n$**ls -l /srv/zoom/usr/lib/libelf***\r\n-rw-r--r-- 1 root root 521436 Oct 27 15:31 /srv/zoom/usr/lib/libelf.a\r\nlrwxrwxrwx 1 root root     15 Oct 27 15:31 /srv/zoom/usr/lib/libelf.so -> libelf.so.0.8.5\r\nlrwxrwxrwx 1 root root     15 Oct 27 15:31 /srv/zoom/usr/lib/libelf.so.0 -> libelf.so.0.8.5\r\n-rwxr-xr-x 1 root root 269779 Oct 27 15:31 /srv/zoom/usr/lib/libelf.so.0.8.5\r\n\r\n$**file /srv/zoom/usr/lib/libelf.so.0.8.5**\r\n/srv/zoom/usr/lib/libelf.so.0.8.5: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped\r\n\r\n\r\nThen I tried the following:\r\n\r\n$**git diff configure** \r\n```diff\r\ndiff --git a/configure b/configure\r\nindex 0ec7675..581f70b 100755\r\n--- a/configure\r\n+++ b/configure\r\n@@ -102,8 +102,8 @@ MAKEOVERRIDES=\r\n \r\n export CC CFLAGS LD LDFLAGS\r\n \r\n-make -siC ${srcdir}/check-deps check-clean\r\n-make -siC ${srcdir}/check-deps check-build\r\n+make V=1 -C ${srcdir}/check-deps check-clean\r\n+make V=1 -d -C ${srcdir}/check-deps check-build\r\n \r\n if [ ! -e ${srcdir}/check-deps/have_libelf ]; then\r\n     echo \"Error: cannot find 'libelf' (from elfutils): Please install it first.\"\r\n```\r\n\r\n$**./configure ARCH=arm CFLAGS='--sysroot /srv/zoom'**\r\n. . . \r\n    No need to remake target `__clock_without_librt.c'.\r\n   Finished prerequisites of target file `clock_without_librt'.\r\n  Must remake target `clock_without_librt'.\r\nPutting child 0x0193bf30 (clock_without_librt) PID 18486 on the chain.\r\nLive child 0x0193bf30 (clock_without_librt) PID 18486 \r\nmake: Reaping losing child 0x0193bf30 PID 18486 \r\n*** [clock_without_librt] Error 1\r\nRemoving child 0x0193bf30 PID 18486 from chain.\r\nmake: Leaving directory `/mnt/extra_disk/dev/3rdparty_tools/uftrace/check-deps'\r\nError: cannot find 'libelf' (from elfutils): Please install it first.\r\n"},"comment":{"url":"https://api.github.com/repos/namhyung/uftrace/issues/comments/340950442","html_url":"https://github.com/namhyung/uftrace/issues/205#issuecomment-340950442","issue_url":"https://api.github.com/repos/namhyung/uftrace/issues/205","id":340950442,"user":{"login":"namhyung","id":48503,"avatar_url":"https://avatars0.githubusercontent.com/u/48503?v=4","gravatar_id":"","url":"https://api.github.com/users/namhyung","html_url":"https://github.com/namhyung","followers_url":"https://api.github.com/users/namhyung/followers","following_url":"https://api.github.com/users/namhyung/following{/other_user}","gists_url":"https://api.github.com/users/namhyung/gists{/gist_id}","starred_url":"https://api.github.com/users/namhyung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namhyung/subscriptions","organizations_url":"https://api.github.com/users/namhyung/orgs","repos_url":"https://api.github.com/users/namhyung/repos","events_url":"https://api.github.com/users/namhyung/events{/privacy}","received_events_url":"https://api.github.com/users/namhyung/received_events","type":"User","site_admin":false},"created_at":"2017-11-01T01:10:58Z","updated_at":"2017-11-01T01:10:58Z","author_association":"OWNER","body":"> In my case the compiler does not pass normally the linker arguments to the linker (I tried everything I could (linker options): -L, -rpath, -rpath-link, { -Wl,-L -Wl,path }, -Wl,-Lpath, {-Wl,-rpath -Wl,path}, etc.).\r\n\r\n@kuzminrobin It's strange that gcc doesn't pass the linker options.  Could you please show me the exact command line the make runs and the error messages?  I really appreciate your detailed report and sorry for the inconvenience."}}
{"actor":{"display_login":"namhyung"}}