[smartmontools-support] info about C++11 support

Niclas Borlin niclas.borlin at cs.umu.se
Mon Feb 26 16:00:20 CET 2018


On 02/26/2018 02:05 PM, Christian Franke wrote:
> Hi,
> 
> Niclas Borlin wrote:
>> A per the request of the configure script for smartmontools-6.6, here 
>> is the info (I think) you wanted.
> 
> Thanks for the info. Actually this is the very first report for this issue.
> 
>> ...
>> checking for g++ option to accept C++11... unknown
>> configure: error:
>> This version of smartmontools does not use C++11 features, but future
>> versions possibly will.
>> This script was unable to determine a compiler option to enable C++11.
>> Use option '--with-cxx11-option=OPTION' to specify the compiler option
>> (it will be checked, but not used in the actual build).
>> Use option '--without-cxx11-option' to suppress this error message if the
>> compiler lacks C++11 support.
>> In both cases, please send info about compiler and platform to
>> smartmontools-support at listi.jpberlin.de - Thanks!
>> ...
>>
>> eddie:~/src/smartctl/smartmontools-6.6> uname -a
>> Linux eddie 3.16.0-0.bpo.4-kirkwood #1 Debian 3.16.39-1+deb8u1~bpo70+1 
>> (2017-02-24) armv5tel GNU/Linux
> 
> Which kind of armv5tel hardware is this?

Hi Christian,

It's a D-link NAS DNS-320, converted to linux debian from a standard 
busybox distro. (Probably a rare beast; I had to solder an USB-to-TTL 
cable to coerce it to load something else. Will buy a more open-source 
NAS next time...)

This is the output of cat /proc/cpuinfo:

processor       : 0
model name      : Feroceon 88FR131 rev 1 (v5l)
BogoMIPS        : 792.57
Features        : swp half thumb fastmult edsp
CPU implementer : 0x56
CPU architecture: 5TE
CPU variant     : 0x2
CPU part        : 0x131
CPU revision    : 1

Hardware        : Marvell Kirkwood (Flattened Device Tree)
Revision        : 0000
Serial          : 0000000000000000

> 
>> eddie:~/src/smartctl/smartmontools-6.6> sudo lsb_release -a
>> No LSB modules are available.
>> Distributor ID: Debian
>> Description:    Debian GNU/Linux 7.11 (wheezy)
>> Release:        7.11
>> Codename:       wheezy
>>
>> eddie:~/src/smartctl/smartmontools-6.6> g++ --version
>> g++ (Debian 4.6.3-14) 4.6.3
>> ...
> 
> GCC 4.6 supports some C++11 subset with the -std=*++0x options:
> https://gcc.gnu.org/gcc-4.6/cxx0x_status.html
> 
> Please check which C++ level is reported in the __cplusplus macro, for 
> example:
> 
> $ echo 'level=__cplusplus' | g++ -std=c++0x -xc++ -E - | grep level
> level=201103L

$ echo 'level=__cplusplus' | g++ -std=c++0x -xc++ -E - | grep level
level=1

Full output:

$ echo 'level=__cplusplus' | g++ -std=c++0x -xc++ -E -
# 1 "<stdin>"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "<stdin>"
level=1

> Debian wheezy is still supported. This may be one reason to avoid C++11 
> features for the next release(s).

Well, cudos to you to warn that you might use such features in the 
future rather than just use it and break someones install.

> BTW, there may be also a GCC 4.7 available:
> https://packages.debian.org/wheezy/g++-4.7
> https://gcc.gnu.org/gcc-4.7/cxx0x_status.html

Thanks. Installed it (gcc, g++, cpp) via update-alternatives.

gcc --version gives gcc (Debian 4.7.2-5) 4.7.2

g++ --version gives g++ (Debian 4.7.2-5) 4.7.2

./configure now only warns about NVMe support.
make compiles fine.

./smartctl produces expected output

Looks like install gcc-4.7 + update-alternatives would have been a 
solution should you have used C++11 features.

> Thanks,
> Christian

Thanks,
/Niclas



More information about the Smartmontools-support mailing list