Sunday, October 2, 2011

Compiling Asterisk SCF

(for the "note to self" bucket) I was attempting to build Asterisk SCF
and cmake was failing with the following error:

Linking CXX shared library ../../lib/ /root/gitall/pjproject/pjlib/lib/libpj-asteriskscf.a(guid_uuid.o): In function `pj_generate_unique_string': /root/gitall/pjproject/pjlib/build/../src/pj/guid_uuid.c:45: undefined reference to `uuid_generate' /root/gitall/pjproject/pjlib/build/../src/pj/guid_uuid.c:46: undefined reference to `uuid_unparse' collect2: ld returned 1 exit status make[2]: *** [lib/] Error 1 make[1]: *** [ice-util-cpp/src/CMakeFiles/astscf-ice-util-cpp-pjlib.dir/all] Error 2 make: *** [all] Error 2

The fix is simple. Simply add "-DEXTRA_LIBS='-luuid'" to the cmake command. In other words, the command line should look like:

cmake -DEXTRA_LIBS='-luuid' --build ./build