nickguletskii / GLXOSD

GLXOSD is an extensible on-screen display (OSD)/overlay for OpenGL applications running on Linux with X11 which aims to provide similar functionality to MSI Afterburner/RivaTuner OSD. It can show FPS, frame timings, temperatures and more in OpenGL games and applications. It can also be used to benchmark games, much like voglperf.
https://glxosd.nickguletskii.com
MIT License
123 stars 20 forks source link

Unable to run Make All on SteamOS #20

Closed sabun123 closed 8 years ago

sabun123 commented 9 years ago

Hi, Currently in SteamOS if I attempt to run make all after cmake -G "Unix Makefiles I will get issues with compiling when referencing the boost libraries.

The error (there's more, but the beginning pinpoints first occurrence):

[ 50%] Building CXX object src/glxosd/CMakeFiles/glxosd.dir/ConfigurationManager.cpp.o
In file included from /usr/include/boost/xpressive/detail/core/access.hpp:21:0,
                 from /usr/include/boost/xpressive/detail/core/state.hpp:18,
                 from /usr/include/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp:20,
                 from /usr/include/boost/xpressive/detail/core/matchers.hpp:17,
                 from /usr/include/boost/xpressive/regex_primitives.hpp:22,
                 from /usr/include/boost/xpressive/xpressive_static.hpp:24,
                 from /usr/include/boost/xpressive/xpressive.hpp:18,
                 from /home/desktop/Desktop/GLXOSD-master/src/glxosd/ConfigurationManager.cpp:17:
/usr/include/boost/xpressive/match_results.hpp:122:21: error: expected identifier before numeric constant
/usr/include/boost/xpressive/match_results.hpp:122:21: error: expected '}' before numeric constant
/usr/include/boost/xpressive/match_results.hpp:122:21: error: expected unqualified-id before numeric constant

I believe this occurs because of this issue here.

In SteamOS, when attempting to install the required dependencies for compiling GLXOSD, the SteamOS dev libraries seem to be different compared to the normal Debian Wheezy dev libraries for the following: libgl1-mesa-dev libglu1-mesa-dev libfontconfig1-dev libfreetype6-dev

If I try to force the Debian packages to be installed, this is what I get:

desktop@steamos:~/Desktop/GLXOSD-master$ sudo apt-get install -t wheezy mesa-common-dev libgl1-mesa-dev libglu1-mesa-dev libfontconfig1-dev libfreetype6-dev libsensors4-dev libboost-dev
....
The following packages have unmet dependencies:
 libfontconfig1-dev : Depends: libfontconfig1 (= 2.9.0-7.1) but 2.9.0-7.1+bsos7 is to be installed
 libfreetype6-dev : Depends: libfreetype6 (= 2.4.9-1.1) but 2.4.9-1.1+bsos7 is to be installed
 libgl1-mesa-dev : Depends: libgl1-mesa-glx (= 8.0.5-4+deb7u2) but 10.1.6-steamos-1+steamos2+bsos1 is to be installed
 libglu1-mesa-dev : Depends: libglu1-mesa (= 8.0.5-4+deb7u2) but 9.0.0-2+bsos1 is to be installed
E: Unable to correct problems, you have held broken packages.
desktop@steamos:~/Desktop/GLXOSD-master$

I can install the dependencies normally without forcing it to take from Debian's repositories, but it will mix and match. It will take the ones it can from Debian, and the above will be taken from the SteamOS repository but then the issue with the Boost library happens.

Any advice or guidance on how to overcome this problem? If I were to build GLXOSD on the same machine, but in Ubuntu 14.10, would I be able to bring that over to SteamOS for the make install process?

ghost commented 8 years ago

This is what I could find in a quick google search: https://svn.boost.org/trac/boost/ticket/8204

Boost is (was) clashing with a define in GLX headers. This was worked around in boost version 1.53.

A workaround for GLXOSD would be to make sure that glx.h and boost-xpressive are not being included in the same compilation unit.

I have boost 1.54 here, so I won't be able to test a fix.

@myromance123 : can you still reproduce the error? From what I could tell in the latest glxosd source, ConfigurationManager.cpp no longer has glx.h in its include hierarchy, so it should work now.

ghost commented 8 years ago

#define None seems to come from X.h, so I think this error still exists. If you have a sufficiently old boost, that is.

ghost commented 8 years ago

I attempted a fix in #38. @myromance123 : If you still have SteamOS, or something else using boost < 1.53, then please test :)

ghost commented 8 years ago

I will try to set up a Travis-CI build bot for GLXOSD, so we can test fixes like this one more easily.

ghost commented 8 years ago

Pull request #43 merged into development fixes another one of these clashes. GLXOSD successfully built on travis-ci (Ubuntu 12.04), which does have a very old version of boost. I think it's time to close this issue, unless you want to wait for the commit to appear in a released version?

sabun123 commented 8 years ago

I do not have my SteamOS machine with me, and it will be quite a while before I get it back and am able to test it. Thus, I'll take your word for it right now. Apologies for the late reply, I'll close this for now :)