Ubuntu 15.04 clang++ 3.6 编译boost 1.59/1.55

Ubuntu 15.04已经可以直接通过apt-get insall 安装clang 3.6, 并且预装的gcc版本是4.9.2。这些安装过程在这里介绍。

首先下载boost源码

[plain] view plain copy

print?

  1. wget -O boost.1.59.tar.bz2 http://sourceforge.net/projects/boost/files/latest/download?source=files

解压

[plain] view plain copy

print?

  1. tar jxvf ./boost.1.59.tar.bz2

指定clang工具,生成编译脚本

[plain] view plain copy

print?

  1. ./bootstrap.sh --with-libraries=system,filesystem,log,atomic,thread,program_options --with-toolset=clang

编译并安装

[plain] view plain copy

print?

  1. ./b2 toolset=clang cxxflags="-std=c++11"
  2. sudo ./b2 install --prefix=/usr

等一会儿就好。

要注意的是,boost 1.59 似乎有问题,因为编译安装之后,我的一个简单的使用boost log的程序编译会报错,错误如下:

[plain] view plain copy

print?

  1. clang++ -g -std=c++11 -I../include -Wall -DBOOST_LOG_DYN_LINK -o
  2. ./object/main.cc.o -c ../src/main.cc In file included from
  3. ../src/main.cc:8: In file included from ../include/helper/logger.h:16:
  4. In file included from /usr/include/boost/log/sinks.hpp:25: In file
  5. included from /usr/include/boost/log/sinks/async_frontend.hpp:42: In
  6. file included from
  7. /usr/include/boost/log/sinks/unbounded_fifo_queue.hpp:29: In file
  8. included from /usr/include/boost/log/detail/event.hpp:25: In file
  9. included from /usr/include/boost/atomic/capabilities.hpp:18: In file
  10. included from /usr/include/boost/atomic/detail/platform.hpp:22:
  11. /usr/include/boost/atomic/detail/gcc-atomic.hpp:35:67: error: unknown
  12. type name ‘memory_order‘ BOOST_FORCEINLINE BOOST_CONSTEXPR int
  13. convert_memory_order_to_gcc(memory_order order) BOOST_NOEXCEPT
  14. /usr/include/boost/atomic/detail/gcc-atomic.hpp:37:22: error: use of
  15. undeclared identifier ‘memory_order_relaxed‘

当我降级到boost 1.55.0后,问题消失。

http://blog.csdn.net/csfreebird/article/details/48877657

时间: 2024-08-25 14:06:00

Ubuntu 15.04 clang++ 3.6 编译boost 1.59/1.55的相关文章

Ubuntu 15.04 clang++ 4.6 编译boost 1.59

Ubuntu 15.04已经可以直接通过apt-get insall 安装clang 3.6, 并且预装的gcc版本是4.9.2.这些安装过程在这里介绍. 首先下载boost源码 wget -O boost.1.59.tar.bz2 http://sourceforge.net/projects/boost/files/latest/download?source=files 解压 tar jxvf ./boost.1.59.tar.bz2 指定clang工具,生成编译脚本 ./bootstra

ubuntu 15.04 clang++ 3.6 编译cppcms1.0.5

首先下载cppcms库 wget -O cppcms-1.0.5.tar.bz2 http://downloads.sourceforge.net/project/cppcms/cppcms/1.0.5/cppcms-1.0.5.tar.bz2?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fcppcms%2Ffiles%2F&ts=1443867793&use_mirror=jaist 解压 tar jxvf cppcms-1.0.5.tar.bz

caffe学习笔记(1)安装 - Ubuntu 15.04

官方安装手册 备注:使用系统 - Ubuntu 15.04 64位操作系统(若系统位于虚拟机上,在安装CUDA后,Ubuntu将无法进入图形界面) /**************************************************/ //准备工作:CUDA,OpenBLAS,Boost, protobuf,OpenCV, Python /**************************************************/ 方法一: Ubuntu系统上安装ca

Ubuntu 15.04 + CUDA7.5 + Caffe 配置笔记

Ubuntu 15.04 + CUDA7.5 + Caffe 配置笔记 一.Ubuntu 安装 安装Ubuntu 15.04x64 + Win7x64 双系统,让二者在启动引导上相互隔离, 删除Ubuntu时不至Win7躺枪,就必须讲究安装方法. 最最最简单的就是使用EasyBCD安装.这可以将Ubuntu的启动引导Grub2安装在其自己的boot分区,而Win7的启动引导则安装在C盘或其保留分区,相互不干扰,不存在用Ubuntu引导Win7启动的问题. 这个策略非常干净,不存在安装完Win7可

Caffe + Ubuntu 15.04 + CUDA 7.0 安装以及配置

作为小码农的我,昨天就在装这个东东了,主要参考第一篇博文,但是过程发现很多问题,经过反反复复,千锤百炼,终于柳暗花明,我把这个caffe给搞定了,是故,我发布出来,后之来者,欲将有感于斯文~ 本分分为四个部分,在Ubuntu上调试运行成功,第一部分:nVidia驱动和CUDA Toolkit的安装和调试:第二部分 Python安装和调试:第三部分 Matlab安装和调试:第四部分 Caffe的安装和测试. 第一部分:nVidia驱动和CUDA Toolkit的安装和调试 这里以CUDA 7.0为

【转载】如何在 Ubuntu 15.04/CentOS 7 中安装 Lighttpd Web 服务器

Lighttpd 是一款开源 Web 服务器软件.Lighttpd 安全快速,符合行业标准,适配性强并且针对高配置环境进行了优化.相对于其它的 Web 服务器而言,Lighttpd 占用内存更少:因其对 CPU 占用小和对处理速度的优化而在效率和速度方面从众多 Web 服务器中脱颖而出.而 Lighttpd 诸如 FastCGI.CGI.认证.输出压缩.URL 重写等高级功能更是那些面临性能压力的服务器的福音. 以下便是我们在运行 Ubuntu 15.04 或 CentOS 7 Linux 发行

ubuntu 15.04 使用

全文目录: 一.经典菜单兼容       1.安装gnome2风格的UBUNTU MATE2.安装经典菜单指示器二.更改语言1.汉化环境2.安装搜狗输入法.农历3.加装字体4.添加右键菜单打开终端,扩展 Nautilus 的功能:三.通用软件推荐1.安装GIMP图片编辑器2.安装rar解压功能3.安装字典软件4.wine运行MS Windows程序5.安装虚拟软件Virtualbox6.安装永中办公套件7.安装WPS Office8.安装英语阅读软件9.安装okular10.安装系统指示器Sys

Caffe + Ubuntu 15.04 + CUDA 7.5 新手安装配置指南

Caffe + Ubuntu 15.04 + CUDA 7.5 新手安装配置指南 特: 0. Caffe 官网地址:http://caffe.berkeleyvision.org/ 1. 本文为作者亲自实验完成,但仅限用于学术交流使用,使用本指南造成的任何不良后果由使用者自行承担,与本文作者无关,谢谢!为保证及时更新,转载请标明出处,谢谢! 2. 本文旨在为新手提供一个参考,请高手勿要吐槽,有暴力倾向者,请绕道,谢谢! 3. 本文使用2015年11月8日下载的caffe-master版本,运行平

ubuntu 15.04 安装real vnc

在ubuntu 15.04中安装real vnc,首先到网站下一个real vnc下来,链接如下: http://www.realvnc.com/download/viewer/ ubuntu的话就是用.deb数据包64位的进行安装,红帽的就是用RPM安装包. 安装完成使用命令导入注册序列号: sudo vnclicense -add 84WFN-YRJ4C-WA44V-9BW6X-PAE2A 这个是在百度上找的,得多谢原作者分享这个序列号 在vnc下面使用命令vncserver-x11-ser