adamrehn / ue4-opencv-demo

Demo for integrating OpenCV and UE4 using conan-ue4cli
40 stars 14 forks source link

Compilation error when rebuilding OpenCVDemo.uproject #2

Open rishik840 opened 5 years ago

rishik840 commented 5 years ago

The project could not be compiled. Would you like to open it in Null Source Code Access?

Running /home/collinsbook/UnrealEngine-release/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project="/home/collinsbook/UnrealEngine-release/Demos/ue4-opencv-demo-master/project/OpenCVDemo 4.23/OpenCVDemo.uproject" -TargetType=Editor -Progress -NoHotReloadFromIDE Scale at X=67.000000, Y=27.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000)) Scale at X=960.000000, Y=540.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000)) Scale at X=960.000000, Y=540.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000))

Running Mono...

Fixing inconsistent case in filenames. Setting up Mono ~/UnrealEngine-release/Engine ~/UnrealEngine-release/Engine/Binaries/Linux Using 'git status' to determine working set for adaptive non-unity build (/home/collinsbook/UnrealEngine-release). Creating makefile for OpenCVDemoEditor (no existing makefile) Configuration: [settings] arch=x86_64 arch_build=x86_64 build_type=Release compiler=clang compiler.libcxx=libc++ compiler.version=8 os=Linux os_build=Linux [options] [build_requires] [env] CC=/home/collinsbook/UnrealEngine-release/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/aarch64-unknown-linux-gnueabi/bin/clang CXX=/home/collinsbook/UnrealEngine-release/Engine/Extras/ThirdPartyNotUE/SDKs/HostLinux/Linux_x64/v15_clang-8.0.1-centos7/aarch64-unknown-linux-gnueabi/bin/clang++ Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/conans/client/command.py", line 1938, in run method(args[0][1:]) File "/usr/local/lib/python3.6/dist-packages/conans/client/command.py", line 478, in install lockfile=args.lockfile) File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 81, in wrapper return f(api, *args, **kwargs) File "/usr/local/lib/python3.6/dist-packages/conans/client/conan_api.py", line 558, in install recorder=recorder) File "/usr/local/lib/python3.6/dist-packages/conans/client/manager.py", line 47, in deps_install False, update, remotes, recorder) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_manager.py", line 110, in load_graph recorder, apply_build_requires=apply_build_requires) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_manager.py", line 236, in _resolve_graph graph_lock=graph_lock) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_manager.py", line 337, in _load_graph graph_lock) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_builder.py", line 39, in load_graph profile_host, graph_lock) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_builder.py", line 127, in _load_deps remotes, profile_host, new_reqs, new_options, graph_lock) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_builder.py", line 148, in _handle_require remotes, profile_host, graph_lock) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/graph_builder.py", line 315, in _create_new_node remotes, self._recorder) File "/usr/local/lib/python3.6/dist-packages/conans/client/graph/proxy.py", line 32, in get_recipe with layout.conanfile_write_lock(self._out): File "/usr/local/lib/python3.6/dist-packages/conans/util/locks.py", line 97, in enter save(self._count_file, "-1") File "/usr/local/lib/python3.6/dist-packages/conans/util/files.py", line 190, in save with open(path, "wb") as handle: PermissionError: [Errno 13] Permission denied: '/home/collinsbook/.conan/data/opencv-ue4/3.3.0/adamrehn/4.23.count'

ERROR: Unable to instantiate module 'OpenCVDemo': System.IO.FileNotFoundException: Could not find file "/home/collinsbook/UnrealEngine-release/Demos/ue4-opencv-demo-master/project/OpenCVDemo 4.23/conanbuildinfo.json" File name: '/home/collinsbook/UnrealEngine-release/Demos/ue4-opencv-demo-master/project/OpenCVDemo 4.23/conanbuildinfo.json' at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool) at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) [0x00067] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) [0x0000d] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.StreamReader..ctor (System.String path) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string) at System.IO.File.ReadAllText (System.String path) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at Tools.DotNETCommon.FileReference.ReadAllText (Tools.DotNETCommon.FileReference Location) [0x00000] in :0 at Tools.DotNETCommon.JsonObject.Read (Tools.DotNETCommon.FileReference File) [0x00000] in :0 at OpenCVDemo.ProcessDependencies (System.String depsJson, UnrealBuildTool.ReadOnlyTargetRules target) [0x00022] in <5fa1a1cc5250455c93a68785ada20eb5>:0 at OpenCVDemo..ctor (UnrealBuildTool.ReadOnlyTargetRules Target) [0x00083] in <5fa1a1cc5250455c93a68785ada20eb5>:0 at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <98fac219bd4e453693d76fda7bd96ab0>:0 (referenced via OpenCVDemoEditor.Target.cs)

I have all the appropriate configurations necessary. I have updated the conanfile to reflect the short version of unreal engine that I am using (4.23). I am not sure if this is a linker issue, a permission issue, or something else? Please help.

Thank you!

rishik840 commented 5 years ago

So I sort of resolved the Permission issue by using chmod -R 777 on the given file and the new log is as follows:

The project could not be compiled. Would you like to open it in Null Source Code Access?

Running /home/collinsbook/UnrealEngine-release/Engine/Binaries/DotNET/UnrealBuildTool.exe Development Linux -Project="/home/collinsbook/UnrealEngine-release/Demos/ue4-opencv-demo-master/project/OpenCVDemo 4.23/OpenCVDemo.uproject" -TargetType=Editor -Progress -NoHotReloadFromIDE Scale at X=67.000000, Y=27.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000)) Scale at X=960.000000, Y=540.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000)) Scale at X=960.000000, Y=540.000000: 1.000000 (monitor=#0, HDPI=96.000000 (horz scale: 1.000000), VDPI=96.000000 (vert scale: 1.000000))

Running Mono...

Fixing inconsistent case in filenames. Setting up Mono ~/UnrealEngine-release/Engine ~/UnrealEngine-release/Engine/Binaries/Linux Using 'git status' to determine working set for adaptive non-unity build (/home/collinsbook/UnrealEngine-release). Creating makefile for OpenCVDemoEditor (no existing makefile) ERROR: Unable to instantiate module 'OpenCVDemo': System.IO.FileNotFoundException: Could not find file "/home/collinsbook/UnrealEngine-release/Demos/ue4-opencv-demo-master/project/OpenCVDemo 4.23/conanbuildinfo.json" File name: '/home/collinsbook/UnrealEngine-release/Demos/ue4-opencv-demo-master/project/OpenCVDemo 4.23/conanbuildinfo.json' at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x0019e] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.IO.FileOptions options, System.String msgPath, System.Boolean bFromProxy, System.Boolean useLongPath, System.Boolean checkHost) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare,int,System.IO.FileOptions,string,bool,bool,bool) at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize, System.Boolean checkHost) [0x00067] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, System.Boolean detectEncodingFromByteOrderMarks, System.Int32 bufferSize) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.StreamReader..ctor (System.String path, System.Boolean detectEncodingFromByteOrderMarks) [0x0000d] in <98fac219bd4e453693d76fda7bd96ab0>:0 at System.IO.StreamReader..ctor (System.String path) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at (wrapper remoting-invoke-with-check) System.IO.StreamReader..ctor(string) at System.IO.File.ReadAllText (System.String path) [0x00000] in <98fac219bd4e453693d76fda7bd96ab0>:0 at Tools.DotNETCommon.FileReference.ReadAllText (Tools.DotNETCommon.FileReference Location) [0x00000] in :0 at Tools.DotNETCommon.JsonObject.Read (Tools.DotNETCommon.FileReference File) [0x00000] in :0 at OpenCVDemo.ProcessDependencies (System.String depsJson, UnrealBuildTool.ReadOnlyTargetRules target) [0x00022] in <5fa1a1cc5250455c93a68785ada20eb5>:0 at OpenCVDemo..ctor (UnrealBuildTool.ReadOnlyTargetRules Target) [0x00083] in <5fa1a1cc5250455c93a68785ada20eb5>:0 at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&) at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters, System.Boolean wrapExceptions) [0x00005] in <98fac219bd4e453693d76fda7bd96ab0>:0 (referenced via OpenCVDemoEditor.Target.cs)

I looked at your other issue and I am facing a similar issue but I am not sure if the conanbuildinfo.json is getting created the way you explained it.

adamrehn commented 4 years ago

The first error was clearly a permissions error regarding your Conan cache directory, as you noted. I can only assume that the permissions error was caused by you building the OpenCV package using sudo or copying the package cache from somewhere else.

The second set of output isn't showing any output from Conan whatsoever and then fails because the Conan output JSON file cannot be found, which suggests the conan install command isn't being triggered. Have you commented out the Process.Start() call in the OpenCVDemo class constructor at some point?