Discussion:
Compilation error (trunk)
Kornel Benko
2014-08-15 15:35:49 UTC
Permalink
[ 97%] Building CXX object src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o
cd /usr/BUILD/BuildLyxGit/src/tests && /usr/bin/c++ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING=1 -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -O0 -g3 -D_DEBUG -I/usr/BUILD/BuildLyxGit -I/usr/src/lyx/lyx-git/src -I/usr/include/enchant -I/usr/src/lyx/lyx-git/boost -I/usr/BUILD/BuildLyxGit/src -I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/src/lyx/lyx-git/src/support/tests -DBOOST_USER_CONFIG="<config.h>" -o CMakeFiles/check_layout.dir/check_layout.cpp.o -c /usr/src/lyx/lyx-git/src/tests/check_layout.cpp
In file included from /usr/src/lyx/lyx-git/src/tests/check_layout.cpp:6:0:
/usr/src/lyx/lyx-git/src/tests/../LayoutFile.h: In function ‘bool test_Layout(const string&, const string&)’:
/usr/src/lyx/lyx-git/src/tests/../LayoutFile.h:130:2: error: ‘lyx::LayoutFileList::LayoutFileList()’ is private
/usr/src/lyx/lyx-git/src/tests/check_layout.cpp:50:17: error: within this context
make[2]: *** [src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o] Error 1
make[2]: Leaving directory `/usr/BUILD/BuildLyxGit'
make[1]: *** [src/tests/CMakeFiles/check_layout.dir/all] Error 2
make[1]: Leaving directory `/usr/BUILD/BuildLyxGit'

Kornel
Richard Heck
2014-08-15 16:04:41 UTC
Permalink
Post by Kornel Benko
[ 97%] Building CXX object src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o
cd /usr/BUILD/BuildLyxGit/src/tests && /usr/bin/c++ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING=1 -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -O0 -g3 -D_DEBUG -I/usr/BUILD/BuildLyxGit -I/usr/src/lyx/lyx-git/src -I/usr/include/enchant -I/usr/src/lyx/lyx-git/boost -I/usr/BUILD/BuildLyxGit/src -I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/src/lyx/lyx-git/src/support/tests -DBOOST_USER_CONFIG="<config.h>" -o CMakeFiles/check_layout.dir/check_layout.cpp.o -c /usr/src/lyx/lyx-git/src/tests/check_layout.cpp
/usr/src/lyx/lyx-git/src/tests/../LayoutFile.h:130:2: error: ‘lyx::LayoutFileList::LayoutFileList()’ is private
/usr/src/lyx/lyx-git/src/tests/check_layout.cpp:50:17: error: within this context
make[2]: *** [src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o] Error 1
make[2]: Leaving directory `/usr/BUILD/BuildLyxGit'
make[1]: *** [src/tests/CMakeFiles/check_layout.dir/all] Error 2
make[1]: Leaving directory `/usr/BUILD/BuildLyxGit'
I'm not sure why I didn't see this, but it is in one of the tests,
src/tests/check_layout.cpp. Do these not get compiled with autotools?

Anyway, try:

diff --git a/src/tests/check_layout.cpp b/src/tests/check_layout.cpp
index b4ecad9..968f7b1 100644
--- a/src/tests/check_layout.cpp
+++ b/src/tests/check_layout.cpp
@@ -47,7 +47,7 @@ using namespace std;
bool test_Layout(string const & input, string const & output)
{
FileName const ifn(makeAbsPath(input));
- LayoutFileList l;
+ LayoutFileList & l = LayoutFileList.get();
LayoutFileIndex i = l.addLocalLayout(ifn.onlyFileName(),
ifn.onlyPath().
if (i.empty()) {
cerr << "Could not read layout file " << input <<
".layout.\n";

Richard
Post by Kornel Benko
Kornel
Kornel Benko
2014-08-15 16:54:36 UTC
Permalink
Post by Richard Heck
Post by Kornel Benko
[ 97%] Building CXX object src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o
cd /usr/BUILD/BuildLyxGit/src/tests && /usr/bin/c++ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING=1 -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -O0 -g3 -D_DEBUG -I/usr/BUILD/BuildLyxGit -I/usr/src/lyx/lyx-git/src -I/usr/include/enchant -I/usr/src/lyx/lyx-git/boost -I/usr/BUILD/BuildLyxGit/src -I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/src/lyx/lyx-git/src/support/tests -DBOOST_USER_CONFIG="<config.h>" -o CMakeFiles/check_layout.dir/check_layout.cpp.o -c /usr/src/lyx/lyx-git/src/tests/check_layout.cpp
/usr/src/lyx/lyx-git/src/tests/../LayoutFile.h:130:2: error: ‘lyx::LayoutFileList::LayoutFileList()’ is private
/usr/src/lyx/lyx-git/src/tests/check_layout.cpp:50:17: error: within this context
make[2]: *** [src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o] Error 1
make[2]: Leaving directory `/usr/BUILD/BuildLyxGit'
make[1]: *** [src/tests/CMakeFiles/check_layout.dir/all] Error 2
make[1]: Leaving directory `/usr/BUILD/BuildLyxGit'
I'm not sure why I didn't see this, but it is in one of the tests,
src/tests/check_layout.cpp. Do these not get compiled with autotools?
diff --git a/src/tests/check_layout.cpp b/src/tests/check_layout.cpp
index b4ecad9..968f7b1 100644
--- a/src/tests/check_layout.cpp
+++ b/src/tests/check_layout.cpp
@@ -47,7 +47,7 @@ using namespace std;
bool test_Layout(string const & input, string const & output)
{
FileName const ifn(makeAbsPath(input));
- LayoutFileList l;
+ LayoutFileList & l = LayoutFileList.get();
LayoutFileIndex i = l.addLocalLayout(ifn.onlyFileName(),
ifn.onlyPath().
if (i.empty()) {
cerr << "Could not read layout file " << input <<
".layout.\n";
Richard
Does not look much better.
...
[ 97%] Building CXX object src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o
cd /usr/BUILD/BuildLyxGit/src/tests && /usr/bin/c++ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING=1 -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -O0 -g3 -D_DEBUG -I/usr/BUILD/BuildLyxGit -I/usr/src/lyx/lyx-git/src -I/usr/include/enchant -I/usr/src/lyx/lyx-git/boost -I/usr/BUILD/BuildLyxGit/src -I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/src/lyx/lyx-git/src/support/tests -DBOOST_USER_CONFIG="<config.h>" -o CMakeFiles/check_layout.dir/check_layout.cpp.o -c /usr/src/lyx/lyx-git/src/tests/check_layout.cpp
/usr/src/lyx/lyx-git/src/tests/check_layout.cpp: In function ‘bool test_Layout(const string&, const string&)’:
/usr/src/lyx/lyx-git/src/tests/check_layout.cpp:50:37: error: expected primary-expression before ‘.’ token
make[2]: *** [src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o] Error 1
make[2]: Leaving directory `/usr/BUILD/BuildLyxGit'
make[1]: *** [src/tests/CMakeFiles/check_layout.dir/all] Error 2
make[1]: Leaving directory `/usr/BUILD/BuildLyxGit'
make: *** [all] Error 2

Kornel
Richard Heck
2014-08-15 19:18:42 UTC
Permalink
Post by Kornel Benko
Post by Richard Heck
Post by Kornel Benko
[ 97%] Building CXX object src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o
cd /usr/BUILD/BuildLyxGit/src/tests && /usr/bin/c++ -DBOOST_SIGNALS_NO_DEPRECATION_WARNING=1 -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -Wall -Wunused-parameter --std=gnu++11 -fno-strict-aliasing -O0 -g3 -D_DEBUG -I/usr/BUILD/BuildLyxGit -I/usr/src/lyx/lyx-git/src -I/usr/include/enchant -I/usr/src/lyx/lyx-git/boost -I/usr/BUILD/BuildLyxGit/src -I/usr/include/qt4 -I/usr/include/qt4/Qt -I/usr/share/qt4/mkspecs/default -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/Qt3Support -I/usr/include/qt4/QtDesigner -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4/QtSql -I/usr/include/qt4/QtXml -I/usr/include/qt4/QtSvg -I/usr/include/qt4/QtUiTools -I/usr/include/qt4/QtTest -I/usr/src/lyx/lyx-git/src/support/tests -DBOOST_USER_CONFIG="<config.h>" -o CMakeFiles/check_layout.dir/check_layout.cpp.o -c /usr/src/lyx/lyx-git/src/tests/check_layout.cpp
/usr/src/lyx/lyx-git/src/tests/../LayoutFile.h:130:2: error: ‘lyx::LayoutFileList::LayoutFileList()’ is private
/usr/src/lyx/lyx-git/src/tests/check_layout.cpp:50:17: error: within this context
make[2]: *** [src/tests/CMakeFiles/check_layout.dir/check_layout.cpp.o] Error 1
make[2]: Leaving directory `/usr/BUILD/BuildLyxGit'
make[1]: *** [src/tests/CMakeFiles/check_layout.dir/all] Error 2
make[1]: Leaving directory `/usr/BUILD/BuildLyxGit'
I'm not sure why I didn't see this, but it is in one of the tests,
src/tests/check_layout.cpp. Do these not get compiled with autotools?
diff --git a/src/tests/check_layout.cpp b/src/tests/check_layout.cpp
index b4ecad9..968f7b1 100644
--- a/src/tests/check_layout.cpp
+++ b/src/tests/check_layout.cpp
@@ -47,7 +47,7 @@ using namespace std;
bool test_Layout(string const & input, string const & output)
{
FileName const ifn(makeAbsPath(input));
- LayoutFileList l;
+ LayoutFileList & l = LayoutFileList.get();
LayoutFileIndex i = l.addLocalLayout(ifn.onlyFileName(),
ifn.onlyPath().
if (i.empty()) {
cerr << "Could not read layout file " << input <<
".layout.\n";
Richard
Does not look much better.
Sorry, should have been:

- LayoutFileList l;
+ LayoutFileList & l = LayoutFileList::get();
Kornel Benko
2014-08-15 19:24:16 UTC
Permalink
Post by Richard Heck
Post by Kornel Benko
Does not look much better.
- LayoutFileList l;
+ LayoutFileList & l = LayoutFileList::get();
It compiles now.

Kornel

Continue reading on narkive:
Loading...