xstudio icon indicating copy to clipboard operation
xstudio copied to clipboard

DNeg’s XStudio on windows with CMake

Open giuseppeICH opened this issue 1 year ago • 19 comments

Hi,

i am trying to install DNeg’s XStudio on windows with CMake, but i am finding many difficulties. Every time I do the CMake setup it tells me that a new package is missing.

the first one was “nlohmann_json” (solved by downloading the package from GitHub and placed in the folder ./XStudio/xstudio/build/vcpkg/packages/nlohmann-json_x64-windows/share/nlohmann_json)

the second one “pybind11” (solved by downloading the package via Python and placed in the folder C:/Users/User/AppData/Local/Packages/PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0/LocalCache/local-packages/Python312/site-packages/pybind11/share/cmake/pybind11

now it is “cafConfig.cmake” which i can’t figure out where to find it.

I wanted to know if there was a single guide on how to implement XStudio, because online I can’t find a comprehensive guide on the various procedures to follow.

the only generic guide is on

mpkepic/xstudio/blob/windows/docs/build_guides/windows.md but it is missing all the contingencies that I am finding.

Thanks in advance

Giuseppe

giuseppeICH avatar Mar 12 '24 15:03 giuseppeICH

Try to enable USE_VCPKG, the windows branch has a vcpkg.json file which should make dependency install alot easier.

fjallraven avatar Mar 23 '24 08:03 fjallraven

Hello here

I have a similar experience:

  • first, a hash problem with openimageio\portfile.cmake
  • then, ensurepip problem (https://discourse.cmake.org/t/cmake-error-failed-to-ensurepip/10019)
  • after, it's pybind11 not found
  • spdlog
  • ... and so on

Enabling USE_VCPKG does not help :/

ndeebook avatar Apr 16 '24 13:04 ndeebook

Sounds like installing and invoking vcpkg failed, would you be able to share beginning on cmake log?

You are on mpkepic/xstudio windows branch?

fjallraven avatar Apr 16 '24 15:04 fjallraven

I was manually downloading a lot of dependencies using vcpkg now and manually edited all the pathnames, but currently stuck with liblzma which is installed, but cmake is looking for a lzma_auto_decoder which is not part of the installation and also nowhere to be found

xXTR0YXx avatar May 04 '24 19:05 xXTR0YXx

Hi! I've done a significant overhaul on the Cmake/vcpkg integration and cmake install target support among other things. I recommend checking out the latest commit on the pull request.

Note it now supports Visual Studio 2022, comes with some useful presets to make configuring easier, and has a bunch of build reliability improvements.

https://github.com/AcademySoftwareFoundation/xstudio/pull/50

mpkepic avatar Jun 06 '24 17:06 mpkepic

yes, you posted an update on the next day, and I could finally make it work. It was also crucial to run the power-shell script setting up the environment properly which doesn't work with an unaltered system where running scripts is not allowed. it is now up and running, still get some python related error messages on boot-up and xStudio doesn't recognize EXR sequences as such but instead only loads one image

xXTR0YXx avatar Jun 07 '24 14:06 xXTR0YXx

Thanks, I'm spinning off that issue into #106; see there for updates.

mpkepic avatar Jun 07 '24 16:06 mpkepic

@xXTR0YXx, I've closed out #106, if you want to pull and try it again it should be resolved.

mpkepic avatar Jun 07 '24 23:06 mpkepic

Thanks..will look into that today. I have also the issue that loading from my NAS is not supported, but I have seen that this is mentioned somewhere already. Guess it is the double-slash issue if I remember right

xXTR0YXx avatar Jun 08 '24 08:06 xXTR0YXx

Thanks..will look into that today. I have also the issue that loading from my NAS is not supported, but I have seen that this is mentioned somewhere already. Guess it is the double-slash issue if I remember right

Can you please open a new issue for this with any sort of useful examples? I'm trying (and failing) to prevent these massive monolithic issues that keep morphing :)

mpkepic avatar Jun 09 '24 23:06 mpkepic

Will do. But currently I wasn't able to build your fork due to VCPKG not being able to create MP3LAME

xXTR0YXx avatar Jun 10 '24 07:06 xXTR0YXx

can you provide the relevant section from the build logs? alternatively you can use a prebuilt ffmpeg 5.1.2 and set FFMPEG_ROOT

mpkepic avatar Jun 10 '24 14:06 mpkepic

Also gives the error when using vcpkg install directly and when using "full" vcpkg without manifest using vcpkg install mp3lame.

build-x64-windows-rel-out.log

I used the prebuild FFMPEG on my first build, but adding FFMPEG_ROOT set to C:\ffmpeg\bin seems to be ignored

xXTR0YXx avatar Jun 10 '24 14:06 xXTR0YXx

I used the prebuild FFMPEG on my first build, but adding FFMPEG_ROOT set to C:\ffmpeg\bin seems to be ignored

If using prebuilt, you can remove ffmpeg from the manifest, add the FFMPEG_ROOT and point it to the non-bin directory; make sure your ffmpeg prebuilt is the full shared version (with dll and libs), not just the executable.

mpkepic avatar Jun 10 '24 14:06 mpkepic

Given the error is failing to find some very core files, validate two things for me:

  1. have you enabled long file paths (https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry)
  2. do you have disk space available on your drive (and did you when you installed visual studio)?

Alternatively, you can be more discerning about which packages you pull in by modifying the manifest to set the features in ffmpeg and only include specific features. https://vcpkg.link/ports/ffmpeg

mpkepic avatar Jun 10 '24 15:06 mpkepic

yes, set the file path limitation from 0 to 1 and have plenty of drive space on each drive on this machine.

So just to make sure, the manifest is vcpkg.json?

running vcpkg install ffmpeg builds fine, just MP3LAME is not. but I have seen that by default ffmpeg builds using --disable-libmp3lame.

Sorry for all those noob questions, but I am not a developer and just trying to get some of the open source tools running, which is really giving me a hard time

xXTR0YXx avatar Jun 10 '24 15:06 xXTR0YXx

Yes, vcpkg.json is the manifest.

On Mon, Jun 10, 2024 at 8:06 AM Volker Troy @.***> wrote:

yes, set the file path limitation from 0 to 1 and have plenty of drive space on each drive on this machine.

So just to make sure, the manifest is vcpkg.json?

— Reply to this email directly, view it on GitHub https://urldefense.com/v3/__https://github.com/AcademySoftwareFoundation/xstudio/issues/100*issuecomment-2158613749__;Iw!!N1d2nkBXpQ!Ivz9i0mrUoKhtPBH7NKnyKR8tm-_cATpC6fByXAti67UfPnd3SEs26Xya_P5tTzL-XZ3YvLDjC7HGiYOxXZ6MfD2lGuUYkU$, or unsubscribe https://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/AZXQR2SJVRVPAPTSAQ7LDYDZGW6IHAVCNFSM6AAAAABESQDZBSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJYGYYTGNZUHE__;!!N1d2nkBXpQ!Ivz9i0mrUoKhtPBH7NKnyKR8tm-_cATpC6fByXAti67UfPnd3SEs26Xya_P5tTzL-XZ3YvLDjC7HGiYOxXZ6MfD2U6QpIeA$ . You are receiving this because you commented.Message ID: @.***>

mpkepic avatar Jun 10 '24 15:06 mpkepic

There is not much I can delete from the manifest regarding ffmpeg. The upper part seems to be part of the opencolorio dependency and can't be delete. The lower part I can delete, but doesn't make a difference when trying to build.

manifest

xXTR0YXx avatar Jun 10 '24 15:06 xXTR0YXx

What I meant is you can modify the "features": ["all"] to be, instead of "all", a list of features you wish to include, as enumerated here: https://vcpkg.link/ports/ffmpeg As an example, you could enumerate every subpackage from all except mp3lame.

As far as why mp3lame won't work, 🤷 but given it fails with vcpkg outside of the xstudio build, I suspect it is something to do with your specific computer configuration.

mpkepic avatar Jun 10 '24 15:06 mpkepic