Re: LO build can not find external dependencies

2012-09-21 Thread Stephan Bergmann

On 09/21/2012 01:43 PM, Stephan Bergmann wrote:

On 09/21/2012 08:42 AM, Henrik /KaarPoSoft wrote:

In
solenv/gbuild/platform/com_GCC_defs.mk
I changed
gb_Helper_set_ld_path :=
$(gb_Helper_LIBRARY_PATH_VAR)="$(OUTDIR_FOR_BUILD)/lib"
to
gb_Helper_set_ld_path :=
$(gb_Helper_LIBRARY_PATH_VAR)="/opt/lib/:$(OUTDIR_FOR_BUILD)/lib"
and now my build continues much further!

Thanks a million for your help; it is most appreciated.

(Guess it would be nice if someone would put a general solution to this
into the codetree, maybe using a LD_LIBRARY_PATH_PREFIX= var in
configure or similar).



"Honour preset LD_LIBRARY_PATH etc. in gbuild, too" should fix that.


...plus 
 
"Cut/paste typos," of course.


Stephan

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO build can not find external dependencies

2012-09-21 Thread Stephan Bergmann

On 09/21/2012 08:42 AM, Henrik /KaarPoSoft wrote:

In
solenv/gbuild/platform/com_GCC_defs.mk
I changed
gb_Helper_set_ld_path :=
$(gb_Helper_LIBRARY_PATH_VAR)="$(OUTDIR_FOR_BUILD)/lib"
to
gb_Helper_set_ld_path :=
$(gb_Helper_LIBRARY_PATH_VAR)="/opt/lib/:$(OUTDIR_FOR_BUILD)/lib"
and now my build continues much further!

Thanks a million for your help; it is most appreciated.

(Guess it would be nice if someone would put a general solution to this
into the codetree, maybe using a LD_LIBRARY_PATH_PREFIX= var in
configure or similar).


 
"Honour preset LD_LIBRARY_PATH etc. in gbuild, too" should fix that.


Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO build can not find external dependencies

2012-09-20 Thread Henrik /KaarPoSoft

On 09/20/12 13:19, Michael Stahl wrote:

On 20/09/12 13:12, Henrik /KaarPoSoft wrote:

On 09/20/12 12:15, Michael Stahl wrote:

On 19/09/12 10:35, Henrik /KaarPoSoft wrote:

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...

look in solenv/gbuild, only 11 hits there; one of which to set
gb_Helper_LIBRARY_PATH_VAR , which is used here:

solenv/gbuild/platform/com_GCC_defs.mk:gb_Helper_set_ld_path :=
$(gb_Helper_LIBRARY_PATH_VAR)="$(OUTDIR_FOR_BUILD)/lib"


BINGO!

In
solenv/gbuild/platform/com_GCC_defs.mk
I changed
gb_Helper_set_ld_path := 
$(gb_Helper_LIBRARY_PATH_VAR)="$(OUTDIR_FOR_BUILD)/lib"

to
gb_Helper_set_ld_path := 
$(gb_Helper_LIBRARY_PATH_VAR)="/opt/lib/:$(OUTDIR_FOR_BUILD)/lib"

and now my build continues much further!

Thanks a million for your help; it is most appreciated.

(Guess it would be nice if someone would put a general solution to this 
into the codetree, maybe using a LD_LIBRARY_PATH_PREFIX= var in 
configure or similar).


/Henrik
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO build can not find external dependencies

2012-09-20 Thread Michael Stahl
On 20/09/12 13:12, Henrik /KaarPoSoft wrote:
> On 09/20/12 12:15, Michael Stahl wrote:
>> On 19/09/12 10:35, Henrik /KaarPoSoft wrote:
>>> 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...

look in solenv/gbuild, only 11 hits there; one of which to set
gb_Helper_LIBRARY_PATH_VAR , which is used here:

solenv/gbuild/platform/com_GCC_defs.mk:gb_Helper_set_ld_path :=
$(gb_Helper_LIBRARY_PATH_VAR)="$(OUTDIR_FOR_BUILD)/lib"
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO build can not find external dependencies

2012-09-20 Thread Henrik /KaarPoSoft

On 09/20/12 12:13, Michael Meeks wrote:

On Wed, 2012-09-19 at 10:35 +0200, Henrik /KaarPoSoft wrote:

/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1/solver/unxlngi6.pro/bin/cppunit/cppunittester:
error while loading shared libraries: libcppunit-1.12.so.1: cannot open
shared object file: No such file or directory

Ok.


--
Even though the shared library IS present under /opt/lib, and the
symlinks are not broken.
Workaround: --without-system-cppunit

So - is /opt/lib in your system linker path ? ie. in /etc/ld.so.conf -
it's an unusual place to have in there ;-) and have you run
sudo /sbin/ldconfig to re-build whatever caches there are there ?
No, it is not. This is by design: I only want stuff from / and /usr in 
the system linker path, to minimize the risk that root, daemons, etc. 
pulls anything from /opt.

But I have the following in profile.d for the build user:
export PATH="$PATH:/opt/sbin:/opt/bin"
export LD_LIBRARY_PATH="/local/lib:/lib:/opt/lib"
export PKG_CONFIG_PATH="/opt/lib/pkgconfig"
And I have not experienced any problems with using LD_LIBRARY_PATH before.

Out of interest, what Linux are you using ? :-)

KaarPux: http://kaarpux.kaarposoft.dk/
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO build can not find external dependencies

2012-09-20 Thread Henrik /KaarPoSoft

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.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO build can not find external dependencies

2012-09-20 Thread Michael Stahl
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.

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 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.

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: LO build can not find external dependencies

2012-09-20 Thread Michael Meeks
Hi there,

On Wed, 2012-09-19 at 10:35 +0200, Henrik /KaarPoSoft wrote:
> I am trying to build version 3.6.2.1 from source on a Linux box.

Sounds great.

> 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.

Seems reasonable.

> generates this error:
> --
> /home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1/solver/unxlngi6.pro/bin/cppunit/cppunittester:
>  
> error while loading shared libraries: libcppunit-1.12.so.1: cannot open 
> shared object file: No such file or directory

Ok.

> --
> Even though the shared library IS present under /opt/lib, and the 
> symlinks are not broken.
> Workaround: --without-system-cppunit

So - is /opt/lib in your system linker path ? ie. in /etc/ld.so.conf -
it's an unusual place to have in there ;-) and have you run
sudo /sbin/ldconfig to re-build whatever caches there are there ?

Out of interest, what Linux are you using ? :-)

ATB,

Michael.

-- 
michael.me...@suse.com  <><, Pseudo Engineer, itinerant idiot

___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


LO build can not find external dependencies

2012-09-19 Thread Henrik /KaarPoSoft

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

I also have
export LD_LIBRARY_PATH="/opt/lib"

In general, this seems to work, but there are a few problems:



In sal, this command:
--
S=/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1 
&& O=$S/solver/unxlngi6.pro && W=$S/workdir/unxlngi6.pro &&  mkdir -p 
$W/CppunitTest/ && (LD_LIBRARY_PATH="$O/lib":$O/lib/sqlite 
DBGSV_ERROR_OUT=shell  STAR_RESOURCEPATH=$O/bin/ 
$O/bin/cppunit/cppunittester 
$W/LinkTarget/CppunitTest/libtest_Module_DLL.so --headless   > 
$W/CppunitTest/Module_DLL.test.log 2>&1 || (cat 
$W/CppunitTest/Module_DLL.test.log && echo; echo "Error: a unit test 
failed, please do one of:"; echo; echo "export 
DEBUGCPPUNIT=TRUE# for exception catching"; echo "export 
GDBCPPUNITTRACE=\"gdb --args\" # for interactive debugging"; echo 
"export VALGRIND=memcheck# for memory checking" ; echo "and 
retry." && false))

--

generates this error:
--
/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1/solver/unxlngi6.pro/bin/cppunit/cppunittester: 
error while loading shared libraries: libcppunit-1.12.so.1: cannot open 
shared object file: No such file or directory

--
Even though the shared library IS present under /opt/lib, and the 
symlinks are not broken.

Workaround: --without-system-cppunit





In tail_build, this command:
--
S=/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1 
&& O=$S/solver/unxlngi6.pro && W=$S/workdir/unxlngi6.pro &&  rm -rf 
$W/Extension/presenter-screen/root/help/en-US && mkdir 
$W/Extension/presenter-screen/root/help/en-US && 
LD_LIBRARY_PATH="$O/lib" $O/bin/HelpLinker -mod help -extlangsrc 
$W/Extension/presenter-screen/help/en-US -sty $O/bin/embed.xsl 
-extlangdest $W/Extension/presenter-screen/root/help/en-US -idxcaption 
$O/bin/idxcaption.xsl -idxcontent $O/bin/idxcontent.xsl 
com.sun.PresenterScreen-linux_x86/presenter.xhp && (cd 
$W/Extension/presenter-screen/help/en-US && zip  -r 
$W/Extension/presenter-screen/root/help/en-US/help.jar 
com.sun.PresenterScreen-linux_x86/presenter.xhp) && 
LD_LIBRARY_PATH="$O/lib" $O/bin/HelpIndexer -lang en-US -mod help -dir 
$W/Extension/presenter-screen/root/help/en-US && touch 
$W/Extension/presenter-screen/root/help/en-US.done

--

generates this error:
--
/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1/solver/unxlngi6.pro/bin/HelpLinker: 
error while loading shared libraries: libclucene-core.so.1: cannot open 
shared object file: No such file or directory

--
Even though the shared library IS present under /opt/lib, and the 
symlinks are not broken.

Workaround: --without-system-clucene




In tail_build, this command:
--
LD_LIBRARY_PATH="$O/lib":$O/lib/sqlite DBGSV_ERROR_OUT=shell 
STAR_RESOURCEPATH=$O/bin/ $O/bin/cppunit/cppunittester 
$W/LinkTarget/CppunitTest/libtest_basic_scanner.so --headless > 
$W/CppunitTest/basic_scanner.test.log 2>&1

--

generates this error:
--
Aborted (core dumped)
terminate called after throwing an instance of 
'CppUnit::DynamicLibraryManagerException'
what():  Failed to load dynamic library: 
/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1/workdir/unxlngi6.pro/LinkTarget/CppunitTest/libtest_basic_scanner.so

--




It seems to me that in all 3 cases, the LibreOffice build fails to set 
-L/opt/lib, and it even forces it's own LD_LIBRARY_PATH, which does not 
include /opt/lib.


Running
--
S=/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1 
O=$S/solver/unxlngi6.pro W=$S/workdir/unxlngi6.pro 
LD_LIBRARY_PATH="$O/lib" ldd 
/home/kaarpux/KX_OO/kaarpux/linux/build/opt/libreoffice-core-3.6.2.1/workdir/unxlngi6.pro/LinkTarget/CppunitTest/libtest_basic_scanner.so 
| grep "not found"

--
gives
--
libgraphite2.so.2.0.0 => not found
--
whereas
--
S=/home/kaarpux/KX_OO/kaarpux/l