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

findgllib.mk does not work in pop for cuda programs that use GL #21

Open
fcaballerop opened this issue Aug 20, 2021 · 0 comments
Open

Comments

@fcaballerop
Copy link

The findgllib.mk file is executed by 'make' in all sample codes that use GL for visualization. This file tries to find the files libGL.so and libGLU.so in the system but only does so for supported distros (Ubuntu, Fedora, Rhel, CentOS and SUSE). If this programs are compiled in Pop the make command tells us it cannot find those libraries and fails.

This can be fixed by changing the default findgllib.mk file that ships with this repository, either adding an option for PopOs, which would look as follows. For the version that ships with cuda-11.2, after line 62 add:

POP   = $(shell echo $(DISTRO) | grep -i 'pop' >/dev/null 2>&1; echo $$?)
ifeq ("(POP)", "0")
      GLPATH    ?= /usr/lib
      GLLINK    ?= -L/usr/lib
      DFLT_PATH ?= /usr/lib
endif

This works since these files are installed with the cuda toolkit on /usr/lib/cuda/.

Alternatively, and a much simpler solution, is that line 89 (DFLT_PATH ?= /usr/lib) can be moved at the end of all if statements that check for distributions, right before lines 114 and 115 that actually try to find libGL.so and libGLU.so. I believe this last solution is actually what whoever wrote this file actually intended, since it's the last place to look for if a distribution cannot be recognized. This is how it then goes to find the header files, which works because it starts by setting a default distribution-independent path of search.

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

1 participant