为Yocto编译fortran似乎存在一些问题,
我配置了local.conf:
FORTRAN_forcevariable = ",fortran"
RUNTIMETARGET_append_pn-gcc-runtime = " libquadmath libgfortran"
IMAGE_INSTALL_append = " gfortran gfortran-symlinks libgfortran libgfortran-dev"
在编译期间我遇到了错误:
| make: *** [all] Error 2
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_compile (log file is located at /tmp/work/cortexa9hf-neon-poky-linux-gnueabi/gcc-runtime/6.2.0-r0/temp/log.do_compile.24985)
ERROR: Task (/sources/poky/meta/recipes-devtools/gcc/gcc-runtime_6.2.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3636 tasks of which 3570 didn't need to be rerun and 1 failed.
知道怎么解决吗?
答案 0 :(得分:0)
我在Rocko中也遇到了类似的错误。就我而言,我需要在imx6目标上使用fortran编译器,因此我为libgfortran.inc找到了patch,尽管在我而言,我通过libgfortran_7.3.bbappend配方覆盖了do_configure和do_compile函数。
我的配置已添加到local.conf:
# Enable fortran
IMAGE_FEATURES += "tools-sdk"
FORTRAN_forcevariable = ",fortran"
配置已添加到我的图像配方中:
FORTRAN_TOOLS = " \
gfortran \
gfortran-symlinks \
libgfortran \
libgfortran-dev \
"
IMAGE_INSTALL += "${FORTRAN_TOOLS}"
构建映像并启动目标后,我在目标imx6板上成功编译了Fortran代码。