Installing Root using Linux Subsystem on Windows: “error: no member named 'fgetws' in the global namespace”

I am trying to install ROOT (6.10.08) on a Linux Subsystem on Windows (Ubuntu 16.04), as described here. When I try to build root (cmake --build .), 69% through the build, I run into the following problem:

[ 69%] Generating G__ODBC.cxx, …/…/lib/libRODBC_rdict.pcm, …/…/lib/libRODBC.rootmap
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:40:
In file included from /usr/include/c++/5/bits/char_traits.h:40:
In file included from /usr/include/c++/5/bits/postypes.h:40:
/usr/include/c++/5/cwchar:143:11: error: no member named ‘fgetws’ in the global namespace
using ::fgetws;
~~^
/usr/include/c++/5/cwchar:145:11: error: no member named ‘fputws’ in the global namespace
using ::fputws;
~~^
/usr/include/c++/5/cwchar:149:11: error: no member named ‘getwc’ in the global namespace
using ::getwc;
~~^
/usr/include/c++/5/cwchar:150:11: error: no member named ‘getwchar’ in the global namespace
using ::getwchar;
~~^
/usr/include/c++/5/cwchar:155:11: error: no member named ‘putwc’ in the global namespace
using ::putwc;
~~^
/usr/include/c++/5/cwchar:156:11: error: no member named ‘putwchar’ in the global namespace
using ::putwchar;
~~^
/usr/include/c++/5/cwchar:158:11: error: no member named ‘swprintf’ in the global namespace
using ::swprintf;
~~^
/usr/include/c++/5/cwchar:167:11: error: no member named ‘vswprintf’ in the global namespace
using ::vswprintf;
~~^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:43:
In file included from /usr/include/c++/5/bits/localefwd.h:40:
/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:52:23: error: use of undeclared identifier ‘uselocale’
extern “C” __typeof(uselocale) __uselocale;
^
/usr/include/x86_64-linux-gnu/c++/5/bits/c++locale.h:62:11: error: unknown type name ‘__locale_t’
typedef __locale_t __c_locale;
^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:43:
In file included from /usr/include/c++/5/bits/localefwd.h:42:
/usr/include/c++/5/cctype:87:11: error: no member named ‘isblank’ in the global namespace
using ::isblank;
~~^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
In file included from /usr/include/c++/5/bits/basic_string.h:39:
In file included from /usr/include/c++/5/ext/atomicity.h:35:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:148:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:35:
In file included from /mnt/c/MinGW/include/pthread.h:76:
/mnt/c/MinGW/include/_ptw32.h:55:4: error: “Please upgrade your GNU compiler to one that supports __declspec.”
^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
In file included from /usr/include/c++/5/bits/basic_string.h:39:
In file included from /usr/include/c++/5/ext/atomicity.h:35:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr.h:148:
In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/gthr-default.h:35:
In file included from /mnt/c/MinGW/include/pthread.h:179:
/mnt/c/MinGW/include/time.h:383:1: error: unknown type name ‘__MINGW_IMPORT’
__MINGW_IMPORT char *tzname[2];
^
/mnt/c/MinGW/include/time.h:383:16: error: expected unqualified-id
__MINGW_IMPORT char *tzname[2];
^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
In file included from /usr/include/c++/5/bits/basic_string.h:5249:
In file included from /usr/include/c++/5/ext/string_conversions.h:41:
/usr/include/c++/5/cstdlib:126:11: error: no member named ‘at_quick_exit’ in the global namespace
using ::at_quick_exit;
~~^
/usr/include/c++/5/cstdlib:149:11: error: no member named ‘quick_exit’ in the global namespace
using ::quick_exit;
~~^
/usr/include/c++/5/cstdlib:241:11: error: no member named ‘atoll’ in the global namespace
using ::atoll;
~~^
/usr/include/c++/5/cstdlib:262:22: error: no member named ‘atoll’ in namespace ‘__gnu_cxx’
using ::__gnu_cxx::atoll;
~~~~~~~~~~~~~^
In file included from input_line_2:2:
In file included from /usr/include/c++/5/string:52:
/usr/include/c++/5/bits/basic_string.h:5402:51: error: no member named ‘vswprintf’ in namespace ‘std’
{ return __gnu_cxx::__to_xstring(&std::vswprintf, 4 * sizeof(int),
~~~~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]

*** Break *** segmentation violation

I’m a beginner and am following the steps as closely as I can. I was wondering if anyone could offer advice as to the errors I am running into, and potential fixes.

Thanks!

Hi,

Are you using the Linux sub-system or MingW on Windows? It looks like you’re mixing both and I’m not sure this will work…

Cheers, Bertrand.

I’m using a Linux subsystem

Then why do you get this error?

I wish I had good answer for you. I launched “Bash on Ubuntu on Windows,” use sudo to install the necessary prereqs for Ubuntu, then followed the steps under Quick Start by downloading the source file, and when I try to build it, that’s the error I’m running into.

So it looks like there is a mix of Linux include path and MingW, making gcc picking some wrong include files…

Do you have any advice as to how to go about fixing this issue?

Try to remove /mnt/c/MinGW/include from your include PATH. I’ll check on my own Windows 10 Linux sub-system if I can give more information…

@Jane_Tran can you provide the results of a printenv command? This might make it easier for us to see if there is an issue with the paths.

Here’s the output of printenv:

$ printenv
MANPATH=/home/Jane/root/builddir/man:/usr/local/man:/usr/local/share/man:/usr/share/man:/mnt/c/Users/Jane/Anaconda3/man:/mnt/c/Users/Jane/Anaconda3/Library/share/man:/mnt/c/Program Files/CMake/man
SHELL=/bin/bash
TERM=xterm-256color
OLDPWD=/mnt/c/Windows/System32
USER=Jane
NAME=Jane-PC
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:.tar=01;31:.tgz=01;31:.arc=01;31:.arj=01;31:.taz=01;31:.lha=01;31:.lz4=01;31:.lzh=01;31:.lzma=01;31:.tlz=01;31:.txz=01;31:.tzo=01;31:.t7z=01;31:.zip=01;31:.z=01;31:.Z=01;31:.dz=01;31:.gz=01;31:.lrz=01;31:.lz=01;31:.lzo=01;31:.xz=01;31:.bz2=01;31:.bz=01;31:.tbz=01;31:.tbz2=01;31:.tz=01;31:.deb=01;31:.rpm=01;31:.jar=01;31:.war=01;31:.ear=01;31:.sar=01;31:.rar=01;31:.alz=01;31:.ace=01;31:.zoo=01;31:.cpio=01;31:.7z=01;31:.rz=01;31:.cab=01;31:.jpg=01;35:.jpeg=01;35:.gif=01;35:.bmp=01;35:.pbm=01;35:.pgm=01;35:.ppm=01;35:.tga=01;35:.xbm=01;35:.xpm=01;35:.tif=01;35:.tiff=01;35:.png=01;35:.svg=01;35:.svgz=01;35:.mng=01;35:.pcx=01;35:.mov=01;35:.mpg=01;35:.mpeg=01;35:.m2v=01;35:.mkv=01;35:.webm=01;35:.ogm=01;35:.mp4=01;35:.m4v=01;35:.mp4v=01;35:.vob=01;35:.qt=01;35:.nuv=01;35:.wmv=01;35:.asf=01;35:.rm=01;35:.rmvb=01;35:.flc=01;35:.avi=01;35:.fli=01;35:.flv=01;35:.gl=01;35:.dl=01;35:.xcf=01;35:.xwd=01;35:.yuv=01;35:.cgm=01;35:.emf=01;35:.ogv=01;35:.ogx=01;35:.aac=00;36:.au=00;36:.flac=00;36:.m4a=00;36:.mid=00;36:.midi=00;36:.mka=00;36:.mp3=00;36:.mpc=00;36:.ogg=00;36:.ra=00;36:.wav=00;36:.oga=00;36:.opus=00;36:.spx=00;36:.xspf=00;36:
HOSTTYPE=x86_64
PATH=/home/Jane/root/builddir/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/ProgramData/Oracle/Java/javapath_target_3469109:/mnt/c/Program Files/Java/jdk1.8.0_101/bin:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/mnt/c/Program Files/Git/cmd:/mnt/c/MinGW/bin:/mnt/c/Program Files (x86)/Skype/Phone:/mnt/c/Python27/python:/mnt/c/Program Files/MATLAB/R2017a/runtime/win64:/mnt/c/Program Files/MATLAB/R2017a/bin:/mnt/c/Program Files (x86)/Common Files/Propellerhead Software/ReWire:/mnt/c/Program Files/Common Files/Propellerhead Software/ReWire:/mnt/c/Users/Jane/Anaconda3:/mnt/c/Users/Jane/Anaconda3/Scripts:/mnt/c/Users/Jane/Anaconda3/Library/bin:/mnt/c/Users/Jane/AppData/Local/Microsoft/WindowsApps:/mnt/c/texlive/2016/bin/win32:/mnt/c/MinGW/bin:/mnt/c/Program Files/CMake/bin
G4PIIDATA=/home/Jane/geant4/geant4.10.3-install/share/Geant4-10.3.3/data/G4PII1.3
PWD=/home/Jane
LANG=en_US.UTF-8
ROOTSYS=/home/Jane/root/builddir
SHLVL=1
HOME=/home/Jane
DYLD_LIBRARY_PATH=/home/Jane/root/builddir/lib
PYTHONPATH=/home/Jane/root/builddir/lib
LOGNAME=Jane
LESSOPEN=| /usr/bin/lesspipe %s
SHLIB_PATH=/home/Jane/root/builddir/lib
CMAKE_PREFIX_PATH=/home/Jane/root/builddir
DISPLAY=localhost:0
LESSCLOSE=/usr/bin/lesspipe %s %s
_=/usr/bin/printenv

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.