Question / Help Build Error on Fedora 21

Hey guys,

I'm trying to compile the 0.9 release from source. I've followed the readme build instructions for Red Hat based distros. It runs through most of build without an error then spits this error at me right at the end.




[100%] Building C object test/test-input/CMakeFiles/test-input.dir/test-sinewave.c.o
[100%] Building C object test/test-input/CMakeFiles/test-input.dir/test-random.c.o
Linking C shared module test-input.so
[100%] Built target test-input
Linking CXX executable obs
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clReleaseMemObject@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clReleaseCommandQueue@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clCreateBuffer@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clBuildProgram@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clSetKernelArg@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clGetDeviceIDs@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clEnqueueUnmapMemObject@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clGetPlatformInfo@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clCreateProgramWithSource@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clGetDeviceInfo@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clReleaseContext@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clCreateContextFromType@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clCreateCommandQueue@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clEnqueueMapBuffer@OPENCL_1.0'
/usr/bin/../lib64/libavutil.so.54: undefined reference to `clGetPlatformIDs@OPENCL_1.0'
collect2: error: ld returned 1 exit status
obs/CMakeFiles/obs.dir/build.make:901: recipe for target 'obs/obs' failed
make[2]: *** [obs/obs] Error 1
CMakeFiles/Makefile2:385: recipe for target 'obs/CMakeFiles/obs.dir/all' failed
make[1]: *** [obs/CMakeFiles/obs.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2

I'm running Fedora 21 fully updated with a GTX660 and the nvidia proprietary blob.
Any help would be greatly appreciated. Thanks guys!
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
Strange, seems your libavutil is trying to access OpenCL. I'm guessing that it has something to do with your particular build of FFmpeg. OBS is not able to load because the FFmpeg libraries are unable to load, if that makes sense.
 
Strange, seems your libavutil is trying to access OpenCL. I'm guessing that it has something to do with your particular build of FFmpeg. OBS is not able to load because the FFmpeg libraries are unable to load, if that makes sense.

Yup, built ffmpeg from source and it compiles fine now...and now I'm getting

obs: error while loading shared libraries: libobs.so.0: cannot open shared object file: No such file or directory

I'm seeing a couple of fixes in the forums but this is kinda ridiculous. I think I might come back to this software when its had a bit more time in the oven. Good luck with the project guys.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
You have to set LD_LIBRARY_PATH environment variable to your /usr/local/lib.
 

jflory7

New Member
You have to set LD_LIBRARY_PATH environment variable to your /usr/local/lib.
Hey Jim, could you explain how to do this or where to set this? I am also using Fedora 21 and I am having the same problem.
 

Lain

Forum Admin
Lain
Forum Moderator
Developer
If you're executing it via the command line, you can do: LD_LIBRARY_PATH=/usr/local/lib
Then do: export LD_LIBRARY_PATH

If you're wanting to execute it via other means, you would have to set up.. /etc/ld.so.conf.d I think? Or I suppose you could install to /usr instead of /usr/local though people would probably yell at me for saying that
 

jflory7

New Member
If you're executing it via the command line, you can do: LD_LIBRARY_PATH=/usr/local/lib
Then do: export LD_LIBRARY_PATH

If you're wanting to execute it via other means, you would have to set up.. /etc/ld.so.conf.d I think? Or I suppose you could install to /usr instead of /usr/local though people would probably yell at me for saying that
Sorry for the late response. Just wanted to confirm that this fixed it for me. :) Thanks!
 

Sotka

New Member
If you're executing it via the command line, you can do: LD_LIBRARY_PATH=/usr/local/lib
Then do: export LD_LIBRARY_PATH

If you're wanting to execute it via other means, you would have to set up.. /etc/ld.so.conf.d I think? Or I suppose you could install to /usr instead of /usr/local though people would probably yell at me for saying that

I searched this for a long time! Thanks. It's helped for me too.
 
Top