www/nginx-full failed with src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle'
Date: Fri, 28 Jul 2023 01:45:39 UTC
Hi, list www/nginx-full failed with "src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle'" : struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator ^ /usr/include/c++/v1/__config:808:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17' # define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED ^ /usr/include/c++/v1/__config:781:49: note: expanded from macro '_LIBCPP_DEPRECATED' # define _LIBCPP_DEPRECATED __attribute__((deprecated)) ^ 2 warnings generated. c++ -o buildout/nginx_dynamic/module_libpassenger_common/StrIntTools/StrIntUtilsNoStrictAliasing.o -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Wno-ambiguous-member-template -DUSE_VENDORED_LIBEV -Isrc/cxx_supportlib/vendor-copy/libuv/include -O2 -fno-strict-aliasing -fPIC -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-ambiguous-member-template -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -g -fno-limit-debug-info -Wno-unused-local-typedefs -Wno-format-nonliteral -DHAS_UNORDERED_MAP -c src/cxx_supportlib/StrIntTools/StrIntUtilsNoStrictAliasing.cpp mkdir -p buildout/nginx_dynamic/module_libpassenger_common/IOTools c++ -o buildout/nginx_dynamic/module_libpassenger_common/IOTools/IOUtils.o -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Wno-ambiguous-member-template -DUSE_VENDORED_LIBEV -Isrc/cxx_supportlib/vendor-copy/libuv/include -O -fPIC -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-ambiguous-member-template -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -g -fno-limit-debug-info -Wno-unused-local-typedefs -Wno-format-nonliteral -DHAS_UNORDERED_MAP -c src/cxx_supportlib/IOTools/IOUtils.cpp src/cxx_supportlib/IOTools/IOUtils.cpp:288:3: error: use of undeclared identifier 'random_shuffle' random_shuffle(result.begin(), result.end()); ^ 1 error generated. rake aborted! Command failed with status (1): [c++ -o buildout/nginx_dynamic/module_libpassenger_common/IOTools/IOUtils.o -Isrc/cxx_supportlib -Isrc/cxx_supportlib/vendor-copy -Isrc/cxx_supportlib/vendor-modified -Isrc/cxx_supportlib/vendor-modified/libev -Wno-ambiguous-member-template -DUSE_VENDORED_LIBEV -Isrc/cxx_supportlib/vendor-copy/libuv/include -O -fPIC -D_REENTRANT -I/usr/local/include -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -Wno-ambiguous-member-template -fvisibility=hidden -DVISIBILITY_ATTRIBUTE_SUPPORTED -DHAVE_ACCEPT4 -DHAS_SFENCE -DHAS_LFENCE -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS -g -fno-limit-debug-info -Wno-unused-local-typedefs -Wno-format-nonliteral -DHAS_UNORDERED_MAP -c src/cxx_supportlib/IOTools/IOUtils.cpp] /var/ports/work/usr/ports/www/nginx-full/work/passenger-6.0.17/build/support/cplusplus.rb:53:in `run_compiler' /var/ports/work/usr/ports/www/nginx-full/work/passenger-6.0.17/build/support/cplusplus.rb:104:in `compile_cxx' /var/ports/work/usr/ports/www/nginx-full/work/passenger-6.0.17/build/support/cplusplus.rb:162:in `block in define_cxx_object_compilation_task' Tasks: TOP => nginx:as_dynamic_module => nginx_dynamic_without_native_support => buildout/nginx_dynamic/module_libpassenger_common/IOTools/IOUtils.o (See full trace by running task with --trace) ===> Script "configure" failed unexpectedly. Please report the problem to joneum@FreeBSD.org [maintainer] and attach the "/var/ports/work/usr/ports/www/nginx-full/work/nginx-1.24.0/config.log" including the output of the failure of your make command. Also, it might be a good idea to provide an overview of all packages installed on your system (e.g. a /usr/local/sbin/pkg-static info -g -Ea). *** Error code 1 Stop. make: stopped in /usr/ports/www/nginx-full This is because c++ version updated to 16 ? As for [1], random_shuffle was deprecated in c++14 and completely removed in c++17. Incidentally, c++ version of 14.0-CURRENT (c5312bd79e66:2023-07-18) is 16.0.6 : root@jwebkx:~ # c++ --version FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git llvmorg-16.0.6-0-g7cbf1a259152) Target: x86_64-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin root@jwebkx:~ # [1] https://stackoverflow.com/questions/45013977/random-shuffle-is-not-a-member-of-std-error Regards --- Kazuhiko Kiriyama