I'm trying to build perf with static linking, and running into some trouble. My command is:
LDFLAGS=-static emerge-link perf
The Makefile fails with this error:
Makefile:479: *** No libelf.h/libelf found, please install libelf-dev/elfutils-libelf-devel. Stop.
Okay fine, I emerged libelf for BOARD=link. I had to uninstall elfutils first because apparently they can't both be installed.
The perf ebuild file has an RDEPEND on elfutils. I removed that line so that it wouldn't attempt to build elfutils.
Now I'm emerging perf again, with the static flag. It fails with these errors:
util/symbol.c: In function 'elf_read_build_id':
util/symbol.c:1465:3: error: unknown type name 'GElf_Nhdr'
util/symbol.c:1466:26: error: request for member 'n_namesz' in something not a structure or union
util/symbol.c:1467:26: error: request for member 'n_descsz' in something not a structure or union
util/symbol.c:1473:11: error: request for member 'n_type' in something not a structure or union
util/symbol.c:1474:11: error: request for member 'n_namesz' in something not a structure or union
util/symbol.c: In function 'sysfs__read_build_id':
util/symbol.c:1530:3: error: unknown type name 'GElf_Nhdr'
util/symbol.c:1536:19: error: request for member 'n_namesz' in something not a structure or union
util/symbol.c:1537:19: error: request for member 'n_descsz' in something not a structure or union
util/symbol.c:1538:11: error: request for member 'n_type' in something not a structure or union
util/symbol.c:1539:11: error: request for member 'n_namesz' in something not a structure or union
Browsing online, I found
Seems like I'm not the only one who ran into this problem, and it doesn't seem to be resolved thee.
Simon