Re: Building LibreOffice on Raspberry Pi 4

2022-06-09 Thread Rene Engelhard

Hi,

Am 08.06.22 um 22:37 schrieb Rene Engelhard:
[CXX] 
workdir/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom.cpp

{standard input}: Assembler messages:
{standard input}:194: Error: selected processor does not support 
`yield' in ARM mode
make[1]: *** [/home/pi/Projects/core/solenv/gbuild/LinkTarget.mk:404: 
/home/pi/Projects/core/workdir/GenCxxObject/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock.o] 
Error 1



Works here.

(Though on Debian unstable)


... even with dbgutil :) (After disabling some internal libs...)

The final problem that I have encountered was that some libraries were 
build with a '-lo' suffix, as it was expected:


You mean *were not*, I assume?

And that is completely explainable, the modules patch the (generated by 
automake) Makefile.in (that then becomes Makefile when running 
configure). Probably because patching Makefile.am would have triggered a 
automatic re-automake...


See e.g. external/libwpg/libwpg-bundled-soname.patch.0


autoreconf also runs automake which regenerates Makefile.in from 
Makefile.am and thus you loose the -release lo...



Regards,


Rene



Re: Building LibreOffice on Raspberry Pi 4

2022-06-08 Thread Rene Engelhard

Hi,

Am 08.06.22 um 19:20 schrieb Hossein Nourikhah:
I was trying to build LibreOffice master on 32 bit armhf Debian 10 
(Official Raspbian) on Raspberry Pi 4. I could compile and run 
LibreOffice successfully, but some changes were necessary. Here's how:


Your mail prompted me to retry it with current master. Since the alpha 
builds fine..




First, some information about the OS:

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/;
SUPPORT_URL="http://www.raspbian.org/RaspbianForums;
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs;

Ugh, old. Why oldstable? And why raspbian in the first place if you use 
a rpi4 anyway?



Following with a "real" Debian on a rpi4 (arm64, actually with a armhf 
chroot).




This is my build configuration:

$ cat autogen.input
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-armhf

Unneeded. Just works.

--enable-dbgutil


I always build without. Maybe it has to do with it



--without-doxygen
--disable-pdfium

This was the problem with pdfium, so I disabled it:

[CXX] 
workdir/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom.cpp

{standard input}: Assembler messages:
{standard input}:194: Error: selected processor does not support 
`yield' in ARM mode
make[1]: *** [/home/pi/Projects/core/solenv/gbuild/LinkTarget.mk:404: 
/home/pi/Projects/core/workdir/GenCxxObject/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock.o] 
Error 1



Works here.

(Though on Debian unstable)


Then, I had this problem:
[...]


Or use system-libs ;-)

Other than that, I had to remove 'Executable_regmerge from 
registry/Module_registry.mk, as it was causing problem for the build.



For example? Works here, too.

I expect regmerge to get removed soon:

[API CHANGE] Remove deprecated idlc and regmerge from the SDK
https://gerrit.libreoffice.org/c/core/+/122363


For 7.5 at the earliest..


The final problem that I have encountered was that some libraries were 
build with a '-lo' suffix, as it was expected:


Again no problem if you use the system libs. all needed stuff exist in 
Debian proper.



(The only problem we had was that we need

https://salsa.debian.org/libreoffice-team/libreoffice/libreoffice/-/blob/master/patches/arm-fp-mode.diff

so that bridges compiles but that's probably because our gcc 
configuration and thus I didn't upstream that one. I think the error was 
similar to your pdfim one though).



Regards,


Rene



Building LibreOffice on Raspberry Pi 4

2022-06-08 Thread Hossein Nourikhah

Hello,

I was trying to build LibreOffice master on 32 bit armhf Debian 10 
(Official Raspbian) on Raspberry Pi 4. I could compile and run 
LibreOffice successfully, but some changes were necessary. Here's how:


First, some information about the OS:

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/;
SUPPORT_URL="http://www.raspbian.org/RaspbianForums;
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs;

This is my build configuration:

$ cat autogen.input
--with-jdk-home=/usr/lib/jvm/java-11-openjdk-armhf
--enable-dbgutil
--without-doxygen
--disable-pdfium

This was the problem with pdfium, so I disabled it:

[CXX] 
workdir/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/partition_oom.cpp

{standard input}: Assembler messages:
{standard input}:194: Error: selected processor does not support `yield' 
in ARM mode
make[1]: *** [/home/pi/Projects/core/solenv/gbuild/LinkTarget.mk:404: 
/home/pi/Projects/core/workdir/GenCxxObject/UnpackedTarball/pdfium/third_party/base/allocator/partition_allocator/spin_lock.o] 
Error 1


Then, I had this problem:

cd . && /bin/bash 
/home/pi/Projects/libo/core/workdir/UnpackedTarball/hunspell/missing 
automake-1.15 --gnu

configure.ac:11: error: version mismatch.  This is Automake 1.15.1,
configure.ac:11: but the definition used by this AM_INIT_AUTOMAKE
configure.ac:11: comes from Automake 1.15.  You should recreate
configure.ac:11: aclocal.m4 with aclocal and run automake again.
WARNING: 'automake-1.15' is probably too old.
 You should only need it if you modified 'Makefile.am' or
 'configure.ac' or m4 files included by 'configure.ac'.
 The 'automake' program is part of the GNU Automake package:
 
 It also requires GNU Autoconf, GNU m4 and Perl in order to run:
 
 
 
make[3]: *** [Makefile:402: Makefile.in] Error 1
make[2]: *** [Makefile:403: Makefile.in] Error 1
make[1]: *** 
[/home/pi/Projects/libo/core/external/hunspell/ExternalProject_hunspell.mk:28: 
/home/pi/Projects/libo/core/workdir/ExternalProject/hunspell/build] 
Error 1


I have added autoreconf to the .mk files, and this fixed the problem. 
Here is my gerrit submission for this fix:


Use autoreconf in some external projects
https://gerrit.libreoffice.org/c/core/+/135285

Other than that, I had to remove 'Executable_regmerge from 
registry/Module_registry.mk, as it was causing problem for the build.


I expect regmerge to get removed soon:

[API CHANGE] Remove deprecated idlc and regmerge from the SDK
https://gerrit.libreoffice.org/c/core/+/122363

The final problem that I have encountered was that some libraries were 
build with a '-lo' suffix, as it was expected:


$ make
...
[UPK] 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
/home/pi/Projects/libo/core/external/librevenge/ExternalPackage_librevenge.mk:19: 
*** file 
/home/pi/Projects/libo/core/workdir/UnpackedTarball/librevenge/src/lib/.libs/librevenge-0.0-lo.so.0.0.4 
does not exist in the tarball.  Stop.


I fixed the problem by creating symbolic links (this if for libwpg):

$ ln -s 
/home/pi/Projects/libo/core/workdir/UnpackedTarball/libwpg/src/lib/.libs/libwpg-0.3.so 
/home/pi/Projects/libo/core/workdir/UnpackedTarball/libwpg/src/lib/.libs/libwpg-0.3-lo.so.3.0.3


$ ln -s 
/home/pi/Projects/libo/core/workdir/UnpackedTarball/libwpg/src/lib/.libs/libwpg-0.3.so 
/home/pi/Projects/libo/core/instdir/program/libwpg-0.3-lo.so.3


If I can fix the last problem, I can put the build instructions in the 
appropriate section in:


Build LibreOffice from source code
https://wiki.documentfoundation.org/User:Hossein/Build

I appreciate any help on this.

Regards,
Hossein