MNN icon indicating copy to clipboard operation
MNN copied to clipboard

编译MNN出错

Open wuxiaolianggit opened this issue 7 years ago • 11 comments

/wuxl/MNN/source/core/Backend.cpp:12:27: fatal error: MNN_generated.h: No such file or directory 请问大佬怎么解决 @ @nihui @llhe @intheway @li-qing @80945

wuxiaolianggit avatar Jul 25 '19 07:07 wuxiaolianggit

same problem. “MNN_generated.h”: No such file or directory. @li-qing windows10 + vs2019 + cmake3.14.4

yizhaoyanbo avatar Jul 25 '19 09:07 yizhaoyanbo

Have you run the ./schema/generate.sh script and generated the header files successfully?

/wuxl/MNN/source/core/Backend.cpp:12:27: fatal error: MNN_generated.h: No such file or directory 请问大佬怎么解决 @ @nihui @llhe @intheway @li-qing @80945

woodrocky avatar Jul 26 '19 00:07 woodrocky

chmod 777 schema/generate.sh
chmod 777 tools/converter/generate_schema.sh
./schema/generate.sh

then run start to cmake and make.

Sugaryou avatar Jul 27 '19 01:07 Sugaryou

Have you run the ./schema/generate.sh script and generated the header files successfully?

/wuxl/MNN/source/core/Backend.cpp:12:27: fatal error: MNN_generated.h: No such file or directory 请问大佬怎么解决 @ @nihui @llhe @intheway @li-qing @80945

I have tried to run the ./schema/generate.sh script. But error occurs as following: *** building flatc *** env: ‘bash’: No such file or directory *** cleaning up *** *** generating fbs under default *** xargs: ../../3rd_party/flatbuffers/tmp/flatc: No such file or directory ===> Generating Schema... *** building flatc *** env: ‘bash’: No such file or directory xargs: ../../3rd_party/flatbuffers/tmp/flatc: No such file or directory ./generate_schema.sh: line 39: ../../3rd_party/flatbuffers/tmp/flatc: No such file or directory ===> Done! *** done ***

windows10 + vs2019 + cmake3.14

yizhaoyanbo avatar Jul 27 '19 03:07 yizhaoyanbo

Have you run the ./schema/generate.sh script and generated the header files successfully?

/wuxl/MNN/source/core/Backend.cpp:12:27: fatal error: MNN_generated.h: No such file or directory 请问大佬怎么解决 @ @nihui @llhe @intheway @li-qing @80945

I have tried to run the ./schema/generate.sh script. But error occurs as following: *** building flatc *** env: ‘bash’: No such file or directory *** cleaning up *** *** generating fbs under default *** xargs: ../../3rd_party/flatbuffers/tmp/flatc: No such file or directory ===> Generating Schema... *** building flatc *** env: ‘bash’: No such file or directory xargs: ../../3rd_party/flatbuffers/tmp/flatc: No such file or directory ./generate_schema.sh: line 39: ../../3rd_party/flatbuffers/tmp/flatc: No such file or directory ===> Done! *** done ***

windows10 + vs2019 + cmake3.14

If you are are installing on windows, you should use nmake. Read the install_cn.md for details.

woodrocky avatar Jul 27 '19 16:07 woodrocky

@li-qing @woodrocky

我就是按照install_cn.md里面执行的,在nmake的时候总是报找不到MNN_generated.h头文件,请问是缺少其他必要的步骤吗?

image

yizhaoyanbo avatar Jul 31 '19 03:07 yizhaoyanbo

@li-qing @woodrocky

我就是按照install_cn.md里面执行的,在nmake的时候总是报找不到MNN_generated.h头文件,请问是缺少其他必要的步骤吗?

image

可以看一下这个帖子https://github.com/alibaba/MNN/issues/156#issuecomment-510958784,你应该遇到了同样的问题。./schema/generate.ps1并没有执行成功,需要先正确安装flatc.exe.

woodrocky avatar Jul 31 '19 04:07 woodrocky

@li-qing @woodrocky 我就是按照install_cn.md里面执行的,在nmake的时候总是报找不到MNN_generated.h头文件,请问是缺少其他必要的步骤吗? image

可以看一下这个帖子https://github.com/alibaba/MNN/issues/156#issuecomment-510958784,你应该遇到了同样的问题。./schema/generate.ps1并没有执行成功,需要先正确安装flatc.exe.

@woodrocky @li-qing 谢谢回答,我按照上面帖子里的编CPU顺利编过了,但是我想编支持VULKAN加速的库,我执行 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DMNN_VULKAN=ON .. 然后nmake的时候报错如下:

捕获

yizhaoyanbo avatar Jul 31 '19 06:07 yizhaoyanbo

@li-qing @woodrocky 我就是按照install_cn.md里面执行的,在nmake的时候总是报找不到MNN_generated.h头文件,请问是缺少其他必要的步骤吗?

可以看一下这个帖子https://github.com/alibaba/MNN/issues/156#issuecomment-510958784,你应该遇到了同样的问题。./schema/generate.ps1并没有执行成功,需要先正确安装flatc.exe.

@woodrocky @li-qing 谢谢回答,我按照上面帖子里的编CPU顺利编过了,但是我想编支持VULKAN加速的库,我执行 cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DMNN_VULKAN=ON .. 然后nmake的时候报错如下:

It seems GPU acceleration is not well supported on Windows. At least OPENCL is not supported on Windows now. But I am not sure about the VULKAN. Maybe you need to check the DOCS or ask the developer to make sure.

woodrocky avatar Jul 31 '19 16:07 woodrocky

目前vulkan还未在windows,linux验证过,看编译log,判断是一些语言特性不兼容导致。vulkan近期会做windows适配。

hacker-joe avatar Aug 01 '19 03:08 hacker-joe

chmod 777 schema/generate.sh
chmod 777 tools/converter/generate_schema.sh
./schema/generate.sh

then run start to cmake and make.

仍然无效,打开了脚本权限,然后执行出现

===> Generating Schema...
../../3rd_party/flatbuffers/tmp/flatc: 1: ../../3rd_party/flatbuffers/tmp/flatc: Syntax error: word unexpected (expecting ")")
./generate_schema.sh: 行 39: ../../3rd_party/flatbuffers/tmp/flatc: 无法执行二进制文件: 可执行文件格式错误
===> Done!

changkaizhao avatar Mar 25 '20 02:03 changkaizhao