After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 733085 - Fail to build nemiver on FreeBSD with clang and libc++ because of std::tr1
Fail to build nemiver on FreeBSD with clang and libc++ because of std::tr1
Status: RESOLVED FIXED
Product: nemiver
Classification: Other
Component: general
trunk
Other FreeBSD
: Normal normal
: ---
Assigned To: Hubert Figuiere (:hub)
Nemiver maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-12 09:41 UTC by Ting-Wei Lan
Modified: 2016-11-03 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (7.30 KB, patch)
2016-10-31 03:26 UTC, Hubert Figuiere (:hub)
none Details | Review

Description Ting-Wei Lan 2014-07-12 09:41:10 UTC
FreeBSD 10.0 (or later version) uses clang and libc++ as default compiler and C++ standard library, instead of gcc and libstdc++. However, libc++ does not have std::tr1. It supports C++11 things. For example, libc++ does not have <tr1/unordered_map>, but it have it has <unordered_map>.




gmake[3]: Entering directory `/home/lantw44/gnome/source/nemiver/src/common'
  CXX      nmv-log-stream.lo
nmv-log-stream.cc:70:14: error: no member named 'tr1' in namespace 'std'
typedef std::tr1::unordered_map<std::string, bool> DomainMap;
        ~~~~~^
nmv-log-stream.cc:252:45: error: read-only variable is not assignable
        allowed_domains[NMV_GENERAL_DOMAIN] = true;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nmv-log-stream.cc:279:28: error: member reference base type 'DomainMap' (aka 'int') is not a structure or union
        if (allowed_domains.find ("all") == allowed_domains.end ()) {
            ~~~~~~~~~~~~~~~^~~~~
nmv-log-stream.cc:279:60: error: member reference base type 'DomainMap' (aka 'int') is not a structure or union
        if (allowed_domains.find ("all") == allowed_domains.end ()) {
                                            ~~~~~~~~~~~~~~~^~~~
nmv-log-stream.cc:280:32: error: member reference base type 'DomainMap' (aka 'int') is not a structure or union
            if (allowed_domains.find (a_domain.c_str ()) == allowed_domains.end ()) {
                ~~~~~~~~~~~~~~~^~~~~
nmv-log-stream.cc:280:76: error: member reference base type 'DomainMap' (aka 'int') is not a structure or union
            if (allowed_domains.find (a_domain.c_str ()) == allowed_domains.end ()) {
                                                            ~~~~~~~~~~~~~~~^~~~
nmv-log-stream.cc:408:52: error: read-only variable is not assignable
        m_priv->allowed_domains[a_domain.c_str ()] = true;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
nmv-log-stream.cc:410:32: error: member reference base type 'DomainMap' (aka 'int') is not a structure or union
        m_priv->allowed_domains.erase (a_domain.c_str ());
        ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
nmv-log-stream.cc:417:32: error: member reference base type 'DomainMap' (aka 'int') is not a structure or union
    if (m_priv->allowed_domains.find (a_domain.c_str ())
        ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
nmv-log-stream.cc:418:35: error: member reference base type 'DomainMap' (aka 'int') is not a structure or union
        != m_priv->allowed_domains.end ()) {
           ~~~~~~~~~~~~~~~~~~~~~~~^~~~
10 errors generated.
gmake[3]: *** [nmv-log-stream.lo] Error 1
gmake[3]: Leaving directory `/home/lantw44/gnome/source/nemiver/src/common'
Comment 1 Hubert Figuiere (:hub) 2016-10-31 03:26:53 UTC
Created attachment 338807 [details] [review]
Proposed patch

Proposed patch to remove all tr1 since c++11 is now required.
Comment 2 Hubert Figuiere (:hub) 2016-11-03 02:10:52 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.

commit bd59adfb0821461b829740d4a8d1e7c5ea895cb5
Comment 3 Hubert Figuiere (:hub) 2016-11-03 02:11:18 UTC
Please let us know if you encounter more problems building it.
Comment 4 Ting-Wei Lan 2016-11-03 17:34:45 UTC
Thanks for fixing this issue. Nemiver can be built on FreeBSD 11 with clang 3.8 now.