cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Meteorhead
Challenger

Error building SDK

Ubuntu 11.10 64-bit

Hi!

I know it is not officially supported, but it might occur to others also they want to build SDK on new Ubuntu, or it could come in handy when releasing new Catalyst and SDK. I'm trying it under 11.10 64-bit, but SDK won't compile, and even the part that does crashes:

g++ -o build/debug/x86_64/BoxFilterGL build/debug/x86_64//BoxFilterGL.o build/debug/x86_64//BoxFilterGLSeparable.o build/debug/x86_64//BoxFilterGLSAT.o -lpthread -ldl -L/usr/X11R6/lib   -lSDKUtil  -lglut  -lGLEW  -lOpenCL   -L../../../../../lib/x86_64  -L../../../../../TempSDKUtil/lib/x86_64 -L"/lib/x86_64" 
/usr/bin/ld: build/debug/x86_64//BoxFilterGLSeparable.o: undefined reference to symbol 'glEnd'
/usr/bin/ld: note: 'glEnd' is defined in DSO /usr/lib64/libGL.so.1 so try adding it to the linker command line
/usr/lib64/libGL.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status

Seems to have some ptoblem with the OpenGL library (built by the driver installer if I'm not mistaken). I tried enabling OpenGL support for Unity also, but then it fails to launch saying "wrong ELF class" inside libGL.so.1

Second problem is, even the part that compiles crashes instantly:

mnagy@ubuntu:~/AMD/SDK/AMD-APP-SDK-v2.5-RC2-lnx64/bin/x86_64$ ./clinfo
terminate called after throwing an instance of 'cl::Error'
  what():  clGetPlatformIDs

 

Anyone ideas on how to go about solving this? I've had enough of OS install for the weekend and would not like to go about reverting to older Ubuntu to solve these.

Cheers,

Máté

0 Likes
6 Replies
genaganna
Journeyman III

Originally posted by: Meteorhead Hi!

I know it is not officially supported, but it might occur to others also they want to build SDK on new Ubuntu, or it could come in handy when releasing new Catalyst and SDK. I'm trying it under 11.10 64-bit, but SDK won't compile, and even the part that does crashes:

g++ -o build/debug/x86_64/BoxFilterGL build/debug/x86_64//BoxFilterGL.o build/debug/x86_64//BoxFilterGLSeparable.o build/debug/x86_64//BoxFilterGLSAT.o -lpthread -ldl -L/usr/X11R6/lib   -lSDKUtil  -lglut  -lGLEW  -lOpenCL   -L../../../../../lib/x86_64  -L../../../../../TempSDKUtil/lib/x86_64 -L"/lib/x86_64"  /usr/bin/ld: build/debug/x86_64//BoxFilterGLSeparable.o: undefined reference to symbol 'glEnd' /usr/bin/ld: note: 'glEnd' is defined in DSO /usr/lib64/libGL.so.1 so try adding it to the linker command line /usr/lib64/libGL.so.1: could not read symbols: Invalid operation collect2: ld returned 1 exit status

Seems to have some ptoblem with the OpenGL library (built by the driver installer if I'm not mistaken). I tried enabling OpenGL support for Unity also, but then it fails to launch saying "wrong ELF class" inside libGL.so.1

Second problem is, even the part that compiles crashes instantly:

mnagy@ubuntu:~/AMD/SDK/AMD-APP-SDK-v2.5-RC2-lnx64/bin/x86_64$ ./clinfo terminate called after throwing an instance of 'cl::Error'   what():  clGetPlatformIDs

Anyone ideas on how to go about solving this? I've had enough of OS install for the weekend and would not like to go about reverting to older Ubuntu to solve these.

Cheers,

Máté

Which driver are you using?

0 Likes
scharupa
Staff

Meteor,

Could you please provide the below details:

1) Is the SDK installed properly under  /opt/AMDAPP/

2) Are the Environment vairables set properly?

3) GCC version?

4) Please create symlink in case broken,, # ln -s libGL.so.1 libGL.so

0 Likes

This was with latest Catalyst, 10.9.

I always installed SDKs under $(HOME)/AMD/SDK/ to compile sample programs and check functionality, but for the runtime and development files, I always use nou's packages, which place all the neccessary files in their respective locations.

This has always worked for me this far.

So the long answer short: Ubuntu 11.10 64-bit, Catalyst 10.9, SDK 2.5 with matching runtime and dev .deb package installed.

As a sidenote, since I really wanted to use a native linux, I tried reverting back to Ubuntu 10.04,but the wubi (Windows) installer fails to create bootable filesystem for Ubuntu. If you really need me trying some things, I could put some effort into solving this, however the problem I guess is pretty generic and not specific to my system. This is a laptop btw and HW is Mobility HD5870, should that matter anything.

ps: GCC version is whatever the system comes with by default. I have not checked. I believe it is gcc 4.6. And I have not set any environmental variables, as I have never had to before to make things work.

0 Likes

Hi! I had this same problem on my Fedora 16 / Catalyst 11.7 / SDK 2.5 RC2 installation. I ran "sudo make release=1" from /opt/AMDAPP/ and got the same error.

I solved it by editing the samples/opencl/cl/app/BoxFilterGL/Makefile and changing the line

LLIBS += glut GLEW

to

LLIBS += glut GLEW GL GLU

You'll probably find that you will have to do the same for the FluidSimulation2D, Mandelbrot, NBody, and possibly others.

0 Likes

Thank you for the tip. I'll definately try it out. 😉

0 Likes
phajaa
Journeyman III

I solved it by editing the samples/opencl/cl/app/BoxFilterGL/Makefile and changing the line

0 Likes