I'm building libreoffice-5.3.0.3 in

Beyond Linux® From Scratch - Version 8.0
Chapter 41. Office Programs LibreOffice-5.3.0

I wanted to see if the tests would run, so I tried compiling with the flags --with-junit=path and --with-hamcrest=path set in configure. The configure script could not find either junit4.jar or hamcrest.jar. I traced part of the problem back to the installation of JUnit-4.11. It appears that the last two lines of the BLFS page need some work.

The line

cp -v hamcrest-1.3/hamcrest-core*.jar /usr/share/java/junit-4.11

should be

cp -v lib/hamcrest-core*.jar /usr/share/java/junit-4.11

because the earlier line

cp -v ../hamcrest-core-1.3{,-sources}.jar lib/

puts the hamcrest .jar files in /sources/junit4-4.11/lib rather than in
/sources/junit4-4.11/

The line

cp -v junit*/junit*.jar /usr/share/java/junit-4.11

seems to be fine. However, it appears that libreoffice is looking for files named

junit4.jar and hamcrest.jar

in /usr/share/java. So I'm thinking that links should be created to point to the right
places, although I'm not entirely sure of this:

ln -sfv /usr/share/java/junit-4.11/junit-4.11-SNAPSHOT.jar /usr/share/java/junit4.jar ln -sfv /usr/share/java/junit-4.11/hamcrest-core-1.3.jar /usr/share/java/hamcrest.jar

Result:

root [ /usr/share/java ]# ll
total 4
lrwxrwxrwx 1 root root   48 Jun  3 20:31 hamcrest.jar ->
/usr/share/java/junit-4.11/hamcrest-core-1.3.jar
drwxr-xr-x 2 root root 4096 Jun  3 19:19 junit-4.11
lrwxrwxrwx 1 root root   50 Jun  3 19:59 junit4.jar ->
/usr/share/java/junit-4.11/junit-4.11-SNAPSHOT.jar

I don't know if this allows successful testing of libreoffice, since I've successfully compiled it --without-junit as in the BLFS book. I hesitate to run the tests because the book says:

The instructions below will only build the package without running any unit tests. If you prefer to run the unit tests, replace make build-nocheck with make build or (as a regular user only) just make, but do not be surprised if a unit test fails right at the end of the
build and breaks it.

How badly can running the tests break the build?

Libreoffice on Linux runs *fast* compared to on Windows7.

Alan
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to