Building TensorFlow using Borland 7 32 bits

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Building TensorFlow using Borland 7 32 bits

Post by Antonio Linares »

For 64 bits you can simply download the TensorFlow.dll from here:
http://ci.tensorflow.org/view/Nightly/j ... w-windows/

git.exe clone --progress -v "https://github.com/tensorflow/tensorflow" "C:\tensorflow"

If you use TortoiseGit then simply use https://github.com/tensorflow/tensorflow as the url

Add this line as the first line in tensorflow/c/c_api.h
#define COMPILER_MSVC

cd tensorflow

c:\tensorflow>c:\bcc7\bin\bcc32 -c -Ithird_party/eigen3 tensorflow/c/c_api.cc
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Building TensorFlow using Borland 7

Post by Antonio Linares »

c:\tensorflow>c:\bcc7\bin\bcc32 -c -Ithird_party/eigen3 tensorflow/c/c_api.cc
Embarcadero C++ 7.00 for Win32 Copyright (c) 1993-2015 Embarcadero Technologies, Inc.
tensorflow/c/c_api.cc:
Warning W8105 tensorflow/c/c_api.h 946: Constant member 'TF_WhileParams::ninputs' in class without constructors
Warning W8105 tensorflow/c/c_api.h 946: Constant member 'TF_WhileParams::cond_graph' in class without constructors
Warning W8105 tensorflow/c/c_api.h 946: Constant member 'TF_WhileParams::cond_inputs' in class without constructors
Warning W8105 tensorflow/c/c_api.h 946: Constant member 'TF_WhileParams::body_graph' in class without constructors
Warning W8105 tensorflow/c/c_api.h 946: Constant member 'TF_WhileParams::body_inputs' in class without constructors
Warning W8105 tensorflow/c/c_api.h 946: Constant member 'TF_WhileParams::body_outputs' in class without constructors
Fatal F1005 third_party/eigen3\unsupported/Eigen/CXX11/Tensor 1: Include files nested too deep
*** 1 errors in Compile ***
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Building TensorFlow using Borland 7 32 bits

Post by Antonio Linares »

Modifying c:\tensorflow\third_party\eigen3\unsupported\Eigen\CXX11\Tensor this way, it continues until next error

// #include "unsupported/Eigen/CXX11/Tensor"

#ifdef _WIN32
#ifndef SLEEP_FUNC_HEADER_GUARD
#define SLEEP_FUNC_HEADER_GUARD
#include <windows.h>
inline void sleep(unsigned int seconds) { Sleep(1000*seconds); }
#endif

// On Windows, Eigen will include Windows.h, which defines various
// macros that conflict with TensorFlow symbols. Undefine them here to
// prevent clashes.
#undef DeleteFile
#undef ERROR
#undef LoadLibrary
#endif // _WIN32
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Building TensorFlow using Borland 7 32 bits

Post by Antonio Linares »

At c:\tensorflow\tensorflow\core\framework\ I created a dummy file allocation_description.pb.h

allocation_description.pb.h
// dummy

it continues...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Building TensorFlow using Borland 7 32 bits

Post by Antonio Linares »

Trying to build it using MinGW gcc:

go.bat

Code: Select all

set path=c:\Qt\Tools\mingw530_32\bin
gcc -std=c++11 -I. -Ithird_party\eigen3 tensorflow/c/c_api.cc
These files are missing and must be created as empty files:
tensorflow/core/framework/allocation_description.pb.h
tensorflow/core/lib/core/error_codes.pb.h
tensorflow/core/framework/tensor.pb.h
tensorflow/core/framework/tensor_description.pb.h
tensorflow/core/framework/tensor_shape.pb.h
tensorflow/core/framework/types.pb.h
tensorflow/core/framework/attr_value.pb.h
tensorflow/core/framework/function.pb.h
tensorflow/core/framework/graph.pb.h
tensorflow/core/framework/op_def.pb.h
tensorflow/core/framework/versions.pb.h
tensorflow/core/protobuf/meta_graph.pb.h
tensorflow/core/framework/device_attributes.pb.h
tensorflow/core/protobuf/config.pb.h
tensorflow/core/framework/device_attributes.pb_text.h
tensorflow/core/framework/kernel_def.pb.h
tensorflow/core/framework/step_stats.pb.h
tensorflow/core/framework/node_def.pb.h

google/protobuf/arena.h
google/protobuf/compiler/importer.h
google/protobuf/descriptor.h
google/protobuf/io/coded_stream.h
google/protobuf/io/zero_copy_stream.h
google/protobuf/io/zero_copy_stream_impl_lite.h
google/protobuf/map.h
google/protobuf/repeated_field.h
google/protobuf/text_format.h
google/protobuf/util/json_util.h
google/protobuf/util/type_resolver_util.h
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Building TensorFlow using Borland 7 32 bits

Post by Antonio Linares »

regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply