octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error after 334119c390b3


From: Ben Abbott
Subject: error after 334119c390b3
Date: Sat, 04 Feb 2017 14:35:58 -0500

jwe,

After your recent changeset ...

http://hg.savannah.gnu.org/hgweb/octave/rev/334119c390b3

… I see the error at the bottom of this email on MacOS using Apple’s LLVM

g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.4.0
Thread model: posix
InstalledDir: 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

I’m out of know comfort-zone, but using google I found a fix indicating the 
headers below are needed.

#include <string>
#include <sstream>
#include <iostream>

The attached changeset fixed the problem for me. However, I don’t know if some 
CPP magic is needed to limit the change to MacOS or if it would be preferred if 
these headers were inside bp_table.h.

Ben

Attachment: changeset.patch
Description: Binary data


—————————
libinterp/parse-tree/bp-table.h:36:20: error: implicit instantiation of 
undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, 
std::__1::allocator<char> >'
static std::string bp_empty_string ("");
                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33:
 note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from libinterp/parse-tree/pt-jit.cc:32:
libinterp/parse-tree/bp-table.h:42:15: error: implicit instantiation of 
undefined template 'std::__1::basic_string<char, std::__1::char_traits<char>, 
std::__1::allocator<char> >'
  std::string cond;
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:193:33:
 note: template is declared here
    class _LIBCPP_TYPE_VIS_ONLY basic_string;
                                ^
In file included from libinterp/parse-tree/pt-jit.cc:32:
libinterp/parse-tree/bp-table.h:78:52: error: reference to type 'const 
std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> 
>') could not bind to an lvalue of type 'const char [1]'
  static intmap add_breakpoint (const std::string& fname = "",
                                                   ^       ~~
libinterp/parse-tree/bp-table.h:78:52: note: passing argument to parameter 
'fname' here
libinterp/parse-tree/bp-table.h:87:52: error: reference to type 'const 
std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> 
>') could not bind to an lvalue of type 'const char [1]'
  static int remove_breakpoint (const std::string& fname = "",
                                                   ^       ~~
libinterp/parse-tree/bp-table.h:87:52: note: passing argument to parameter 
'fname' here
libinterp/parse-tree/bp-table.h:80:52: warning: unused parameter 'condition' 
[-Wunused-parameter]
                                const std::string& condition = bp_empty_string)
                                                   ^
libinterp/parse-tree/bp-table.h:204:60: error: reference to type 'const 
std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> 
>') could not bind to an lvalue of type 'const char [1]'
extern octave_user_code *get_user_code (const std::string& fname = "");
                                                           ^       ~~
libinterp/parse-tree/bp-table.h:204:60: note: passing argument to parameter 
'fname' here
1 warning and 5 errors generated.
—————————

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]