LO build can not find external dependencies

Henrik /KaarPoSoft henrik at kaarposoft.dk
Thu Sep 20 04:12:17 PDT 2012


On 09/20/12 12:15, Michael Stahl wrote:
> On 19/09/12 10:35, Henrik /KaarPoSoft wrote:
>> Dear all,
>>
>> I am trying to build version 3.6.2.1 from source on a Linux box.
>>
>> I want to use headers already on system and system installed versions of
>> libraries as much as possible, so I pass --with-system-headers
>> --with-system-libs to ./configure.
>>
>> The external dependencies are installed in /opt, so I
>> export CPPFLAGS="-I/opt/include"
>> export LDFLAGS="-L/opt/lib"
>> before running ./autogen.sh
> LibreOffice currently has 2 build systems; the new one should respect
> these variables, but the old one probably does not, which effectively
> makes them useless today.  you will probably have a better time by
> setting PATH to /opt/bin and whatever variable is used by pkg-config, as
> long as all the externals you have installed there have a foo-config
> script or are pkg-config enabled the LO configure script should set
> things up the right way.
I already have
     export PATH="$PATH:/opt/sbin:/opt/bin"
     export LD_LIBRARY_PATH="/local/lib:/lib:/opt/lib"
     export PKG_CONFIG_PATH="/opt/lib/pkgconfig"
and LO configuration seems to pick up the dependencies with pkg-config, 
as config_host.mk has a lot of export *_CFLAGS= and export *_LIBS with 
info from pkg-config.
> another alternative would be to install a complete baseline (i.e. incl.
> libc and everything needed) into some prefix and make use of the
> existing GCC --sysroot support, but i've actually never done that in a
> configure environment (i just remember that it was used to build OOo at
> Sun), and you probably have to fix up some bitrot to get it to actually
> work (reading configure it seems you'd need to set SYSBASE var).
I would rather not go into this, as it seems much to complex for this 
"simple" problem.

Anyway, I do not think it would solve the problem.
It is not gcc which is complaining about the missing libraries, but 
rather the system linker which complains when trying to run some 
executable created by LO.
>> I also have
>> export LD_LIBRARY_PATH="/opt/lib"
> apparently the new build system overwrites this always, guess nobody
> ever needed to set this from the outside; you could try to edit various
> occurrences in solenv/gbuild to prepend the values if it is already defined.
*Do you have any suggestions as to which files to look into/edit?*

I do not have much experience with the LO codebase, and a grep for 
LD_LIBRARY_PATH returns almost 1000 files...

I am now trying to build with:
./autogen.sh [...lots-of-options...] --with-system-headers 
--with-system-libs CPPFLAGS="-I/opt/include" LDFLAGS="-L/opt/lib"
export CPPFLAGS="-I/opt/include"
export LDFLAGS="-L/opt/lib"
make verbose=t CPPFLAGS="-I/opt/include" LDFLAGS="-L/opt/lib" build
but running into the same problems.


More information about the LibreOffice mailing list