it looks like the standard is c++ 20. I am still getting the following
error message:
/usr/bin/cmake -S/home/albaro/drogon-assist
-B/home/albaro/drogon-assist/build --check-build-system
CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start
/home/albaro/drogon-assist/build/CMakeFiles
/home/albaro/drogon-assist/build//CMakeFiles/progress.marks
make  -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/home/albaro/drogon-assist/build'
make  -f CMakeFiles/drogon_assist.dir/build.make
CMakeFiles/drogon_assist.dir/depend
make[2]: Entering directory '/home/albaro/drogon-assist/build'
cd /home/albaro/drogon-assist/build && /usr/bin/cmake -E cmake_depends
"Unix Makefiles" /home/albaro/drogon-assist /home/albaro/drogon-assist
/home/albaro/drogon-assist/build /home/albaro/drogon-assist/build
/home/albaro/drogon-assist/build/CMakeFiles/drogon_assist.dir/DependInfo.cmake
--color=
Dependencies file
"CMakeFiles/drogon_assist.dir/drogon/assist/passwdhash.cpp.o.d" is newer
than depends file
"/home/albaro/drogon-assist/build/CMakeFiles/drogon_assist.dir/compiler_depend.internal".
Consolidate compiler generated dependencies of target drogon_assist
make[2]: Leaving directory '/home/albaro/drogon-assist/build'
make  -f CMakeFiles/drogon_assist.dir/build.make
CMakeFiles/drogon_assist.dir/build
make[2]: Entering directory '/home/albaro/drogon-assist/build'
[ 11%] Building CXX object
CMakeFiles/drogon_assist.dir/drogon/assist/passwdhash.cpp.o
/usr/bin/c++ -DHAS_YAML_CPP -I/usr/include/botan-2
-I/home/albaro/drogon-assist/. -std=gnu++20 -MD -MT
CMakeFiles/drogon_assist.dir/drogon/assist/passwdhash.cpp.o -MF
CMakeFiles/drogon_assist.dir/drogon/assist/passwdhash.cpp.o.d -o
CMakeFiles/drogon_assist.dir/drogon/assist/passwdhash.cpp.o -c
/home/albaro/drogon-assist/drogon/assist/passwdhash.cpp
/home/albaro/drogon-assist/drogon/assist/passwdhash.cpp: In function
‘std::string drassist::secureRandomString(size_t)’:
/home/albaro/drogon-assist/drogon/assist/passwdhash.cpp:20:15: error:
‘string_view’ does not name a type
   20 |         const string_view alphabet =
"1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
      |               ^~~~~~~~~~~
/home/albaro/drogon-assist/drogon/assist/passwdhash.cpp:24:22: error:
‘alphabet’ was not declared in this scope
   24 |                 ch = alphabet[secureRandom(0, alphabet.size())];
      |                      ^~~~~~~~
make[2]: *** [CMakeFiles/drogon_assist.dir/build.make:76:
CMakeFiles/drogon_assist.dir/drogon/assist/passwdhash.cpp.o] Error 1
make[2]: Leaving directory '/home/albaro/drogon-assist/build'
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/drogon_assist.dir/all]
Error 2
make[1]: Leaving directory '/home/albaro/drogon-assist/build'
make: *** [Makefile:136: all] Error 2

Thanks for pointing me in the right direction there might be a problem with
gcc.

On Mon, Jul 1, 2024 at 2:07 PM Paul Smith <psm...@gnu.org> wrote:

> On Mon, 2024-07-01 at 13:51 -0700, Albaro Pereyra wrote:
> > Thanks for reaching out.  I have reached out to the maintainers of
> > drogon-assist. They said it was out of their scope to diagnose the
> > issue with my make.  Basically saying it works on their computer and
> > don't know why it doesn't work on mine.  Is there a make discord
> > channel where they can offer programming help.  I think I found a bug
> > in WSL2 using the default which is Ubuntu. Basically it's not
> > recognizing the c++ standard and therefore fails to compile.  I will
> > copy and paste next time. I just like how my terminal looks after
> > installing oh-my-zsh.
>
> I'm sure it's very lovely to look at, but I can't read that screenshot
> in my mail client so I have no idea what error messages you're seeing.
>
> If the problem is that the compiler options you specified with cmake
> -DCMAKE_CXX_STANDARD=20 are not taking effect, then that's an issue
> with either cmake or the CMakeFiles.txt that are provided with drogon-
> assist (cmake generates makefiles, so if there's something wrong with
> the makefiles that cmake generates there's nothing make can do about
> that).
>
> I recommend you run "make VERBOSE=1" so that you can see the actual
> compile line that make is running and find out what arguments are being
> passed to the compiler (note, the "VERBOSE=1" option is a feature of
> cmake, not make: the makefiles cmake generates will show more details
> when you set that variable).
>
> Then ensure that you see the desired -std=c++20 compiler option, for
> example, which tells the compiler to use the C++20 standard.
>
> When reporting problems to whomever, you should also include the
> version of cmake you're using (run cmake --version) and the version of
> the compiler you're using (run g++ --version).
>
> However, none of the issues with the code, with the compiler, or with
> cmake are anything that GNU Make can control.  It just runs the
> makefiles it was given and invokes the tools it was told to invoke...
>

Reply via email to