I'm trying to compile VTK from source and I received the following error. I'm running Fedora 27, kernel version 4.14.11-300.fc27.x86_64

/usr/lib64/libSM.so: undefined reference to `uuid_generate@UUID_1.0'
/usr/lib64/libSM.so: undefined reference to `uuid_unparse_lower@UUID_1.0'

ldd /usr/lib64/libSM.so shows

 $ldd /usr/lib64/libSM.so
    linux-vdso.so.1 (0x00007ffd4998b000)
    libICE.so.6 => /lib64/libICE.so.6 (0x00007f3aa36ff000)
    libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f3aa34fa000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f3aa3115000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f3aa3b23000)

Further looking at the symbols in libuuid.so.1 shows

$objdump -T /lib64/libuuid.so.1 | grep 'uuid_generate$'
0000000000002370 g    DF .text  0000000000000087  UUID_1.0    uuid_generate

$objdump -T /lib64/libuuid.so.1 | grep 'uuid_unparse_lower'
0000000000002710 g    DF .text  0000000000000002  UUID_1.0    uuid_unparse_lower

The output of ldconfig is

$sudo ldconfig -p | grep libuuid

libuuid.so.1 (libc6,x86-64) => /lib64/libuuid.so.1
    libuuid.so.1 (libc6) => /lib/libuuid.so.1

$ sudo ldconfig -p | grep libSM
    libSM.so.6 (libc6,x86-64) => /lib64/libSM.so.6
    libSM.so.6 (libc6) => /lib/libSM.so.6
    libSM.so (libc6,x86-64) => /lib64/libSM.so

I'm not sure, what is going on here. Can someone please help?

Thank you Senthil


Try adding a -luuid to the link. According to my understanding of *.so files you shouldn't have to do that, but in my case it fixes a similar problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.