OpenRV icon indicating copy to clipboard operation
OpenRV copied to clipboard

[Linux] Various errors when building

Open adro79 opened this issue 2 years ago • 3 comments
trafficstars

Hello there,

Just mention that I have no knowledge of programming and these workaround may cause more problems than fixes. I'm reporting those so anyone with experience can deal with it.

I'm using a fully updated Arch Linux.

/home/adro/Applications/3D/OpenRV/src/pub/LibRaw/internal/dcraw_common.cpp:6395:64: error: call of overloaded ‘powf64(int, int)’ is ambiguous
 6395 |                         10*(table_buf[iLensData+9]>>2) * powf64(4, (table_buf[iLensData+9] & 0x03)-2);
      |                                                          ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12.2.1/cmath:45,
                 from /usr/include/c++/12.2.1/math.h:36,
                 from /home/adro/Applications/3D/OpenRV/src/pub/LibRaw/internal/dcraw_common.cpp:24:

A workaround i found is to delete the lines 6392-6395 as mentioned here

Another error I found:

/home/adro/Applications/3D/OpenRV/src/lib/app/RvCommon/RvApplication.cpp:855:27: error: ‘sleep_for’ is not a member of ‘std::this_thread’
  855 |         std::this_thread::sleep_for(std::chrono::milliseconds(1));
      |                           ^~~~~~~~~
/home/adro/Applications/3D/OpenRV/src/bin/apps/rv/main.cpp:431:27: error: ‘sleep_for’ is not a member of ‘std::this_thread’
  431 |         std::this_thread::sleep_for( std::chrono::seconds( sleepTime ) );
      |  

As well as the previous one, deleting the line works.

After all this workarounds, I succesfully built OpenRV.

adro79 avatar Jan 20 '23 20:01 adro79

Had the exact same issues, the (I think) better fix for the first one is described here: https://github.com/LibRaw/LibRaw/commit/158398653a14e8b5884d744ec711ba31a8ceafdc so just rename powf64( to libraw_powf64( inside of dcraw_common.cpp.

The LibRaw package in https://github.com/shotgunsoftware/openrv-pub seems to use 0.18.0, but this fix was applied in ~0.18.8

For the sleep_for errors I had to add #include <thread> to both files that throw the error

marcomeyerVFX avatar Jan 20 '23 21:01 marcomeyerVFX

Great to hear you got it to build on Arch Linux! If this is was the only blocker, I will see if I can do a quick fix that will still work for both Arch and CentOS.

rogernelson avatar Jan 21 '23 13:01 rogernelson

Great to hear you got it to build on Arch Linux! If this is was the only blocker, I will see if I can do a quick fix that will still work for both Arch and CentOS.

Well yes, those were the only errors I found. But I was planning to create an AUR package for OpenRV, and since it requires Qt prebuilt binaries I can't automate the process afaik.

Would be nice to adapt the program to use the system libraries.

adro79 avatar Jan 21 '23 13:01 adro79

It's unfortunately a third-parties library (PySide) that requires a more up-to-date version of Qt than is provided by the system.

rogernelson avatar Jan 24 '23 15:01 rogernelson

With the ucontext_t type and thread includes addressed, I'll close this issue. Feel free to reopen if something is not still working.

rogernelson avatar Jan 24 '23 19:01 rogernelson

Hi, I'm reopening this issue because of the new issues I'm facing when building the current version.

I've had several errors that I've easily patched (due Arch Linux diferences) but I haven't found a way to fix this one:

[536/677] Generating /mnt/data/Applications/AUR/openrv/src/build/stage/app/plugins/MovieFormats/movieformats.gto
FAILED: stage/app/plugins/MovieFormats/movieformats.gto /mnt/data/Applications/AUR/openrv/src/build/stage/app/plugins/MovieFormats/movieformats.gto
cd /mnt/data/Applications/AUR/openrv/src/build/stage/app/bin && /mnt/data/Applications/AUR/openrv/src/build/stage/app/bin/makeMovieIOformats /mnt/data/Applications/AUR/openrv/src/build/stage/app/plugins/MovieFormats
RV_HOME = /mnt/data/Applications/AUR/openrv/src/build/stage/app
/mnt/data/Applications/AUR/openrv/src/build/stage/app/bin/makeMovieIOformats.bin: Relink `/mnt/data/Applications/AUR/openrv/src/build/stage/app/lib/liblcms.so' with `/usr/lib/libm.so.6' for IFUNC symbol `sincos'
[542/677] Building CXX object src/lib/ip/IPMu/CMakeFiles/IPMu.dir/CommandsModule.cpp.o
In file included from /mnt/data/Applications/AUR/openrv/src/OpenRV/src/lib/mu/MuLang/MuLang/HalfType.h:14,
                 from /mnt/data/Applications/AUR/openrv/src/OpenRV/src/lib/ip/IPMu/CommandsModule.cpp:46:
/mnt/data/Applications/AUR/openrv/src/deps/RV_DEPS_IMATH/install/include/Imath/halfLimits.h:17:2: warning: #warning "ImathLimits is deprecated; use #include <half.h>" [-Wcpp]
   17 | #warning "ImathLimits is deprecated; use #include <half.h>"
      |  ^~~~~~~
[547/677] Building CXX object src/test/IPCore/AudioRendererTest/CMakeFiles/AudioRendererTest.dir/main.cpp.o
ninja: build stopped: subcommand failed.

Once the project gets prebuilt libraries support it would be possible to make an AUR package for OpenRV, but for now I'll keep testing in my machine.

adro79 avatar Aug 01 '23 21:08 adro79

Sorry I didn't see this thread before- I'd started an AUR repository since I had an immediate need for OpenRV on Arch earlier https://aur.archlinux.org/packages/openrv-git

It's certainly not the cleanest build, and I haven't been keeping up with every update to the main branch, but I've confirmed that RV's basic functions work, so hopefully it's a good start. It does seem like the process went more smoothly for other people. Hopefully I haven't shot myself in the foot somewhere.

Most of my changes are for updating dependencies to the Arch environment, though:

  • I did have difficulties using RV_FFMPEG_PATCH_COMMAND_STEP. PATCH_COMMAND didn't seem to be recognized by CMake, but I'm not super familiar with CMake to begin with
    • I was patching rvcmds with sed -E 's/(alias rvcfg.+)"$/\1 '\''-DRV_FFMPEG_PATCH_COMMAND_STEP=PATCH_COMMAND git cherry-pick -n 988f2e9eb063db7c1a678729f58aab6eba59a55b \&\& git cherry-pick -n 031f1561cd286596cdb374da32f8aa816ce3b135 \&\& git cherry-pick -n effadce6c756247ea8bae32dc13bb3e6f464f0eb'\''"/' rvcmds.sh but CMake was concatenating the patch step with SOURCE_DIR
  • Some lines in the pub repository were flagged with the format-security error
  • OCIO will default to the Arch-provided yaml-cpp and not build the yaml-cpp static library that seems to be required elsewhere, so I've needed to force it
  • PyOpenColorIO seemed to install elsewhere

That all being said, I know that Arch itself is introducing a lot of these difficulties, and I'm not well-equipped to test changes on other platforms, so I'm okay with just patching them in the AUR.

meepzh avatar Dec 09 '23 13:12 meepzh

@meepzh OpenRV contributors are discussing offloading the dependency generation to something like conan so it's done outside of the OpenRV cmake build. It would make it easier for your project since you will be able to grab those dependencies using aur. The plan is not final yet, but so far it's where we are going.

geffrak avatar Dec 11 '23 14:12 geffrak

Also, @meepzh some of your changes would be great in OpenRV's main repository, would you mind making a pull request?

  • --disable-doc in ffmpeg.cmake
  • the format-security error fix in arg

geffrak avatar Dec 11 '23 14:12 geffrak