LHAPDF configure error - 2020.01.02

Nah nah nah nah…
I don’t want to finish this blog anymore, cuz the problem is way beyond my skill set so far. Once I overcome it, I’ll revisit this blog then and post about what I do.
Thanks

1. What I was doing on this bloody night

Who knows!

  • OS = Ubuntu 18
  • gcc = 5.5.0
  • g++ = 5.5.0
  • LHAPDF = 6.2.3/6.2.1/6.1.6/6.1.5

1.1 Before I run into this error

别人都告诉我LHAPDF是比较容易装的,我记得我之前装LHAPDF的时候也不觉得难,直到我遇到了今天这台机器。

  • LHAPDF-6.2.3

最开始的时候是LHAPDF-6.2.3的安装遇到了问题。老老实实按照LHAPDF installation instructions一步一步来,configure、make、make install都没有遇到什么大问题,但是在调用lhapdf的时候很明显可以看出来LHAPDF没有安装对。

lhapdf install CT14lo
Traceback (most recent call last):
  File "/usr/local/bin/lhapdf", line 442, in <module>
    for pdf in get_installed_list(options.PDFDIR):
  File "/usr/local/bin/lhapdf", line 237, in get_installed_list
    import lhapdf
ImportError: libLHAPDF.so: cannot open shared object file: No such file or directory

lhapdf list也会给出同样的错误,说明LHAPDF出了问题。然而lhapdf -h则可以给出LHAPDF的帮助文档,说明LHAPDF只是没有安好,而不是没有安装上。尝试良久,但找不到破解的方法。
一直关照我的小老师提醒了一下,LHAPDF installation instructions上说可以立c++的flag“-std=c++11”。但尝试后就会发现,./configure时并没有-std这个选项,进而改为

./configure CPPFLAGS=c++11 --prefix=/path/for/installation

但结果会变得更加恐怖

$ ./configure CPPFLAGS=c++11 --prefix=/usr/local
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for sw_vers... no
checking for g++... g++
checking whether the C++ compiler works... no
configure: error: in `/media/ms/Research/PDFit/LHAPDF/LHAPDF-6.2.1':
configure: error: C++ compiler cannot create executables
See `config.log' for more details

最令人挠头的是我明明安装了gcc和g++,但终端却告诉我C++ compiler没在工作。至此,并不知道该怎么办。

  • LHAPDF-6.2.1
    小老师说,要不咱尝试一下别的版本,看看是不是LHAPDF-6.2.3太新了的缘故。

剩下的明天在写,谢谢!

  • LHAPDF-6.1.6/6.1.5

1.2 Cython Problem

2. What I vainly tried

2.1 for configuration error

2.2 for Cython shit

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是使用gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz交叉编译qt4.8.7的流程: 1. 下载并解压gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz和qt-everywhere-opensource-src-4.8.7.tar.gz 2. 配置环境变量,将交叉编译工具链的路径添加到PATH中: ``` export PATH=/path/to/gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf/bin:$PATH ``` 3. 进入qt-everywhere-opensource-src-4.8.7目录,运行./configure命令,配置Qt的编译选项: ``` ./configure -embedded arm -xplatform qws/linux-arm-gnueabi-g++ -prefix /usr/local/qt4.8.7-arm -no-gfx-linuxfb -no-gfx-multiscreen -no-gfx-transformed -depths all -no-qt3support -no-scripttools -no-openssl -no-nis -no-cups -no-iconv -no-pch -no-dbus -no-phonon -no-opengl -no-javascript-jit -no-webkit -no-qml-debug -no-separate-debug-info -no-exceptions -no-accessibility -no-script -no-stl -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon-backend -no-webkit-qml-plugin -no-declarative -no-declarative-debug -no-gif -no-libtiff -no-mng -no-openssl -no-glib -no-pulseaudio -no-gstreamer -no-alsa -no-sm -no-xinerama -no-xkb -no-xcursor -no-xfixes -no-xrandr -no-xrender -no-xshape -no-xinput -no-xkbcommon -no-xcb -no-xlib -no-kms -no-linuxfb -no-directfb -no-gfx-qvfb -no-largefile -no-nas-sound -no-webkitwidgets -no-javascriptcore -no-script -no-scripttools -no-xmlpatterns -no-svg -no-webkit -no-qml-debug -no-separate-debug-info -no-icu -no-openssl -no-sql-sqlite -no-sql-mysql -no-sql-odbc -no-sql-psql -no-sql-tds -no-tls ``` 参数说明: -embedded arm:选择Qt的嵌入式编译模式。 -xplatform qws/linux-arm-gnueabi-g++:指定交叉编译器和Qt平台的路径。 -prefix /usr/local/qt4.8.7-arm:指定Qt的安装路径。 其他参数是为了禁用不需要的模块和功能。 4. 运行make命令进行编译: ``` make ``` 5. 编译完成后,运行make install命令进行安装: ``` make install ``` 6. 将交叉编译后的Qt库拷贝到目标设备上,将头文件和库文件添加到交叉编译环境的搜索路径中。 7. 在交叉编译环境中使用qmake编译Qt应用程序: ``` /path/to/qt4.8.7-arm/bin/qmake make ``` 以上就是使用gcc-arm-10.2-2020.11-x86_64-aarch64-none-elf.tar.xz交叉编译qt4.8.7的流程。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值