当前位置: 首页 > 第一原理 >thirdorder求解力常数

thirdorder求解力常数

作者 mujie2319
来源: 小木虫 350 7 举报帖子
+关注

在安装编译thirdorder的过程中,出现了错误。请问有人知道怎么解决吗?anaconda已经安装好


[slb@slb thirdorder]$ ./compile.sh
running build
running build_ext
building 'thirdorder_core' extension
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/lib64/python2.6/site-packages/numpy/core/include -I/home/slb/Desktop/spglib-1.11.2.1/include -I/usr/include/python2.6 -c thirdorder_core.c -o build/temp.linux-x86_64-2.6/thirdorder_core.o
thirdorder_core.c:559:27: error: spglib/spglib.h: No such file or directory
thirdorder_core.c: In function ‘__pyx_f_15thirdorder_core_18SymmetryOperations___spg_get_dataset’:
thirdorder_core.c:4895: error: ‘SpglibDataset’ undeclared (first use in this function)
thirdorder_core.c:4895: error: (Each undeclared identifier is reported only once
thirdorder_core.c:4895: error: for each function it appears in.)
thirdorder_core.c:4895: error: ‘__pyx_v_data’ undeclared (first use in this function)
thirdorder_core.c:4934: warning: implicit declaration of function ‘spg_get_dataset’
thirdorder_core.c:6011: warning: implicit declaration of function ‘spg_free_dataset’
thirdorder_core.c: In function ‘__pyx_f_5numpy_PyDataType_SHAPE’:
thirdorder_core.c:19446: warning: implicit declaration of function ‘PyDataType_HASSUBARRAY’
error: command 'gcc' failed with exit status 1 返回小木虫查看更多

今日热帖
  • 精华评论
  • Sahira

    最近才装过 但我忘了有没有这个报错了 给你顶顶

  • physicsshh

    请问您解决这个问题了吗?我现在也遇到了

  • get-it

    error: spglib/spglib.h: No such file or directory

    这不写了吗

  • Mr.linzh

    引用回帖:
    4楼: Originally posted by get-it at 2021-07-24 02:51:15
    error: spglib/spglib.h: No such file or directory

    这不写了吗

    然后呢?在setup.py里面已经定义了spglib.h的位置了,"/home/gengzi/apps/spglib/include",include目录下明明有spglib.h,为啥他说没有?

  • Mr.linzh

    引用回帖:
    5楼: Originally posted by Mr.linzh at 2021-11-15 23:18:16
    然后呢?在setup.py里面已经定义了spglib.h的位置了,"/home/gengzi/apps/spglib/include",include目录下明明有spglib.h,为啥他说没有?...

    哦,我知道了,得在include里面加一个spglib文件夹,把spglib.h复制到这个文件夹下面

  • valenhou001

    引用回帖:
    5楼: Originally posted by Mr.linzh at 2021-11-16 00:18:16
    然后呢?在setup.py里面已经定义了spglib.h的位置了,"/home/gengzi/apps/spglib/include",include目录下明明有spglib.h,为啥他说没有?...

    可能是spglib的版本有变化了的,早期版本中spglib.h放在了include/spglib/目录下,而新版本中放到了include/目录下。。将thirdorder_core.c里的第559行#include "spglib/spglib.h" 改为:  #include "spglib.h"

  • Sahira

    引用回帖:
    7楼: Originally posted by valenhou001 at 2022-08-18 18:11:59
    可能是spglib的版本有变化了的,早期版本中spglib.h放在了include/spglib/目录下,而新版本中放到了include/目录下。。将thirdorder_core.c里的第559行#include "spglib/spglib.h" 改为:  #inc ...

    太牛了!!感谢老师!!

猜你喜欢
下载小木虫APP
与700万科研达人随时交流
  • 二维码
  • IOS
  • 安卓