Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 400547 - dev-libs/STLport-5.2.1 does not compile using clang++ due to error in stlport/stl/_locale.h
Summary: dev-libs/STLport-5.2.1 does not compile using clang++ due to error in stlport...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michał Górny
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2012-01-24 05:52 UTC by Dmitry Potapov
Modified: 2017-05-07 07:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch that fixes the issue by including header with complete std::basic_string definition (stlport.patch,238 bytes, patch)
2012-01-24 05:54 UTC, Dmitry Potapov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Potapov 2012-01-24 05:52:19 UTC
stlport/stl/_locale.h includes stl/_string_fwd.h, which contains forward declaration of std::basic_string template, and instantiates it at line 155, which is not allowed in C++.
clang detects this situation and generates compilation error.
For unknown reason gcc passes this.

Reproducible: Always

Steps to Reproduce:
1. echo "#include <iostream>">main.cpp
2. clang++ -c main.cpp -isystem/usr/include/stlport


Actual Results:  
Successful compilation

Expected Results:  
Error occurs:
In file included from main.cpp:1:
In file included from /usr/include/stlport/iostream:43:
In file included from /usr/include/stlport/stl/_istream.h:27:
In file included from /usr/include/stlport/stl/_ios.h:23:
In file included from /usr/include/stlport/stl/_ios_base.h:30:
/usr/include/stlport/stl/_locale.h:155:39: error: implicit instantiation of undefined template 'stlp_std::basic_string<char, stlp_std::char_traits<char>, stlp_std::allocator<char> >'
      _M_throw_on_combine_error(__loc.name());
                                      ^
/usr/include/stlport/stl/_string_fwd.h:32:7: note: template is declared here
class basic_string;
      ^
1 error generated.
Comment 1 Dmitry Potapov 2012-01-24 05:54:22 UTC
Created attachment 299695 [details, diff]
patch that fixes the issue by including header with complete std::basic_string definition
Comment 2 Dmitry Potapov 2012-01-24 05:56:42 UTC
This issue has been reported in August 2011, but STLport maintainer was in bad mood and rejected bug report without issue investigation: http://sourceforge.net/tracker/?func=detail&aid=3400141&group_id=146814&atid=766244
Comment 3 Toralf Förster gentoo-dev 2014-12-10 12:20:12 UTC
I do get at a ~amd64:
x86_64-pc-linux-gnu-g++ -pthread -fexceptions  -fPIC   -fvisibility=hidden -O2 -pipe  -D_GNU_SOURCE -I../../stlport  -c -o obj/gcc/so/time_facets.o ../../src/time_facets.cpp
../../src/time_facets.cpp: In function ‘void stlp_std::priv::__write_formatted_timeT(stlp_std::priv::__basic_iostring<_CharT>&, const stlp_std::ctype<_CharT>&, char, char, const _TimeInfo&, const tm*)’:
../../src/time_facets.cpp:434:19: error: ‘const struct tm’ has no member named ‘__tm_gmtoff’
         diff = t->__tm_gmtoff;
                   ^
../Makefiles/gmake/targets.mak:123: recipe for target 'obj/gcc/so/time_facets.o' failed
make[1]: *** [obj/gcc/so/time_facets.o] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-libs/STLport-5.2.1-r2/work/STLport-5.2.1/build/lib'
Makefile:15: recipe for target 'all' failed
make: *** [all] Error 2
 * ERROR: dev-libs/STLport-5.2.1-r2::gentoo failed (compile phase):
 *   emake failed
Comment 4 David Seifert gentoo-dev 2017-04-05 17:21:01 UTC
Masked for removal.

commit 101473c8fcfd29edec481993247d3e5dac60d8b0
Author: David Seifert <soap@gentoo.org>
Date:   Wed Apr 5 19:14:18 2017 +0200

    profiles: Mask dev-libs/STLport for removal
    
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=359247
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=400547
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=409119
    Bug: https://bugs.gentoo.org/show_bug.cgi?id=594144
Comment 5 David Seifert gentoo-dev 2017-05-07 07:49:56 UTC
commit 967d0ecf3f118dae84b7d100d3464f26cc3d33f7
Author: David Seifert <soap@gentoo.org>
Date:   Sun May 7 09:47:53 2017 +0200

    dev-libs/STLport: Remove from tree