CuteVCF icon indicating copy to clipboard operation
CuteVCF copied to clipboard

Trouble building

Open wdecoster opened this issue 7 years ago • 3 comments

See thread for context https://www.biostars.org/p/227973/#232095

After adding QMAKE_CXXFLAGS += -std=c++11

I get the following error when running make:

~/Downloads/CuteVCF$ make
g++ -Wl,-O1 -Wl,-rpath,/home/wdecoster/anaconda3/lib -o CuteVCF qfonticon.o aboutdialog.o createindexdialog.o infowidget.o mainwindow.o main.o qtabix.o samplewidget.o vcfheader.o vcfline.o vcfmodel.o qrc_files.o moc_qfonticon.o moc_aboutdialog.o moc_createindexdialog.o moc_infowidget.o moc_mainwindow.o moc_samplewidget.o moc_vcfmodel.o   -L/home/wdecoster/Downloads/CuteVCF/htslib -lhts -L/home/wdecoster/anaconda3/lib -lQt5Widgets -lQt5Gui -lQt5Concurrent -lQt5Core -lGL -lpthread 
qtabix.o: In function `QTabix::buildIndex(QString const&)':
qtabix.cpp:(.text+0x313): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o: In function `QTabix::open()':
qtabix.cpp:(.text+0x703): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.cpp:(.text+0x763): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.cpp:(.text+0x7a3): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o: In function `QTabix::readInfo()':
qtabix.cpp:(.text+0x10d3): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)'
qtabix.o:qtabix.cpp:(.text+0x1113): more undefined references to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_create(unsigned long&, unsigned long)' follow
collect2: error: ld returned 1 exit status
Makefile:219: recipe for target 'CuteVCF' failed
make: *** [CuteVCF] Error 1

$ qmake --version
QMake version 3.0
Using Qt version 5.6.0 in /home/wdecoster/anaconda3/lib

wdecoster avatar Jan 23 '17 20:01 wdecoster

Hello,

Thanks for your issue.

Can you get her :

  • Your distribution
  • Your kernel version
  • Your Qt version

I see on biostars you use the qmake of anaconda, so I suppose you use anaconda (is very good think), but it's not use the last Qt version. Did you install qt with classic package manager ? If yes please replace qmake by /usr/bin/qmake (maybe /usr/bin/qmake-qt5).

If this change didn't solve the issue can you send the Makefile generate by qmake, please (in some distribution qmake generate a bad Makefile).

Thank

natir avatar Jan 23 '17 20:01 natir

Also please, your GCC version.

Looks like the C++11-ABI-compiled object files are linked against a pre-C++11-ABI-libstdc++. Seeing the default for your compiler is -std=gnu++0x, I suspect you're using a pre-C++11-ABI version of GCC (ie < 5.1).

Adding -D_GLIBCXX_USE_CXX11_ABI=0 might be a workaround but a compiler update is probably the way to go.

Thanks

Arkanosis avatar Jan 23 '17 20:01 Arkanosis

I'm using a Ubuntu 16.04 LTS so I would expect that my compiler is quite up to date. I'm going to reattempt the installation from the beginning.

$gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609

wdecoster avatar Jan 23 '17 21:01 wdecoster