error: no template named 'set' in namespace 'std'; compiling on Windows

1,377 views
Skip to first unread message

pdfium_noob

unread,
Apr 19, 2018, 7:18:03 PM4/19/18
to pdfium
New to compiling PDFium and chromium. I get the compile error below when I run ninja -C pdfium. Any advice on solving this error would be greatly appreciated. Here are the steps I followed:

1. run gn args ./out and set arguments to the following:

# Build arguments go here.
# See "gn args <out_dir> --list" for available build arguments.
use_goma = false  # Googlers only. Make sure goma is installed and running first.
is_debug = true  # Enable debugging features.

pdf_use_skia = false  # Set true to enable experimental skia backend.
pdf_use_skia_paths = false  # Set true to enable experimental skia backend (paths only).

pdf_enable_xfa = false  # Set false to remove XFA support (implies JS support).
pdf_enable_v8 = false  # Set false to remove Javascript support.
pdf_is_standalone = true  # Set for a non-embedded build.
is_component_build = false # Disable component build (must be false)

clang_use_chrome_plugins = false  # Currently must be false.


2. run ninja -C ./out pdfium.and get the following compile error

ninja: Entering directory `./out'
[1/821] CXX obj/formfiller/cffl_checkbox.obj
FAILED: obj/formfiller/cffl_checkbox.obj 
../third_party/llvm-build/Release+Asserts/bin/clang-cl.exe /nologo /showIncludes  "-imsvcC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\ATLMFC\include" "-imsvcC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\include" "-imsvcC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-imsvcC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\ucrt" "-imsvcC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\shared" "-imsvcC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\um" "-imsvcC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt" "-imsvcC:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\cppwinrt" -DV8_DEPRECATION_WARNINGS -DUSE_AURA=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -D"CR_CLANG_REVISION=\"328716-2\"" -D_HAS_EXCEPTIONS=0 -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -DDEPRECATEDENUMERATOR(x)=[[deprecated(x)]] -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS -DPSAPI_VERSION=1 -DWIN32 -D_SECURE_ATL -D_USING_V110_SDK71_ -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=0x0A000002 -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -D_DEBUG -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -DV8_DEPRECATION_WARNINGS -DOPJ_STATIC -DPNG_PREFIX -DPNG_USE_READ_MACROS -D"FT_CONFIG_MODULES_H=\"freetype-custom-config/ftmodule.h\"" -D"FT_CONFIG_OPTIONS_H=\"freetype-custom-config/ftoption.h\"" -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DU_STATIC_IMPLEMENTATION -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=wchar_t -I.. -Igen -I.. -I../third_party/freetype/include -I../third_party/freetype/src/include -I../third_party/icu/source/common -I../third_party/icu/source/i18n /utf-8 /X -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=0 /Gy /FS /bigobj /d2FastFail /Zc:sizedDealloc- -fmsc-version=1911 -m64 /W4 -Wimplicit-fallthrough -Wthread-safety /WX /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4702 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-ignored-pragma-optimize /Od /Ob0 /GF /Z7 -fno-standalone-debug /MTd -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare /wd4267 /wd4324 /wd4577 /utf-8 -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare /TP /wd4577 /GR- /c ../fpdfsdk/formfiller/cffl_checkbox.cpp /Foobj/formfiller/cffl_checkbox.obj /Fd"obj/formfiller_cc.pdb"
In file included from ../fpdfsdk/formfiller/cffl_checkbox.cpp:7:
In file included from ..\fpdfsdk/formfiller/cffl_checkbox.h:10:
In file included from ..\fpdfsdk/formfiller/cffl_button.h:11:
In file included from ..\fpdfsdk/formfiller/cffl_formfiller.h:13:
In file included from ..\fpdfsdk/cpdfsdk_fieldaction.h:10:
In file included from ..\core/fxcrt/fx_string.h:10:
In file included from ..\core/fxcrt/bytestring.h:18:
In file included from ..\core/fxcrt/string_view_template.h:20:
..\third_party/base/stl_util.h(60,27):  error: no template named 'set' in namespace 'std'; did you mean 'get'?
  ScopedSetInsertion(std::set<T>* org_set, T elem)


Dan Sinclair

unread,
Apr 23, 2018, 12:08:52 PM4/23/18
to willem....@gmail.com, pdfium
It looks like you're using Windows, if you're building with visual sudio make sure you're using the correct version (Visual Studio 2017 update 3.x). Otherwise, it looks like your build environment can't find the standard libraries?

dan


--
You received this message because you are subscribed to the Google Groups "pdfium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
To post to this group, send email to pdf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/927f81d3-8e69-43ba-a322-f12e8235d1cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jian Zhong

unread,
Apr 27, 2020, 5:18:26 AM4/27/20
to pdfium
Hi, Run into this issue recently, search on the web without a solution.
have this issue been solved and how?
I appreciate you help.
Reply all
Reply to author
Forward
0 new messages