Creating to a softlink to a file that I have no write permissions

I think that I am in the category of not having write access to the /usr/lib/ directory. The ls -l output of files and directorys is:

total 92
drwxr-xr-x 2 root root 4096 2009-03-11 09:39 bin
drwxr-xr-x 3 root root 4096 2009-03-30 09:55 boot
lrwxrwxrwx 1 root root 11 2008-10-16 05:30 cdrom -> media/cdrom
drwxr-xr-x 12 root root 14300 2009-04-03 09:33 dev
drwxr-xr-x 135 root root 12288 2009-04-03 09:34 etc
drwxr-xr-x 3 root root 4096 2008-10-16 05:36 homeand I must
drwxr-xr-x 2 root root 4096 2008-07-02 06:16 initrd
lrwxrwxrwx 1 root root 33 2009-03-02 12:08 initrd.img -> boot/initrd.img-2.6.24-24-generic
lrwxrwxrwx 1 root root 33 2009-01-09 11:18 initrd.img.old -> boot/initrd.img-2.6.24-23-generic
drwxr-xr-x 15 root root 12288 2009-04-01 10:32 lib <------------------------------------------------------------
drwx------ 2 root root 16384 2008-10-16 05:29 lost+found
drwxr-xr-x 4 root root 4096 2009-04-03 09:33 media
drwxr-xr-x 2 root root 4096 2008-04-15 01:53 mnt
drwxr-xr-x 2 root root 4096 2008-07-02 06:16 opt
dr-xr-xr-x 114 root root 0 2009-04-03 05:33 proc
drwxr-xr-x 13 root root 4096 2009-03-31 15:32 root
drwxr-xr-x 2 root root 4096 2009-02-24 09:07 sbin
drwxr-xr-x 2 root root 4096 2008-07-02 06:16 srv
drwxr-xr-x 12 root root 0 2009-04-03 05:33 sys
drwxrwxrwt 13 root root 4096 2009-04-03 11:16 tmp
drwxr-xr-x 12 root root 4096 2009-04-01 11:01 usr
drwxr-xr-x 15 root root 4096 2008-07-02 06:34 var
lrwxrwxrwx 1 root root 30 2009-03-02 12:08 vmlinuz -> boot/vmlinuz-2.6.24-24-generic
lrwxrwxrwx 1 root root 30 2009-01-09 11:18 vmlinuz.old -> boot/vmlinuz-2.6.24-23-generic
james /$ ls -l /usr/lib | grep glut
lrwxrwxrwx 1 root root 21 2009-04-03 11:10 libglut.so -> /usr/lib/libglut.so.3
lrwxrwxrwx 1 root root 16 2008-10-16 05:30 libglut.so.3 -> libglut.so.3.8.0
-rw-r–r-- 1 root root 207824 2007-12-10 14:40 libglut.so.3.8.0

http://forums.nvidia.com/index.php?act=UserCP&CODE=50

shows that I have no write permission to the /usr/lib directory except as root. Is this correct?

When I give the command

james /$ ls -l /usr/lib | grep glut

the following is shown:

lrwxrwxrwx 1 root root 21 2009-04-03 11:10 libglut.so -> /usr/lib/libglut.so.3
lrwxrwxrwx 1 root root 16 2008-10-16 05:30 libglut.so.3 -> libglut.so.3.8.0and I must
-rw-r–r-- 1 root root 207824 2007-12-10 14:40 libglut.so.3.8.0

I believe that I have correctly set up the link between libglut.so and ibglut.so.3
which was discussed on page 4 of the CUDA Software Development Kit Release Notes.

I must do what it says to do at the end (page 5) of the Release notes section

IV section Known Issues

I must create a soft link in a directory to which I do have write permissions ( to directory /usr/lib) and then add that directory
to the library search path (-L) in the Makefile.

What is the syntax for that command? I simply am not sure of it. The notes give syntax for everything, but that command.
I am too new to Linux to create that command.

I am using CUDA 8.04 and CUDA 2.1.

Newport_j

What is the actual problem that you’re trying to solve?

First, I am running Linux Ubuntu 8.04 and CUDA 2.1

I am trying to get make to compile my first files. The is in the Linux CuDA 2.1 Installation and Verification of LINUX document. I believe that it is not finding the library files in /usr/lib/. I know that I have no write permision to the directory /usr/lib/ except as root. Thus I must do as it says in the release notes:

If you have libglut.so.3 but you do not have write access to /usr/lib, you

can also fix the problem by creating the soft link in a directory to which

you have write permissions and then add that directory to the libarary

search path (-L) in the Makefile.

I clearly do not have write access to the /usr/lib/ except as root (see above). I also have libglut.so.3 and not libglut.so. I successfully linked the two (see above). Now I am having trouble with a known issue. I seem to fit the last definition and I must create a softlink to /usr/lib/ where I have no write permission (except as root). I must link to it with a directory where I do have write permission. What is the syntax for that? the release note give syntax for a lot, but not for that.

Respectfully,

newport_j

The documentation instructs you to either set LD_LIBRARY_PATH to the location of the CUDA toolkit libraries, or add that location to /etc/ld.so.conf. Did you do either of those?

What is the actual failure you’re getting?

Here is what happens when I type make.

james ~/NVIDIA_CUDA_SDK$ make
make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/common' a - obj/release/bank_checker.cpp.o make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/common’
a - obj/release/paramgl.cpp.o
a - obj/release/param.cpp.o
make[1]: Leaving directory /home/james/NVIDIA_CUDA_SDK/common' make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/common’
a - obj/release/rendercheck_gl.cpp.o
a - obj/release/cmd_arg_reader.cpp.o
a - obj/release/cutil.cpp.o
a - obj/release/stopwatch.cpp.o
a - obj/release/stopwatch_linux.cpp.o
a - obj/release/multithreading.cpp.o
make[1]: Leaving directory /home/james/NVIDIA_CUDA_SDK/common' make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/common’
a - obj/release/paramgl.cpp.o
a - obj/release/param.cpp.o
make[1]: Leaving directory /home/james/NVIDIA_CUDA_SDK/common' make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/common’
a - obj/release/rendercheck_gl.cpp.o
make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/common' a - obj/release/paramgl.cpp.o a - obj/release/param.cpp.o make[1]: Leaving directory /home/james/NVIDIA_CUDA_SDK/common’
make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/common' a - obj/release/rendercheck_gl.cpp.o make[1]: Leaving directory /home/james/NVIDIA_CUDA_SDK/common’
make -C projects/simpleGL/
make[1]: Entering directory /home/james/NVIDIA_CUDA_SDK/projects/simpleGL' /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/libGL.so: undefined reference to _nv001250gl’
/usr/lib/gcc/i486-linux-gnu/4.2.4/…/…/…/…/lib/libGL.so: undefined reference to _nv001253gl' /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/libGL.so: undefined reference to _nv001252gl’
/usr/lib/gcc/i486-linux-gnu/4.2.4/…/…/…/…/lib/libGL.so: undefined reference to _nv001254gl' /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/libGL.so: undefined reference to _nv001249gl’
/usr/lib/gcc/i486-linux-gnu/4.2.4/…/…/…/…/lib/libGL.so: undefined reference to _nv001251gl' /usr/lib/gcc/i486-linux-gnu/4.2.4/../../../../lib/libGL.so: undefined reference to _n
v001255gl’
collect2: ld returned 1 exit status
make[1]: *** […/…/bin/linux/release/simpleGL] Error 1
make[1]: Leaving directory `/home/james/NVIDIA_CUDA_SDK/projects/simpleGL’
make: *** [projects/simpleGL/Makefile.ph_build] Error 2
james ~/NVIDIA_CUDA_SDK$
james ~/NVIDIA_CUDA_SDK$

Paths

james ~/NVIDIA_CUDA_SDK$ echo PATH /usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games james ~/NVIDIA_CUDA_SDK echo $LD_LIBRARY_PATH
/usr/local/cuda/lib:

Paths okay.

Now it can find lglut. I showed that in the first email. I linked libglut.so and
libglut.so.3.

I need syntax command. Link to dir with no write permission.
Newport_j