Skip to Content

compilation error

3 replies [Last post]
metzi
Offline
Joined: 04/17/2010

Hello, I'm getting this error when compiling Hydrogen SVN (revision 156):

i686-pc-linux-gnu-g++ -c -include objs/hydrogen -pipe -O2 -march=athlon-xp -fomit-frame-pointer -pipe -g -Wall -fPIC -D_REENTRANT -Wall -W -DALSA_SUPPORT -DJACK_SUPPORT -DFLAC_SUPPORT -DLADSPA_SUPPORT -DLRDF_SUPPORT -DOSS_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../.. -Iinclude -I. -I. -o objs/instrument.o src/instrument.cpp
include/hydrogen/instrument.h: In constructor 'H2Core::Instrument::Instrument(const QString&, const QString&, H2Core::ADSR*)':
include/hydrogen/instrument.h:269: warning: 'H2Core::Instrument::__random_pitch_factor' will be initialized after
include/hydrogen/instrument.h:263: warning: 'float H2Core::Instrument::__volume'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:270: warning: 'H2Core::Instrument::__id' will be initialized after
include/hydrogen/instrument.h:258: warning: 'bool H2Core::Instrument::__muted'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:276: warning: 'H2Core::Instrument::__soloed' will be initialized after
include/hydrogen/instrument.h:266: warning: 'float H2Core::Instrument::__peak_l'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:266: warning: 'H2Core::Instrument::__peak_l' will be initialized after
include/hydrogen/instrument.h:260: warning: 'float H2Core::Instrument::__pan_l'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:267: warning: 'H2Core::Instrument::__peak_r' will be initialized after
include/hydrogen/instrument.h:261: warning: 'float H2Core::Instrument::__pan_r'
src/instrument.cpp:40: warning: when initialized here
i686-pc-linux-gnu-g++ -c -include objs/hydrogen -pipe -O2 -march=athlon-xp -fomit-frame-pointer -pipe -g -Wall -fPIC -D_REENTRANT -Wall -W -DALSA_SUPPORT -DJACK_SUPPORT -DFLAC_SUPPORT -DLADSPA_SUPPORT -DLRDF_SUPPORT -DOSS_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../.. -Iinclude -I. -I. -o objs/local_file_mgr.o src/local_file_mgr.cpp
src/local_file_mgr.cpp: In member function 'int H2Core::LocalFileMng::saveDrumkit(H2Core::Drumkit*)':
src/local_file_mgr.cpp:555: error: expected primary-expression before '<<' token
src/local_file_mgr.cpp:555: error: expected primary-expression before '<<' token
src/local_file_mgr.cpp:555: error: expected primary-expression before '<<' token
src/local_file_mgr.cpp:555: error: expected primary-expression before '<' token
src/local_file_mgr.cpp:555: error: expected primary-expression before '.' token
src/local_file_mgr.cpp:558: error: expected primary-expression before '==' token
src/local_file_mgr.cpp:558: error: expected primary-expression before '==' token
src/local_file_mgr.cpp:558: error: expected primary-expression before '=' token
src/local_file_mgr.cpp:561: error: expected primary-expression before '>>' token
src/local_file_mgr.cpp:561: error: expected primary-expression before '>>' token
src/local_file_mgr.cpp:561: error: expected primary-expression before '>>' token
src/local_file_mgr.cpp:561: error: expected primary-expression before '>' token
src/local_file_mgr.cpp:561: error: expected primary-expression before '.' token
src/local_file_mgr.cpp:563: error: expected primary-expression before '<<' token
src/local_file_mgr.cpp:563: error: expected primary-expression before '<<' token
src/local_file_mgr.cpp:563: error: expected primary-expression before '<' token
src/local_file_mgr.cpp:563: error: expected primary-expression before '.' token
src/local_file_mgr.cpp:567: error: expected primary-expression before '==' token
src/local_file_mgr.cpp:567: error: expected primary-expression before '==' token
src/local_file_mgr.cpp:567: error: expected primary-expression before '=' token
src/local_file_mgr.cpp:570: error: expected primary-expression before '>>' token
src/local_file_mgr.cpp:570: error: expected primary-expression before '>>' token
src/local_file_mgr.cpp:570: error: expected primary-expression before '>>' token
src/local_file_mgr.cpp:570: error: expected primary-expression before '>' token
src/local_file_mgr.cpp:570: error: expected primary-expression before '.' token
src/local_file_mgr.cpp:571: error: expected `;' before '}' token
src/local_file_mgr.cpp: In member function 'void H2Core::SongWriter::writeSong(H2Core::Song*, const QString&)':
src/local_file_mgr.cpp:889: error: 'VERSION' was not declared in this scope
make[2]: *** [objs/local_file_mgr.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-sound/hydrogen-9999/work/hydrogen-9999/libs/hydrogen'
make[1]: *** [sub-hydrogen-make_default] Error 2
make[1]: Leaving directory `/var/tmp/portage/media-sound/hydrogen-9999/work/hydrogen-9999/libs'
make: *** [sub-libs-make_default] Error 2

gcc --version
gcc (GCC) 4.2.3 (Gentoo 4.2.3 p1.0)

mauser
Offline
Joined: 03/30/2010

Hey..

works fine for me.. But the error-messages looks like a conflict in src/local_file_mgr.cpp. Maybe you should delete it and run "svn update". Or make a clean checkout of the whole repository..

metzi
Offline
Joined: 04/17/2010

Hi there, thanks for the reply.
I did a 'rm -rf /usr/portage/distfiles/svn-src/hydrogen' for 100% clean repo. and I got rid of the 'expected primary-expression before' errors, but the 'VERSION' error is still there.

$uname -a
Linux barcino 2.6.25-gentoo-r3 #1 PREEMPT Mon May 12 01:17:14 CEST 2008 i686 AMD Athlon(tm) XP 1800+ AuthenticAMD GNU/Linux
$gcc --version
gcc (GCC) 4.2.3 (Gentoo 4.2.3 p1.0)

i686-pc-linux-gnu-g++ -c -include objs/hydrogen -pipe -O2 -march=athlon-xp -fomit-frame-pointer -pipe -g -Wall -fPIC -D_REENTRANT -Wall -W -DALSA_SUPPORT -DJACK_SUPPORT -DFLAC_SUPPORT -DLADSPA_SUPPORT -DLRDF_SUPPORT -DOSS_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../.. -Iinclude -I. -I. -o objs/instrument.o src/instrument.cpp
include/hydrogen/instrument.h: In constructor 'H2Core::Instrument::Instrument(const QString&, const QString&, H2Core::ADSR*)':
include/hydrogen/instrument.h:269: warning: 'H2Core::Instrument::__random_pitch_factor' will be initialized after
include/hydrogen/instrument.h:263: warning: 'float H2Core::Instrument::__volume'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:270: warning: 'H2Core::Instrument::__id' will be initialized after
include/hydrogen/instrument.h:258: warning: 'bool H2Core::Instrument::__muted'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:276: warning: 'H2Core::Instrument::__soloed' will be initialized after
include/hydrogen/instrument.h:266: warning: 'float H2Core::Instrument::__peak_l'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:266: warning: 'H2Core::Instrument::__peak_l' will be initialized after
include/hydrogen/instrument.h:260: warning: 'float H2Core::Instrument::__pan_l'
src/instrument.cpp:40: warning: when initialized here
include/hydrogen/instrument.h:267: warning: 'H2Core::Instrument::__peak_r' will be initialized after
include/hydrogen/instrument.h:261: warning: 'float H2Core::Instrument::__pan_r'
src/instrument.cpp:40: warning: when initialized here
i686-pc-linux-gnu-g++ -c -include objs/hydrogen -pipe -O2 -march=athlon-xp -fomit-frame-pointer -pipe -g -Wall -fPIC -D_REENTRANT -Wall -W -DALSA_SUPPORT -DJACK_SUPPORT -DFLAC_SUPPORT -DLADSPA_SUPPORT -DLRDF_SUPPORT -DOSS_SUPPORT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtGui -I/usr/include/qt4 -I../.. -Iinclude -I. -I. -o objs/local_file_mgr.o src/local_file_mgr.cpp
src/local_file_mgr.cpp: In member function 'void H2Core::SongWriter::writeSong(H2Core::Song*, const QString&)':
src/local_file_mgr.cpp:878: error: 'VERSION' was not declared in this scope
make[2]: *** [objs/local_file_mgr.o] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-sound/hydrogen-9999/work/hydrogen-9999/libs/hydrogen'
make[1]: *** [sub-hydrogen-make_default] Error 2
make[1]: Leaving directory `/var/tmp/portage/media-sound/hydrogen-9999/work/hydrogen-9999/libs'
make: *** [sub-libs-make_default] Error 2

mauser
Offline
Joined: 03/30/2010

Hi,

did you run "./configure" before "make" ? Because "./configure" defines the VERSION constant.