error after 334119c390b3

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

error after 334119c390b3

bpabbott
Administrator
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




—————————
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



changeset.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error after 334119c390b3

John W. Eaton
Administrator
On 02/04/2017 02:35 PM, Ben Abbott wrote:

> 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.

The changeset seems fine and doesn't need to be limited to MacOS.

I also checked in a changeset to include <string>  in bp-table.h and
also eliminate the bp_empty_string object.

Thanks,

jwe


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error after 334119c390b3

John W. Eaton
Administrator
On 02/04/2017 02:09 PM, John W. Eaton wrote:

> On 02/04/2017 02:35 PM, Ben Abbott wrote:
>> 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.
>
> The changeset seems fine and doesn't need to be limited to MacOS.

I pushed it.

jwe



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: error after 334119c390b3

bpabbott
Administrator

On Feb 8, 2017, at 7:36 PM, John W. Eaton <[hidden email]> wrote:

On 02/04/2017 02:09 PM, John W. Eaton wrote:
On 02/04/2017 02:35 PM, Ben Abbott wrote:
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.

The changeset seems fine and doesn't need to be limited to MacOS.

I pushed it.

jwe

Thanks

Ben

Loading...