[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Build and run-time triplets



On Thu, Jun 09, 2022 at 10:43:01AM +0100, Julian Gilbey wrote:
> > > The normal way for this is putting it into
> > > /usr/lib/<triplet>/pkgname/foo.so, and according to the code below you'll
> > > need the full path at the run time so you indeed need the triplet at both
> > > build and run time.
> > 
> > You can do something like
> > 
> >      handle = dlopen("/usr/${LIB}/pkgname/foo.so", flags);
> > [...]
> > 
> > Then you'd install the private library into what Autotools would refer to
> > as ${libdir}/pkgname/foo.so (adjust as necessary for other build systems)
> > and it will usually end up in the correct place. This assumes that
> > ${libdir} is configured to something like
> > ${exec_prefix}/lib/x86_64-linux-gnu or ${exec_prefix}/lib64 as appropriate
> > for the distribution, but that's normally true anyway, and in particular
> > should be true in debhelper.
> 
> Thanks Simon!
> 
> The build system here is the standard Python setup.py, except for this
> library.  That is built by the following script:
> 
> ---
> g++ -m64 -shared -o attach_linux_amd64.so -fPIC -nostartfiles attach.cpp
> mv attach_linux_amd64.so ../attach_linux_amd64.so
> echo Compiled amd64
> ---
> 
> There's not even an attempt at working out ${libdir} or so on.
Sure, it's not necessary to know the installation path at the compile and
link time. It's only needed at the install time.


-- 
WBR, wRAR

Attachment: signature.asc
Description: PGP signature


Reply to: