Discussion:
[Linuxsampler-devel] LibGIg Compiler error on UbuntuStudio 16.04
Andrew C
2017-05-11 19:04:40 UTC
Permalink
Hey guys,

I'm trying to compile Libgig on UbuntuStudio 16.04 and I'm getting a
compile time error.

Here's the version of g++ i'm using:

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

Thanks in advance, guys :)


Andrew.

---

Here's the error messages:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -pedantic
-Wreturn-type -g -O2 -MT gig.lo -MD -MP -MF .deps/gig.Tpo -c gig.cpp
-fPIC -DPIC -o .libs/gig.o
In file included from gig.cpp:24:0:
gig.h:85:33: warning: anonymous variadic macros were introduced in
C++11 [-Wvariadic-macros]
# define GIG_DECLARE_ENUM(type, ...) enum type { __VA_ARGS__ }
^
In file included from gig.cpp:27:0:
Serialization.h: In function ‘bool Serialization::IsClass(const T&)’:
Serialization.h:138:16: error: ‘__is_union_or_class’ is not a member
of ‘std::tr1’
return std::tr1::__is_union_or_class<T>::value; // without compiler sup
^
Serialization.h:138:47: error: expected primary-expression before ‘>’ token
return std::tr1::__is_union_or_class<T>::value; // without compiler sup
^
Serialization.h:138:48: error: ‘::value’ has not been declared
return std::tr1::__is_union_or_class<T>::value; // without compiler sup
^
Serialization.h: At global scope:
Serialization.h:40:32: error: ‘__is_union_or_class’ is not a member of
‘std::tr1’
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:40:32: error: ‘__is_union_or_class’ is not a member of
‘std::tr1’
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:40:66: error: template argument 2 is invalid
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:40:67: error: expected ‘{’ before ‘::’ token
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:700:89: error: expected initializer before ‘>’ token
ct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_CLASS(T)> {
^
Serialization.h:701:10: warning: extra ‘;’ [-Wpedantic]
};
^
Serialization.h: In instantiation of ‘void
Serialization::Archive::serializeMember(const T_classType&, const
T_memberType&, const char*) [with T_classType = gig::leverage_ctrl_t;
T_memberType = gig::leverage_ctrl_t::type_t]’:
gig.cpp:326:9: required from here
Serialization.h:605:70: error: incomplete type
‘Serialization::Archive::SerializationRecursion<gig::leverage_ctrl_t::type_t>’
used in nested name specifier
SerializationRecursion<T_memberType>::serializeObject(this, nati
^
Serialization.h: In instantiation of ‘void
Serialization::Archive::serializeMember(const T_classType&, const
T_memberType&, const char*) [with T_classType = gig::leverage_ctrl_t;
T_memberType = unsigned int]’:
gig.cpp:327:9: required from here
Serialization.h:605:70: error: incomplete type
‘Serialization::Archive::SerializationRecursion<unsigned int>’ used in
nested name specifier
Serialization.h: In instantiation of ‘void
Serialization::Archive::serializeMember(const T_classType&, const
T_memberType&, const char*) [with T_classType = gig::crossfade_t;
T_memberType = unsigned char]’:
gig.cpp:336:9: required from here
Serialization.h:605:70: error: incomplete type
‘Serialization::Archive::SerializationRecursion<unsigned char>’ used
in nested name specifier
Serialization.h: In instantiation of ‘void
Serialization::Archive::serializeMember(const T_classType&, const
T_memberType&, const char*) [with T_classType = gig::DimensionRegion;
T_memberType = unsigned char]’:
gig.cpp:1820:9: required from here
Serialization.h:605:70: error: incomplete type
‘Serialization::Archive::SerializationRecursion<unsigned char>’ used
in nested name specifier
Serialization.h: In instantiation of ‘void
Serialization::Archive::serializeMember(const T_classType&, const
T_memberType&, const char*) [with T_classType = gig::DimensionRegion;
T_memberType = short unsigned int]’:
gig.cpp:1821:9: required from here
Andrew C
2017-05-11 19:07:25 UTC
Permalink
P.S. This is from the latest libgig svn.

Andrew.
Post by Andrew C
Hey guys,
I'm trying to compile Libgig on UbuntuStudio 16.04 and I'm getting a
compile time error.
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Thanks in advance, guys :)
Andrew.
---
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -pedantic -Wreturn-type -g -O2 -MT gig.lo -MD -MP -MF .deps/gig.Tpo -c gig.cpp -fPIC -DPIC -o .libs/gig.o
gig.h:85:33: warning: anonymous variadic macros were introduced in C++11 [-Wvariadic-macros]
# define GIG_DECLARE_ENUM(type, ...) enum type { __VA_ARGS__ }
^
Serialization.h:138:16: error: ‘__is_union_or_class’ is not a member of ‘std::tr1’
return std::tr1::__is_union_or_class<T>::value; // without compiler sup
^
Serialization.h:138:47: error: expected primary-expression before ‘>’ token
return std::tr1::__is_union_or_class<T>::value; // without compiler sup
^
Serialization.h:138:48: error: ‘::value’ has not been declared
return std::tr1::__is_union_or_class<T>::value; // without compiler sup
^
Serialization.h:40:32: error: ‘__is_union_or_class’ is not a member of ‘std::tr1’
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:40:32: error: ‘__is_union_or_class’ is not a member of ‘std::tr1’
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:40:66: error: template argument 2 is invalid
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:40:67: error: expected ‘{’ before ‘::’ token
# define LIBGIG_IS_CLASS(type) std::tr1::__is_union_or_class<type>::value //NOT
^
Serialization.h:700:71: note: in expansion of macro ‘LIBGIG_IS_CLASS’
struct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_C
^
Serialization.h:700:89: error: expected initializer before ‘>’ token
ct SerializationRecursion : SerializationRecursionImpl<T, LIBGIG_IS_CLASS(T)> {
^
Serialization.h:701:10: warning: extra ‘;’ [-Wpedantic]
};
^
gig.cpp:326:9: required from here
Serialization.h:605:70: error: incomplete type ‘Serialization::Archive::SerializationRecursion<gig::leverage_ctrl_t::type_t>’ used in nested name specifier
SerializationRecursion<T_memberType>::serializeObject(this, nati
^
gig.cpp:327:9: required from here
Serialization.h:605:70: error: incomplete type ‘Serialization::Archive::SerializationRecursion<unsigned int>’ used in nested name specifier
gig.cpp:336:9: required from here
Serialization.h:605:70: error: incomplete type ‘Serialization::Archive::SerializationRecursion<unsigned char>’ used in nested name specifier
gig.cpp:1820:9: required from here
Serialization.h:605:70: error: incomplete type ‘Serialization::Archive::SerializationRecursion<unsigned char>’ used in nested name specifier
gig.cpp:1821:9: required from here
Christian Schoenebeck
2017-05-11 23:13:44 UTC
Permalink
Post by Andrew C
P.S. This is from the latest libgig svn.
Andrew.
Post by Andrew C
Hey guys,
I'm trying to compile Libgig on UbuntuStudio 16.04 and I'm getting a
compile time error.
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
[snip]
Post by Andrew C
Post by Andrew C
Serialization.h:138:16: error: ‘__is_union_or_class’ is not a member of
‘std::tr1’>
return std::tr1::__is_union_or_class<T>::value; // without
compiler sup
^
I just commited something to SVN which should fix this error. Hope it works.

CU
Christian
Andrew C
2017-05-12 11:59:57 UTC
Permalink
Thanks, Christian, that works like a charm. Libgig compiled successfully.

Getting a makefile/make related error now when trying to build Linuxsampler
from SVN:

make all-recursive
make[1]: Entering directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler'
Making all in man
make[2]: Entering directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/man'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/man'
Making all in src
make[2]: Entering directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/src'
Making all in scriptvm
make[3]: Entering directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/src/scriptvm'
make[3]: *** No rule to make target 'parser.h', needed by 'all'. Stop.
make[3]: Leaving directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/src/scriptvm'
Makefile:689: recipe for target 'all-recursive' failed


On Thu, May 11, 2017 at 11:13 PM, Christian Schoenebeck <
Post by Christian Schoenebeck
Post by Andrew C
P.S. This is from the latest libgig svn.
Andrew.
Post by Andrew C
Hey guys,
I'm trying to compile Libgig on UbuntuStudio 16.04 and I'm getting a
compile time error.
g++ (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
[snip]
Post by Andrew C
Post by Andrew C
Serialization.h:138:16: error: ‘__is_union_or_class’ is not a member of
‘std::tr1’>
return std::tr1::__is_union_or_class<T>::value; // without
compiler sup
^
I just commited something to SVN which should fix this error. Hope it works.
CU
Christian
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxsampler-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Christian Schoenebeck
2017-05-12 12:53:47 UTC
Permalink
Post by Andrew C
Thanks, Christian, that works like a charm. Libgig compiled successfully.
Getting a makefile/make related error now when trying to build Linuxsampler
[snip]
Post by Andrew C
make[3]: Entering directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/src/scriptvm'
make[3]: *** No rule to make target 'parser.h', needed by 'all'. Stop.
Make sure bison is installed on your machine, then try this:

cd TOPLEVELDIROFLSSOURCES
make parser
make

If that does not do it, then make a clean rebuild instead:

cd TOPLEVELDIROFLSSOURCES
make -f Makefile.svn clean
make -f Makefile.svn
./configure
make

Since you are using a Debian flavored distro, you can of course also build
.deb packages instead:

cd TOPLEVELDIROFLSSOURCES
dpkg-buildpackage -b

And then install the built .deb packages:

dpkg -i REPLACE_BY_DEB_FILES

There is also a (fairly old) Debian howto:

http://linuxsampler.org/debian.html

CU
Christian
Andrew C
2017-05-12 20:07:22 UTC
Permalink
Thanks, using 'make parser' worked fine and linuxsampler builds properly.

On Fri, May 12, 2017 at 12:53 PM, Christian Schoenebeck <
Post by Andrew C
Post by Andrew C
Thanks, Christian, that works like a charm. Libgig compiled successfully.
Getting a makefile/make related error now when trying to build
Linuxsampler
[snip]
Post by Andrew C
make[3]: Entering directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/src/scriptvm'
make[3]: *** No rule to make target 'parser.h', needed by 'all'. Stop.
cd TOPLEVELDIROFLSSOURCES
make parser
make
cd TOPLEVELDIROFLSSOURCES
make -f Makefile.svn clean
make -f Makefile.svn
./configure
make
Since you are using a Debian flavored distro, you can of course also build
cd TOPLEVELDIROFLSSOURCES
dpkg-buildpackage -b
dpkg -i REPLACE_BY_DEB_FILES
http://linuxsampler.org/debian.html
CU
Christian
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxsampler-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Andrew C
2017-05-12 20:51:44 UTC
Permalink
One final thing re svn gigedit now :>

Got the following when trying to compile it:

mainwindow.cpp: In member function ‘void Saver::thread_function()’:
mainwindow.cpp:1207:17: error: ‘String’ was not declared in this scope
String tmpname = filename + ".TMP";
^
mainwindow.cpp:1207:17: note: suggested alternatives:
In file included from /usr/local/include/libgig/DLS.h:27:0,
from /usr/local/include/libgig/gig.h:27,
from global.h:49,
from mainwindow.cpp:47:
/usr/local/include/libgig/RIFF.h:144:25: note: ‘RIFF::String’
typedef std::string String;
^
In file included from /usr/local/include/libgig/gig.h:27:0,
from global.h:49,
from mainwindow.cpp:47:
/usr/local/include/libgig/DLS.h:106:25: note: ‘DLS::String’
typedef std::string String;
^
In file included from global.h:50:0,
from mainwindow.cpp:47:
/usr/local/include/libgig/Serialization.h:119:25: note:
‘Serialization::String’
typedef std::string String;
^
In file included from global.h:49:0,
from mainwindow.cpp:47:
/usr/local/include/libgig/gig.h:94:25: note: ‘gig::String’
typedef std::string String;
^
mainwindow.cpp:1208:27: error: ‘tmpname’ was not declared in this scope
gig->Save(tmpname, &progress);
^
Makefile:721: recipe for target 'libgigedit_la-mainwindow.lo' failed
make[4]: *** [libgigedit_la-mainwindow.lo] Error 1
make[4]: Leaving directory
'/home/ubuntu-studio/Desktop/Linuxsampler/gigedit/src/gigedit'
Post by Andrew C
Thanks, using 'make parser' worked fine and linuxsampler builds properly.
On Fri, May 12, 2017 at 12:53 PM, Christian Schoenebeck <
Post by Andrew C
Post by Andrew C
Thanks, Christian, that works like a charm. Libgig compiled
successfully.
Post by Andrew C
Getting a makefile/make related error now when trying to build
Linuxsampler
[snip]
Post by Andrew C
make[3]: Entering directory
'/home/ubuntu-studio/Desktop/Linuxsampler/linuxsampler/src/scriptvm'
make[3]: *** No rule to make target 'parser.h', needed by 'all'. Stop.
cd TOPLEVELDIROFLSSOURCES
make parser
make
cd TOPLEVELDIROFLSSOURCES
make -f Makefile.svn clean
make -f Makefile.svn
./configure
make
Since you are using a Debian flavored distro, you can of course also build
cd TOPLEVELDIROFLSSOURCES
dpkg-buildpackage -b
dpkg -i REPLACE_BY_DEB_FILES
http://linuxsampler.org/debian.html
CU
Christian
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxsampler-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Christian Schoenebeck
2017-05-13 19:02:16 UTC
Permalink
Post by Andrew C
One final thing re svn gigedit now :>
mainwindow.cpp:1207:17: error: ‘String’ was not declared in this scope
String tmpname = filename + ".TMP";
^
I have no idea why this error triggered with your compiler and not with any
one in our compiler arsenal, but ooookaaay.

I just committed a fix to SVN. Should work now for you.

CU
Christian
Andrew C
2017-05-14 10:55:19 UTC
Permalink
UbuntuStudio must be "unique" in this regard...

Got another compile time error, if you'd like to take a look :D

mainwindow.cpp: In member function ‘void Saver::thread_function()’:
mainwindow.cpp:1215:156: error: ‘String’ was not declared in this scope
temporary file (unable to remove original file): " +
String(strerror(errno)));

^
mainwindow.cpp:1215:156: note: suggested alternatives:
In file included from /usr/local/include/libgig/DLS.h:27:0,
from /usr/local/include/libgig/gig.h:27,
from global.h:49,
from mainwindow.cpp:47:
/usr/local/include/libgig/RIFF.h:144:25: note: ‘RIFF::String’
typedef std::string String;
^
In file included from /usr/local/include/libgig/gig.h:27:0,
from global.h:49,
from mainwindow.cpp:47:
/usr/local/include/libgig/DLS.h:106:25: note: ‘DLS::String’
typedef std::string String;
^
In file included from global.h:50:0,
from mainwindow.cpp:47:
/usr/local/include/libgig/Serialization.h:119:25: note:
‘Serialization::String’
typedef std::string String;
^
In file included from global.h:49:0,
from mainwindow.cpp:47:
/usr/local/include/libgig/gig.h:94:25: note: ‘gig::String’
typedef std::string String;
^
mainwindow.cpp:1222:152: error: ‘String’ was not declared in this scope
with temporary file (unable to rename temp file): " +
String(strerror(errno)));

^
mainwindow.cpp:1222:152: note: suggested alternatives:
In file included from /usr/local/include/libgig/DLS.h:27:0,
from /usr/local/include/libgig/gig.h:27,
from global.h:49,
from mainwindow.cpp:47:
/usr/local/include/libgig/RIFF.h:144:25: note: ‘RIFF::String’
typedef std::string String;
^
In file included from /usr/local/include/libgig/gig.h:27:0,
from global.h:49,
from mainwindow.cpp:47:
/usr/local/include/libgig/DLS.h:106:25: note: ‘DLS::String’
typedef std::string String;
^
In file included from global.h:50:0,
from mainwindow.cpp:47:
/usr/local/include/libgig/Serialization.h:119:25: note:
‘Serialization::String’
typedef std::string String;
^
In file included from global.h:49:0,
from mainwindow.cpp:47:
/usr/local/include/libgig/gig.h:94:25: note: ‘gig::String’
typedef std::string String;
^
Makefile:733: recipe for target 'libgigedit_la-mainwindow.lo' failed
make[4]: *** [libgigedit_la-mainwindow.lo] Error 1
make[4]: Leaving directory
'/home/andrew/Desktop/Linuxsampler/gigedit/src/gigedit'



On Sat, May 13, 2017 at 8:02 PM, Christian Schoenebeck <
Post by Christian Schoenebeck
Post by Andrew C
One final thing re svn gigedit now :>
mainwindow.cpp:1207:17: error: ‘String’ was not declared in this scope
String tmpname = filename + ".TMP";
^
I have no idea why this error triggered with your compiler and not with any
one in our compiler arsenal, but ooookaaay.
I just committed a fix to SVN. Should work now for you.
CU
Christian
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxsampler-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Christian Schoenebeck
2017-05-14 13:24:26 UTC
Permalink
Post by Andrew C
UbuntuStudio must be "unique" in this regard...
Got another compile time error, if you'd like to take a look :D
mainwindow.cpp:1215:156: error: ‘String’ was not declared in this scope
temporary file (unable to remove original file): " +
String(strerror(errno)));
Try again.

I think I got the idea what the cause of all these errors now is. Seems GCC 5
became more strict on typedefs.

CU
Christian
Andrew C
2017-05-14 16:09:33 UTC
Permalink
Thanks, Christian! Got all the bits and pieces finally working in unison.
Took me a bit of googling to figure out I had to install linuxsampler
before I installed gigedit so I could live edit, but it all works now!

I should make a new post for this, but I'm really digging the new features
of gigedit since I last saw it. I'm looking forward to digging into it
(Though considering .gig is more or less 'dead', manually editing .sfz
files isn't my cup of tea....).

What kind of scripting language is used in gigedit? I see there is a
'script's feature.

On Sun, May 14, 2017 at 2:24 PM, Christian Schoenebeck <
Post by Christian Schoenebeck
Post by Andrew C
UbuntuStudio must be "unique" in this regard...
Got another compile time error, if you'd like to take a look :D
mainwindow.cpp:1215:156: error: ‘String’ was not declared in this scope
temporary file (unable to remove original file): " +
String(strerror(errno)));
Try again.
I think I got the idea what the cause of all these errors now is. Seems GCC 5
became more strict on typedefs.
CU
Christian
------------------------------------------------------------
------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxsampler-devel mailing list
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel
Christian Schoenebeck
2017-05-14 16:24:58 UTC
Permalink
Post by Andrew C
Thanks, Christian! Got all the bits and pieces finally working in unison.
Took me a bit of googling to figure out I had to install linuxsampler
before I installed gigedit so I could live edit, but it all works now!
I should make a new post for this, but I'm really digging the new features
of gigedit since I last saw it. I'm looking forward to digging into it
(Though considering .gig is more or less 'dead', manually editing .sfz
files isn't my cup of tea....).
What kind of scripting language is used in gigedit? I see there is a
'script's feature.
One question, one link: :)

http://doc.linuxsampler.org/Instrument_Scripts/NKSP_Language/

Adding, writing and assigning scripts to instruments with gigedit:

http://doc.linuxsampler.org/Gigedit/Managing_Scripts/

Current state of gigedit's built-in script editor:

http://doc.linuxsampler.org/News/Instrument_Script_Editor_2016-05-04/

CU
Christian

Loading...