Bug 61092 - Build broken in oosplash when configured with --enable-headless
Summary: Build broken in oosplash when configured with --enable-headless
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All Linux (All)
: high major
Assignee: Riccardo Magliocchetti
URL:
Whiteboard: target:4.0.4
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 02:19 UTC by clkao
Modified: 2013-11-13 20:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
buildlog with ./autogen.sh --enable-headless && make (5.58 KB, text/plain)
2013-04-17 17:29 UTC, Jorendc
Details
force to not build extensions on libo headless (1.96 KB, patch)
2013-05-03 17:57 UTC, Riccardo Magliocchetti
Details
config.log (87.44 KB, text/plain)
2013-05-06 17:16 UTC, clkao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description clkao 2013-02-19 02:19:05 UTC
When following the instructions: http://wiki.documentfoundation.org/Development/HeadlessBuild

$ ./autogen.sh --with-max-jobs=6 --with-num-cpus=3 --without-java --enable-headless  --with-theme=''

(with-theme="no" doesn't work though btw)

build failed in oosplash when trying to link, apparently symbols in libx11 can't be found.

this is because desktop/Executable_oosplash.mk has:

 $(eval $(call gb_Executable_add_libs,oosplash,-lX11))

only enabled when headless is not enabled.

Should oosplash be just a stub when headless build is enabled?
Comment 1 Joel Madero 2013-04-14 18:36:46 UTC
Fridrich - do you happen to have an opinion on this one? Thought this would be your territory
Comment 2 Joel Madero 2013-04-17 17:17:34 UTC
I can confirm.

Marking:
New (confirmed)
Major (inability to build is a major problem if documentation says to do it this way)
High: default seems appropriate

I wonder if this ever worked, definitely broken now though:


tested against 4.0 master branch pulled just a couple days ago.


Thanks for reporting


@clkao - if you have a build log that may help
Comment 3 Jorendc 2013-04-17 17:29:53 UTC
Created attachment 78146 [details]
buildlog with ./autogen.sh --enable-headless && make

buildlog with ./autogen.sh --enable-headless && make
Comment 4 Jorendc 2013-04-17 17:35:27 UTC
@Riccardo: Michael S. told me on IRC you are currently working on this issue?

@Bug reporter: Michael S. also told that building with --enable-headless is currently 'experimental'. So that explains a lot :-).

Kind regards,
Joren
Comment 5 Riccardo Magliocchetti 2013-04-18 07:41:15 UTC
Thanks for adding me to the loop. Starting a new build to repliace on git master.

@clkao: are you using git master or 4.0 branch?

The status of this is that all should be fine in master but in a very bad shape on the 4.0 branch. We fixed that and other issues later in the cycle after 4.0 was already branched. Personally if experimental is not enough i'd just mark it as broken on 4.0 branch. The plan is to drop the experimental tag on master to promote it as working for 4.1.
Comment 6 Riccardo Magliocchetti 2013-04-28 16:29:58 UTC
@clkao, @jorendc, @jmadero: So it looks like libreoffice-4-0 branch has everything it needs. It looks like you are trying to compile with --enable-headless on top of a libo built with a different configuration. Can you confirm the issue after a make clean?

@clkao:
The desktop/Executable_oosplash.mk you referenced should looks like this in libreoffice-4.0 branch:

ifneq ($(GUIBASE),headless)
ifeq ($(GUI),UNX)
$(eval $(call gb_Executable_add_libs,oosplash,\
    -lX11 \
))
endif
endif

See http://cgit.freedesktop.org/libreoffice/core/tree/desktop/Executable_oosplash.mk?h=libreoffice-4-0#n60
Comment 7 Riccardo Magliocchetti 2013-05-02 07:13:05 UTC
A clean build on libreoffice-4-0 (3ac3c8681253b7a05d5736f664929bcd5f15c8aa) worked nicely here with "./configure --with-parallelism=3 --without-java --enable-headless --disable-vba --disable-extensions". I'd like some feedback from the reporters before closing.
Comment 8 clkao 2013-05-02 08:38:41 UTC
Hi,

I am still seeing this on a clean build of libreoffice-4-0 (b2ca148) with

./configure --with-max-jobs=6 --with-num-cpus=3 --without-java
--enable-headless --with-theme= --disable-vba

The error is the same as what @Jorendc attached:
/home/clkao/lodev/libo/workdir/unxlngx6.pro/CObject/desktop/unx/source/splashx.o:
In function `splash_draw_progress':
splashx.c:(.text+0x367): undefined reference to `XSetForeground'
[snipped]

AFAICT desktop/Executable_oosplash.mk has not changed on libreoffice-4-0.

The fix should be either: disable oosplash completely for headless, or
remove the ifndef and let it link with X11, since
desktop/unx/source/splashx.c definitely uses those symbols.

On 2 May 2013 15:13,  <bugzilla-daemon@freedesktop.org> wrote:
> Comment # 7 on bug 61092 from Riccardo Magliocchetti
>
> A clean build on libreoffice-4-0 (3ac3c8681253b7a05d5736f664929bcd5f15c8aa)
> worked nicely here with "./configure --with-parallelism=3 --without-java
> --enable-headless --disable-vba --disable-extensions". I'd like some
> feedback
> from the reporters before closing.
>
> ________________________________
> You are receiving this mail because:
>
> You reported the bug.
Comment 9 Riccardo Magliocchetti 2013-05-03 07:39:57 UTC
(In reply to comment #8)
> Hi,
> 
> I am still seeing this on a clean build of libreoffice-4-0 (b2ca148) with
> 
> ./configure --with-max-jobs=6 --with-num-cpus=3 --without-java
> --enable-headless --with-theme= --disable-vba
> 
[snip]

I wasn't seeing issues because X development headers got installed somehow on my build machine. Now i'm seeing a failure an X related (in an extension), plan to give a poke at it later today. Thanks!
Comment 10 Riccardo Magliocchetti 2013-05-03 17:57:28 UTC
Created attachment 78817 [details]
force to not build extensions on libo headless

With the patch and this command line you should build correctly, please double check.

./configure --with-parallelism=3 --without-java --enable-headless --disable-vba --disable-extensions --with-theme= --disable-opengl
Comment 11 clkao 2013-05-04 05:23:11 UTC
it seems with the patch it is still building oosplash.  should it be
desktop/Module_desktop.mk removing oosplash?

re x headers:  i have them as well, but i think it's irrelevant
because the issue is headless removed -lX11 so ld failed.

On 4 May 2013 01:57,  <bugzilla-daemon@freedesktop.org> wrote:
> Comment # 10 on bug 61092 from Riccardo Magliocchetti
>
> Created attachment 78817 [details] [review]
> force to not build extensions on libo headless
>
> With the patch and this command line you should build correctly, please
> double
> check.
>
> ./configure --with-parallelism=3 --without-java --enable-headless
> --disable-vba
> --disable-extensions --with-theme= --disable-opengl
>
> ________________________________
> You are receiving this mail because:
>
> You reported the bug.
Comment 12 Riccardo Magliocchetti 2013-05-06 07:58:36 UTC
(In reply to comment #11)
> it seems with the patch it is still building oosplash.  should it be
> desktop/Module_desktop.mk removing oosplash?

no it shouldn't, there should be the proper ifdefery in place. Now can you retry these instructions with latest libreoffice-4-0 (pushed a patch that superseded the one provided here) please?

make clean && ./autogen.sh --with-parallelism=3 --without-java --enable-headless --disable-vba --disable-extensions --disable-opengl && make
Comment 13 clkao 2013-05-06 09:21:20 UTC
Hi,

Retried with cfe7f87.  Still the same, failing at linking X* symbols
originated from splashx.c of LinkTarget/Executable/oosplash.

On 6 May 2013 15:58,  <bugzilla-daemon@freedesktop.org> wrote:
> Comment # 12 on bug 61092 from Riccardo Magliocchetti
>
> (In reply to comment #11)
>> it seems with the patch it is still building oosplash.  should it be
>> desktop/Module_desktop.mk removing oosplash?
>
> no it shouldn't, there should be the proper ifdefery in place. Now can you
> retry these instructions with latest libreoffice-4-0 (pushed a patch that
> superseded the one provided here) please?
>
> make clean && ./autogen.sh --with-parallelism=3 --without-java
> --enable-headless --disable-vba --disable-extensions --disable-opengl &&
> make
>
> ________________________________
> You are receiving this mail because:
>
> You reported the bug.
Comment 14 Riccardo Magliocchetti 2013-05-06 17:10:43 UTC
(In reply to comment #13)
> Hi,
> 
> Retried with cfe7f87.  Still the same, failing at linking X* symbols
> originated from splashx.c of LinkTarget/Executable/oosplash.

Can you upload your config.log please?
Comment 15 clkao 2013-05-06 17:16:02 UTC
Created attachment 78937 [details]
config.log
Comment 16 Riccardo Magliocchetti 2013-05-06 19:12:54 UTC
(In reply to comment #15)
> Created attachment 78937 [details]
> config.log

thanks, could you try adding --disable-unix-qstart-libpng ?
Comment 17 clkao 2013-05-07 07:55:26 UTC
That seems to do it, thanks!  so perhaps headless should imply
disable-unix-qstart-libpng?

On 7 May 2013 03:12,  <bugzilla-daemon@freedesktop.org> wrote:
> Comment # 16 on bug 61092 from Riccardo Magliocchetti
>
> (In reply to comment #15)
>> Created attachment 78937 [details]
>> config.log
>
> thanks, could you try adding --disable-unix-qstart-libpng ?
>
> ________________________________
> You are receiving this mail because:
>
> You reported the bug.
Comment 18 Riccardo Magliocchetti 2013-05-07 08:03:52 UTC
(In reply to comment #17)
> That seems to do it, thanks!  so perhaps headless should imply
> disable-unix-qstart-libpng?

Yes, already pushed patches for review that hopefully will go to 4.0.4. Thanks a lot for your help debugging this issue. Will update the wiki with all this info.
Comment 19 Commit Notification 2013-05-09 08:53:30 UTC
Riccardo Magliocchetti committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c3302a23d3539070103584816d554c871b0792b7&h=libreoffice-4-0

fdo#61092: force ENABLE_QUICKSTART_LIBPNG to None with --enable-headless


It will be available in LibreOffice 4.0.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 20 Riccardo Magliocchetti 2013-05-09 08:56:35 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > That seems to do it, thanks!  so perhaps headless should imply
> > disable-unix-qstart-libpng?
> 
> Yes, already pushed patches for review that hopefully will go to 4.0.4.
> Thanks a lot for your help debugging this issue. Will update the wiki with
> all this info.

So both this issue
fdo#61092: force ENABLE_QUICKSTART_LIBPNG to None with --enable-headless c3302a23d3539070103584816d554c871b0792b7

and this

configure: with --enable-headless disable opengl by default 4a36c4544346cdf4d4133bdfc4b9b28e6a7d9743

hit libreoffice-4-0 branch.

Closing as resolved fixed.