mattgodbolt / seasocks

Simple, small, C++ embeddable webserver with WebSockets support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Conan center build 1.4.5 failed

mattgodbolt opened this issue · comments

[...]
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found PythonInterp: /opt/pyenv/versions/3.7.13/bin/python (found version "3.7.13") 
-- Using Python: '/opt/pyenv/versions/3.7.13/bin/python'
-- Conan: Using autogenerated FindZLIB.cmake
-- Found ZLIB: 1.2.12 (found version "1.2.12") 
-- Library z found /home/conan/w/prod/BuildSingleReference/.conan/data/zlib/1.2.12/_/_/package/76f87539fc90ff313e0b3182641a9bb558a717d2/lib/libz.a
-- Found: /home/conan/w/prod/BuildSingleReference/.conan/data/zlib/1.2.12/_/_/package/76f87539fc90ff313e0b3182641a9bb558a717d2/lib/libz.a
-- Configuring done
-- Generating done
-- Build files have been written to: /home/conan/w/prod/BuildSingleReference/.conan/data/seasocks/1.4.5/_/_/build/a015930a9d9a9177506d380af2818c61ca961334

----Running------
> cmake --build '/home/conan/w/prod/BuildSingleReference/.conan/data/seasocks/1.4.5/_/_/build/a015930a9d9a9177506d380af2818c61ca961334' '--' '-j3'
-----------------
[  4%] Generating embedded content
Scanning dependencies of target embedded
[  8%] Building CXX object source_subfolder/src/main/web/CMakeFiles/embedded.dir/Embedded.cpp.o
[  8%] Built target embedded
Scanning dependencies of target seasocks
[ 20%] Building CXX object source_subfolder/src/main/c/CMakeFiles/seasocks.dir/HybiAccept.cpp.o
[ 20%] Building CXX object source_subfolder/src/main/c/CMakeFiles/seasocks.dir/Connection.cpp.o
[ 20%] Building CXX object source_subfolder/src/main/c/CMakeFiles/seasocks.dir/HybiPacketDecoder.cpp.o
source_subfolder/src/main/c/CMakeFiles/seasocks.dir/build.make:81: recipe for target 'source_subfolder/src/main/c/CMakeFiles/seasocks.dir/Connection.cpp.o' failed
CMakeFiles/Makefile2:953: recipe for target 'source_subfolder/src/main/c/CMakeFiles/seasocks.dir/all' failed
Makefile:148: recipe for target 'all' failed
seasocks/1.4.5: 
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_EXPORT_NO_PACKAGE_REGISTRY


In file included from /home/conan/w/prod/BuildSingleReference/.conan/data/seasocks/1.4.5/_/_/build/a015930a9d9a9177506d380af2818c61ca961334/source_subfolder/src/main/c/internal/HeaderMap.h:32:0,
                 from /home/conan/w/prod/BuildSingleReference/.conan/data/seasocks/1.4.5/_/_/build/a015930a9d9a9177506d380af2818c61ca961334/source_subfolder/src/main/c/Connection.cpp:28:
/home/conan/w/prod/BuildSingleReference/.conan/data/seasocks/1.4.5/_/_/build/a015930a9d9a9177506d380af2818c61ca961334/source_subfolder/src/main/c/./seasocks/StrCompare.h:5:23: fatal error: string_view: No such file or directory
compilation terminated.
make[2]: *** [source_subfolder/src/main/c/CMakeFiles/seasocks.dir/Connection.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [source_subfolder/src/main/c/CMakeFiles/seasocks.dir/all] Error 2
make: *** [all] Error 2
seasocks/1.4.5: ERROR: Package 'a015930a9d9a9177506d380af2818c61ca961334' build failed
seasocks/1.4.5: WARN: Build folder /home/conan/w/prod/BuildSingleReference/.conan/data/seasocks/1.4.5/_/_/build/a015930a9d9a9177506d380af2818c61ca961334
ERROR: seasocks/1.4.5: Error in build() method, line 75
	cmake.build()
	ConanException: Error 2 while executing cmake --build '/home/conan/w/prod/BuildSingleReference/.conan/data/seasocks/1.4.5/_/_/build/a015930a9d9a9177506d380af2818c61ca961334' '--' '-j3'

Missing <string_view> for that build ? odd

This is with GCC 5; so I guess we no longer support that

We only use <string_view> in one place, so we should probably remove that dependency...

That said we do:

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

and that apparently passed OK in GCC 5, so I don't know how it thinks it's c++17 capable without string_view

C++17 features are available since GCC 5. This mode is the default in GCC 11; it can be explicitly selected with the -std=c++17 command-line flag, or -std=gnu++17 to enable GNU extensions as well.

https://gcc.gnu.org/projects/cxx-status.html#cxx11 - so apparently them's the breaks. Argh. Will try a workaround.

commented

If it's only the string_view – rarely used at the moment – we can get away with it. But according to cppreference compiler support most of C++17 features are shipped by GCC 7 (incl. string_view).

So we might end in a situation where we use C++17, except most of it's features 😆 .

commented

We use inline variables too.

Got it. I found out how we can deny older versions in conan; so that's a route too

commented

So we can either support GCC < 7 (= C++14) or require GCC >= 7 (C++17).

Personally I'd prefer C++17 – almost the last but two standard – but I do not have a strong opinion here.

I guess, de facto our users must be GCC >= 7 here

commented

Can we close #175 and #176 then?

I guess so!