[
https://issues.apache.org/jira/browse/SYSTEMML-1875?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16149507#comment-16149507
]
Nakul Jindal commented on SYSTEMML-1875:
----------------------------------------
Caffe2DML requires protoc v2.
Compiled `protoc` for `v2.4.1`, `v2.5.0` & `v2.6.1` for `ppc64le` and opened
[PR 28|https://github.com/os72/protoc-jar/pull/28]
Note : Compiling v2.5.0 for ppc64le was not straightforward. To reproduce:
1. In the {{protobuf/src/google/protobuf/stubs/}} folder, in the
{{platform_macros.h}} file, add a condition to detect {{ppc64le}}.
*Add these lines to the appropriate place:*
{code}
#elif defined(_POWER) || defined(__powerpc64__) || defined(__PPC64__)
#define GOOGLE_PROTOBUF_ARCH_POWER 1
#define GOOGLE_PROTOBUF_ARCH_64_BIT 1
#elif defined(__PPC__)
#define GOOGLE_PROTOBUF_ARCH_PPC 1
#define GOOGLE_PROTOBUF_ARCH_32_BIT 1
{code}
2. In the same directory in the {{atomicops.h}} file, add these lines to
include the powerpc include files:
{code}
#elif defined(GOOGLE_PROTOBUF_ARCH_PPC)
#include <google/protobuf/stubs/atomicops_internals_ppc_gcc.h>
{code}
3. Add the
[atomicops_internals_power.h|https://github.com/google/protobuf/blob/3.4.x/src/google/protobuf/stubs/atomicops_internals_power.h]
file to the {{protobuf/src/google/protobuf/stubs/}} directory.
+**Steps to Compile Protoc:**+
0. Install dependencies
([Instructions|https://github.com/google/protobuf/blob/master/src/README.md])
{{sudo apt-get install autoconf automake libtool curl make g++ unzip}}
1. get the latest version from git
{{git clone https://github.com/google/protobuf}}
2. setup autotools and make a build directory. I follow the convention of
calling it by the version.
{code}
cd protobuf
./autogen.sh
mkdir v3.4.0 && cd v3.4.0
{code}
Note : This step may fail for earlier versions of protobuf because the
{{autogen.sh}} script downloads the google tests and the URL hardcoded is
incorrect. You'll have to download the appropriate version yourself,
unzip/untar it and rename the directory to {{gtest}}.
3. configure the project to build in your build directory with static linking
in {{protobuf/v3.4.0/}}
{code}
mkdir RELEASE
../configure --disable-shared --prefix=/path/to/protobuf/v3.4.0/release
make -j
make check -j
make install-strip -j
{code}
Note : {{make -j}} is for parallel builds
4. Your resultant protobuf compiler should be in
{{protobuf/v3.4.0/RELEASE/bin/}}
To make sure there are no weird dependencies, use {{ldd}}.
On a powerpc machine, I see the following:
{code}
linux-vdso64.so.1 => (<address>)
libpthread.so.0 => /lib/powerpc64le-linux-gnu/libpthread.so.0 (<address>)
libstdc++.so.6 => /usr/lib/powerpc64le-linux-gnu/libstdc++.so.6 (<address>)
libgcc_s.so.1 => /lib/powerpc64le-linux-gnu/libgcc_s.so.1 (<address>)
libc.so.6 => /lib/powerpc64le-linux-gnu/libc.so.6 (<address>)
/lib64/ld64.so.2 (0x000000002a490000)
libm.so.6 => /lib/powerpc64le-linux-gnu/libm.so.6 (<address>)
{code}
>From this list, there seem to be no dependencies on anything that protobuf has
>built. That is what we are looking for.
> Support for ppc64le in Caffe2DML
> --------------------------------
>
> Key: SYSTEMML-1875
> URL: https://issues.apache.org/jira/browse/SYSTEMML-1875
> Project: SystemML
> Issue Type: Bug
> Reporter: Nakul Jindal
> Fix For: SystemML 1.0
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)