Bug 65244 - Build fails with because of libpng-devel missing, while configure is fine
Summary: Build fails with because of libpng-devel missing, while configure is fine
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.2.0.0.alpha0+ Master
Hardware: Other All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:4.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-01 14:56 UTC by Clemens Eisserer
Modified: 2013-08-15 13:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Clemens Eisserer 2013-06-01 14:56:26 UTC
When compiling LibreOffice from git, the build failed with the following message:

configure: WARNING: Could not find libpng in the pkg-config search path
checking whether cairo's PNG functions feature could be enabled... no
configure: error: recommended PNG functions feature could not be enabled
make[1]: *** [/home/ce/libreoffice/workdir/unxlngx6/ExternalProject/cairo/build] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [build] Error 2


However, configure succeeded without any warning.
Comment 1 Jorendc 2013-06-01 15:59:58 UTC
@Clemens: I think writing a mail to the developers mailinglist will result in more answers related to build/compile errors/problems. http://lists.freedesktop.org/mailman/listinfo/libreoffice

You mind emailing them?

Kind regards,
Joren
Comment 2 Clemens Eisserer 2013-06-01 16:19:13 UTC
Hi Joren,

Thanks again for answering a report of mine :)

I was able to solve the issue by installing libpng-devel.
However as such checks are typically performed by the configure script and not during make - I thought it would be a good idea to have that inconsitency filed somewhere.
Therefor I filed it because I think its a bug/issue within the build system.
Comment 3 Jorendc 2013-06-01 16:24:43 UTC
(In reply to comment #2)
> Hi Joren,
> 
> Thanks again for answering a report of mine :)

Heh :-). Thank _you_ for reporting issues, so we have feedback and can solve all 'bad' things :-).
> 
> I was able to solve the issue by installing libpng-devel.
> However as such checks are typically performed by the configure script and
> not during make - I thought it would be a good idea to have that
> inconsitency filed somewhere.
> Therefor I filed it because I think its a bug/issue within the build system.

@Michael, Björn: Opinion? Improvements?
Comment 4 Michael Stahl (allotropia) 2013-08-15 13:06:40 UTC
so probably unless we build --with-system-cairo we should ensure that the internal cairo finds either the internal libpng or the system libpng depending on value of SYSTEM_LIBPNG...

... ok things work mostly fine until i actually remove the /usr/lib64/pkgconfig/libpng*.pc file, where it becomes apparent that the cairo configure check for libpng does not do what the help output says and tries to second-guess pkgconfig instead of respecting the png_LIBS and png_CFLAGS vars.

fortunately this can be work-arounded by setting yet another variable,
fixed on master.
Comment 5 Commit Notification 2013-08-15 13:16:55 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a1230334d42250f7376f0a887e5303fa218234bb

fdo#65244: cairo configure fails to detect libpng...



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.