Compile Failures

7 posts / 0 new
Last post
revert
revert's picture
Offline
Last seen: 2 years 10 months ago
Joined: Nov 8 2009
Junior Boarder

Posts: 1

Dan Young
Compile Failures

Hello,

I am having trouble compiling calpont-infinidb-0.9.4.0-5. Any suggestions:

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/Calpont/include -I/usr/include/libxml2 -g0 -O3 -fno-strict-aliasing -Wall -MT libthreadpool_la-weightedthreadpool.lo -MD -MP -MF .deps/libthreadpool_la-weightedthreadpool.Tpo -c weightedthreadpool.cpp -fPIC -DPIC -o .libs/libthreadpool_la-weightedthreadpool.o
weightedthreadpool.h:50: error: ISO C++ forbids declaration of 'function0' with no type
weightedthreadpool.h:50: error: typedef name may not be a nested-name-specifier
weightedthreadpool.h:50: error: expected ';' before '<' token
weightedthreadpool.h:115: error: expected ',' or '...' before '&' token
weightedthreadpool.h:115: error: ISO C++ forbids declaration of 'Functor_T' with no type
weightedthreadpool.h:137: error: expected ',' or '...' before '&' token
weightedthreadpool.h:137: error: ISO C++ forbids declaration of 'Functor_T' with no type
weightedthreadpool.h:160: error: expected ',' or '...' before '&' token
weightedthreadpool.h:160: error: ISO C++ forbids declaration of 'Functor_T' with no type
weightedthreadpool.h:199: error: 'Functor_T' does not name a type
weightedthreadpool.h:210: error: 'condition' in namespace 'boost' does not name a type
weightedthreadpool.h:211: error: 'condition' in namespace 'boost' does not name a type
weightedthreadpool.cpp:101: error: expected ',' or '...' before '&' token
weightedthreadpool.cpp:101: error: ISO C++ forbids declaration of 'Functor_T' with no type
weightedthreadpool.cpp: In member function 'void threadpool::WeightedThreadPool::stop()':
weightedthreadpool.cpp:113: error: 'fNeedThread' was not declared in this scope
weightedthreadpool.cpp: In member function 'void threadpool::WeightedThreadPool::wait()':
weightedthreadpool.cpp:125: error: 'fThreadAvailable' was not declared in this scope
weightedthreadpool.cpp: At global scope:
weightedthreadpool.cpp:130: error: expected ',' or '...' before '&' token
weightedthreadpool.cpp:130: error: ISO C++ forbids declaration of 'Functor_T' with no type
weightedthreadpool.cpp: In member function 'void threadpool::WeightedThreadPool::invoke(int)':
weightedthreadpool.cpp:144: error: 'threadfunc' was not declared in this scope
weightedthreadpool.cpp:144: error: 'functor_weight' was not declared in this scope
weightedthreadpool.cpp:154: error: 'threadfunc' was not declared in this scope
weightedthreadpool.cpp:154: error: 'functor_weight' was not declared

bdempsey
bdempsey's picture
Offline
Last seen: 5 hours 27 min ago
Joined: Oct 27 2009
Platinum Boarder

Posts: 194

Robert Dempsey
Re:Compile Failures

You are most likely compiling against a Boost library > 1.33.

InfiniDB 0.9.5.0 has portability to many, many more platform/library combinations than 0.9.4.0.

The 0.9.5.0 source tar file on [url=http://launchpad.net/infinidb]Launchpad[/url] has compatibility up to GCC 4.3 and Boost 1.39. The current bazaar trunk on Launchpad has compatibility up to GCC 4.4 and Boost 1.40.

srand
srand's picture
Offline
Last seen: 3 years 7 months ago
Joined: Dec 21 2009
Junior Boarder

Posts: 11

cyril scetbon
Re:Compile Failures

Hi !

I'm trying to compile your code and having troubles :

g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/local/Calpont/include -I/usr/include/libxml2 -g0 -O3 -fno-strict-aliasing -Wall -DSKIP_SNMP -MT librowgroup_la-rowaggregation.lo -MD -MP -MF .deps/librowgroup_la-rowaggregation.Tpo -c rowaggregation.cpp -fPIC -DPIC -o .libs/librowgroup_la-rowaggregation.o
rowaggregation.cpp: In member function 'void rowgroup::RowAggregation::updateIntSum(int64_t, int64_t, int64_t)':
rowaggregation.cpp:220: error: 'LLONG_MAX' was not declared in this scope
rowaggregation.cpp:221: error: 'LLONG_MIN' was not declared in this scope
rowaggregation.cpp: In member function 'virtual void rowgroup::RowAggregation::doAvg(const rowgroup::Row&, int64_t, int64_t, int64_t)':
rowaggregation.cpp:1092: error: 'LLONG_MAX' was not declared in this scope
rowaggregation.cpp:1093: error: 'LLONG_MIN' was not declared in this scope
rowaggregation.cpp: In member function 'void rowgroup::RowAggregationUM::calculateAvgColumns()':
rowaggregation.cpp:1432: error: 'LLONG_MAX' was not declared in this scope
rowaggregation.cpp:1432: error: 'LLONG_MIN' was not declared in this scope
make: *** [librowgroup_la-rowaggregation.lo] Error 1

The error is coming from the fact that _STDC_VERSION__ is not defined and that it inhibs the definition of LLONG_XXX in limits.h

the small following code works with gcc if I use gcc -std=c99 test.c :

#include
#include

int main()
{
printf("__STDC_VERSION__ = %ld\n",__STDC_VERSION__);
return 0;
}

but not if I use g++ :(

How can I make __STDC_VERSION__ defined with g++ ??

bdempsey
bdempsey's picture
Offline
Last seen: 5 hours 27 min ago
Joined: Oct 27 2009
Platinum Boarder

Posts: 194

Robert Dempsey
Re:Compile Failures

Hi!

Thank you for trying InfiniDB.

Can you tell me a couple of things about your environment so I can target a response?

[ol]1. What Linux distribution are you using?
2. What is the output of 'g++ -v'?
3. What version of InfiniDB are you trying to compile?[/ol]
Thanks.

srand
srand's picture
Offline
Last seen: 3 years 7 months ago
Joined: Dec 21 2009
Junior Boarder

Posts: 11

cyril scetbon
Re:Compile Failures

1. Debian Etch
2. g++ -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
3. infinidb-0.9.5.3

bdempsey
bdempsey's picture
Offline
Last seen: 5 hours 27 min ago
Joined: Oct 27 2009
Platinum Boarder

Posts: 194

Robert Dempsey
Re:Compile Failures

Currently we support building from source on the following distributions:

Fedora 6
Fedora 9
Fedora 12
RHEL/CentOS 5
Debian lenny
Ubuntu Intrepid
Ubuntu Karmic
SUSE 11

Debian etch should be very close to Ubuntu Intrepid, but apparently not close enough.

However, if all you need is one more compile flag, you may have some success with:

locate this line in configure.ac:
CXXFLAGS="-g0 -O3 -fno-strict-aliasing -Wall -DSKIP_SNMP"
and add the define there.
Then run autoreconf, and configure again.

However, I checked our g++ defines and we don't define __STDC_VERSION__ explicitly, so we're getting what ever g++ gives us.

srand
srand's picture
Offline
Last seen: 3 years 7 months ago
Joined: Dec 21 2009
Junior Boarder

Posts: 11

cyril scetbon
Re:Compile Failures

thanks ! FYI it works if I add -D__STDC_VERSION__=199901L