Question: no template "X" in namespace 'gsl::std'
JoshuaPettus opened this issue · comments
I'm certain this is a me issue as it use to compile not too long ago. Maybe it's a fedora 38 issue as I recently upgraded
I keep getting various errors like this when trying to compile:
openjk/lib/gsl-lite/include/gsl/gsl-lite.h:479:13: error: no template named 'reverse_iterator' in namespace 'gsl::std'; did you mean '::std::reverse_iterator'?
openjk/lib/gsl-lite/include/gsl/gsl-lite.h:483:22: error: no template named 'iterator_traits' in namespace 'gsl::std'; did you mean '::std::iterator_traits'?
openjk/lib/gsl-lite/include/gsl/gsl-lite.h:493:33: error: no type named 'nullptr_t' in namespace 'gsl::std'; did you mean '::std::nullptr_t'?
openjk/lib/gsl-lite/include/gsl/gsl-lite.h:765:46: error: no template named 'array' in namespace 'gsl::std'; did you mean '::std::array'?
openjk/lib/gsl-lite/include/gsl/gsl-lite.h:818:17: error: no member named 'wstring' in namespace 'gsl::std'
There are like 20 of these errors of various std libraries..all stemming from gsl-lite.h It's all very odd. I've tried clang and gcc and they both complain at the same point. Any ideas what maybe wrong with my environment now?
+1, also faced this using a fedora:38
container after installing all the dev dependencies and following the guidelines for building.
How reproducible:
$ podman run -it --rm --entrypoint bash -v "${PWD}":/Games:Z fedora:38
# dnf install cmake3 make gcc gcc-c++ glibc-devel libstdc++-devel libjpeg-turbo-devel libpng-devel zlib-devel libglvnd-devel SDL2-devel -y
# dnf groupinstall "Development tools" -y
# git clone https://github.com/JACoders/OpenJK.git <-- using master branch, no tags are being used for releasing here...
# cd OpenJK
# mkdir build
# <EDIT CMakeLists.txt to enable JK2 build>
# cd build
# cmake -DCMAKE_INSTALL_PREFIX=/Games/ja/GameData/ ..
# make
Seems likely no issues have been yet raised at https://github.com/microsoft/GSL about it
It builds using a fedora:37
container image, but then the running openjo_sp.x86_64
on my F38 PC fails with the following msg:
Could not open string package 'KEYNAMES'This option is not available. Please see --help for all possible usages.
Not sure what this is all about though:
$ ldd openjo_sp.x86_64
linux-vdso.so.1 (0x00007ffc6e9a3000)
libSDL2-2.0.so.0 => /lib64/libSDL2-2.0.so.0 (0x00007f142afd2000)
libz.so.1 => /lib64/libz.so.1 (0x00007f142afb8000)
libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f142ac00000)
libm.so.6 => /lib64/libm.so.6 (0x00007f142aed7000)
libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f142aeb3000)
libc.so.6 => /lib64/libc.so.6 (0x00007f142aa22000)
/lib64/ld-linux-x86-64.so.2 (0x00007f142b1c0000)
$ ls -l openjo_sp.x86_64
-rwxr-xr-x. 1 user user 1642856 2 mag 19.24 openjo_sp.x86_64
So it's an upstream issue that then effects fedora 38? Dang...Anything I can do?
Same issue trying to build on Arch via https://aur.archlinux.org/packages/openjk-git
Downgrading gcc
and gcc-libs
from 13.1.1-1 to 12.2.1-2 makes the repo compile again on Arch.
unfortunately upgraded gsl-lite seems to have removed string views entirely and string span is marked for deprecation.
so can there be a solution? Your linux compile release doesn't work on fedora38 because if differing dependency versions.
This was probably fixed when #1154 was merged.
Good call, will close this one.
Please re-open if you're still having issues with gsl(-lite).
Nope I'm good, JO and JK compiled fine on the last release! Thanks everyone!