The port devel/electron6 fails to build for me using poudriere on my amd64 12-stable system. Below is an excerpt of the build log with the errors. In file included from ../../third_party/leveldatabase/port/port_chromium.cc:10: ../../third_party/snappy/src/snappy.h:76:59: error: unknown type name 'string'; did you mean 'std::string'? size_t Compress(const char* input, size_t input_length, string* output); ^~~~~~ std::string /usr/include/c++/v1/iosfwd:211:65: note: 'std::string' declared here typedef basic_string<char, char_traits<char>, allocator<char> > string; ^ In file included from ../../third_party/leveldatabase/port/port_chromium.cc:10: ../../third_party/snappy/src/snappy.h:85:19: error: unknown type name 'string'; did you mean 'std::string'? string* uncompressed); ^~~~~~ std::string /usr/include/c++/v1/iosfwd:211:65: note: 'std::string' declared here typedef basic_string<char, char_traits<char>, allocator<char> > string; ^ 2 errors generated. [7204/16384] c++ -MMD -MF obj/third_party/leveldatabase/leveldatabase/leveldb_chrome.o.d -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_COMPILE_LIBRARY -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\"361212-67510fac-4\" -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../.. -Igen -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -Igen/shim_headers/re2_shim -Igen/shim_headers/snappy_shim -I../../third_party/boringssl/src/include -fprofile-sample-use=../../chrome/android/profiles/afdo.prof -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -m64 -march=x86-64 -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -std=c++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -c ../../third_party/leveldatabase/leveldb_chrome.cc -o obj/third_party/leveldatabase/leveldatabase/leveldb_chrome.o [7205/16384] c++ -MMD -MF obj/third_party/leveldatabase/leveldatabase/env_chromium.o.d -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_COMPILE_LIBRARY -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\"361212-67510fac-4\" -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -I../.. -Igen -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -Igen/shim_headers/re2_shim -Igen/shim_headers/snappy_shim -I../../third_party/boringssl/src/include -fprofile-sample-use=../../chrome/android/profiles/afdo.prof -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -m64 -march=x86-64 -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wall -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -std=c++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -c ../../third_party/leveldatabase/env_chromium.cc -o obj/third_party/leveldatabase/leveldatabase/env_chromium.o [7206/16384] c++ -MMD -MF obj/components/services/leveldb/public/interfaces/interfaces/interfaces_jumbo_1.o.d -DUSE_AURA=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNO_UNWIND_TABLES -D_GNU_SOURCE -DCR_CLANG_REVISION=\"361212-67510fac-4\" -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_32 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_26 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DUSE_CHROMIUM_ICU=1 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -DLEVELDB_PLATFORM_CHROMIUM=1 -DLEVELDB_PLATFORM_CHROMIUM=1 -I. -I../.. -Igen -Igen/shim_headers/re2_shim -Igen/shim_headers/snappy_shim -I../../third_party/boringssl/src/include -I../../third_party/ced/src -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -I../../third_party/leveldatabase -I../../third_party/leveldatabase/src -I../../third_party/leveldatabase/src/include -fprofile-sample-use=../../chrome/android/profiles/afdo.prof -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -fno-unwind-tables -fno-asynchronous-unwind-tables -fPIC -pthread -fcolor-diagnostics -fmerge-all-constants -m64 -march=x86-64 -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes -Wall -Wextra -Wimplicit-fallthrough -Wthread-safety -Wextra-semi -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -std=c++14 -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -O2 -pipe -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -c gen/components/services/leveldb/public/interfaces/interfaces_jumbo_1.cc -o obj/components/services/leveldb/public/interfaces/interfaces/interfaces_jumbo_1.o In file included from gen/components/services/leveldb/public/interfaces/interfaces_jumbo_1.cc:5: In file included from ./gen/components/services/leveldb/public/interfaces/leveldb.mojom-test-utils.cc:16: In file included from gen/components/services/leveldb/public/interfaces/leveldb.mojom-test-utils.h:8: In file included from gen/components/services/leveldb/public/interfaces/leveldb.mojom.h:14: In file included from ../../base/callback.h:14: In file included from ../../base/callback_internal.h:14: In file included from ../../base/memory/ref_counted.h:19: In file included from ../../base/sequence_checker.h:10: In file included from ../../base/sequence_checker_impl.h:13: In file included from ../../base/synchronization/lock.h:11: ../../base/synchronization/lock_impl.h:71:12: warning: releasing mutex 'native_handle_' that was not held [-Wthread-safety-analysis] int rv = pthread_mutex_unlock(&native_handle_); ^ 1 warning generated. ninja: build stopped: subcommand failed. ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/devel/electron6 =>> Cleaning up wrkdir ===> Cleaning for electron6-6.1.6 build of devel/electron6 | electron6-6.1.6 ended at Thu Jan 23 09:45:11 EST 2020 build time: 00:44:09 !!! build failure encountered !!!
(In reply to Robert Cina from comment #0) This is the same issue as the one reported as PR 243509. https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243509 The patch committed with r523845 can be applied to this issue as well. https://svnweb.freebsd.org/ports?view=revision&revision=523845 I'm now asking a ports committer to review/commit some changes (including the patch) to electron ports.
@Christoph Could you look at this issue given you resolved bug 243509
A commit references this bug: Author: cmt Date: Sat Jan 25 21:00:23 UTC 2020 New revision: 524133 URL: https://svnweb.freebsd.org/changeset/ports/524133 Log: devel/electron6: copy snappy fix from chromium electron6 comes with two copies of the chromium source code, of which seemingly only one is fully used - at least, the embedded leveldb fails in only one place after the update of archivers/snappy (the system-provided headers didn't match the embedded snappy anymore). PR: 243544 Reported by: Robert Cina Changes: head/devel/electron6/files/patch-third__part_snappy_src_snappy.h
MFH not required - snappy didn't get MFHed, and electron6 isn't MFHed by default
fixing the build was easy enough. But looking at this - the brings two (wtf?) copies of the chromium source code, both of which are three major versions behind and thus vulnerable as ... well, I can't find any comparison I'd dare to put down in writing. Should we really have this just to support one more editor? (there's only editors/vscode as a dependency).
committed ports r524133