I also got linker errors reporting dlclose, dlopen, dlsym, etc as undefined.
I fixed that by adding ${CMAKE_DL_LIBS} to the
"target_link_libraries(amarok_collection-sqlcollection ..." section in
"src/collection/sqlcollection/CMakeLists.txt".
Maybe its just a freak occourance on my end. I'll commit that if
anyone has the same problem.