Changeset View
Standalone View
package.yml
| name : nvidia-glx-driver | name : nvidia-glx-driver | ||||
| version : '415.25' | version : '415.25' | ||||
| release : 279 | release : 280 | ||||
| source : | source : | ||||
| - http://us.download.nvidia.com/XFree86/Linux-x86_64/415.25/NVIDIA-Linux-x86_64-415.25.run : 64b65b8923d15e2566ed2ab6a4a65b21c45445bdd028ec0091c9b509a51e9349 | - http://us.download.nvidia.com/XFree86/Linux-x86_64/415.25/NVIDIA-Linux-x86_64-415.25.run : 64b65b8923d15e2566ed2ab6a4a65b21c45445bdd028ec0091c9b509a51e9349 | ||||
| extract : no | extract : no | ||||
| homepage : https://nvidia.com | homepage : https://nvidia.com | ||||
| license : | license : | ||||
| - EULA | - EULA | ||||
| summary : | summary : | ||||
| - NVIDIA Binary Driver (LTS Kernel) | - NVIDIA Binary Driver (LTS Kernel) | ||||
| ▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | install : | | ||||
| install -m 00755 lib*.so* $installdir/%libdir%/. | install -m 00755 lib*.so* $installdir/%libdir%/. | ||||
| # install -m 00755 tls/lib*.so* $installdir/%libdir%/. | # install -m 00755 tls/lib*.so* $installdir/%libdir%/. | ||||
| install -m 00755 32/lib*.so* $installdir/usr/lib32/. | install -m 00755 32/lib*.so* $installdir/usr/lib32/. | ||||
| # install -m 00755 32/tls/lib*.so* $installdir/usr/lib32/. | # install -m 00755 32/tls/lib*.so* $installdir/usr/lib32/. | ||||
| # Strip glvnd bits and OpenCL, we have those elsewhere | # Strip glvnd bits and OpenCL, we have those elsewhere | ||||
| rm -v $installdir/usr/lib{32,64}/{libGLX.so.0,libGL.so.1.7.0,libOpenGL.so.0,libOpenCL.so.1.0.0,libGLdispatch.so*} | rm -v $installdir/usr/lib{32,64}/{libGLX.so.0,libGL.so.1.7.0,libOpenGL.so.0,libOpenCL.so.1.0.0,libGLdispatch.so*} | ||||
| # Get weird guys in order first | |||||
| ln -sv libGLESv2_nvidia.so.${version} $installdir/%libdir%/libGLESv2_nvidia.so.2 | |||||
| ln -sv libGLESv2_nvidia.so.${version} $installdir/usr/lib32/libGLESv2_nvidia.so.2 | |||||
| ln -sv libGLX_nvidia.so.${version} $installdir/%libdir%/libGLX_nvidia.so.0 | |||||
| ln -sv libGLX_nvidia.so.${version} $installdir/usr/lib32/libGLX_nvidia.so.0 | |||||
| function redo_libs() { | function redo_libs() { | ||||
| for gl in $* ; do | for gl in $* ; do | ||||
| i=`dirname ${gl}` | i=`dirname ${gl}` | ||||
| clean=`echo $(basename ${gl})|sed -e 's@\.so\.%version%@@g'` | clean=`echo $(basename ${gl})|sed -e 's@\.so\.%version%@@g'` | ||||
| if [[ ! -e $i/${clean}.so.2 ]] ; then | soname=`objdump -p ${gl} | grep SONAME | awk '{print $2}'` | ||||
| if [[ ! -e $i/${clean}.so.1 ]] && [[ ! -e $i/${clean}.so.0 ]] ; then | if [[ ! -e $i/${soname} ]] ; then | ||||
| ln -sv `basename ${gl}` $i/${clean}.so.1 | ln -sv `basename ${gl}` $i/${soname} | ||||
| fi | |||||
| fi | fi | ||||
JoshStrobl: Why are you doing all this and not just changing the `.1` to `.0` in the symlink call? | |||||
Not Done Inline ActionsThe only library needs to be changed is libEGL_nvidia.so. I tried to find a systematic way to determine whether we should call it libEGL_nvidia.so.0 or libEGL_nvidia.so.1 rather than random guessing. This is also the way that other programs (e.g. nvidia-docker determines which library to link to during runtime). That is why I am using objdump here. xulongwu4: The only library needs to be changed is `libEGL_nvidia.so`. I tried to find a systematic way to… | |||||
Not Done Inline ActionsThen why are we changing everything else and not just doing a single symlink? JoshStrobl: Then why are we changing everything else and not just doing a single symlink? | |||||
Not Done Inline ActionsWith the current patch:
I agree that we can add a few lines to fix libEGL_nvidia.so. But I don't know whether NVIDAI will give it another soname so that it might be called libnvidia-glsi.so.1 in the future. At that time, we need to fix the patch again. Someone always needs to check the soname of that library that way. If you believe it is safer to simply change the name for libEGL_nvidia.so.0, I will also be happy to do that. xulongwu4: With the current patch:
- the `libEGL_nvidia.so.0` has the correct name and all the other… | |||||
| if [[ ! -e $i/{clean}.so ]]; then | if [[ ! -e $i/{clean}.so ]]; then | ||||
| ln -sv `basename ${gl}` $i/${clean}.so | ln -sv `basename ${gl}` $i/${clean}.so | ||||
| fi | fi | ||||
| done | done | ||||
| } | } | ||||
| redo_libs $installdir/usr/lib64/lib*.so.%version% | redo_libs $installdir/usr/lib64/lib*.so.%version% | ||||
| redo_libs $installdir/usr/lib32/lib*.so.%version% | redo_libs $installdir/usr/lib32/lib*.so.%version% | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||
Why are you doing all this and not just changing the .1 to .0 in the symlink call?