Google Tensorflow 源码编译(一):Protobuf<v3.0.0-alpha-3>
这几天终于把tensorflow安装上了,中间遇到过不少的问题,这里记录下来。供大家想源码安装的参考。
安装环境:POWER8处理器,Docker容器Ubuntu14.04镜像。
Build Protobuf<v3.0.0-alpha-3> for IBM POWER8 CPU from Source Code
My computer's os is ubuntu 14.04 , and I want to install protobuf v3.0.0-alpha-3, but there is no deb package in the repository, so I need to build from source code.
Here are the steps that I succeed to install protobuf<v3.0.0-alpha-3> on my computer:
1. Get source code
1.1 Get protobuf code
git clone https://github.com/google/protobuf
git checkout v3.0.0-alpha-3
1.2 Get gtest code
The latest protobuf version uses gmock, but v3.0.0-alpha-3 uses gtest. Anyway ,the following code always works!
git clone https://github.com/franramirez688/gmock(../ is the root path of protobuf)
cp ./gmock/gtest ../
2. Modify the code to support POWER cpu
2.1 Add g++ MACRO
in protobuf/src/google/protobuf/stubs/platform_macros.h:
change #elif defined(_POWER) to #elif defined(_POWER) || defined(__powerpc64__) || defined(__PPC64__).
2.2 Include power cpu header file
in protobuf/src/google/protobuf/stubs/atomicops.h, add:
if defined(GOOGLE_PROTOBUF_ARCH_POWER)
#include <google/protobuf/stubs/atomicops_internals_power.h>
endif
2.3 Add power cpu header file
add atomicops_internals_power.h to google/protobuf/stubs folder:
you can copy it from the latest version < v3.0.0-beta-1>
3. Compile source code
$ ./autogen.sh
$ ./configure
$ make
$ make install
4. the binary file <protoc> is saved at protobuf/src/protoc.
Google Tensorflow 源码编译(一):Protobuf<v3.0.0-alpha-3>的更多相关文章
- Google Tensorflow 源码编译(三):tensorflow<v0.5.0>
这几天终于把tensorflow安装上了,中间遇到过不少的问题,这里记录下来.供大家想源码安装的参考. 安装环境:POWER8处理器,Docker容器Ubuntu14.04镜像. Build Tens ...
- Google Tensorflow 源码编译(二):Bazel<v0.1.0>
这几天终于把tensorflow安装上了,中间遇到过不少的问题,这里记录下来.供大家想源码安装的参考. 安装环境:POWER8处理器,Docker容器Ubuntu14.04镜像. Build Baze ...
- tensorflow 源码编译tensorflow 1.1.0到 tensorflow 2.0,ver:1.1.0rc1、1.4.0rc1、1.14.0-rc1、2.0.0b1
目录 tensorflow-build table 更多详细过程信息及下载: tensorflow-build tensorflow 源码编译,提升硬件加速,支持cpu加速指令,suport SSE4 ...
- Tensorflow源码编译常见问题点总结
Tensorflow源码编译分两种:一种是本地源码编译,另一种是针对ARM平台的源码编译. 接下来分别介绍: 一.本地编译 本地编译时,使用的编译工具是本地GCC. 一般会碰到以下问题: 第1个:ex ...
- Ubuntu 16.04源码编译安装nginx 1.10.0
一.下载相关的依赖库 pcre 下载地址 http://120.52.73.43/jaist.dl.sourceforge.net/project/pcre/pcre/8.38/pcre-8.38.t ...
- Centos7下源码编译安装与配置redis5.0
1.下载redis5.0源码包 wget http://download.redis.io/releases/redis-5.0.5.tar.gz 2.检查是否安装过之前的历史版本 rpm -qa|g ...
- Tensorflow源码编译,解决tf提示未使用SSE4.1 SSE4.2 AVX警告【转】
本文转载自:https://blog.csdn.net/iTaacy/article/details/72799833 版权声明:欢迎转载,转载请注明出处! https://blog.csdn.net ...
- tensorflow 源码编译
https://blog.csdn.net/xsfl1234/article/details/67669707 https://blog.csdn.net/guxi123/article/detail ...
- TensorFlow 源码编译安装
## Install prerequisites (rhel) yum install numpy python-devel python-wheel python-mock ## Install B ...
随机推荐
- ASP.NET 程序中删除文件夹导致session失效解决问题
在Global中 Application_Start 添加 如: void Application_Start(object sender, EventArgs e) { //在 ...
- 向JS对象添加和删除事件
this.removeEventListener = function (obj, ename, func) { var store = obj[this.addEventListener.pre + ...
- Android碎片使用
首先新建一个fragment的布局文件, <?xml version="1.0" encoding="utf-8"?><LinearLay ...
- "struct"类型重定义解决办法
#ifndef 在头文件中的作用 在一个大的软件工程里面,可能会有多个文件同时包含一个头文件,当这些文件编译链接成一个可执行文件时,就会出现大量 “重定义”的错误. 在头文件中使用#ifndef #d ...
- ios基础篇(十六)——UIWebView的基本使用
UIWebView是内置的浏览器控件,可以用它来浏览网页.打开文档等.UIWebView是一个混合体,具体的功能控件内置的,实现一些基本的功能.UIWebView可以查看Html网页,pdf文件,do ...
- 反向Ajax,实现服务器向客户端推送消息
反向Ajax的基本概念是客户端不必从服务器获取信息,服务器会把相关信息直接推送到客户端.这样做的目的是解决Ajax传统Web模型所带来的一个限制:实时信息很难从技术上解决.原因是,客户端必须联系服务器 ...
- IEEE参考文献格式
IEEE参考文献格式 由于国外期刊参考文献与国内参考文献的格式有很大区别,其中最常用的参考文献为会议论文.书籍.期刊文献,所以特别在此记录说明,方便以后使用. 会议论文(Published Confe ...
- 两个小的java程序,用于练习java基本语法
1.输入两个数,求其加减乘除.用窗口的形式呈现 import javax.swing.JOptionPane; public class JJCC { public static void main( ...
- mysql表分区(摘自 MySQL表的四种分区类型)
一.什么是表分区通俗地讲表分区是将一大表,根据条件分割成若干个小表.mysql5.1开始支持数据表分区了. 如:某用户表的记录超过了600万条,那么就可以根据入库日期将表分区,也可以根据所在地将表分区 ...
- C++ friend keyword
You often need to split a class in half when the two halves will have different numbers of instances ...