Bug 92712 - OS X Build Instructions Cleanup (LibreOffice Website)
Summary: OS X Build Instructions Cleanup (LibreOffice Website)
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other macOS (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-13 20:50 UTC by Asher
Modified: 2020-11-23 20:30 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
OSX Build Screenshot (570.47 KB, image/png)
2015-07-13 20:52 UTC, Asher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Asher 2015-07-13 20:50:08 UTC
=== PROBLEM ===
LibreOffice needs to have a clean build on a fresh XCode (7.0) / OS X (10.10.4) install.  
 - Too many "suggestions" on the website (see cleanup)
 - LibreOffice Build doesn't seem to work with the default OS X version of Java (1.8.0_45)
 - Unit Test Fail /core/workdir/CppunitTest/dbaccess_hsqldb_test.test

=== CLEANUP IDEAS & QUESTIONS ===
* Key idea... git source path must be clear.
EXAMPLE: git clone git://gerrit.libreoffice.org/lode
EXAMPLE: git clone git://gerrit.libreoffice.org/core 
PROBLEM: Which one should we use?  Both are on the same page (search below for example)?

=== WEBSITE CLEANUP ===
https://wiki.documentfoundation.org/Development/BuildingOnMac

NOTE: After the build is over there should be instructions on how to install it to the correct Applications directory and how to start it from the command line with the debugger.


=== MAIN ERROR === (SEE ATTACHED SCREEN SHOT)
(shouldn't we be able to compile libreoffice with the default Java Version on OSX?  After all the precompiled libreoffice works on the same system)

https://support.apple.com/kb/DL1572?locale=en_US

To open “this Java application” you need to install the legacy Java SE 6 runtime.

[build LNK] CppunitTest/libtest_sd_uimpress.dylib
No Java runtime present, requesting install.

Error: a unit test failed, please do one of:

export CPPUNITTRACE="lldb --"       # for interactive debugging on OS X
export VALGRIND=memcheck            # for memory checking

and retry using: make CppunitTest_dbaccess_hsqldb_test

make[1]: *** [/Users/Asher/lo/core/workdir/CppunitTest/dbaccess_hsqldb_test.test] Error 1
make[1]: *** Waiting for unfinished jobs....
No Java runtime present, requesting install.

Error: a unit test failed, please do one of:

export CPPUNITTRACE="lldb --"       # for interactive debugging on OS X
export VALGRIND=memcheck            # for memory checking

and retry using: make CppunitTest_dbaccess_RowSetClones

make[1]: *** [/Users/Asher/lo/core/workdir/CppunitTest/dbaccess_RowSetClones.test] Error 1
make: *** [build] Error 2

           

=== SYSTEM BUILD SPECS (7/13/2015) ===
uname -v
Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64
  OS: 10.10.4
  Model Name:	MacBook Pro
  Model Identifier:	MacBookPro11,3
  Processor Name:	Intel Core i7
  Processor Speed:	2.8 GHz
  Number of Processors:	1
  Total Number of Cores:	4
  L2 Cache (per Core):	256 KB
  L3 Cache:	6 MB
  Memory:	16 GB

=== XCODE ===
Version 7.0 beta 3

=== JAVA / JAVAC (default) ===
$javac -version
javac 1.8.0_45
$java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

=== EXAMPLE ERRORS ===

== ERROR #1 == After a command line build GIT wont work (maybe an old issue)

$ git pull git://gerrit.libreoffice.org/core 
xcrun: error: active developer path ("/Volumes/Xcode/Xcode-beta.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)

(CORRECT LOCATION SHOULD BE)
$ xcode-select -print-path 
/Applications/Xcode-beta.app/Contents/Developer

SOLUTION: Manually going into Xcode's Preferences, select Locations and make sure the corresponding Command Line Tools are installed (/Applications/Xcode-beta.app) "grep -r "xcode-select -switch" *" shows nothing in all of libreoffice directories.

"git pull git://gerrit.libreoffice.org/core" then works...


== ERROR #2 == /autogen.sh stops working after build (maybe related to above)

$ ./autogen.sh
main::scan_file() called too early to check prototype at /opt/lo/bin/aclocal line 617.
autom4te: need GNU m4 1.4 or later: /usr/bin/m4
aclocal: autom4te failed with exit status: 1
Failed to run aclocal at ./autogen.sh line 159.

== ERROR #3 == (is there anyway to make the build process more colorful to watch?)

=== EXAMPLE OSX SPECIFIC BUILD WARNINGS === 
$ make

= WARNING =
/core/workdir/LexTarget/unoidl/source/sourceprovider-scanner.cxx:1054:2:
/core/workdir/YaccTarget/connectivity/source/parse/sqlbison.cxx:174:51:

 warning: 'register' storage class specifier is deprecated [-Wdeprecated-register]

= WARNING =
/Users/Asher/lo/core/vcl/osx/printaccessoryview.mm:1368:10: warning: 'setAccessoryView:' is deprecated: first deprecated in OS X 10.5 [-Wdeprecated-declarations]
    [pOp setAccessoryView: [pAccessoryView autorelease]];
         ^
/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSPrintOperation.h:142:1: note: 'setAccessoryView:' has been explicitly marked deprecated here
- (void)setAccessoryView:(NSView *)view NS_DEPRECATED_MAC(10_0, 10_5);
^

= WARNING =
/core/chart2/source/controller/main/ChartController.cxx:353:30: warning: unused function 'getSidebarFromModel' [-Wunused-function]
uno::Reference<ui::XSidebar> getSidebarFromModel(uno::Reference<frame::XModel> xModel)
Comment 1 Asher 2015-07-13 20:52:51 UTC
Created attachment 117216 [details]
OSX Build Screenshot
Comment 2 Alex Thurgood 2015-07-14 17:40:07 UTC
Not framework module, but LibreOffice in general

1) Too many issue in one report, please file one report per issue.

2) Xcode 7 is not the current version, but is in beta status, and only available to developers (or perhaps public beta) - TDF builds are built against XCode 6 for the most part (most of the build bots)

3) Java will work if you install OSX for Java, there is already a known issue about direct Java support, which is out of the projects control as it relies on Oracle fixing its version of Java.
Comment 3 Asher 2015-07-15 17:30:07 UTC
My main goal was to get LibreOffice to compile using the latest OSX toolchain and provide an update on what that build looked like using XCODE (7.0) and JAVA 8 (1.8).  

In the LibreOffice build instructions it talks about using XCODE Beta and also the latest JAVA and thats good.  However, it maybe doesn't work yet or isn't smooth unless you really know what your doing.
See: https://wiki.documentfoundation.org/Development/BuildingOnMac

When I tried to install Java 6 from Apple (https://support.apple.com/kb/DL1572?locale=en_US) it wouldn't install correctly.  When I type "java -version" I still get the latest java version "1.8.0_45".

Has anyone gotten LibreOffice to compile with the latest JAVA (8) / XCODE (7) on OSX recently?
Comment 4 Buovjaga 2020-08-05 15:55:29 UTC
There have been many changes to the article since this report. Is there still something that needs improving?
Comment 5 Roman Kuznetsov 2020-11-23 19:40:00 UTC
Tor, what's your opinion here? Can we close it now or really our mac building wiki page still needs some love?
Comment 6 How can I remove my account? 2020-11-23 19:41:56 UTC
Things can always be improved, but the details mentioned in the initial bug report from 2015 are hardly relevant any longer. This should be closed.