Closed yugr closed 2 years ago
Hey @yugr , this is a good question. I don't think the LD_PRELOAD
itself can help you out to solve the pbuilder
limitation. (Definitely not with the 3.x versions, maybe with the 2.4 version.)
pbuilder
command itself inside Bear. bear --config config.json -- pbuilder ...
The config file shall say that output.content.include_only_existing_source
should set to false, and the output.content.paths_to_include
should be set to the source directory of your project. (I would run first without the paths_to_include
set, to see which files it lists.) You can speed up this process by running the intercept
command once against the build, and just run subsequent citnames
to customize the output.make
program, which calls bear -- /usr/bin/make $@
, and set your PATH
to have this directory in the front. Then run pbuilder
which is likely to pick up fake make
program.I made these suggestion without really know how pbuilder
works. (I did try this with arch linux package maker though.)
I'm trying to collect compilation database in a package build system (
pbuilder
) environment. Unfortunately the build infrastructure does not provide control over build command so I can not simply applybear
to it:I do have control over environment variables though so I could set
LD_PRELOAD
by hand prior to running the build. I this possible? If yes, could this scenario be added to docs?