Discussion:
[Fluxbox-users] Error compiling from source
Jj
2016-10-26 03:14:41 UTC
Permalink
I checked out from Github and my current revision is
4bab7afaa4943bb627c25ec4e55e383c39dd14bd

I'm on Ubuntu 16.04 and make stops with the following error:

g++ -DHAVE_CONFIG_H -I. -include ./config.h -I./src -I./src -I./src/FbTk
-I./nls -std=c++0x -g -O2 -MT src/fluxbox-cli_cfiles.o -MD -MP -MF
src/.deps/fluxbox-cli_cfiles.Tpo -c -o src/fluxbox-cli_cfiles.o `test -f
'src/cli_cfiles.cc' || echo './'`src/cli_cfiles.cc
src/cli_cfiles.cc: In function ‘void
FluxboxCli::updateConfigFilesIfNeeded(const string&)’:
src/cli_cfiles.cc:144:22: error: ‘CONFIG_VERSION’ was not declared in this
scope
if (*c_version < CONFIG_VERSION) {
^
Makefile:3812: recipe for target 'src/fluxbox-cli_cfiles.o' failed
make[2]: *** [src/fluxbox-cli_cfiles.o] Error 1
make[2]: Leaving directory '/home/jj/Programas/fluxbox/fluxbox.git'
Makefile:4730: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/jj/Programas/fluxbox/fluxbox.git'
Makefile:1612: recipe for target 'all' failed
make: *** [all] Error 2

$ git status shows the repo up to date. Am I missing some dependency or is
this dependent on some compiler version?

g++ --version
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
--
Jj
http://isgeek.net/
- Don't make me hate email: http://goo.gl/hk9q
Thomas Lübking
2016-10-26 06:31:25 UTC
Permalink
CONFIG_VERSION should be unconditionally defined in src/defaults.hh and
that unconditionally be included in cli_cfiles.cc
The error must have occurred before when generating defaults.hh from the
Makefile from Makemodule.am, it when running ./configure

Cheers,
Thomas
Jj
2016-10-26 08:01:27 UTC
Permalink
I just did a clean checkout from github again just to make sure and I first
have to run ./autogen.sh, then I can do ./configure and on Make I get this
error:


g++ -DHAVE_CONFIG_H -I. -I/usr/include/freetype2 -include ./config.h
-I./src -I./src -I./nls -g -O2 -MT src/FbTk/libFbTk_a-Button.o -MD -MP
-MF src/FbTk/.deps/libFbTk_a-Button.Tpo -c -o src/FbTk/libFbTk_a-Button.o
`test -f 'src/FbTk/Button.cc' || echo './'`src/FbTk/Button.cc
In file included from src/FbTk/Button.hh:28:0,
from src/FbTk/Button.cc:22:
src/FbTk/FbWindow.hh:244:10: error: ‘unique_ptr’ in namespace ‘std’ does
not name a template type
std::unique_ptr<FbTk::Transparent> m_transparent;

I added the following flag to move forward:
http://stackoverflow.com/a/9766614/43490 but then ran into the
CONFIG_VERSION error mentioned above
Post by Thomas Lübking
CONFIG_VERSION should be unconditionally defined in src/defaults.hh and
that unconditionally be included in cli_cfiles.cc
The error must have occurred before when generating defaults.hh from the
Makefile from Makemodule.am, it when running ./configure
Cheers,
Thomas
--
Jj
http://isgeek.net/
- Don't make me hate email: http://goo.gl/hk9q
Thomas Lübking
2016-10-26 13:17:22 UTC
Permalink
Post by Jj
http://stackoverflow.com/a/9766614/43490 but then ran into the
CONFIG_VERSION error mentioned above
Please attach the generated src/defaults.hh and in any case use "-std=c++11"


@Mathias, c++14 is default since 6.0, before it was c++98, so if there's
no explicit call for c++11, we'll need to require gcc 6.0 or pass
-std=c++11 explicitly - but I've no overview about the makefile system.

Cheers,
Thomas
Mathias Gumz
2016-10-26 13:42:29 UTC
Permalink
On Wed, Oct 26, 2016 at 3:17 PM, Thomas Lübking
Post by Thomas Lübking
Post by Jj
http://stackoverflow.com/a/9766614/43490 but then ran into the
CONFIG_VERSION error mentioned above
Please attach the generated src/defaults.hh and in any case use "-std=c++11"
@Mathias, c++14 is default since 6.0, before it was c++98, so if there's
no explicit call for c++11, we'll need to require gcc 6.0 or pass
-std=c++11 explicitly - but I've no overview about the makefile system.
I am thinking about
https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html

This should detect the current compiler and "do the right thing".
Adding the --std=c++11 is kind of ... shitty.

Cheers,
--
[uid] mathias gumz [www] http://www.fluxbox.org/
[pgp] 1024D/F6F6B18C [irc] ak|ra at freenode.org
Jj
2016-10-26 22:31:43 UTC
Permalink
Here's the defaults.hh:

[src] cat defaults.hh
// This file is generated from Makefile. Do not edit!
#include <string>

#ifdef _WIN32
#define DUMMYPREFIX "/DUMMYPREFIX"
#define PATHPREFIX DUMMYPREFIX
#else
#define PATHPREFIX
#endif
#define CONFIG_VERSION 13
#define DEFAULTMENU PATHPREFIX "/usr/local/share/fluxbox/menu"
#define DEFAULTSTYLE PATHPREFIX "/usr/local/share/fluxbox/styles/bloe"
#define DEFAULTKEYSFILE PATHPREFIX "/usr/local/share/fluxbox/keys"
#define DEFAULT_APPSFILE PATHPREFIX "/usr/local/share/fluxbox/apps"
#define DEFAULT_OVERLAY PATHPREFIX "/usr/local/share/fluxbox/overlay"
#define DEFAULT_INITFILE PATHPREFIX "/usr/local/share/fluxbox/init"
#define DEFAULT_WINDOWMENU PATHPREFIX "/usr/local/share/fluxbox/windowmenu"
#define PROGRAM_PREFIX ""
#define PROGRAM_SUFFIX ""
std::string realProgramName(const std::string& name);
const char* gitrevision();


Continuing with -std=c++11 stops on the error I reported first about
CONFIG_VERSION

Is there any other library version information you'd need?

My goal was just to get a current build that handles the client side
decorations. I imagine that other people on ubuntu 16.04 are seeing this as
well.
Post by Thomas Lübking
Post by Jj
http://stackoverflow.com/a/9766614/43490 but then ran into the
CONFIG_VERSION error mentioned above
Please attach the generated src/defaults.hh and in any case use "-std=c++11"
@Mathias, c++14 is default since 6.0, before it was c++98, so if there's
no explicit call for c++11, we'll need to require gcc 6.0 or pass
-std=c++11 explicitly - but I've no overview about the makefile system.
Cheers,
Thomas
--
Jj
http://isgeek.net/
- Don't make me hate email: http://goo.gl/hk9q
Thomas Lübking
2016-10-27 13:24:59 UTC
Permalink
Looks fine.
There's absolutely no reason why CONFIG_VERSION should be considered
undefined.
Please redirect the entire configure/make process into some files
("make 2>&1 | tee full_make.log" etc.) and *attach* them to a mail (it's
gonna be quite some text ;-)

Cheers,
Thomas
Thomas Lübking
2016-10-27 19:32:13 UTC
Permalink
Here. Also added the output of autogen.sh
Ok, and for make after setting CPPFLAGS = -std=c++11 in Makefile?

Cheers,
Thomas
Thomas Lübking
2016-10-27 19:42:22 UTC
Permalink
Here
Erhemmm... did you notice there's no error or did I miss something ;-)
How did you apply the standard before?

Cheers,
Thomas
Jj
2016-10-27 20:25:05 UTC
Permalink
Well, crap... now that you ask me, I would answer that I added it the same
way, but evidently I didn't. Now I can't remember where I added the flag.

Sorry for taking your time and thanks for the help.
Post by Thomas Lübking
Here
Erhemmm... did you notice there's no error or did I miss something ;-)
How did you apply the standard before?
Cheers,
Thomas
--
Jj
http://isgeek.net/
- Don't make me hate email: http://goo.gl/hk9q
Thomas Lübking
2016-10-27 20:50:00 UTC
Permalink
Post by Jj
Well, crap... now that you ask me, I would answer that I added it the same
way, but evidently I didn't. Now I can't remember where I added the flag.
Sorry for taking your time and thanks for the help.
Not a problem at all!
Thanks to you, we learned about an actual problem (c++11 reliance) and
it's *much* better that the other error turned out to probably just have
been a result of an imperfect approach to fix that, than being a really
weird issue we'd be fighting for ages =)

So thank you for the heads up!
Thomas

Continue reading on narkive:
Loading...