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

[Arch Linux] Various errors when building #15

Closed
adro79 opened this issue Jan 20, 2023 · 9 comments
Closed

[Arch Linux] Various errors when building #15

adro79 opened this issue Jan 20, 2023 · 9 comments
Labels
build Having issue building Open RV

Comments

@adro79
Copy link
Contributor

adro79 commented Jan 20, 2023

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.

@marcomeyerVFX
Copy link

marcomeyerVFX commented Jan 20, 2023

Had the exact same issues, the (I think) better fix for the first one is described here:
LibRaw/LibRaw@1583986
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

@rogernelson
Copy link
Contributor

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.

@adro79
Copy link
Contributor Author

adro79 commented Jan 21, 2023

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.

@rogernelson
Copy link
Contributor

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 added a commit that referenced this issue Jan 24, 2023
#15

This branch adds the missing `thread` include wherever
`std::thread::sleep_for` was used. Some Linux distros were not building
because changes to the includes in more up-to-date versions meant it was
no longer being implicitly included by another include.

Signed-off-by: Roger Nelson <roger.nelson@autodesk.com>
@rogernelson
Copy link
Contributor

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

@adro79 adro79 changed the title [Linux] Various errors when building [Arch Linux] Various errors when building Aug 1, 2023
@adro79
Copy link
Contributor Author

adro79 commented Aug 1, 2023

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.

@meepzh
Copy link
Contributor

meepzh commented Dec 9, 2023

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.

@geffrak
Copy link
Contributor

geffrak commented Dec 11, 2023

@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
Copy link
Contributor

geffrak commented Dec 11, 2023

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 pushed a commit that referenced this issue Dec 11, 2023
<!--
Thanks for your contribution! Please read this comment in its entirety.
It's quite important.
When a contributor merges the pull request, the title and the
description will be used to build the merge commit! -->

### Disable FFmpeg's documentation build

Opening this PR per geffrak's recommendation!

<!-- It should be in the following format:

[ 12345: Summary of the changes made ] Where 12345 is the corresponding
Github Issue

OR

[ Summary of the changes made ] If it's solving something trivial, like
fixing a typo.
-->

### Linked issues

Relates to #15

### Summarize your change.

This prevents FFmpeg from building its documentation.

### Describe the reason for the change.

Arch Linux has picked up texinfo 7.1, which generates an error when
building FFmpeg 4.4 as mentioned
[here](7Ji/archrepo#10).
```
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/Makefile:70: doc/ffmpeg.html] Error 1
make: *** Waiting for unfinished jobs....
makeinfo: error parsing ./doc/t2h.pm: Undefined subroutine &Texinfo::Config::set_from_init_file called at ./doc/t2h.pm line 24.
make: *** [doc/Makefile:70: doc/ffplay.html] Error 1
==> ERROR: A failure occurred in build().
    Aborting...
```
The maintainers have opted to resolve this by [disabling the
documentation](https://aur.archlinux.org/cgit/aur.git/diff/PKGBUILD?h=ffmpeg-mpp&id=bf0797549552cdf942a4058961de88cf605d4b91).
Presumably, the FFmpeg documentation is not required for the operation
of Open RV either.

### Describe what you have tested and on which operating system.

This has been tested on Arch Linux 6.6.4 by playing an MOV of some
birds.

### Add a list of changes, and note any that might need special
attention during the review.

### If possible, provide screenshots.

<img
src="https://github.com/AcademySoftwareFoundation/OpenRV/assets/4801924/01118fb5-71e1-4bdd-9e6f-d32e92256f6d"
alt="" width="250" />

---------

Signed-off-by: Robert Zhou <meep.aur@meepzh.com>
bernie-laberge pushed a commit that referenced this issue Feb 20, 2024
<!--
Thanks for your contribution! Please read this comment in its entirety.
It's quite important.
When a contributor merges the pull request, the title and the
description will be used to build the merge commit!

### Pull Request TITLE

It should be in the following format:

[ 12345: Summary of the changes made ] Where 12345 is the corresponding
Github Issue

OR

[ Summary of the changes made ] If it's solving something trivial, like
fixing a typo.
-->

### Linked issues
<!--
Link the Issue(s) this Pull Request is related to.

Each PR should link to at least one issue, in the form:

Use one line for each Issue. This allows auto-closing the related issue
when the fix is merged.

Fixes #12345
Fixes #54345
-->

### Summarize your change.

This builds upon the work that Mark did to improve the configuration
options for FFmpeg in #360 with Mark's
[blessing](markreidvfx#1 (comment))!

### Describe the reason for the change.

This fixes use of `PKG_CONFIG_PATH`, `RV_FFMPEG_COMMON_CONFIG_OPTIONS`,
`RV_FFMPEG_PATCH_COMMAND_STEP`
(#15 (comment)),
and other Windows-specific build issues such as
#67 (comment).

### Describe what you have tested and on which operating system.

This has been tested on Arch Linux 6.6.8 and Windows 10.0.22631, running
the same test from
[here](#360 (comment)).

### Add a list of changes, and note any that might need special
attention during the review.

Specific details can be found
[here](#360 (comment)).
I did not include the change to apply `SEPARATE_ARGUMENTS` to
`RV_FFMPEG_CONFIG_OPTIONS`, since `RV_FFMPEG_CONFIG_OPTIONS` did not
seem applicable given the [CMake
documentation](https://cmake.org/cmake/help/latest/command/separate_arguments.html),
but I can include that change as well.

### If possible, provide screenshots.


#360 (comment)

Thanks!

---------

Signed-off-by: Robert Zhou <meep.zh@gmail.com>
bernie-laberge added a commit that referenced this issue Jul 11, 2024
I noticed that if you have an AV1 file, you need to set the threads to
1, to playback properly without stuttering.

e.g. compare:
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 4 -play
to
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 1 -play

It seems like av1 is missing from the slowRandomAccessCodecsArray array.

Changing this seems to improve things. Athough with the above debug
enabled, I'm still seeing lines like:
PATTERN FAIL #15 :  3 1 2 2 2 2 3 2 1 2 // frame = 83 (83)
PATTERN FAIL #16 :  2 3 1 2 2 2 2 3 2 1 // frame = 84 (84)


Which I'm guessing is not good. But that might be something else.

Signed-off-by: Sam Richards <sam_junk@taurich.org>
Co-authored-by: Bernard Laberge <117092886+bernie-laberge@users.noreply.github.com>
chxmberland pushed a commit to chxmberland/OpenRV that referenced this issue Jul 15, 2024
)

I noticed that if you have an AV1 file, you need to set the threads to
1, to playback properly without stuttering.

e.g. compare:
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 4 -play
to
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 1 -play

It seems like av1 is missing from the slowRandomAccessCodecsArray array.

Changing this seems to improve things. Athough with the above debug
enabled, I'm still seeing lines like:
PATTERN FAIL AcademySoftwareFoundation#15 :  3 1 2 2 2 2 3 2 1 2 // frame = 83 (83)
PATTERN FAIL AcademySoftwareFoundation#16 :  2 3 1 2 2 2 2 3 2 1 // frame = 84 (84)


Which I'm guessing is not good. But that might be something else.

Signed-off-by: Sam Richards <sam_junk@taurich.org>
Co-authored-by: Bernard Laberge <117092886+bernie-laberge@users.noreply.github.com>
chxmberland pushed a commit to chxmberland/OpenRV that referenced this issue Jul 15, 2024
)

I noticed that if you have an AV1 file, you need to set the threads to
1, to playback properly without stuttering.

e.g. compare:
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 4 -play
to
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 1 -play

It seems like av1 is missing from the slowRandomAccessCodecsArray array.

Changing this seems to improve things. Athough with the above debug
enabled, I'm still seeing lines like:
PATTERN FAIL AcademySoftwareFoundation#15 :  3 1 2 2 2 2 3 2 1 2 // frame = 83 (83)
PATTERN FAIL AcademySoftwareFoundation#16 :  2 3 1 2 2 2 2 3 2 1 // frame = 84 (84)

Which I'm guessing is not good. But that might be something else.

Signed-off-by: Sam Richards <sam_junk@taurich.org>
Co-authored-by: Bernard Laberge <117092886+bernie-laberge@users.noreply.github.com>
Signed-off-by: Ben Chamberland <becha9260@gmail.com>
chxmberland pushed a commit to chxmberland/OpenRV that referenced this issue Jul 15, 2024
)

I noticed that if you have an AV1 file, you need to set the threads to
1, to playback properly without stuttering.

e.g. compare:
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 4 -play
to
rv.exe -debug playback -fps 30 -playMode 2
chimera_cars_srgb-test_mp4-libsvtav1-10bit.mp4 -rthreads 1 -play

It seems like av1 is missing from the slowRandomAccessCodecsArray array.

Changing this seems to improve things. Athough with the above debug
enabled, I'm still seeing lines like:
PATTERN FAIL AcademySoftwareFoundation#15 :  3 1 2 2 2 2 3 2 1 2 // frame = 83 (83)
PATTERN FAIL AcademySoftwareFoundation#16 :  2 3 1 2 2 2 2 3 2 1 // frame = 84 (84)

Which I'm guessing is not good. But that might be something else.

Signed-off-by: Sam Richards <sam_junk@taurich.org>
Co-authored-by: Bernard Laberge <117092886+bernie-laberge@users.noreply.github.com>
Signed-off-by: Ben Chamberland <becha9260@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Having issue building Open RV
Projects
None yet
Development

No branches or pull requests

6 participants