Closed halogenandtoast closed 6 years ago
@halogenandtoast I am sorry for the issue.
I am very certain that this maybe because you might not be using the latest version of Tensorflow source.
I will try to install everything on a fresh Digital ocean droplet to test the issue.
Thanks
@halogenandtoast I have updated the install script . You can just run this script and it will properly install all the dependencies for Tensorflow and then install tensorflow.rb properly.
I have tested it on a fresh ubuntu instance too.
After that you can run bundle exec rake spec for the tests and they will pass.
If you face any issues feel free to comment below.
I still get the arithmetic issue. I wonder if it has anything to do with me being on OSX and using clang as a compiler instead of GCC?
@halogenandtoast I am almost certain that this might be the reason for your issue.
I am not very well versed with compilers but as of now that is all I can say.
@halogenandtoast - Did you find a way around this issue? Running into the same problem.
@memikequinn I've had no luck. Any hack I've put in place to get rid of this warning give me a gem that segfaults. I believe the segfault is related to:
[libprotobuf ERROR external/protobuf/src/google/protobuf/io/coded_stream.cc:208] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h.
@halogenandtoast Even I get a similar message when I do make
in the ext directory
./files/tf_tensor_helper.cc: In function ‘std::string tensorflow::String_decoder(TF_Tensor*)’:
./files/tf_tensor_helper.cc:274:38: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
auto src = (char *)(cbytes + 8);
But notice that this is just a warning and not an error.
While writing these functions there was no work around for this and since the intended function was working fine, I chose to ignore the warning.
I think maybe this is an issue with using clang compiler.
Right, part of the problem is performing arithmetic on a void pointer is undefined behavior which is probably compiler dependent. Is there a reason why these have to be initialized as void pointers? You can always cast them as the correct type (I assume char*) and typecast them to void when needed.
@halogenandtoast That has to do with the tensorflow internals and I can't comment on that.
I am assuming that if they have done it there is a very good reason for it or maybe it was simply unavoidable.
@halogenandtoast @Arafatk Was there ever any update/fix for this?
I'm trying to build on Sierra and still running into the same problem.
Repeating what I said over on #94 which I found first, but fixing the error itself is just a matter of casting before the additional, but I get the segfault as well.
I also get a ton of warnings, any of which could be the cause for the segfault (could also be none of them)... implicit casts from 64-bit to 32-bit types may be it - there's a lot of warnings for those.
Also have the same issue
compiling Tensorflow_wrap.cxx
make iIn file included from Tensorflow_wrap.cxx:2733:
././files/tf_tensor_helper.cc:29:9: warning: cannot delete expression with pointer-to-'void' type 'void *' [-Wdelete-incomplete]
delete[] data;
^ ~~~~
././files/tf_tensor_helper.cc:57:46: error: arithmetic on a pointer to void
*(char *)(buffer_data_pointer+i) = file_string[i];
~~~~~~~~~~~~~~~~~~~^
././files/tf_tensor_helper.cc:66:56: error: arithmetic on a pointer to void
buffer += *(char *)(buffer_data_pointer+i);
~~~~~~~~~~~~~~~~~~~^
././files/tf_tensor_helper.cc:294:39: error: arithmetic on a pointer to void
auto dst_str = (char *)(cbytes+8);
~~~~~~^
././files/tf_tensor_helper.cc:304:36: error: arithmetic on a pointer to void
auto src = (char *)(cbytes + 8);
~~~~~~ ^
nst1 warning and 4 errors generated.
make: *** [Tensorflow_wrap.o] Error 1
ioannis@MacBook-Pro tensorflow_c (master) ⚡️ g++ --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.38)
Target: x86_64-apple-darwin17.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
@halogenandtoast @msroot @trejkaz @memikequinn @AshtonO
I have made updates to the code.
Please try the installation process again and hopefully this should work out for you guys.
Feel free to reopen if you have any issues.
When running make I get the following errors:
If I typecast these to
char*
before the addition I can get the gem to build, but it segfaults when I try to do anything. For instance, here is the backtrace when I try to run the classify_image.rb example: