Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building Error? #8

Closed
AFWSI opened this issue Aug 3, 2018 · 34 comments
Closed

Building Error? #8

AFWSI opened this issue Aug 3, 2018 · 34 comments

Comments

@AFWSI
Copy link

AFWSI commented Aug 3, 2018

I’m assuming I need the QT 5.11.1 for windows(2.4 GB) installer from here
https://www1.qt.io/offline-installers/?hsLang=en to install the proper qt5? Also, can visual studio 2017 be used to build this? Most of what I’m seeing in the code says visual studio 2015.

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

OK, I think I finally got QT5 installed. Why am I getting this cmake error?

cmake_meshroom_error

@AFWSI AFWSI changed the title Building? Building Error? Aug 4, 2018
@fabiencastan
Copy link
Member

You called cmake with a relative path which is supposed to point to the qmlAlembic repo.
But currently you are in qmlAlembic and call it with "..".
So run: md build && cd build first.

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

@fabiencastan OK, that works. I'm now getting this.

cmake_meshroom_error_2

Is this a version error? Shouldn't I have the right version when I did this for alicevision?

vcpkg install ^
          boost-algorithm boost-accumulators boost-atomic boost-container boost-date-time boost-exception boost-filesystem boost-graph boost-log ^
          boost-program-options boost-property-tree boost-ptr-container boost-regex boost-serialization boost-system boost-test boost-thread ^
          openexr ^
          openimageio[libraw] ^
          alembic ^
          geogram ^
          eigen3 ^
          ceres[suitesparse] ^
          cuda ^
          --triplet x64-windows

Since you have been posting on the thread on blender artist, I'm sure you have seen my building progress post. I think I got everything working now, just trying to figure out these plugins now.

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

OK, I think it just built successfully. I realized I had to do "x64" to make it work.

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

@fabiencastan Maybe not. It doesn't seem to be loading. This is what I have in the install folder.

meshroom_plugin_issue

I set this

QML2_IMPORT_PATH=C:\meshroom-git\MeshroomPlugins\QmlAlembicPlugin\qml

Edit:
I tried again and noticed this

ILMBASE_ROOT is undefined

Does that have something to do with it not working?

@fabiencastan
Copy link
Member

Could you launch it with these env variables defined?

set QT_DEBUG_PLUGINS=1
set QML_IMPORT_TRACE=1

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

That didn't help any.

@fabiencastan
Copy link
Member

It enables verbose logging from Qt regarding plugins loading, so we should be able to see what's wrong in the log now.

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

OK, I just did only set QT_DEBUG_PLUGINS=1 and I found something.

cmake_meshroom_error_3

@fabiencastan
Copy link
Member

Did you have Alembic dll in your PATH?

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

meshroom? or the plugin?

alembic_dll

@fabiencastan
Copy link
Member

When you launch Meshroom, it will load the plugin with the current environment. So you need to have Alembic.dll in your PATH.
You can check your plugin dll with depends to see if there is a pbl.

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

I will have to read up on that. I'm not sure exactly what you mean by "Alembic.dll in your PATH".

@AFWSI
Copy link
Author

AFWSI commented Aug 4, 2018

OK, so I checked the plugin dll with depends and there seems to be a issue ,but it's all foreign to me.

plugin_error

@zvrba
Copy link
Member

zvrba commented Aug 5, 2018

There's a warning sign by qt5qml.dll. Alembic seems fine.

@AFWSI
Copy link
Author

AFWSI commented Aug 5, 2018

@zvrba So is this a path issue to qt5? I'm doing set QT_DIR=C:\Qt\Qt5.11.1\5.11.1\msvc2017_64 I'm not sure what I should do now.

This is what I get when I do the cmake.. step and then the nmake install.
It does say ILMBASE_ROOT is undefined I'm not sure if this is part of the problem or not.
cmake_meshroom_error_4

This is what I have in the qmlAlembic > build > src folder.
cmake_meshroom_error_5

@zvrba
Copy link
Member

zvrba commented Aug 5, 2018

qt5qml.dll is a part of qt and it doesn't seem to be found. Try doing in addition set PATH=%PATH%;C:\Qt\Qt5.11.1\5.11.1\msvc2017_64 (possibly also \bin to the path if the DLLs aren't in the original path) before running the program. Additionally, you probably need to set qml plugin dir, but I have no idea which environment variable is that.

I thought that meshroom had some .bat file to set all environment variables properly...

@yann-lty
Copy link
Member

yann-lty commented Aug 5, 2018

When launching Meshroom, everything related to Qt is correctly setup (otherwise Meshroom won't even show up). depends is not launched in the same context and only knows about libraries next to the library you're inspecting, that's why qt5qml.dll is not found.
I'm not sure what's preventing the plugin to be loaded.
You should only have the installed folder of vcpkg in your PATH to launch everything.

@yann-lty
Copy link
Member

yann-lty commented Aug 5, 2018

And also, Qt dlls are located in the Pyside2 package, you're not supposed to add your local installation of Qt in the path for Meshroom to run.

@AFWSI
Copy link
Author

AFWSI commented Aug 5, 2018

@yann-lty I think I'm more confused now. What do you mean by this? You should only have the installed folder of vcpkg in your PATH to launch everything. To get meshroom to even work, I copied everything from the AliceVision Release folder to the meshroom folder. You can see it in one of my post above.

Would my exact steps I did for AliceVision, meshroom, and qmlAlembic help out any?

@yann-lty
Copy link
Member

yann-lty commented Aug 5, 2018

Yes sorry, I wrote a little too fast, I actually meant having AliceVision build folder in your PATH is all you need, not vcpkg installed folder.
Adding to the PATH simply means you just need to write something like this in the terminal before starting Meshroom:

set PATH=\path\to\AliceVision\build\Windows-AMD64\Release\;%PATH%

On your side, you copied the result of AliceVision build in the meshroom folder, which also works because current directory is automatically added to the PATH.
After that, the only thing you should need to do (from the terminal, in meshroom directory) is:

# Add qmlAlembicPlugin to the QML2_IMPORT_PATH for the plugin to be loaded at Meshroom startup
set QML2_IMPORT_PATH=\path\to\qmlAlembic\install\qml
# Add current directory (%CD%) to PYTHONPATH, so the Python package `meshroom` can be used.
set PYTHONPATH=%CD%
# Launch meshroom
python meshroom/ui

But I think you did something pretty similar to this, since the qmlAlembic plugin is found but fails to load.
Is there any step you did differently ?

@AFWSI
Copy link
Author

AFWSI commented Aug 5, 2018

@yann-lty As far as I know, the only thing I did different was copying the AliceVision build to the meshroom folder.
Does the set PATH=\path\to\AliceVision\build\Windows-AMD64\Release\;%PATH% have to be ran every time you launch meshroom? I deleted everything that was related to AliceVision in the meshroom folder and did the set PATH=\path\to\AliceVision\build\Windows-AMD64\Release\;%PATH%, the next time I tried to launch meshroom it didn't load the pictures. When copying everything to the meshroom folder, it works every time.

Still not understanding the plugin not loading. Do you see anything that I have posted that would keep it from loading? Is it not finding the plugin path?

What exactly does this do? I can't tell that it does anything.

Under Usage for qmlAlembic
set QML2_IMPORT_PATH=<INSTALL_PATH>/qml;%QML2_IMPORT_PATH%

Then this for meshroom
QML2_IMPORT_PATH=/path/to/qmlAlembic/install/qml

@AFWSI
Copy link
Author

AFWSI commented Aug 5, 2018

Here is kinda what I did for building everything.

Getting and building MeshRoom 

Creating folders for the project
•	Create a folder called meshroom-git, located here C:\
•	Create a folder called meshroomplugins, located here C:\meshroom-git
•	Create a folder called qmlalembicplugin, located here C:\meshroom-git\meshroomplugins

vcpkg
Getting and setting up vcpkg 
•	cd C:\meshroom-git
•	git clone --recursive git://github.com/Microsoft/vcpkg
•	cd vcpkg
•	.\bootstrap-vcpkg.bat
•	.\vcpkg integrate install

AliceVision
Getting AliceVision 
•	cd C:\meshroom-git
•	git clone --recursive git://github.com/alicevision/aliceVision
Getting AliceVision’s dependencies using vcpkg
•	cd C:\meshroom-git\vcpkg
•	set VCPKG_ROOT=%cd%
•	vcpkg install ^
          boost-algorithm boost-accumulators boost-atomic boost-container boost-date-time boost-exception boost-filesystem boost-graph boost-log ^
          boost-program-options boost-property-tree boost-ptr-container boost-regex boost-serialization boost-system boost-test boost-thread ^
          openexr ^
          openimageio[libraw] ^
          alembic ^
          geogram ^
          eigen3 ^
          ceres[suitesparse] ^
          cuda ^
          --triplet x64-windows
Building AliceVision
•	"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64 -vcvars_ver=14.0
•	cd C:\meshroom-git\AliceVision
•	mkdir build && cd build
•	cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -G "Visual Studio 14 2015" -A x64 -T v140,host=x64
•	Open the aliceVision.sln located in here C:\meshroom-git\AliceVision\build.
•	Change the Solution Configuration to Release. In Solution Explorer select INSTALL(Visual Studio 2015). Then go to Build and select Build INSTALL.


MeshRoom
Getting meshroom 
•	cd C:\meshroom-git
•	git clone --recursive git://github.com/alicevision/meshroom

Setting up meshroom 
•	cd C:\meshroom-git\meshroom
•	pip install -r requirements.txt
•	Copy everything from inside here C:\meshroom-git\AliceVision\build\Windows-AMD64\Release to here C:\meshroom-git\meshroom

Setting up Environment Variables
•	Go to Control Panel > System and Security > System > Advanced system settings > Advanced > Environment Variables
•	Click “Add” under user variables for (insert name), Variable Name =  QML2_IMPORT_PATH, Variable Value = C:\meshroom-git\meshroomplugins\qmlalembicplugin\qml
•	Click “Add” under user variables for (insert name), Variable Name =  ALICEVISION_SENSOR_DB, Variable Value = C:\meshroom-git\AliceVision\src\aliceVision\sensorDB\sensor_width_camera_database.txt
Running meshroom
•	cd C:\meshroom-git\meshroom
•	set PYTHONPATH=%CD% && python meshroom/ui

 
qmlAlembic Plugin
Getting qmlAlembic plugin 
•	cd C:\meshroom-git
•	git clone --recursive git://github.com/alicevision/qmlAlembic
Building qmlAlembic plugin
•	cd C:\meshroom-git\qmlAlembic
•	"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
•	mkdir build && cd build
•	set QT_DIR=C:\Qt\Qt5.11.1\5.11.1\msvc2017_64
•	set VCPKG_ROOT=C:\meshroom-git\vcpkg
•	cmake .. -DCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%\scripts\buildsystems\vcpkg.cmake -DCMAKE_PREFIX_PATH=%QT_DIR% -DVCPKG_TARGET_TRIPLET=x64-windows -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX= C:\meshroom-git\meshroomplugins\qmlalembicplugin -DCMAKE_BUILD_TYPE=Release
•	nmake install

Here is the AlembicEntity folder within the qml folder, if anybody wants to see if it works for them.

AlembicEntity.zip

@3Descape Did you have this much trouble. I see in your youtube video, you seem to have no issues with it loading.

@yann-lty
Copy link
Member

yann-lty commented Aug 5, 2018

I could load your plugin without any issue in my setup.
My guess would be that there is something in your PATH that conflicts. In Dependency Walker (depends), were some of the Qt libraries found somewhere on your system or were they all like QT5QML.dll, marked as "not found" ?

@AFWSI
Copy link
Author

AFWSI commented Aug 5, 2018

@yann-lty I'm getting different results now with depends. I've tried so many things, I'm prolly getting farther away from getting it to work. At least it doesn't seem to be a problem with the plugin.
meshroom_plugin_error

If I go to Control Panel > System and Security > System > Advanced system settings > Advanced > Environment Variables and add "C:\Qt\Qt5.11.1\5.11.1\msvc2017_64\bin" under "path"
meshroom_plugin_error_1

If I delete "C:\Qt\Qt5.11.1\5.11.1\msvc2017_64\bin" and replace with "C:\meshroom-git\meshroom" I get.
plugin_error

I don't know if this tells you anything or not.

If you look there's ?s beside a bunch of stuff that says "API-MS-WIN-CORE", "EXT-MS-WIN", and "EXT-MS-ONECORE" could this be why it doesn't work?

@AFWSI
Copy link
Author

AFWSI commented Aug 6, 2018

@yann-lty Any more ideas? I did the debug again and I noticed more that's not in the screenshot above. It's kinda frustrating. You seem to have it working ,but it won't load for me. Did any of the recent updates to meshroom the last couple of days do something maybe? Anything else I could try? Put it directly in the meshroom folder or something?

Found metadata in lib C:/meshroom-git/meshroomplugins/qmlalembicplugin/qml/AlembicEntity/alembicEntityQmlPlugin.dll, metadata=
{
    "IID": "alembicEntity.qmlPlugin",
    "MetaData": {
    },
    "className": "AlembicEntityQmlPlugin",
    "debug": false,
    "version": 330497
}


Cannot load library C:\meshroom-git\meshroomplugins\qmlalembicplugin\qml\AlembicEntity\alembicEntityQmlPlugin.dll: Unknown error 0x000000c1.
QLibraryPrivate::loadPlugin failed on "C:/meshroom-git/meshroomplugins/qmlalembicplugin/qml/AlembicEntity/alembicEntityQmlPlugin.dll" : "Cannot load library C:\\meshroom-git\\meshroomplugins\\qmlalembicplugin\\qml\\AlembicEntity\\alembicEntityQmlPlugin.dll: Unknown error 0x000000c1."

@yann-lty
Copy link
Member

yann-lty commented Aug 6, 2018

Are you by any chance using a 32 bits version of Python ?
This could be a problem with mixing 32/64 bits libraries (like here: https://forum.qt.io/topic/85999/3d-studio-issues/2)

@AFWSI
Copy link
Author

AFWSI commented Aug 6, 2018

@yann-lty yeah, it says 32-bit on the python setup/installer. Is that my issue? From what I could tell, it didn't give me the option to download a 64-bit.

@yann-lty
Copy link
Member

yann-lty commented Aug 6, 2018

@AFWSI yes i'm pretty sure this is the problem. On Python download page, make sure to select a x86_64 installer. Then, you'll need to setup meshroom again with this new Python install (pip install -r requirements.txt) and you should be okay !

@AFWSI
Copy link
Author

AFWSI commented Aug 6, 2018

@yann-lty I now get this error when I do the pip install -r requirements.txt

  Could not find a version that satisfies the requirement PySide2==5.11.0 (from -r requirements.txt (line 4)) (from versions: 0.0.0a1, 5.11.1)
No matching distribution found for PySide2==5.11.0 (from -r requirements.txt (line 4))

@yann-lty
Copy link
Member

yann-lty commented Aug 6, 2018

Did you chose a Python 2 installer ?
Make sure to take a Python 3 installer (let's say 3.6.6, I haven't try Meshroom on Python 3.7 yet) too. As explained here, PySide2 is not distributed for Python 2 on Windows.

@AFWSI
Copy link
Author

AFWSI commented Aug 6, 2018

@yann-lty no, I did the python 3 installer ,but I did do the latest(3.7) I'll try the 3.6.6 and see what happens.

@yann-lty
Copy link
Member

yann-lty commented Aug 6, 2018

Yes, it seems that PySide2 is not yet available for 3.7 either.

@AFWSI
Copy link
Author

AFWSI commented Aug 6, 2018

@yann-lty It works now. I never would have figured out the 32-bit python was the issue. Still would have had the 3.7 version installed, LOL. Thanks for finally thinking about python being the issue.

qmlalembic_success

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants