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

Build script dies on OpenSubdiv/GLFW on Ubuntu #261

Closed
jcowles opened this issue Aug 8, 2017 · 20 comments
Closed

Build script dies on OpenSubdiv/GLFW on Ubuntu #261

jcowles opened this issue Aug 8, 2017 · 20 comments

Comments

@jcowles
Copy link

jcowles commented Aug 8, 2017

Description of Issue

Building on Ubuntu

Steps to Reproduce

  1. mkdir build
  2. python build_scripts/build_usd.py build

Error:
CMake Error at cmake/FindGLFW.cmake:146 (message):
Xrandr library not found - required for GLFW
Call Stack (most recent call first):
CMakeLists.txt:316 (find_package)

System Information (OS, Hardware)

Ubuntu 13

@jcowles
Copy link
Author

jcowles commented Aug 8, 2017

Oh! This is xrandar, not glfw

@sunyab
Copy link
Contributor

sunyab commented Aug 8, 2017

The GLFW dependency is a known issue -- if GLFW isn't installed on your system, you'll eventually run into issues with the OpenSubdiv build. I'm thinking I'll need to add GLFW to the build script, at least until PixarAnimationStudios/OpenSubdiv#903 is resolved.

@jcowles
Copy link
Author

jcowles commented Aug 8, 2017

Ah, yeah -- I fixed the xrandr dependency, did a clean build and it still failed:

-- Could NOT find GLFW (missing: GLFW_INCLUDE_DIR GLFW_LIBRARIES) (Required is at least version "3.0.0")
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find GLEW (missing: GLEW_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
cmake/FindGLEW.cmake:124 (find_package_handle_standard_args)
CMakeLists.txt:329 (find_package)

@jcowles
Copy link
Author

jcowles commented Aug 8, 2017

Any workaround? Just install GLFW?

@sunyab
Copy link
Contributor

sunyab commented Aug 8, 2017

Yeah, unfortunately that's the only workaround at the moment.

@jcowles
Copy link
Author

jcowles commented Aug 8, 2017

FYI, I had to install both GLFW and GLEW.

For anyone else hitting this:
GLFW, I just cloned from GitHub and did the CMake dance (cmake, make, make install).
GLEW, I downloaded the source zip and ran make, make install.

@jtran56
Copy link

jtran56 commented Aug 8, 2017

Filed as internal issue #149508.

@dboogert
Copy link

dboogert commented Sep 3, 2017

On my Ubuntu based distro running build_usd.py resulted in glew being installed to lib64 instead of lib

@Mockermockery
Copy link

installing Xrandr is not trivial how did you resolve the issue.
I am having the same issue using ubuntu.

@meshula
Copy link
Member

meshula commented Feb 5, 2019

to build glfw on ubuntu, I first had to:

sudo apt install libxrandr-dev
sudo apt install libxinerama-dev
sudo apt install libxcursor-dev

@drwave
Copy link

drwave commented Sep 29, 2019

Hey folks. So this has moved me along, but now the configure is dying with:

-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
CMake Error at cmake/FindGLFW.cmake:174 (message):
Xi library not found - required for GLFW
Call Stack (most recent call first):
CMakeLists.txt:341 (find_package)

I've got (via apt) libglfw3 and libglfw-dev, so I was hoping I would be clear.

Thanks for any tips.

@drwave
Copy link

drwave commented Sep 29, 2019

sorry, forgot to mention: when I tried to install & build glfw from github myself, I got:

-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
CMake Error at CMakeLists.txt:230 (message):
The XInput headers were not found

@meshula
Copy link
Member

meshula commented Sep 30, 2019

not at a computer atm, but I believe

sudo apt install libxi-dev

afaicr, libXi is the last of the weird build dependencies.

will get you past this. I wish installing the x11 dev libraries wasn't this random bag of mixed nuts! I'm not aware of an umbrella install that gets all the pieces in one go. Would be happy to learn of one, if anyone knows.

@drwave
Copy link

drwave commented Sep 30, 2019

well, that got me further, now, even though I've installed GLEW via apt, it's complaining it can't find it.

-- Found GLFW: /usr/local/include (found suitable version "3.4.0", minimum required is "3.0.0")
CMake Error at /usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find GLEW (missing: GLEW_LIBRARY)
Call Stack (most recent call first):
/usr/share/cmake-3.13/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindGLEW.cmake:124 (find_package_handle_standard_args)
CMakeLists.txt:329 (find_package)

@meshula
Copy link
Member

meshula commented Sep 30, 2019

You might have discovered some kind of library-os-version-itis. Where is your GL/glew.h, and your glew.a or glew.so installed by apt? If you don't have the log anymore, this line should tell where it landed:

dpkg-query -L glew

(Edit: changed dpkg to dpkg-query, which would be able to answer Sunya's question.)

@sunyab
Copy link
Contributor

sunyab commented Oct 1, 2019

@drwave Are you running your builds manually or are you using build_usd.py? And is the error coming from building USD itself, or from building OpenSubdiv or one of the other dependencies? My wild guess is that the GLEW .so is being installed into lib64 instead of lib, and that's causing issues.

@drwave
Copy link

drwave commented Oct 4, 2019

I (re?)installed glew with apt, ran the build script again, and it all worked. Thanks for all help, everyone. Not sure I have a totally repeatable set of steps to build on a fresh machine, but at least for this machine I'm up and working, which is great.

@virtualritz
Copy link

I have the same issue on Ubuntu 22.04 trying to build 3.5.0. What I do not get is that the deps section of the OSD CMake docs says:

Optional

  • GLFW (required for standalone examples and some regression tests)

I run cmake with -DNO_EXAMPLES=1 and -DNO_REGRESSION=1 which would make me think GLFW would not be required as a dependency any more. Are the OSD docs outdated/wrong here or is the OSD cmake config buggy?

Specificyally, this is the relevant section from my build faling:

  running: cd "/home/moritz/code/crates/opensubdiv-petite/target/debug/build/opensubdiv-petite-sys-0eb04167d86efd39/out/build" && CMAKE_PREFIX_PATH="" "cmake" "/home/moritz/code/crates/opensubdiv-petite/opensubdiv-petite-sys/OpenSubdiv" "-DNO_EXAMPLES=1" "-DNO_TUTORIALS=1" "-DNO_REGRESSION=1" "-DNO_PTEX=1" "-DNO_DOC=1" "-DNO_OPENCL=1" "-DNO_CLEW=1" "-DNO_TBB=1" "-DNO_CUDA=1" "-DNO_OMP=1" "-DNO_METAL=1" "-DCMAKE_INSTALL_PREFIX=/home/moritz/code/crates/opensubdiv-petite/target/debug/build/opensubdiv-petite-sys-0eb04167d86efd39/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Debug"
  -- Compiling OpenSubdiv version v3_5_0
  -- Using cmake version 3.22.1
  -- Configuring incomplete, errors occurred!
  See also "/home/moritz/code/crates/opensubdiv-petite/target/debug/build/opensubdiv-petite-sys-0eb04167d86efd39/out/build/CMakeFiles/CMakeOutput.log".

  --- stderr
  CMake Error at cmake/FindGLFW.cmake:162 (message):
    xf86vmode library not found - required for GLFW
  Call Stack (most recent call first):
    CMakeLists.txt:359 (find_package)

@virtualritz
Copy link

I found the NO_GLFW flag which is undocumented though (see #2302).

@virtualritz
Copy link

In any case, if the docs are right -DNO_EXAMPLES=1 and -DNO_REGRESSION=1 should imply -DNO_GLFW=1, I guess.

AdamFelt pushed a commit to autodesk-forks/USD that referenced this issue Apr 16, 2024
…/internal-only/feature/update_boost_zlib

add zlib 1.2.12 & boost 1.78 support
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

8 participants