Bug 31322 - libreoffice fails to build with current Xorg libs
Summary: libreoffice fails to build with current Xorg libs
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-02 07:29 UTC by Bernhard Rosenkraenzer
Modified: 2012-03-23 06:57 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Proposed patch (325 bytes, patch)
2010-11-02 07:44 UTC, Bernhard Rosenkraenzer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Rosenkraenzer 2010-11-02 07:29:18 UTC
After updating to the most current Xorg libs, building libreoffice results in

Compiling: vcl/unx/source/window/salframe.cxx
In file included from /usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/
unx/source/window/salframe.cxx:52:0:
../../../unx/inc/dtint.hxx:41:8: error: using typedef-name 'Display' after 'struct'
/usr/include/X11/Xlib.h:495:26: error: 'Display' has a previous declaration here
../../../unx/inc/dtint.hxx:42:8: error: using typedef-name 'XEvent' after 'struct'
/usr/include/X11/Xlib.h:1017:3: error: 'XEvent' has a previous declaration here
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx: In function 'void doReparentPresentationDialogues(SalDisplay*)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:123:47: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XGetGeo
metry(Display*, Drawable, XLIB_Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, un
signed int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:129:40: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '8' to 'int XTransl
ateCoordinates(Display*, XLIB_Window, XLIB_Window, int, int, int*, int*, XLIB_Window*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx: In member function 'void X11SalFrame::Init(ULONG, int, SystemParentData*, bool)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:295:63: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XGetGeo
metry(Display*, Drawable, XLIB_Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, un
signed int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:305:66: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XQueryT
ree(Display*, XLIB_Window, XLIB_Window*, XLIB_Window*, XLIB_Window**, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:312:53: error: cannot convert 'Atom*' to 'UINT32*' in initialization
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:404:70: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XQueryP
ointer(Display*, XLIB_Window, XLIB_Window*, XLIB_Window*, int*, int*, int*, int*, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:541:64: error: cannot convert 'UINT32*' to 'Atom*' for argument '3' to 'int XSetWMProtocol
s(Display*, XLIB_Window, Atom*, int)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx: In member function 'void X11SalFrame::passOnSaveYourSelf()':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:756:90: error: cannot convert 'UINT32*' to 'Atom*' for argument '3' to 'int XSetWMProtocol
s(Display*, XLIB_Window, Atom*, int)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx: In member function 'virtual void X11SalFrame::SetIcon(USHORT)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:1042:57: error: cannot convert 'Atom*' to 'UINT32*' in initialization
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx: In member function 'void X11SalFrame::Center()':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:1482:34: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XQuery
Pointer(Display*, XLIB_Window, XLIB_Window*, XLIB_Window*, int*, int*, int*, int*, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx:1520:39: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XGetGe
ometry(Display*, Drawable, XLIB_Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, u
nsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salf
rame.cxx: In member function 'void X11SalFrame::SetPosSize(const Rectangle&)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:2004:42: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '8' to 'int XTranslateCoordinates(Display*, XLIB_Window, XLIB_Window, int, int, int*, int*, XLIB_Window*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In function 'int IsRunningXAutoLock(Display*, UINT32)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:2302:38: error: cannot convert 'UINT32*' to 'Atom*' for argument '8' to 'int XGetWindowProperty(Display*, XLIB_Window, Atom, long int, long int, int, Atom, Atom*, int*, long unsigned int*, long unsigned int*, unsigned char**)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In member function 'virtual void X11SalFrame::StartPresentation(BOOL)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:2385:74: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '2' to 'int XGetInputFocus(Display*, XLIB_Window*, int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: At global scope:
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:2695:6: error: prototype for 'void X11SalFrame::createNewWindow(UINT32, int)' does not match any in class 'X11SalFrame'
../../../unx/inc/salframe.h:169:21: error: candidate is: void X11SalFrame::createNewWindow(XLIB_Window, int)

/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In member function 'virtual SalFrame::SalPointerState X11SalFrame::GetPointerState()':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:2845:20: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XQueryPointer(Display*, XLIB_Window, XLIB_Window*, XLIB_Window*, int*, int*, int*, int*, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In member function 'long int X11SalFrame::HandleMouseEvent(XEvent*)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3012:49: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XQueryPointer(Display*, XLIB_Window, XLIB_Window*, XLIB_Window*, int*, int*, int*, int*, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: At global scope:
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3557:6: error: prototype for 'void X11SalFrame::RestackChildren(UINT32*, int)' does not match any in class 'X11SalFrame'
../../../unx/inc/salframe.h:152:12: error: candidates are: void X11SalFrame::RestackChildren()
../../../unx/inc/salframe.h:151:12: error:                 void X11SalFrame::RestackChildren(XLIB_Window*, int)
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In member function 'void X11SalFrame::RestackChildren()':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3610:36: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XQueryTree(Display*, XLIB_Window, XLIB_Window*, XLIB_Window*, XLIB_Window**, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3612:51: error: no matching function for call to 'X11SalFrame::RestackChildren(UINT32*&, unsigned int&)'
../../../unx/inc/salframe.h:151:12: note: candidates are: void X11SalFrame::RestackChildren(XLIB_Window*, int)
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3598:6: note:                 void X11SalFrame::RestackChildren()
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In member function 'long int X11SalFrame::HandleSizeEvent(XConfigureEvent*)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3651:36: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '8' to 'int XTranslateCoordinates(Display*, XLIB_Window, XLIB_Window, int, int, int*, int*, XLIB_Window*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In member function 'long int X11SalFrame::HandleReparentEvent(XReparentEvent*)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3732:32: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XQueryTree(Display*, XLIB_Window, XLIB_Window*, XLIB_Window*, XLIB_Window**, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3798:32: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '8' to 'int XTranslateCoordinates(Display*, XLIB_Window, XLIB_Window, int, int, int*, int*, XLIB_Window*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3814:36: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '8' to 'int XTranslateCoordinates(Display*, XLIB_Window, XLIB_Window, int, int, int*, int*, XLIB_Window*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3829:43: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XGetGeometry(Display*, Drawable, XLIB_Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3833:47: error: cannot convert 'UINT32*' to 'XLIB_Window*' for argument '3' to 'int XGetGeometry(Display*, Drawable, XLIB_Window*, int*, int*, unsigned int*, unsigned int*, unsigned int*, unsigned int*)'
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx: In member function 'long int X11SalFrame::HandleStateEvent(XPropertyEvent*)':
/usr/src/ark/BUILD/libreoffice-build-3.2.99.2/build/libreoffice-3.2.99.2/vcl/unx/source/window/salframe.cxx:3909:40: error: cannot convert 'UINT32*' to 'Atom*' for argument '8' to 'int XGetWindowProperty(Display*, XLIB_Window, Atom, long int, long int, int, Atom, Atom*, int*, long unsigned int*, long unsigned int*, unsigned char**)'
dmake:  Error code 1, while making '../../../unxlngx6.pro/slo/salframe.obj'
Comment 1 Bernhard Rosenkraenzer 2010-11-02 07:35:03 UTC
The problem is:


#ifndef _XLIB_H_
// forwards from X
struct Display;
struct XEvent;
#define Atom UINT32
#define XLIB_Window UINT32
#endif


In current libX11, _XLIB_H_ has been replaced with _X11_XLIB_H_, so the forward declarations and defines are run even though Xlib.h is included and Display, XEvent, Atom, XLIB_Window are already defined (to something different).
Comment 2 Bernhard Rosenkraenzer 2010-11-02 07:44:55 UTC
Created attachment 39977 [details]
Proposed patch

Attaching fix
Comment 3 Jeremy Huddleston 2010-11-02 09:57:35 UTC
*Maybe* you should actually just #include <X11/Xlib.h> ...
Comment 4 Bernhard Rosenkraenzer 2010-11-02 10:04:15 UTC
From a quick look, I agree with Jeremy's comment - there doesn't seem to be any situation in which dtint.hxx could be used without requiring X11 anyway.
Comment 5 Björn Michaelsen 2011-12-23 11:35:15 UTC
[This is an automated message.]
This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it
started right out as NEW without ever being explicitly confirmed. The bug is
changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back
to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases.
Details on how to test the 3.5.0 beta1 can be found at:
http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1

more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Comment 6 sasha.libreoffice 2012-03-23 06:57:06 UTC
Thanks for bugreport
Due to now we have no such problem (at least on Fedora 64 bit), changing status to WorksForMe

If problem will appear again, please, change status to Reopened