View Single Post
Old 12-16-2012, 10:26 PM   #9
bharat_iyengar
Member
 
Location: Delhi, India

Join Date: Dec 2012
Posts: 20
Default

Quote:
Originally Posted by lib View Post
The error is caused by the re-define of foreach in common.h:

#define foreach BOOST_FOREACH

You can run a bash script to change all the foreach to for_each as:

for x in *.cpp *.h; do sed 's/foreach/for_each/' $x > x; mv x $x; done

and manually change back the #include <boost/foreach.hpp> in common.h.

I did this but there happens to be one more error:

Code:
make  all-recursive
make[1]: Entering directory `/media/sda8/bharat/genomes/cufflinks-2.0.2'
Making all in src
make[2]: Entering directory `/media/sda8/bharat/genomes/cufflinks-2.0.2/src'
g++  -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wunused -Wuninitialized -m64 -O3  -DNDEBUG  -pthread -I/usr/local/include -I/usr/local/include    -o cufflinks  -L/usr/local/lib -L/usr/local/lib  cufflinks.o libcufflinks.a libgc.a -lboost_thread -lbam  -lz
cufflinks.o: In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:49: undefined reference to `boost::system::system_category()'
cufflinks.o: In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(bundles.o): In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:49: undefined reference to `boost::system::system_category()'
/usr/local/include/boost/thread/exceptions.hpp:49: undefined reference to `boost::system::system_category()'
libcufflinks.a(bundles.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::condition_error::condition_error(int, char const*)':
thread.cpp:(.text._ZN5boost15condition_errorC2EiPKc[_ZN5boost15condition_errorC5EiPKc]+0x21): undefined reference to `boost::system::system_category()'
/usr/local/lib/libboost_thread.a(thread.o): In function `boost::thread_resource_error::thread_resource_error(int, char const*)':
thread.cpp:(.text._ZN5boost21thread_resource_errorC2EiPKc[_ZN5boost21thread_resource_errorC5EiPKc]+0x21): undefined reference to `boost::system::system_category()'
libcufflinks.a(clustering.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(common.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(assemble.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(abundances.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(scaffolds.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(hits.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(genes.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(filters.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(scaffold_graph.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(matching_merge.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(graph_optimize.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(biascorrection.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(sampling.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(replicates.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
libcufflinks.a(multireads.o): In function `thread_exception':
/usr/local/include/boost/thread/exceptions.hpp:49: undefined reference to `boost::system::system_category()'
libcufflinks.a(multireads.o): In function `__static_initialization_and_destruction_0':
/usr/local/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
make[2]: *** [cufflinks] Error 1
make[2]: Leaving directory `/media/sda8/bharat/genomes/cufflinks-2.0.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/media/sda8/bharat/genomes/cufflinks-2.0.2'
make: *** [all] Error 2

i read elsewhere that boost system library needs to be added to ldflags.

i tried editing Makefile.am in cufflinks/src directory and also Makefile in Cufflinks directory:

I added "libboost_system.a" to cufflinks_LDADD > didnt work (in src/makefile.am)
I changed it to "$(BOOST_SYS_LIB) > didnt work either (in src/makefile.am after setting BOOST_SYS_LIB = -lboost_system in Makefile )
Changed it to "-lboost_system" > still doesnt work (in src/makefile.am)

I assume that this is a problem with linking the libraries but i am not sure how to edit the compiler command. Please help

Last edited by bharat_iyengar; 12-17-2012 at 02:35 AM.
bharat_iyengar is offline   Reply With Quote