Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble building #26

Open
wdecoster opened this issue Jan 23, 2017 · 3 comments
Open

Trouble building #26

wdecoster opened this issue Jan 23, 2017 · 3 comments

Comments

@wdecoster
Copy link

wdecoster commented Jan 23, 2017

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

@natir
Copy link
Member

natir commented Jan 23, 2017

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

@Arkanosis
Copy link
Member

Arkanosis commented Jan 23, 2017

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

@wdecoster
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants