Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

RHEL 9 Build process documentation. #6

Closed
NicTanghe opened this issue Jan 19, 2023 · 19 comments
Closed

RHEL 9 Build process documentation. #6

NicTanghe opened this issue Jan 19, 2023 · 19 comments
Labels
build Having issue building Open RV

Comments

@NicTanghe
Copy link

NicTanghe commented Jan 19, 2023

If annyone knows how to fix this and has spare time.

Followed build instructions on RHEL9.
installed Qt5 from qt.io's installer.
got stuck at the Configure step.

Log

cmake -B cmake-build -DRV_DEPS_QT5_LOCATION=/opt/Qt
-- Build type: Debug
-- Building RV for generic Linux OS
-- Using build branch: main
-- Using build hash: 41eccbe
-- RV_STAGE_ROOT_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app
-- RV_STAGE_BIN_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/bin
-- RV_STAGE_LIB_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/lib
-- RV_STAGE_INCLUDE_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/include
-- RV_STAGE_SRC_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/src
-- RV_STAGE_RESOURCES_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/resources
-- RV_STAGE_PLUGINS_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins
-- RV_STAGE_PLUGINS_CONFIGFILES_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/ConfigFiles
-- RV_STAGE_PLUGINS_IMAGEFORMATS_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/ImageFormats
-- RV_STAGE_PLUGINS_MOVIEFORMATS_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/MovieFormats
-- RV_STAGE_PLUGINS_MU_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/Mu
-- RV_STAGE_PLUGINS_NODES_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/Nodes
-- RV_STAGE_PLUGINS_OIIO_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/OIIO
-- RV_STAGE_PLUGINS_PACKAGES_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/Packages
-- RV_STAGE_PLUGINS_PROFILES_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/Profiles
-- RV_STAGE_PLUGINS_PYTHON_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/Python
-- RV_STAGE_PLUGINS_QT_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/Qt
-- RV_STAGE_PLUGINS_SUPPORTFILES_DIR: /home/nanghe/git/OpenRV/cmake-build/stage/app/plugins/SupportFiles
-- Updating submodules

CMake Error at /usr/lib64/cmake/Qt5/Qt5Config.cmake:28 (find_package):
  Could not find a package configuration file provided by "Qt5WebEngineCore"
  with any of the following names:

    Qt5WebEngineCoreConfig.cmake
    qt5webenginecore-config.cmake

  Add the installation prefix of "Qt5WebEngineCore" to CMAKE_PREFIX_PATH or
  set "Qt5WebEngineCore_DIR" to a directory containing one of the above
  files.  If "Qt5WebEngineCore" provides a separate development package or
  SDK, be sure it has been installed.
Call Stack (most recent call first):
  cmake/dependencies/qt5.cmake:41 (FIND_PACKAGE)
  cmake/dependencies/CMakeLists.txt:36 (INCLUDE)

This was fixed by using -DRV_DEPS_QT5_LOCATION=/opt/Qt/5.15.2/gcc_64/


The Error I got after that one is about open Cl.
both ocl-icd and opencl-headers seem to be installed.

Log
CMake Error at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.25/Modules/FindOpenCL.cmake:163 (find_package_handle_standard_args)
  src/lib/ip/IPCore/CMakeLists.txt:255 (FIND_PACKAGE)
Fixed By running
dnf install ocl-icd-devel

Next I`m getting these conserning GLU.
both libglvnd and libglvnd-devel are installed.

and i think the mesa ones dont make sence with nvidia drivers ?

Log
CMake Error at src/lib/mu/MuGL/CMakeLists.txt:28 (TARGET_LINK_LIBRARIES):
  Target "MuGL" links to:

    OpenGL::GLU

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at src/lib/mu/MuGLU/CMakeLists.txt:28 (TARGET_LINK_LIBRARIES):
  Target "MuGLU" links to:

    OpenGL::GLU

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at src/lib/mu/MuGLText/CMakeLists.txt:29 (TARGET_LINK_LIBRARIES):
  Target "MuGLText" links to:

    OpenGL::GLU

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at src/lib/app/OutputVideoDevices/CMakeLists.txt:36 (TARGET_LINK_LIBRARIES):
  Target "OutputVideoDevices" links to:

    OpenGL::GLU

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at src/lib/ui/TwkGLText/CMakeLists.txt:29 (TARGET_LINK_LIBRARIES):
  Target "TwkGLText" links to:

    OpenGL::GLU

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.



CMake Error at src/bin/apps/rvprof/CMakeLists.txt:49 (TARGET_LINK_LIBRARIES):
  Target "rvprof" links to:

    OpenGL::GLU

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

Fixed by running

sudo ln -s /usr/lib64/libGLU.so.1 /usr/lib64/libGLU.so
sudo dnf install mesa-libGLU

Then I tried running CMAKE and ran into the following issues.

openssl-devel is installed

Log

The Meson build system (these only appeared the first time I ran and now don’t appear anymore.

Check usable header "io.h" : NO
Check usable header "pthread_np.h" : NO
Checking for function "_aligned_malloc" : NO
Compiler for C supports arguments -Wshorten-64-to-32: NO
Header <xxhash.h> has symbol "XXH3_createState" : NO

RV_DEPS_OPENSSL

[  4%] Performing configure step for 'RV_DEPS_OPENSSL'
Namespace(clean=False, configure=True, build=False, install=False, source=PosixPath('/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/src'), output=PosixPath('/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/install'), arch='', perlroot='')
Executing ['perl', '/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/src/Configure', 'linux-x86_64', 'no-asm', '--prefix=/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/install', '--openssldir=/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/install', "-Wl,-rpath,'$$ORIGIN/../lib'"] from /home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/src
Can't locate FindBin.pm in @INC (you may need to install the FindBin module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/src/Configure line 15.
BEGIN failed--compilation aborted at /home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/src/Configure line 15.
Traceback (most recent call last):
  File "/home/nanghe/git/OpenRV/src/build/make_openssl.py", line 260, in <module>
    configure()
  File "/home/nanghe/git/OpenRV/src/build/make_openssl.py", line 194, in configure
    subprocess.run(configure_args, cwd=SOURCE_DIR).check_returncode()
  File "/usr/lib64/python3.9/subprocess.py", line 460, in check_returncode
    raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '['perl', '/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/src/Configure', 'linux-x86_64', 'no-asm', '--prefix=/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/install', '--openssldir=/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_OPENSSL/install', "-Wl,-rpath,'$$ORIGIN/../lib'"]' returned non-zero exit status 2.
gmake[3]: *** [cmake/dependencies/CMakeFiles/RV_DEPS_OPENSSL.dir/build.make:92: cmake/dependencies/RV_DEPS_OPENSSL-prefix/src/RV_DEPS_OPENSSL-stamp/RV_DEPS_OPENSSL-configure] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:6171: cmake/dependencies/CMakeFiles/RV_DEPS_OPENSSL.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:13794: src/bin/apps/rv/CMakeFiles/rv.dir/rule] Error 2
gmake: *** [Makefile:3820: rv] Error 2
Fixed by running
sudo dnf install perl-FindBin

No module named '_tkinter'
fixed by

sudo dnf install tcl-devel tk-devel python3-tkinter

next.

sudo dnf install python-yaml sqlite-devel

then there ws an error about sys/sysctl.h that was missing wich is depricated. c #20

Log
[ 8%] Building CXX object src/lib/base/TwkUtil/CMakeFiles/TwkUtil.dir/SystemInfo.cpp.o
git/OpenRV/src/lib/base/TwkUtil/SystemInfo.cpp:22:10: fatal error: sys/sysctl.h: No such file or directory
22 | #include <sys/sysctl.h>

Fixed by removing the lines from the code at
~/git/OpenRV/src/lib/base/TwkUtil/SystemInfo.cpp.o


next libio missing

dnf install libaio-devel

sudo dnf install readline-devel

@la0011
Copy link

la0011 commented Jan 19, 2023

Should look something like this:

-DRV_DEPS_QT5_LOCATION=/opt/Qt/5.15.2/gcc_64/

@compaga compaga added the build Having issue building Open RV label Jan 19, 2023
@rogernelson
Copy link
Contributor

There's also a rvcmds.sh file in the root of the repo that you can source that attempts to set up all the environment you need to build. Of course, not everyone's setup will be the same so if you use it please make sure the paths it sets are accurate -- you can override any of the paths it sets with environment variables.

@NicTanghe
Copy link
Author

NicTanghe commented Jan 19, 2023

@la0011
THx that worked now I`m stuck at

CMake Error at /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenCL (missing: OpenCL_LIBRARY OpenCL_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/share/cmake-3.25/Modules/FindOpenCL.cmake:163 (find_package_handle_standard_args)
  src/lib/ip/IPCore/CMakeLists.txt:255 (FIND_PACKAGE)

both ocl-icd and opencl-headers seem to be installed

@rogernelson
How whould i do that ?
I assume it's just

 source rvcmds.sh

@NicTanghe NicTanghe changed the title RHEL 9 Followed compile instructions cound not find package cinf file "QtWebEngineCore" RHEL 9 Followed compile instructions could not find package conf file "QtWebEngineCore" Jan 19, 2023
@NicTanghe NicTanghe changed the title RHEL 9 Followed compile instructions could not find package conf file "QtWebEngineCore" RHEL 9 Build errors Jan 19, 2023
@NicTanghe NicTanghe changed the title RHEL 9 Build errors RHEL 9 Build errors QT and Opencl pointers ? Jan 19, 2023
@rogernelson
Copy link
Contributor

Hi @NicTanghe. Yes, once you've done source rvcmds.sh and verified that all the paths are correct, you can do rvbootstrap to do the initial setup and build it or rvmk after the initial bootstrap to build it.

For the openCL error, have you installed the openCL headers? If you have a look at this section of the documentation, it gives a yum command that should install them (and other build dependencies).

@marcomeyerVFX
Copy link

marcomeyerVFX commented Jan 19, 2023

I was stuck in the same place, got past it by additionally installing ocl-icd-devel (must have CRB repo enabled for that)
might be worth adding to the dependencies as well

@NicTanghe
Copy link
Author

NicTanghe commented Jan 20, 2023

THx that fixed those.

Now its all the glu ones. (desc top)

@rogernelson
Copy link
Contributor

Hi @NicTanghe Do you have the file /usr/lib64/libGLU.so on your system? If not, you can get it from the package mesa-libGLU

@NicTanghe
Copy link
Author

NicTanghe commented Jan 20, 2023

but i dont use mesa drivers?
does that matter ?

also the mesa-libGLU package was already installed but

test -f /usr/lib64/libGLU.so || echo " doesnt exist."

returns doesn't exist

searching in nautilus
libGLU.so.1
does exist

@rogernelson
Copy link
Contributor

If you already have libGLU, then great. Normally the setup is to link libLGU.so to libGLU.so.1 (which maybe be linked to something else). That is normally done at installation, but if not you could try just creating the symlink yourself.

sudo ln -s libGLU.so.1 /usr/lib64/libGLU.so

You'll also need the headers, do you have /usr/include/GL/glu.h installed on your system?

@NicTanghe
Copy link
Author

NicTanghe commented Jan 20, 2023

I linked the files, Didn’t find the headers.
So I installed the devel package.
That seems to have done it.

Now CMake throws me errors about open ssl and i also can`t make heads or tails of them.

@marcomeyerVFX
Copy link

try installing nss

also, in case you haven't already I also had to install

meson zip python-unversioned-command perl-FindBin libXcomposite libXdamage libXrandr libXtst libXcursor

along the way.

@NicTanghe
Copy link
Author

NicTanghe commented Jan 20, 2023

I was only missing

perl-FindBin

That seems to have fixed things, it seems to be compiling now. I will close the ticket if it finishes compiling, if not I’ll be Arnold.

How did u figure out those dependencies ?

@NicTanghe
Copy link
Author

NicTanghe commented Jan 20, 2023

import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

installing python3-tkinter and running

import tkinter
tkinter._test()

in python solved nothing

i also needed to install
tcl-devel tk-devel

next i installed

sqlite-devel

Now im here

WARNING: The scripts f2py, f2py3 and f2py3.9 are installed in '/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_PYTHON3/install/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The scripts fonttools, pyftmerge, pyftsubset and ttx are installed in '/home/nanghe/git/OpenRV/cmake-build/RV_DEPS_PYTHON3/install/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pre-commit 2.21.0 requires pyyaml>=5.1, which is not installed.

@marcomeyerVFX
Copy link

How did u figure out those dependencies ?

compile... look for errors (usually linker missing an .so)... search on pkgs.org which package contains the missing file... install missing package ... repeat

also I was running in a docker so I started quite minimal already and had to install almost everything

@NicTanghe
Copy link
Author

NicTanghe commented Jan 21, 2023

(i ws hoping you had some magic less labour intensive way)

[ 8%] Building CXX object src/lib/base/TwkUtil/CMakeFiles/TwkUtil.dir/SystemInfo.cpp.o
git/OpenRV/src/lib/base/TwkUtil/SystemInfo.cpp:22:10: fatal error: sys/sysctl.h: No such file or directory
22 | #include <sys/sysctl.h>

I have kernel-headers and kernel-cross-headers
Read somewhere you should remove.

Maybe if removing dont work try in future.
fixing with ln -s /usr/include/linux/sysctl.h sys/sysctl.h

next missing is libaio.h
libaio.h
dnf install libaio-devel

@marcomeyerVFX
Copy link

remove that line #include <sys/sysctl.h> in OpenRV/src/lib/base/TwkUtil/SystemInfo.cpp, apparently that's deprecated from glibc on EL9

@NicTanghe
Copy link
Author

Next error i get is.

/home/nanghe/git/OpenRV/src/lib/mu/Mu/Thread.cpp:77:34: error: ‘ucontext’ does not name a type; did you mean ‘Context’?
   77 |     _threadState = (size_t*)(new ucontext);
      |                                  ^~~~~~~~
      |                                  Context

error: ‘ucontext’ does not name a type; did you mean ‘Context’?
   77 |     _threadState = (size_t*)(new ucontext);

I’m hesitant to replace ucontext with Context because those seem like totally different functions.

@NicTanghe NicTanghe changed the title RHEL 9 Build errors QT and Opencl pointers ? RHEL 9 Build process documentation. Jan 21, 2023
@marcomeyerVFX
Copy link

marcomeyerVFX commented Jan 21, 2023

there's a proposed PR that fixes that. just rename ucontext to ucontext_t
#14

also check this issue, for future code issues, they all apply to EL9 as well:
#15

@NicTanghe
Copy link
Author

I will make a nice markdown file tomorrow or next week.

@AcademySoftwareFoundation AcademySoftwareFoundation locked and limited conversation to collaborators Feb 17, 2023
@geffrak geffrak converted this issue into discussion #78 Feb 17, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
build Having issue building Open RV
Projects
None yet
Development

No branches or pull requests

5 participants