Subject: CGAL users discussion list
List archive
- From: Oren Shpigel <>
- To:
- Subject: Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++
- Date: Tue, 31 Jan 2017 15:09:10 +0000
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:8q7DVhXkEKgWPduYIdlrdOD+0Z3V8LGtZVwlr6E/grcLSJyIuqrYYxyAt8tkgFKBZ4jH8fUM07OQ6PG8HzJdqsna+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6KfroEYDOkcu3y/qy+5rOaAlUmTaxe71/IRG5oAnLt8QbgYRuJ6Q/xxDUvnZGZuNayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnDVhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0jioMKjg0+3zVhMNtlqJWuB2upxJ9zIDUbo+bN+dwcL3Bct4BX2VNQtxcWjZdDo+gbYYCCfcKM+ZCr4n6olsDtQKwBROyC+Pp1zRGm3/23bU70+QuDw7G2BErEtUJsHTOstr1MrwfUOCyzKjGzDTMdf1b1irn5IfUdRAhpOiBULRtesTfzkkvEhnKjlSWqYH9PjOV0P4Ns2mB4OZ6W+KvkWgqoBxyrDi33soglJXFi4YPxl3H9Sh12pg5KcC6RUJhfNKpEppduieHPIVsWMwiWXtnuCMix70Gp5G7eC8KxYwixxHFavyHd5GE4g/5W+qNODt4im9pdbC+ihqo/kigzer8Vsaw0FlUtCZKjt7MtnUV2xzS7MiIVOd981+/1TqT0w3f8OJJLEAumabFNpIswKQ8mocRvEnCBiP2nV/5jK6SdkUq4Oio7OHnb63hpp+GKYB0jBrzM6Qpms2xAOU3KAYDUHWB9eug073j+FX1QK9Wgf0ujqnZrJfaKNwHqa62GQBV1p8v5Au+Dze9zNsYgGIHLEledRKcj4npPknOL+riAfe+hVSsijZryOrcMr3vGJWeZkXFi6rrKLZh91ZHmk101sFa/5sSC7cbIfu1VFW2r83dFhZ+Mgq6xKHsB9x5k48fQmmSGbTKDKSHulCB4qcjIvKHeZQOkDf7MfksofD03lEjnlpIWrOk29MsaGi5EfliaxGee3fqqsYGDnUD5QZ4R+vv3g7RGQVPbmq/CvpvrgowD5irWN/O
Hi again,
I tried compiling everything again with the correct flags, and I still get this error when linking my code to CGAL:
# clang++-3.8 -o build/release/my_output_file -stdlib=libc++ -lc++ my_code_stuff -lCGAL -lCGAL_Core -lprofiler -ltcmalloc -lgtest -lpthread -lboost_date_time -lboost_filesystem -lcurl -ljson -lz -lboost_system -lprotobuf -lglog -lgflags -lblas -llapack
//usr/local/lib/libCGAL.so: undefined reference to `std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::basic_istream<char, std::__1::char_traits<char> >& (*)(std::__1::basic_istream<char, std::__1::char_traits<char> >&))'
//usr/local/lib/libCGAL.so: undefined reference to `std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::basic_istream<char, std::__1::char_traits<char> >& (*)(std::__1::basic_istream<char, std::__1::char_traits<char> >&))'
When checking my CGAL's dependencies it looks good, no libstdc++ anywhere:
# ldd -r /usr/local/lib/libCGAL.so
linux-vdso.so.1 => (0x00007fff3f2ae000)
libmpfr.so.4 => /usr/local/lib/libmpfr.so.4 (0x00007f77e491f000)
libgmp.so.10 => /usr/local/lib/libgmp.so.10 (0x00007f77e46a9000)
libboost_thread.so.1.55.0 => /usr/local/lib/libboost_thread.so.1.55.0 (0x00007f77e448f000)
libboost_system.so.1.55.0 => /usr/local/lib/libboost_system.so.1.55.0 (0x00007f77e428b000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f77e406d000)
libc++.so.1 => /usr/lib/libc++.so.1 (0x00007f77e3d15000)
libc++abi.so.1 => /usr/lib/libc++abi.so.1 (0x00007f77e3aa0000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f77e379a000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f77e3584000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f77e31bf000)
/lib64/ld-linux-x86-64.so.2 (0x00007f77e4da6000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f77e2fb7000)
undefined symbol: _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E (/usr/local/lib/libCGAL.so)
But again, also ldd says this same undefined symbol:
# c++filt _ZNSt3__113basic_istreamIcNS_11char_traitsIcEEErsEPFRS3_S4_E
std::__1::basic_istream<char, std::__1::char_traits<char> >::operator>>(std::__1::basic_istream<char, std::__1::char_traits<char> >& (*)(std::__1::basic_istream<char, std::__1::char_traits<char> >&))
Anyone has any idea about why it's missing? Or what is using it?
Has anyone ever compiled CGAL 4.8 with clang 3.8 and libc++?
Thanks!
Oren
Hi Oren,This sounds like an error between one library looking for libc++ and another looking for libstdc++. Using -std=c++11 can cause libc++ to link unless you explicitly pass -stdlib=libstdc++ (not certain if libstdc++ or just stdc++). So differences in compiler flags between gmp, mpfr, boost and cgal and the c++ library they're linking is probably the problem. And since it's c++, probably just boost and cgal. Try passing -std=c++11 -stdlib=libc++ to both boost and cgal during compile.Cheers,PaddyOn Sun, Jan 29, 2017 at 5:43 PM, Marc Glisse <> wrote:On Sun, 29 Jan 2017, Oren Shpigel wrote:
Hi,
I'm trying to use CGAL with clang++-3.8 and libc++.
I compiled boost, gmp and mpfr, and then compiled CGAL with them (all with
clang++-3.8 and libc++).
But when linking my own program with CGAL I get the following error:
//usr/local/lib/libCGAL.so: undefined reference to
`std::__1::basic_istream<char, std::__1::char_traits<char>
::operator>>(std::__1::basic_istream<char, std::__1::char_traits<char> >&(*)(std::__1::basic_istream<char, std::__1::char_traits<char> >&))'
In the CGAL website I saw that CGAL supports clang 3.5 and 3.6.2.
Do I get this error because clang 3.8 isn't supported?
No.
What has changed? Is there something I can do to use it?
Or any other idea about this linker error?
Did you link you program with libc++? It usually helps answering questions when we can actually see the command producing the error message, and the full message...
--
Marc Glisse
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Oren Shpigel, 01/29/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Marc Glisse, 01/29/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Pádraig Ó Conbhuí, 01/30/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Oren Shpigel, 01/31/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Marc Glisse, 01/31/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Oren Shpigel, 01/31/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Marc Glisse, 01/31/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Oren Shpigel, 01/31/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Marc Glisse, 01/31/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Oren Shpigel, 01/31/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Pádraig Ó Conbhuí, 01/30/2017
- Re: [cgal-discuss] Compile CGAL with clang++-3.8 and libc++, Marc Glisse, 01/29/2017
Archive powered by MHonArc 2.6.18.