Failure when building LibreOffice from ports

Hi, guys:

I get a failure when building LibreOffice via ports. FreeBSD version is 9.1, LibreOffice version is 4.0.3. The attachment is make's options.

Please help me, how can I do this, thanks a lot.

There are some errors logged when building, please note.

Code:
/home/software/FreeBSD/ports/editors/libreoffice/work/libreoffice-4.0.3.3/ucb/source/ucp/cmis/cmis_content.cxx:320:36: error: no type named 'Exception' in namespace 'libcmis'
            catch ( const libcmis::Exception& )
                          ~~~~~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
4 warnings and 20 errors generated.
gmake[2]: *** [/tmp/lobuild/workdir/unxfbsd.pro/CxxObject/ucb/source/ucp/cmis/cmis_content.o] Error 1

-----------------------------------------------------------------------
        Oh dear - something failed during the build - sorry !
  For more help with debugging build errors, please see the section in:
            [url]http://wiki.documentfoundation.org/Development[/url]

  internal build errors:

ERROR: error 512 occurred while making /home/software/FreeBSD/ports/editors/libreoffice/work/libreoffice-4.0.3.3/tail_build/prj

 it seems that the error is inside 'tail_build', please re-run build
 inside this module to isolate the error and/or test your fix.

-----------------------------------------------------------------------
To rebuild a specific module:

gmake tail_build.clean # not recommended, this will re-build almost everything
gmake tail_build

when the problem is isolated and fixed, re-run 'gmake'
gmake[1]: *** [build-packimages] Error 1
gmake[1]: Leaving directory `/home/software/FreeBSD/ports/editors/libreoffice/work/libreoffice-4.0.3.3'
gmake: *** [all] Error 2
*** [do-build] Error code 1

Stop in /home/software/FreeBSD/ports/editors/libreoffice.
*** [build] Error code 1
 
dp_pan said:
The attachment is make's options.

Where are the make's options?

Not all ports build with clang yet. See https://wiki.freebsd.org/PortsAndClang. Try to build with gcc. Make sure your /etc/make.conf contains
Code:
CC=gcc
CXX=g++
CPP=gcpp
This is especially true, if you built your world with WITH_CLANG_IS_CC option.

Maybe you'll have to rebuild LibreOffice again along with all dependencies. You can automate this process with ports-mgmt/portmaster (use the -R flag) or ports-mgmt/portupgrade (use the -Rf flags), but you have to let them know your ports tree is not in /usr/ports but in /home/software/FreeBSD/ports (check the manpages to see how to do that).
 
But this port is compiled with CLANG by default. I have successfully compiled it last week (the same snapshot). I don't have an idea which flag is related with that module, but check your etc/make.conf and place more conservative configuration flags.
 
There is my /etc/make.conf, just only set this:
Code:
root@dpx230:/root # more /etc/make.conf
# for intel graphic card
WITH_NEW_XORG=yes
WITH_KMS=yes
# added by use.perl 2013-05-21 23:36:58
PERL_VERSION=5.14.2
 
Install either ports-mgmt/portmaster or ports-mgmt/portupgrade and try running the following set of commands for portupgrade (my preferred utility)
Code:
# setenv PORTSDIR /home/software/FreeBSD/ports
# setenv DISTDIR $PORTSDIR/distfiles
# mkdir -p $DISTDIR
# cd $PORTSDIR && make fetchindex
# portupgrade -Rf -DD editors/libreoffice

or if you want to use portmaster
Code:
# setenv PORTSDIR /home/software/FreeBSD/ports
# setenv DISTDIR $PORTSDIR/distfiles
# mkdir -p $DISTDIR
# cd $PORTSDIR && make fetchindex
# portmaster -y -Rd $PORTSDIR/editors/libreoffice

These commands will try to download new sources, and then rebuild all the dependencies of editors/libreoffice first, and then try to rebuild the port. Hopefully it will help.

Otherwise check you have other variables set as they should be -- PORTSDIR and DISTDIR may not be the only ones needed to have an operational ports tree outside of /usr. See the bottom of the ports(7)() manpage for further info ;)
 
The error is the same when I try to do those steps. It still stops with the error. What can I do?
Code:
ERROR: error 512 occurred while making /home/software/FreeBSD/ports/editors/libreoffice/work/libreoffice-4.0.3.3/tail_build/prj

 it seems that the error is inside 'tail_build', please re-run build
 inside this module to isolate the error and/or test your fix.

-----------------------------------------------------------------------
To rebuild a specific module:

gmake tail_build.clean # not recommended, this will re-build almost everything
gmake tail_build

when the problem is isolated and fixed, re-run 'gmake'
gmake[1]: *** [build-packimages] Error 1
gmake[1]: Leaving directory `/home/software/FreeBSD/ports/editors/libreoffice/work/libreoffice-4.0.3.3'
gmake: *** [all] Error 2
*** [do-build] Error code 1

Stop in /home/software/FreeBSD/ports/editors/libreoffice.
*** [build] Error code 1

Stop in /home/software/FreeBSD/ports/editors/libreoffice.

===>>> make failed for editors/libreoffice
===>>> Aborting update

===>>> Killing background jobs
Terminated
===>>> The following actions were performed:
	Upgrade of libvisio-0.0.19 to libvisio-0.0.27
	Upgrade of libwps-0.2.7 to libwps-0.2.8
	Upgrade of rasqal-0.9.29 to rasqal-0.9.30
	Upgrade of redland-1.0.15_1 to redland-1.0.16


===>>> You can restart from the point of failure with this command line:
       portmaster <flags> editors/libreoffice x11-fonts/gentium-basic x11-fonts/liberation-fonts-ttf 

===>>> Exiting
 
The problem with clang on i386 was fixed, so you shouldn't have any problems compiling it. You need install devel/llvm and lang/clang.

Add in /etc/make.conf:
Code:
CC=clang 
CXX=clang++ 
CPP=clang-cpp

Reinstall net/libcmis before build editors/libreoffice.

To build with GCC instead using clang:
# cd /usr/ports/editors/libreoffice && make clean && make WITH_GCC=yes install clean

My configuration options:
Code:
[CMD]# cd /usr/ports/editors/libreoffice && make pretty-print-config[/CMD]
+CUPS -DEBUG -GNOME +GTK2 -GTK3 -JAVA -KDE4 -MERGELIBS +MMEDIA -PGSQL -SDK -SYSTRAY -TEST -WEBDAV

Read /usr/ports/KNOBS for descriptions.
 
Please help me again.

I have updated those ports by portmaster.
Code:
# portmaster -y -Rd /usr/ports/devel/llvm
# portmaster -y -Rd /usr/ports/lang/clang
# portmaster -y -Rd /usr/ports/net/libcmis

Then starting rebuild Libreoffice with make WITH_GCC=yes install, but there is a problem with building.

Code:
gmake[2]: *** [/tmp/lobuild/workdir/unxfbsd.pro/CxxObject/sc/source/core/data/dpfilteredcache.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....

-----------------------------------------------------------------------
        Oh dear - something failed during the build - sorry !
  For more help with debugging build errors, please see the section in:
            [url]http://wiki.documentfoundation.org/Development[/url]

  internal build errors:

ERROR: error 512 occurred while making /u/software/FreeBSD/ports/editors/libreoffice/work/libreoffice-4.0.3.3/tail_build/prj

 it seems that the error is inside 'tail_build', please re-run build
 inside this module to isolate the error and/or test your fix.

-----------------------------------------------------------------------
To rebuild a specific module:

gmake tail_build.clean # not recommended, this will re-build almost everything
gmake tail_build

when the problem is isolated and fixed, re-run 'gmake'
gmake[1]: *** [build-packimages] Error 1
gmake[1]: Leaving directory `/u/software/FreeBSD/ports/editors/libreoffice/work/libreoffice-4.0.3.3'
gmake: *** [all] Error 2
*** [do-build] Error code 1

Stop in /u/software/FreeBSD/ports/editors/libreoffice.
*** [build] Error code 1

Stop in /u/software/FreeBSD/ports/editors/libreoffice.
 
My suggestion is to use /usr/ports as your default location of the ports tree and try building again with conservative settings in /etc/make.conf and /etc/src.conf.

If you use any customized settings on your ports, be sure to be able to roll-back in case something like this happens.
 
Back
Top