Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Apr 2021 12:29:22 +0200
From:      Andrea Venturoli <ml@netfence.it>
To:        yuri@FreeBSD.org
Cc:        freebsd-questions@FreeBSD.org
Subject:   Re: devel/google-perftools in a jail
Message-ID:  <2cfa2de6-3d22-bc88-90d2-49e94d1a8f0d@netfence.it>
In-Reply-To: <18dcbb14-d208-071e-8f93-39dd45d7dc14@rawbw.com>
References:  <cc269448-4906-2dc2-8b46-10329d71ed7a@netfence.it> <18dcbb14-d208-071e-8f93-39dd45d7dc14@rawbw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/2/21 11:33 AM, yuri@FreeBSD.org wrote:
> Hi Andrea,
> 
> 
> 
> On 4/2/21 1:54 AM, Andrea Venturoli wrote:
>> Is this expected to work?
>>
>> I tried "perftools-pprof ./a.exe prof.out", but I get:
>> objdump: '/usr/jails/basejail/libexec/ld-elf.so.1': No such file 
> 
> 
> What does 'ldd -a ./a.exe' print?

	libthr.so.3 => /lib/libthr.so.3 (0x8002cd000)
	libc++.so.1 => /usr/lib/libc++.so.1 (0x8002fa000)
	libcxxrt.so.1 => /lib/libcxxrt.so.1 (0x8003c7000)
	libarchive.so.13 => /usr/local/lib/libarchive.so.13 (0x8003e9000)
	libboost_filesystem.so.1.72.0 => 
/usr/local/lib/libboost_filesystem.so.1.72.0 (0x8004bd000)
	libboost_program_options.so.1.72.0 => 
/usr/local/lib/libboost_program_options.so.1.72.0 (0x8004da000)
	libboost_system.so.1.72.0 => /usr/local/lib/libboost_system.so.1.72.0 
(0x80053a000)
	libm.so.5 => /lib/libm.so.5 (0x80053e000)
	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x800570000)
	libc.so.7 => /lib/libc.so.7 (0x80058a000)
	libcrypto.so.111 => /lib/libcrypto.so.111 (0x800980000)
	libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x800c72000)
	liblzo2.so.2 => /usr/local/lib/liblzo2.so.2 (0x800c9f000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x800ccf000)
	liblz4.so.1 => /usr/local/lib/liblz4.so.1 (0x800cfb000)
	libbz2.so.4 => /usr/lib/libbz2.so.4 (0x800d29000)
	libz.so.6 => /lib/libz.so.6 (0x800d3f000)
	libmd.so.6 => /lib/libmd.so.6 (0x800d5b000)

(Here I had removed -lprofiler).



> Do shared libraries mentioned in the printout exist? 

Yes and no: the do exist as shown above, but not as shown in the 
previous message

E.g.: instead of /usr/lib/libc++.so.1, it searches for 
/usr/jails/basejail/usr/lib/libc++.so.1

This being an ezjail jail, /usr/lib/libc++.so.1 is linked to 
/basejail/usr/lib/libc++.so.1.
Seen from outside the jail, that's 
/usr/jails/basejail/usr/lib/libc++.so.1, but inside the jail the 
"/usr/jails" prefix is wrong.


Hope I was clear; otherwise I'll try to explain better.

  bye & Thanks
	av.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2cfa2de6-3d22-bc88-90d2-49e94d1a8f0d>