I am getting a warning while trying to compile drizzle7-2010.12.05

Asked by Nicholas Henry

Hello,

I am trying to compile drizzle7-2010.12.05 on Ubuntu 8.04, but I am getting this error/warning when I issue the 'make' command:
...
  CXX client/drizzleimport.o
  CXXLD client/drizzleimport
  CXX client/client_drizzleslap-drizzleslap.o
cc1plus: warnings being treated as errors
/usr/local/include/boost/lexical_cast.hpp: In function ‘Target boost::detail::lexical_cast(typename boost::call_traits<Source>::param_type, CharT*, size_t) [with Target = char*, Source = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool Unlimited = false, CharT = char]’:
/usr/local/include/boost/lexical_cast.hpp:1153: warning: ‘result’ is used uninitialized in this function
make[2]: *** [client/client_drizzleslap-drizzleslap.o] Error 1
make[2]: Leaving directory `/tmp/drizzle7-2010.12.05'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/drizzle7-2010.12.05'
make: *** [all] Error 2

----------------------

I am using boost_1_45_0; should I try an older version??

If I turn off 'warnings being treated as errors', I get an error later on when I issue the 'make' command (I would also prefer to compile without any warnings if at all possible)...

Any advice would be appreciated.

Thanks,
Nick Henry

Question information

Language:
English Edit question
Status:
Answered
For:
Drizzle Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Nicholas Henry (nickh) said :
#1

I said earlier that if I disable 'warnings being treated as errors', that make fails. I was wrong, it does not fail; however, make test and/or make check both fail in this manner:

cd . && python config/pandora-plugin write
srcdir=. ./config/make-lint.py
make check-recursive
make[1]: Entering directory `/tmp/drizzle7-2010.12.05'
cd . && python config/pandora-plugin write
srcdir=. ./config/make-lint.py
Making check in .
make[2]: Entering directory `/tmp/drizzle7-2010.12.05'
cd . && python config/pandora-plugin write
srcdir=. ./config/make-lint.py
rm -f -f tests/test-run
ln -s test-run.pl tests/test-run
make
make[3]: Entering directory `/tmp/drizzle7-2010.12.05'
cd . && python config/pandora-plugin write
srcdir=. ./config/make-lint.py
make all-recursive
make[4]: Entering directory `/tmp/drizzle7-2010.12.05'
cd . && python config/pandora-plugin write
srcdir=. ./config/make-lint.py
Making all in .
make[5]: Entering directory `/tmp/drizzle7-2010.12.05'
cd . && python config/pandora-plugin write
srcdir=. ./config/make-lint.py
rm -f -f tests/test-run
ln -s test-run.pl tests/test-run
make[5]: Leaving directory `/tmp/drizzle7-2010.12.05'
make[4]: Leaving directory `/tmp/drizzle7-2010.12.05'
make[3]: Leaving directory `/tmp/drizzle7-2010.12.05'
make check-TESTS check-local
make[3]: Entering directory `/tmp/drizzle7-2010.12.05'
cd . && python config/pandora-plugin write
srcdir=. ./config/make-lint.py
==================
All 0 tests passed
==================
( cd tests && perl -I.././tests/lib .././tests/test-run.pl --top-srcdir=../. --top-builddir=../. --vardir=.././tests/var --suitepath=.././plugin --testdir=.././tests --dtr-build-thread=$$ --fast --force --suite=main,jp,tamil,regression,utility_functions,utility_dictionary,user_locks,trigger_dictionary,transaction_log,tableprototester,table_cache_dictionary,storage_engine_api_tester,status_dictionary,sleep,simple_user_policy,show_schema_proto,show_dictionary,session_dictionary,schema_engine,schema_dictionary,rot13,replication_dictionary,registry_dictionary,rand_function,performance_dictionary,pbxt,mysql_protocol,myisam,memory,logging_stats,innobase,information_schema_dictionary,hello_world,hello_events,function_dictionary,filtered_replicator,filesystem_engine,errmsg_stderr,csv,crc32,collation_dictionary,blackhole,auth_test,auth_file,archive,)
Logging: .././tests/test-run.pl --top-srcdir=../. --top-builddir=../. --vardir=.././tests/var --suitepath=.././plugin --testdir=.././tests --dtr-build-thread=6006 --fast --force --suite=main,jp,tamil,regression,utility_functions,utility_dictionary,user_locks,trigger_dictionary,transaction_log,tableprototester,table_cache_dictionary,storage_engine_api_tester,status_dictionary,sleep,simple_user_policy,show_schema_proto,show_dictionary,session_dictionary,schema_engine,schema_dictionary,rot13,replication_dictionary,registry_dictionary,rand_function,performance_dictionary,pbxt,mysql_protocol,myisam,memory,logging_stats,innobase,information_schema_dictionary,hello_world,hello_events,function_dictionary,filtered_replicator,filesystem_engine,errmsg_stderr,csv,crc32,collation_dictionary,blackhole,auth_test,auth_file,archive,
/tmp/drizzle7-2010.12.05/drizzled/.libs/lt-drizzled: error while loading shared libraries: libboost_program_options.so.1.45.0: cannot open shared object file: No such file or directory
drizzle-test-run: *** ERROR: Could not find version of Drizzle
make[3]: *** [test-drizzle] Error 1
make[3]: Leaving directory `/tmp/drizzle7-2010.12.05'
make[2]: *** [check-am] Error 2
make[2]: Leaving directory `/tmp/drizzle7-2010.12.05'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/tmp/drizzle7-2010.12.05'
make: *** [check] Error 2

Revision history for this message
Andrew Hutchings (linuxjedi) said :
#2

I'm not sure about the initial problem, it looks on the surface to be a problem with boost and/or your compiler.

As for the second problem:
"error while loading shared libraries: libboost_program_options.so.1.45.0: cannot open shared object file: No such file or directory"

It looks like you don't have the boost program_options libraries installed (or they somewhere the dynamic linker can't find them).

Revision history for this message
Monty Taylor (mordred) said :
#3

Well, there's a couple of things here...

First of all, we don't really support or test on Hardy, so your mileage may vary. That being said, the compiler there is new enough, so it shouldn't be terribly hard to make this work if you're willing to have local versions of stuff (which you obviously are)

The first warning I'm going to blame on hardy's gcc. /usr/local/include should be considered a system header location, and as such should not emit warnings for code found there. I'll see if I can make the pandora-build macros use -isystem in the future for finding boost libraries, but in this case adding -Wno-error is gonna be your best bet (I can't really fix the boost headers, and most upstream projects don't accept patches to just fix warnings - but I agree with you on the no-warnings thing)

The second error looks to be an ld path problem since your libs are in /usr/local. Try doing:

export LD_LIBRARY_PATH=/usr/local/lib

before you run the test suite. If that works, make sure to add /usr/local/lib to /etc/ld.so.conf and then run ldconfig. If it _DOESN'T_ work, then let me know, because that's strange.

Revision history for this message
Olaf van der Spek (olafvdspek) said :
#4

> and most upstream projects don't accept patches to just fix warnings

I think Boost is an exception.

Revision history for this message
Stewart Smith (stewart) said :
#5

I've actually gotten this on OSX too http://hudson.drizzle.org/job/drizzle-param/782/BUILD_TYPE=release,label=hades.inaugust.com/console

cc1plus: warnings being treated as errors
/usr/local/include/boost/lexical_cast.hpp: In function 'Target boost::detail::lexical_cast(typename boost::call_traits<Source>::param_type, CharT*, size_t) [with Target = char*, Source = std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool Unlimited = false, CharT = char]':
/usr/local/include/boost/lexical_cast.hpp:1153: warning: 'result' is used uninitialized in this function [-Wuninitialized]
make[2]: *** [plugin/innobase/xtrabackup/plugin_innobase_xtrabackup_xtrabackup-xtrabackup.o] Error 1
make[2]: *** Waiting for unfinished jobs....

Revision history for this message
Stewart Smith (stewart) said :
#6

So... this seems to be a bug with boost and po::value<char*> - once i removed those from xtrabackup, I got it to build. We should possibly go through the code to fix these up.

Can you help with this problem?

Provide an answer of your own, or ask Nicholas Henry for more information if necessary.

To post a message you must log in.