Discussion:
openal-1.14 and ffmpeg-0.7.13
Dennis Veatch
2012-10-03 00:46:30 UTC
Permalink
Trying to compile openal and get this error;

[ 91%] Building C object CMakeFiles/alstream.dir/examples/alffmpeg.o
/usr/src/openal-soft-1.14/examples/alffmpeg.c: In function 'MemData_seek':
/usr/src/openal-soft-1.14/examples/alffmpeg.c:101:37: warning:
comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/src/openal-soft-1.14/examples/alffmpeg.c:107:39: warning:
comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/src/openal-soft-1.14/examples/alffmpeg.c:108:38: warning:
comparison between signed and unsigned integer expressions [-Wsign-compare]
/usr/src/openal-soft-1.14/examples/alffmpeg.c:114:37: warning:
comparison between signed and unsigned integer expressions [-Wsign-compare]
[ 94%] Building C object CMakeFiles/alstream.dir/examples/alstream.o
Linking C executable alstream
/usr/bin/ld: CMakeFiles/alstream.dir/examples/alffmpeg.o: undefined
reference to symbol 'av_malloc@@LIBAVUTIL_50'
/usr/bin/ld: note: 'av_malloc@@LIBAVUTIL_50' is defined in DSO
/usr/lib/libavutil.so.50 so try adding it to the linker command line
/usr/lib/libavutil.so.50: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [alstream] Error 1
make[1]: *** [CMakeFiles/alstream.dir/all] Error 2
make: *** [all] Error 2


With some other apps I would do something like LDFLAGS=" -lm" or some
similar such thing depending on the DSO. With this particular issue I
have no idea what to do and Google has not been the all knowing one in
this case.


Thanks
Dennis
Dennis Veatch
2012-10-03 00:57:43 UTC
Permalink
Post by Dennis Veatch
Trying to compile openal and get this error;
[ 91%] Building C object CMakeFiles/alstream.dir/examples/alffmpeg.o
/usr/src/openal-soft-1.14/examples/alffmpeg.c: In function
comparison between signed and unsigned integer expressions
[-Wsign-compare]
comparison between signed and unsigned integer expressions
[-Wsign-compare]
comparison between signed and unsigned integer expressions
[-Wsign-compare]
comparison between signed and unsigned integer expressions
[-Wsign-compare]
[ 94%] Building C object CMakeFiles/alstream.dir/examples/alstream.o
Linking C executable alstream
/usr/bin/ld: CMakeFiles/alstream.dir/examples/alffmpeg.o: undefined
/usr/lib/libavutil.so.50 so try adding it to the linker command line
/usr/lib/libavutil.so.50: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [alstream] Error 1
make[1]: *** [CMakeFiles/alstream.dir/all] Error 2
make: *** [all] Error 2
With some other apps I would do something like LDFLAGS=" -lm" or some
similar such thing depending on the DSO. With this particular issue I
have no idea what to do and Google has not been the all knowing one in
this case.
Thanks
Dennis
_______________________________________________
Oops the magic of the clicky button struck. Using LDFLAGS=" -lavutil"
seems to have done the trick.

Dennis
Chris Robinson
2012-10-03 02:12:13 UTC
Permalink
Post by Dennis Veatch
Trying to compile openal and get this error;
...
Linking C executable alstream
/usr/bin/ld: CMakeFiles/alstream.dir/examples/alffmpeg.o: undefined
/usr/lib/libavutil.so.50 so try adding it to the linker command line
/usr/lib/libavutil.so.50: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[2]: *** [alstream] Error 1
make[1]: *** [CMakeFiles/alstream.dir/all] Error 2
make: *** [all] Error 2
That's odd. It should already be including libavutil on the linker. It
checks for:

PKG_CHECK_MODULES(FFMPEG libavcodec>=52.123.0 libavformat>=52.111.0
libavutil>=51.9.1)

which combines all the libs needed for those packages into
FFMPEG_LIBRARIES, which is then used:

ADD_EXECUTABLE(alstream examples/alhelpers.c examples/alffmpeg.c
examples/alstream.c)
TARGET_LINK_LIBRARIES(alstream ${FFMPEG_LIBRARIES} ${LIBNAME})
SET_TARGET_PROPERTIES(alstream PROPERTIES COMPILE_FLAGS "${FFMPEG_CFLAGS}")

What's interesting is that it thinks it needs to use libavutil.so.50,
but the check should require libavutil.so.51 or newer. Any idea why it
might be trying to use av_malloc@@LIBAVUTIL_50 instead of
av_malloc@@LIBAVUTIL_51?


If you don't care about the example player, you can disable it by
passing setting EXAMPLES to OFF with cmake (-DEXAMPLES=OFF) on the cmake
command line), which should let make finish up.

Loading...