No template named 'allocator'; did you mean ::std::allocator


#1

I tried to include a file that includes the chaiscript code in another part of my system but when I went to compile I got numerous errors like the one in the subject line, others include 'no template named ‘enable_if’, no template named ‘is_random_access_iterator’ and so forth.

They’re all traced back to the standard deque header and presumably this is a namespace issue. However, it’s unclear to me how to fix this. I’ve tried adding using namespace std in a couple of likely (to me) places but to no avail.

Any ideas on how to fix this?


#2

This sounds very much like an issue that others have reported on the android system because it has broken/incomplete C++11 headers.

My hunch would be that in the particular file being compiled something is off with your C++11 options or standard library. Does that sound plausible? Can you confirm which compiler and command line options are being passed in?


#3

OS X 10.5, Xcode 7.2 with LLVM 7 configured to use C++11

Project generated by a tool called introducer (juce.com)

Hard to believe that headers would be missing.


#4

I’m going to strongly suggest that you look at the actual command line being executed. There’s probably something going on there. I’m extremely careful inside of ChaiScript to not muck with the compilation or introduce #defines that could screw things up.


#5

The compilation command line contains 3,193 characters. Without knowing what I’m looking for, that’s a chore not worth doing :slight_smile: The issue is most likely a dependency. I moved the #include of a file that #included the chaiscript stuff to a different place and the problem went away.

Sigh


#6

I kind of expected you to paste the command line here, for us to look at it together. What is the dependency that moving around changed things?


#7

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c++11 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -D_DEBUG=1 -DDEBUG=1 -DScriptingSystem -DJUCER_XCODE_MAC_F6D2F4CF=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.9 -g -fvisibility=hidden -fvisibility-inlines-hidden -Wno-sign-conversion -iquote /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/TheGigRack-generated-files.hmap -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/TheGigRack-own-target-headers.hmap -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/TheGigRack-all-target-headers.hmap -iquote /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/TheGigRack-project-headers.hmap -I/Volumes/HD2/src/Deskew/Projects/TheGigRack/Builds/MacOSX/build/Debug/include -I…/…/…/…/Libraries/VST3\ SDK -I…/…/JuceLibraryCode -I…/…/JUCE/modules -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/DerivedSources/x86_64 -I/Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/DerivedSources -Wreorder -F/Volumes/HD2/src/Deskew/Projects/TheGigRack/Builds/MacOSX/build/Debug -MMD -MT dependencies -MF /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/Objects-normal/x86_64/IOAudioProcessor.d --serialize-diagnostics /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/Objects-normal/x86_64/IOAudioProcessor.dia -c /Volumes/HD2/src/Deskew/Projects/TheGigRack/Source/Processors/IOAudioProcessor.cpp -o /Users/dhj/Library/Developer/Xcode/DerivedData/TheGigRack-bqhrofpvsiwniwbaerihgxhsnjqq/Build/Intermediates/TheGigRack.build/Debug/TheGigRack.build/Objects-normal/x86_64/IOAudioProcessor.o


#8

Sorry — figured it was too big. I don’t know what the dependency is — if I did, I could figure out the issue. I assumed that there was some unsatisfied dependency precisely because successful compilation was based on from where I included (indirectly) the chaiscript header.


#9

Out of curiosity, do you know what others did to fix the problem on android?