Closed aishmita-aggarwal closed 6 years ago
Hi Aishmita, This may be an issue with your c++ compiler.
Can you please tell me which version you are using? Also, can you please try using the install.sh script present in tools folder of the respository. Thanks
On Jul 4, 2017 4:47 AM, "Aishmita Aggarwal" notifications@github.com wrote:
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/somaticio/tensorflow.rb/issues/94, or mute the thread https://github.com/notifications/unsubscribe-auth/AKo3B33UKSTvH27NIHCI7a2VVniGI-Asks5sKiXjgaJpZM4ONP8e .
Getting the same compiler error here.
$ 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.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
I'm not so sure this is an issue with the compiler, so much as it's just that a newer version of the compiler started banning some questionable pointer arithmetic which this code happens to be doing.
e.g., if you change this:
auto dst_str = (char *)(cbytes+8);
To this:
auto dst_str = (char *)cbytes + 8;
Now you get one less error. The other 3 look like more or less the same thing.
Disclaimer: I don't know if that change I suggested means the same thing on all platforms, and also the library crashes for me after making this change, and I don't know whether that crash is due to this, or just because tensorflow itself is broken.
-- Control frame information -----------------------------------------------
c:0005 p:---- s:0044 e:000043 CFUNC :TF_NewTensor_wrapper
c:0004 p:0280 s:0035 e:000032 METHOD /usr/local/var/rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/tensorflow-0.0.1/lib/tensorflow/tensor.rb:59 [FINISH]
c:0003 p:---- s:0027 e:000026 CFUNC :new
c:0002 p:0629 s:0021 E:002698 EVAL classify_image.rb:71 [FINISH]
c:0001 p:0000 s:0003 E:0006e0 (none) [FINISH]
Ah, this issue is a duplicate of #84.
@aishmita-aggarwal @trejkaz @chrhansen I am incredibly sorry for the delayed response for this.
I couldn't replicate this issue on my machine before and therefore, I couldn't help you out.
I have updated the code to solve this issue and therefore I am closing this issue.
If the issue still persists feel free to reopen this and I will try my best to help you out.
Thanks
I am getting the following output on running 'make'
compiling Tensorflow_wrap.cxx In file included from Tensorflow_wrap.cxx:2733: ././files/tf_tensor_helper.cc:43:46: error: arithmetic on a pointer to void (char )(buffer_data_pointer+i) = file_string[i];