BLESS安装方法

首先新建一个目录

mkdir bless_c++
cd bless_c++

然后把源码克隆到本地

git clone https://github.com/thirtyeggs/bless.git

进入目录,执行编译

cd bless
make -j8

编译报错

mpicxx kmc/kmc_api/kmc_file.o kmc/kmc_api/kmer_api.o kmc/kmc_api/mmer.o murmurhash3/MurmurHash3.o check_inputs.o correct_errors.o count_solid_kmers.o main.o parse_args.o -o bless ./boost/lib/libboost_filesystem.a ./boost/lib/libboost_system.a ./boost/lib/libboost_iostreams.a ./zlib/install/lib/libz.a -fopenmp -std=c++11
/usr/bin/ld: ./boost/lib/libboost_filesystem.a(operations.o): relocation R_X86_64_32 against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./boost/lib/libboost_filesystem.a(path.o): relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./boost/lib/libboost_system.a(error_code.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ./boost/lib/libboost_iostreams.a(mapped_file.o): relocation R_X86_64_32S against symbol `_ZNSs4_Rep20_S_empty_rep_storageE@@GLIBCXX_3.4' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
Makefile:10: recipe for target 'bless' failed
make: *** [bless] Error 1

进入Makefile文件查看问题

看样子是第十行有点问题

他这里说是执行到这一行的时候报错,让我们研究一下这一行具体做了什么

了解过Makefile的同学都知道,这一行实际意思就是将LAFLAGS这些库链接为$(OBJ)也就是bless,应该是整个编译过程比较靠后的位置,使用的编译器为mpicxx,那么这个mpicxx又是何方神圣呢

不妨新开一个终端,在命令行输入一下这个命令

mpicxx --version                                                                       master ✗
g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

查阅资料发现,这个其实就是编译链接使用c++开发的MPI项目,没听说过是干什么的(暴露了知识的贫乏),不过似乎感觉类似于g++

官网这里给出了一些参数,输入--help查看一下比较详细的情况

里面有一个pie参数

  -pie                     Create a position independent executable.

立刻想到之前的报错信息

/usr/bin/ld: ./boost/lib/libboost_filesystem.a(operations.o): relocation R_X86_64_32 against symbol `__pthread_key_create@@GLIBC_2.2.5' can not be used when making a PIE object; recompile with -fPIC

查阅资料发现PIE(Position-Independent-Executable)是位置无关的程序,产生的每一条指令,全部使用相对地址,可以被加载到内存的任意位置,就像共享库一样。那么在这个问题中,又是怎么回事呢?

看起来是要加上参数-fPIC,但是仔细一看,却发现真正的原因其实是boost库的问题,也就是那些.a文件不匹配,这些文件既然不匹配,那么推测就不能使用-fPIC参数,所以需要在编译参数中加上-no-pie即可

加上后果然正常了,不过发现cd到下面的目录又是相同的错误

只需要再次找到出错的Makefile位置即可

cd kmc
vim makefile

没有报错!已经正常安装了

试一下看看,成功了!

BLESS的安装---一个问题recompile with -fPIC的解决相关推荐

  1. WRF安装‘can not be used when making a PIE object; recompile with -fPIC‘ 错误解决

    在./compile em_real >& log.compile这一步编译的时候一直报错 搜索error发现均为PIE的问题:'can not be used when making ...

  2. 安装一个Excel插件,轻松网罗50+主流数据库

    电子表格软件(Smartbi Spreadsheet)是思迈特软件推出的企业报表产品,产品以"真Excel"为特色,只需要安装一个小小插件,就能解决Excel最头疼的数据连接和性能 ...

  3. Xavier(6):ubuntu18.04安装casadi 报错与解决(recompile with -fPIC)

    报错: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `N_VClone_Serial' which may bind externally ...

  4. 编译FCL库报错:recompile with -fPIC

    报错如下: Make error relocation R_X86_64_32 against `.text' can not be used when making a shared object; ...

  5. linux c gcc编译报错 can not be used when making a shared object; recompile with -fPIC

    目录 错误现象 错误原因 解决方法 PIC 简介 错误现象 使用 google protobuf 时,出现错误 /usr/bin/ld: /usr/local/lib/libprotobuf.a(me ...

  6. gcc报错 can not be used when making a shared object; recompile with -fPIC

    问题1:gcc报错 can not be used when making a shared object: recompile with -fPIC -fPIC 作用于编译阶段,告诉编译器产生与位置 ...

  7. jmeter mysql plugin_安装一个jmeter的插件--实现监控事务响应时间、tps等功能

    想安装一个jmeter的插件,到官网上去下载插件安装包,但是页面一直都是搜索状态不知道怎么解决,求助大神,知道了解决方法,来这里记录一下 1. 下载一个jmeter的插件管理工具  http://jm ...

  8. 台式计算机怎么加一个硬盘,如何再安装一个台式计算机硬盘驱动器?如何在计算机安装中添加额外的硬盘...

    如果台式计算机的硬盘运行时间较长,它将存储大量数据. 长时间后,硬盘空间将不足. 更换计算机将花费大量金钱. 实际上,我们可以在计算机上添加额外的硬盘以增加硬盘空间并加快系统速度. 那么如何再安装一个 ...

  9. python中安装一个第三方库的命令格式是-无法使用pip命令安装python第三方库的彻底解决方案...

    无法使用pip命令安装python第三方库的原因及解决方法 再dos中无法使用pip,命令主要是没有发现这个命令.我们先找到这个命令的位置,一般是在python里面的Scripts文件夹里面.我们可以 ...

最新文章

  1. OpenGL混合功能实例
  2. android 调用默认铃声后怎么改起始的默认选择位置?
  3. java判断字符串是否为数字或中文或字母
  4. LeetCode 616. 给字符串添加加粗标签(Trie树)
  5. 沉得住气的程序员们!
  6. 用电脑更新手机ios系统_macOS 11正式版:大更新!苹果把iOS风格搬到了电脑上
  7. ES6高级技巧(五)
  8. codeigniter中 get_instance()的应用
  9. vs 2017 调试中断问题
  10. 【计算机】数据结构-严蔚敏/清华大学P4
  11. 全民免费吃鸡,驱动人生带你玩转PUBG
  12. 快捷指令获取url内容_快捷指令,钢铁侠里的“贾维斯”
  13. cad批量打印_CAD批量打印插件的安装与使用方法
  14. VS2003添加.BMP资源
  15. html5中的function,js中function函数的使用方法
  16. 【渝粤教育】电大中专药理学基础 (2)_1作业 题库
  17. Python入门-网络编程
  18. cisco 三层交换机与二层交换机级联 vlan trunk
  19. 码支付源码完整版-安装环境配置
  20. base64图片转成文件流再转成链接 vue js

热门文章

  1. Haproxy基础知识
  2. 图解apk的打包过程
  3. Python下进程同步之互斥锁、信号量、事件机制
  4. WiFi认证过程需要的协议和服务
  5. 2022杭电多校第八场题解
  6. Python基本手册
  7. Camshift知识点
  8. mybatis报错:parameter ' ' not fount.Available parameters are [0, 1, param1, param2]
  9. 关于时区您了解多少呢?在中国我们使用的是哪个时区?
  10. python制作小提琴图