Ubuntu binary package and compiler errors

Forum for general chit-chat or off-topic discussion.

Moderators: CEGUI MVP, CEGUI Team

raymccooney
Just popping in
Just popping in
Posts: 11
Joined: Sat Jul 18, 2009 23:43

Ubuntu binary package and compiler errors

Postby raymccooney » Wed Mar 17, 2010 15:44

Hello CrazyEddie,

Out of curiosity, do you know by chance why Ubuntu 10.04 ships libcegui-mk2-1 with version 0.6.2-3 only while Ubuntu 9.10 had already been shipped with version 0.6.2-1?

Second question: Is it known that the Ubuntu 9.10 binary package 'libcegui-mk2-1' in combination with its developer package 'libcegui-mk2-dev' throws compiler errors in the CEGUIListHeaderSegment.h file?

Code: Select all

In file included from /usr/include/CEGUI/elements/CEGUIListHeader.h:35,
                 from /usr/include/CEGUI/CEGUI.h:83,
                 from main.h:16,
                 from main.cpp:1:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:87: error: expected identifier before numeric constant
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:87: error: expected ‘}’ before numeric constant
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:87: error: expected unqualified-id before numeric constant
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:103: error: non-member function ‘bool CEGUI::isSizingEnabled()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isSizingEnabled()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:103: error: ‘d_sizingEnabled’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:118: error: ‘SortDirection’ does not name a type
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:128: error: non-member function ‘bool CEGUI::isDragMovingEnabled()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isDragMovingEnabled()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:128: error: ‘d_movingEnabled’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:138: error: non-member function ‘const CEGUI::Point& CEGUI::getDragMoveOffset()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘const CEGUI::Point& CEGUI::getDragMoveOffset()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:138: error: ‘d_dragPosition’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:148: error: non-member function ‘bool CEGUI::isClickable()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isClickable()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:148: error: ‘d_allowClicks’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:155: error: non-member function ‘bool CEGUI::isSegmentHovering()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isSegmentHovering()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:155: error: ‘d_segmentHover’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:162: error: non-member function ‘bool CEGUI::isSegmentPushed()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isSegmentPushed()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:162: error: ‘d_segmentPushed’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:169: error: non-member function ‘bool CEGUI::isSplitterHovering()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isSplitterHovering()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:169: error: ‘d_splitterHover’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:176: error: non-member function ‘bool CEGUI::isBeingDragMoved()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isBeingDragMoved()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:176: error: ‘d_dragMoving’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:183: error: non-member function ‘bool CEGUI::isBeingDragSized()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::isBeingDragSized()’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:183: error: ‘d_dragSizing’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:186: error: non-member function ‘const CEGUI::Image* CEGUI::getSizingCursorImage()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:187: error: non-member function ‘const CEGUI::Image* CEGUI::getMovingCursorImage()’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:221: error: variable or field ‘setSortDirection’ declared void
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:221: error: ‘SortDirection’ was not declared in this scope
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:263: error: expected unqualified-id before ‘const’
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:263: error: expected ‘)’ before ‘const’
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:270: error: declaration of ‘~CEGUI::ListHeaderSegment’ as non-member
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:273: error: expected unqualified-id before ‘protected’
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:349: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:349: error: non-member function ‘bool CEGUI::testClassName_impl(const CEGUI::String&)’ cannot have cv-qualifier
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: In function ‘bool CEGUI::testClassName_impl(const CEGUI::String&)’:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:352: error: cannot call member function ‘virtual bool CEGUI::Window::testClassName_impl(const CEGUI::String&) const’ without object
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h: At global scope:
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:363: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:370: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:377: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:384: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:391: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:398: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:405: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:412: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:419: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:426: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:432: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:433: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:434: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:435: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:436: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:437: error: ‘virtual’ outside class declaration
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:452: error: ‘SortDirection’ does not name a type
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:462: error: expected unqualified-id before ‘private’
/usr/include/CEGUI/elements/CEGUIListHeaderSegment.h:480: error: expected declaration before ‘}’ token


In my applications i use the following includes:

Code: Select all

// FreeGLUT includes
#include <GL/freeglut.h>
#include <GL/glx.h>

// CEGUI includes
#include <RendererModules/OpenGLGUIRenderer/openglrenderer.h>
#include <CEGUI.h>
#include <CEGUIDefaultResourceProvider.h>


Thank you for your prompt answer.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Ubuntu binary package and compiler errors

Postby CrazyEddie » Thu Mar 18, 2010 10:01

Hi,

Out of curiosity, do you know by chance why Ubuntu 10.04 ships libcegui-mk2-1 with version 0.6.2-3 only while Ubuntu 9.10 had already been shipped with version 0.6.2-1?

Isn't 0.6.2-3 greater than 0.6.2-1?

Is it known that the Ubuntu 9.10 binary package 'libcegui-mk2-1' in combination with its developer package 'libcegui-mk2-dev' throws compiler errors in the CEGUIListHeaderSegment.h file?

I don't recall any issues with out version(s) of the files - I can't speak for downstream maintainers though. It seems to me that something is interfering with definitions within that file, perhaps a macro of some kind? Which other headers are included prior to CEGUI.h? What happens if you ensure that CEGUI.h is seen first?

CE.

raymccooney
Just popping in
Just popping in
Posts: 11
Joined: Sat Jul 18, 2009 23:43

Re: Ubuntu binary package and compiler errors

Postby raymccooney » Fri Mar 19, 2010 09:06

Hi Eddie,

Thank you for your answer.
CrazyEddie wrote:Isn't 0.6.2-3 greater than 0.6.2-1?


Sure, what I wanted to point out is why there is "only" a 0.6.2-3 release when you've already commited 0.7.x in your svn trunk.

I don't recall any issues with out version(s) of the files - I can't speak for downstream maintainers though. It seems to me that something is interfering with definitions within that file, perhaps a macro of some kind? Which other headers are included prior to CEGUI.h? What happens if you ensure that CEGUI.h is seen first?

I think the conflicting part is here:

Code: Select all

        */
        enum SortDirection
        {
                None,           //!< Items under this segment should not be sorted.
                Ascending,      //!< Items under this segment should be sorted in ascending order.
                Descending      //!< Items under this segment should be sorted in descending order.
        };


Somehow None, Ascending and Descending seem not to be defined...

In my application the only includes are:

Code: Select all

// includes
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>

// FreeGLUT includes
#include <GL/freeglut.h>
#include <GL/glx.h>

// CEGUI includes
#include <RendererModules/OpenGLGUIRenderer/openglrenderer.h>
#include <elements/CEGUIMultiColumnList.h>
#include <CEGUI.h>
#include <CEGUIDefaultResourceProvider.h>



Thank you for your help.

RayMcCooney

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Ubuntu binary package and compiler errors

Postby CrazyEddie » Fri Mar 19, 2010 09:59

I'll run some tests on the headers and get back to you ;)

what I wanted to point out is why there is "only" a 0.6.2-3 release when you've already commited 0.7.x in your svn trunk.

We have no contact with the maintainers of the packages for the various distros, so I have no information as regards to this :)

CE.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Ubuntu binary package and compiler errors

Postby CrazyEddie » Sun Mar 21, 2010 10:39

I got around to testing this issue and it was easily reproduced. The problem is here:

Code: Select all

/usr/include/X11/X.h:120:#define None                 0L   /* universal null resource or null atom */


Which basically means once X.h is included, any instance anywhere of the text 'None' is going to be replaced with 0L. This just goes to highlight why preprocessor macros are evil ;) There are two possible solutions: ensure that any file that contains an instance of the text 'None' you wish to keep appears before any inclusion (explicit or implicit) of the X.h header, or undefine the macro prior to including any file affected by this.

HTH

CE.

raymccooney
Just popping in
Just popping in
Posts: 11
Joined: Sat Jul 18, 2009 23:43

Re: Ubuntu binary package and compiler errors

Postby raymccooney » Mon Mar 22, 2010 08:36

Hi Eddie,

Putting my FreeGLUT includes below the CEGUI includes indeed solved the problem!
I can understand that you have no contact to the package maintainers, as most people probably use the library on microsoft windows anyway...

Thank you very much for your help!

Ray McCooney

User avatar
Jabberwocky
Quite a regular
Quite a regular
Posts: 86
Joined: Wed Oct 31, 2007 18:16
Location: Canada
Contact:

Re: Ubuntu binary package and compiler errors

Postby Jabberwocky » Tue Mar 23, 2010 00:58

Wow, what kind of asshole library has a preproc def for "None"? :shock:
The Salvation Prophecy
Space Combat. Planet Exploration. Strategic Domination.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Ubuntu binary package and compiler errors

Postby CrazyEddie » Tue Mar 23, 2010 11:50

:lol: X does ;)

A lot of the issues are that some of these libs have huge amounts of historical baggage. It's a similar situation to the min / max macro definitions in the Windows.h header - seems like madness today, but aeons ago, probably made some kind of sense.

In fact, due to the amount of 'legacy' crap hanging around, especially in C headers and libs, it's pretty amazing that such conflicts and issues do not arise more often :)

CE.


Return to “Offtopic Discussion”

Who is online

Users browsing this forum: No registered users and 2 guests