Re: gcc-6 is c++14 by default, and hammer does not like it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 6, 2016 at 12:05 AM, kefu chai <tchaikov@xxxxxxxxx> wrote:
> hey cephers,
>
> just a heads up, for those who are using the bleeding edge
> compiler[1], hammer does not compile by default.
>
> i took a while to figure it out tonight. and seems the packaged
> liboost is now compiled using gcc6 with C++14 enabled, so the headers
> are found, but the source does not link with some libboost libraries
> if you pass 'CXXFLAGS=-std=c++98' to configure. and moreover, seems
> libstdc++ does not play well with hammer, i didn't root cause this.

With the following on F24 and gcc 6.1.1 I can successfully run run-make-check.sh
as long as I append -std=c++98 to CXXFLAGS.

$ git log --pretty=oneline -1
eb27865f268eaa4abc4e4b46354f1ea1556d1a5c Merge pull request #10750 from ceph/wip-14799-hammer

$ lsb_release -r
Release:        24

$ g++ -v 2>&1|tail -1
gcc version 6.1.1 20160621 (Red Hat 6.1.1-3) (GCC)

So this appears to have been fixed to at least some degree.

On older commits (such as tag 0.94.7 which I needed to compile on F24) however
you will want to backport 602425abd5cef741fc1b5d4d1dd70c68e153fc8d for the
_LARGEFILE64_SOURCE definition to fix xfs header compilation and for older
versions of rocksdb you may need to add -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS to
CXXFLAGS in rocksdb/configure.ac to enable the previous gcc header include
behaviour (as described by the document Kefu linked). You may also need to pass
"-std=gnu++98" early on the command line since libos_rocksdb_la_CXXFLAGS
includes "-std=gnu++11" so you can't have "-std=gnu++98" overriding that. I
found passing 'CXX="ccache g++ -std=gnu++98"' on the configure line worked
around that.

Oddly I didn't see any problems with the boost libraries.

HTH,
Brad

>
> at last, i cowardly used gcc-5 to compile hammer.
>
> ---
> [1] https://gcc.gnu.org/gcc-6/changes.html
>
> --
> Regards
> Kefu Chai
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Cheers,
Brad
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux