# PV-compilation problems with libSM and uuid

**URL:** https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884
**Category:** ParaView Support
**Created:** [November 12, 2018, 2:35pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884 "2018-11-12T14:35:55Z")
**Posts on this page:** 19
**Page:** 1

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 12, 2018, 2:35pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/1 "2018-11-12T14:35:55Z")

</div>

hi,

i’m trying to compile paraview on ubuntu 18.04;  
it is built with:

- CMAKE\_BUILD\_TYPE=Release
- CMAKE\_INSTALL\_PREFIX=/usr/local/
- PARAVIEW\_ENABLE\_PYTHON=ON
- PARAVIEW\_INSTALL\_DEVELOPMENT\_FILES=ON

in the consecutive compilation step i get:

/usr/lib/x86\_64-linux-gnu/libSM.so: undefined reference to `uuid_generate@UUID_1.0' /usr/lib/x86_64-linux-gnu/libSM.so: undefined reference to`uuid\_unparse\_lower@UUID\_1.0’

do you know how that can be fixed?

one of the solutions i found online (e.g. here: [https://stackoverflow.com/questions/45584275/getting-error-usr-lib-lib64-libsm-so-undefined-reference-to-uuid-unparse-l](https://stackoverflow.com/questions/45584275/getting-error-usr-lib-lib64-libsm-so-undefined-reference-to-uuid-unparse-l)) is to add a " -luuid" to a variable that collects libs

do you know where can i try it out? (which libs might be missing this flag?)

thank you!  
and best wishes,  
gosia

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 12, 2018, 3:56pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/2 "2018-11-12T15:56:15Z")

</div>

What link step is failing with the error message?

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 12, 2018, 5:11pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/3 "2018-11-12T17:11:28Z")

</div>

dear Ben,

thank you for the prompt answer!  
here are the last few lines from the terminal:

[80%] Linking CXX executable …/…/bin/vtkLegacyColorMapXMLToJSON  
/usr/lib/x86\_64-linux-gnu/libSM.so: undefined reference to `uuid_generate@UUID_1.0' /usr/lib/x86_64-linux-gnu/libSM.so: undefined reference to`uuid\_unparse\_lower@UUID\_1.0’  
collect2: error: ld returned 1 exit status  
Utilities/LegacyColorMapXMLToJSON/CMakeFiles/vtkLegacyColorMapXMLToJSON.dir/build.make:184: recipe for target ‘bin/vtkLegacyColorMapXMLToJSON’ failed  
make[2]: \*\*\* [bin/vtkLegacyColorMapXMLToJSON] Error 1  
CMakeFiles/Makefile2:18588: recipe for target ‘Utilities/LegacyColorMapXMLToJSON/CMakeFiles/vtkLegacyColorMapXMLToJSON.dir/all’ failed  
make[1]: \*\*\* [Utilities/LegacyColorMapXMLToJSON/CMakeFiles/vtkLegacyColorMapXMLToJSON.dir/all] Error 2  
Makefile:151: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

best wishes,  
g.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 12, 2018, 6:16pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/4 "2018-11-12T18:16:40Z")

</div>

Try adding `-luuid` to `X11_SM_LIBRARY`. I don’t know if it should take a space or semicolon, so I’d try both to see which works.

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 12, 2018, 6:37pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/5 "2018-11-12T18:37:06Z")

</div>

thank you!

can you please point me to a file in which i should set up this variable?  
grep in paraview does not show anything, also echo $X11\_SM\_LIBRARY is empty

best wishes,  
gosia

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 12, 2018, 6:44pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/6 "2018-11-12T18:44:11Z")

</div>

It’s in `CMakeCache.txt` in the build directory.

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 12, 2018, 8:14pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/7 "2018-11-12T20:14:00Z")

</div>

thank you!  
i see now (i didn’t find it before as in m CMakeCache.txt it is “X11\_SM\_LIB”)  
i tried:

1. //Path to a library.  
X11\_SM\_LIB:FILEPATH=/usr/lib/x86\_64-linux-gnu/libSM.so -luuid

it gave this error:  
make[2]: \*\*\* No rule to make target ‘/usr/lib/x86\_64-linux-gnu/libSM.so -luuid’, needed by ‘lib/libvtkRenderingOpenGL2-pv5.5.so.1’. Stop.  
CMakeFiles/Makefile2:3296: recipe for target ‘VTK/Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/all’ failed  
make[1]: \*\*\* [VTK/Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/all] Error 2  
Makefile:151: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

the same with:  
X11\_SM\_LIB:“FILEPATH=/usr/lib/x86\_64-linux-gnu/libSM.so -luuid”  
X11\_SM\_LIB:“STRING=/usr/lib/x86\_64-linux-gnu/libSM.so -luuid”

1. X11\_SM\_LIB:FILEPATH="/usr/lib/x86\_64-linux-gnu/libSM.so -luuid" ended with:  
/usr/bin/ld: cannot find -l/usr/lib/x86\_64-linux-gnu/libSM.so -luuid  
collect2: error: ld returned 1 exit status  
VTK/Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/build.make:3093: recipe for target ‘lib/libvtkRenderingOpenGL2-pv5.5.so.1’ failed  
make[2]: \*\*\* [lib/libvtkRenderingOpenGL2-pv5.5.so.1] Error 1  
CMakeFiles/Makefile2:3296: recipe for target ‘VTK/Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/all’ failed  
make[1]: \*\*\* [VTK/Rendering/OpenGL2/CMakeFiles/vtkRenderingOpenGL2.dir/all] Error 2  
Makefile:151: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

2. X11\_SM\_LIB:FILEPATH=/usr/lib/x86\_64-linux-gnu/libSM.so;-luuid  
took the longest but also gave an error:  
[100%] Linking CXX executable …/bin/pvdataserver  
//usr/lib/x86\_64-linux-gnu/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0' //usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to`uuid\_unparse\_lower@UUID\_1.0’  
collect2: error: ld returned 1 exit status  
CommandLineExecutables/CMakeFiles/pvdataserver.dir/build.make:129: recipe for target ‘bin/pvdataserver’ failed  
make[2]: \*\*\* [bin/pvdataserver] Error 1  
CMakeFiles/Makefile2:49614: recipe for target ‘CommandLineExecutables/CMakeFiles/pvdataserver.dir/all’ failed  
make[1]: \*\*\* [CommandLineExecutables/CMakeFiles/pvdataserver.dir/all] Error 2  
Makefile:151: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 13, 2018, 5:21pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/8 "2018-11-13T17:21:20Z")

</div>

hi,

do you know where i could add this “-luuid” flag to build the pvdataserver? (tried few places with no success)  
thank you!

from the point 3 in my last post:

[100%] Linking CXX executable …/bin/pvdataserver  
//usr/lib/x86\_64-linux-gnu/libSM.so.6: undefined reference to uuid\_generate@UUID\_1.0’ //usr/lib/x86\_64-linux-gnu/libSM.so.6: undefined reference touuid\_unparse\_lower@UUID\_1.0’  
collect2: error: ld returned 1 exit status  
CommandLineExecutables/CMakeFiles/pvdataserver.dir/build.make:129: recipe for target ‘bin/pvdataserver’ failed  
make[2]: \*\*\* [bin/pvdataserver] Error 1  
CMakeFiles/Makefile2:49614: recipe for target ‘CommandLineExecutables/CMakeFiles/pvdataserver.dir/all’ failed  
make[1]: \*\*\* [CommandLineExecutables/CMakeFiles/pvdataserver.dir/all] Error 2  
Makefile:151: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 14, 2018, 3:37pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/9 "2018-11-14T15:37:21Z")

</div>

Doing `make VERBOSE=1` shows the command line which fails. There should be `-luuid` in there somewhere.

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 14, 2018, 8:10pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/10 "2018-11-14T20:10:05Z")

</div>

here is the output from make VERBOSE=1 (there is no luuid…):

[100%] Linking CXX executable …/bin/pvdataserver  
cd /home/gosia/software/ParaView-v5.5.2/build/CommandLineExecutables && /usr/bin/cmake -E cmake\_link\_script CMakeFiles/pvdataserver.dir/link.txt --verbose=1  
/usr/bin/c++ -O3 -DNDEBUG -rdynamic CMakeFiles/pvdataserver.dir/pvdataserver.cxx.o -o …/bin/pvdataserver -Wl,-rpath,/home/gosia/software/ParaView-v5.5.2/build/lib:/home/gosia/software/anaconda3/lib: …/lib/libvtkPVServerManagerApplication-pv5.5.so.1 …/lib/libvtkUtilitiesPythonInitializer-pv5.5.so.1 …/lib/libvtkPVServerManagerCore-pv5.5.so.1 …/lib/libvtkPVServerImplementationCore-pv5.5.so.1 …/lib/libvtkPVClientServerCoreCore-pv5.5.so.1 …/lib/libvtkFiltersParallel-pv5.5.so.1 …/lib/libvtkFiltersExtraction-pv5.5.so.1 …/lib/libvtkFiltersModeling-pv5.5.so.1 …/lib/libvtkFiltersGeometry-pv5.5.so.1 …/lib/libvtkFiltersProgrammable-pv5.5.so.1 …/lib/libvtkPVVTKExtensionsCore-pv5.5.so.1 …/lib/libvtkPVCommon-pv5.5.so.1 …/lib/libvtkClientServer-pv5.5.so.1 …/lib/libvtkIOXMLParser-pv5.5.so.1 …/lib/libvtkFiltersSources-pv5.5.so.1 …/lib/libvtkFiltersGeneral-pv5.5.so.1 …/lib/libvtkFiltersCore-pv5.5.so.1 …/lib/libvtkIOImage-pv5.5.so.1 …/lib/libvtkParallelCore-pv5.5.so.1 …/lib/libvtkIOLegacy-pv5.5.so.1 …/lib/libvtkIOCore-pv5.5.so.1 …/lib/libvtkCommonExecutionModel-pv5.5.so.1 …/lib/libvtkCommonDataModel-pv5.5.so.1 …/lib/libvtkCommonSystem-pv5.5.so.1 …/lib/libvtkCommonTransforms-pv5.5.so.1 …/lib/libvtkPVVTKExtensionsSIL-pv5.5.so.1 …/lib/libprotobuf.so -lpthread …/lib/libvtkjsoncpp-pv5.5.so.1 …/lib/libvtkPythonInterpreter-pv5.5.so.1 …/lib/libvtkCommonMisc-pv5.5.so.1 …/lib/libvtkCommonMath-pv5.5.so.1 /home/gosia/software/anaconda3/lib/libpython3.6m.so …/lib/libvtkWrappingPython36Core-pv5.5.so.1 …/lib/libvtkCommonCore-pv5.5.so.1 …/lib/libvtksys-pv5.5.so.1 -ldl -Wl,-rpath-link,/home/gosia/software/ParaView-v5.5.2/build/lib  
//usr/lib/x86\_64-linux-gnu/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0' //usr/lib/x86_64-linux-gnu/libSM.so.6: undefined reference to`uuid\_unparse\_lower@UUID\_1.0’  
collect2: error: ld returned 1 exit status  
CommandLineExecutables/CMakeFiles/pvdataserver.dir/build.make:129: recipe for target ‘bin/pvdataserver’ failed  
make[2]: \*\*\* [bin/pvdataserver] Error 1  
make[2]: Leaving directory ‘/home/gosia/software/ParaView-v5.5.2/build’  
CMakeFiles/Makefile2:49614: recipe for target ‘CommandLineExecutables/CMakeFiles/pvdataserver.dir/all’ failed  
make[1]: \*\*\* [CommandLineExecutables/CMakeFiles/pvdataserver.dir/all] Error 2  
make[1]: Leaving directory ‘/home/gosia/software/ParaView-v5.5.2/build’  
Makefile:151: recipe for target ‘all’ failed  
make: \*\*\* [all] Error 2

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 14, 2018, 8:23pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/11 "2018-11-14T20:23:09Z")

</div>

i tried to add -luuid to  
CommandLineExecutables/CMakeFiles/pvdataserver.dir/link.txt  
but it gave the same error

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 14, 2018, 9:28pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/12 "2018-11-14T21:28:41Z")

</div>

What happens if you compile this small program:

```auto
#include <X11/SM/SMlib.h>
#include <stdlib.h>

int main(int argc, char* argv[]) {
  SmcProtocolVersion(NULL);
  return 0;
}

```

via:

```auto
gcc test.c -lSM -luuid

```

If this doesn’t work, I suspect something is wrong with the system. What happens without the `-luuid` might also be interesting.

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 14, 2018, 9:50pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/13 "2018-11-14T21:50:21Z")

</div>

when i compile with -luuid i get:

gosia@nela:~/jobs$ ./a.out  
Segmentation fault (core dumped)

without -luuid it’s the same

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 14, 2018, 9:53pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/14 "2018-11-14T21:53:21Z")

</div>

and when i compile with “-v”:

(it’s ubuntu 18.04 freshly upgraded from 16.04)

gosia@nela:~/jobs$ c  
Using built-in specs.  
COLLECT\_GCC=gcc  
COLLECT\_LTO\_WRAPPER=/usr/lib/gcc/x86\_64-linux-gnu/7/lto-wrapper  
OFFLOAD\_TARGET\_NAMES=nvptx-none  
OFFLOAD\_TARGET\_DEFAULT=1  
Target: x86\_64-linux-gnu  
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu 7.3.0-27ubuntu1~18.04’ --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86\_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86\_64-linux-gnu --host=x86\_64-linux-gnu --target=x86\_64-linux-gnu  
Thread model: posix  
gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)  
COLLECT\_GCC\_OPTIONS=’-v’ ‘-mtune=generic’ ‘-march=x86-64’  
/usr/lib/gcc/x86\_64-linux-gnu/7/cc1 -quiet -v -imultiarch x86\_64-linux-gnu test.c -quiet -dumpbase test.c -mtune=generic -march=x86-64 -auxbase test -version -fstack-protector-strong -Wformat -Wformat-security -o /tmp/cc5lHcHh.s  
GNU C11 (Ubuntu 7.3.0-27ubuntu1~18.04) version 7.3.0 (x86\_64-linux-gnu)  
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072  
ignoring nonexistent directory “/usr/local/include/x86\_64-linux-gnu”  
ignoring nonexistent directory “/usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/…/x86\_64-linux-gnu/include”  
#include “…” search starts here:  
#include \<…\> search starts here:  
/usr/lib/gcc/x86\_64-linux-gnu/7/include  
/usr/local/include  
/usr/lib/gcc/x86\_64-linux-gnu/7/include-fixed  
/usr/include/x86\_64-linux-gnu  
/usr/include  
End of search list.  
GNU C11 (Ubuntu 7.3.0-27ubuntu1~18.04) version 7.3.0 (x86\_64-linux-gnu)  
compiled by GNU C version 7.3.0, GMP version 6.1.2, MPFR version 4.0.1, MPC version 1.1.0, isl version isl-0.19-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072  
Compiler executable checksum: c8081a99abb72bbfd9129549110a350c  
COLLECT\_GCC\_OPTIONS=’-v’ ‘-mtune=generic’ ‘-march=x86-64’  
as -v --64 -o /tmp/cc4TiOCg.o /tmp/cc5lHcHh.s  
GNU assembler version 2.30 (x86\_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.30  
COMPILER\_PATH=/usr/lib/gcc/x86\_64-linux-gnu/7/:/usr/lib/gcc/x86\_64-linux-gnu/7/:/usr/lib/gcc/x86\_64-linux-gnu/:/usr/lib/gcc/x86\_64-linux-gnu/7/:/usr/lib/gcc/x86\_64-linux-gnu/  
LIBRARY\_PATH=/usr/lib/gcc/x86\_64-linux-gnu/7/:/usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/x86\_64-linux-gnu/:/usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/…/lib/:/lib/x86\_64-linux-gnu/:/lib/…/lib/:/usr/lib/x86\_64-linux-gnu/:/usr/lib/…/lib/:/usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/:/lib/:/usr/lib/  
COLLECT\_GCC\_OPTIONS=’-v’ ‘-mtune=generic’ ‘-march=x86-64’  
/usr/lib/gcc/x86\_64-linux-gnu/7/collect2 -plugin /usr/lib/gcc/x86\_64-linux-gnu/7/liblto\_plugin.so -plugin-opt=/usr/lib/gcc/x86\_64-linux-gnu/7/lto-wrapper -plugin-opt=-fresolution=/tmp/cc1LEeBf.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc\_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc\_s --sysroot=/ --build-id --eh-frame-hdr -m elf\_x86\_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro /usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/x86\_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/x86\_64-linux-gnu/crti.o /usr/lib/gcc/x86\_64-linux-gnu/7/crtbeginS.o -L/usr/lib/gcc/x86\_64-linux-gnu/7 -L/usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/x86\_64-linux-gnu -L/usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/…/lib -L/lib/x86\_64-linux-gnu -L/lib/…/lib -L/usr/lib/x86\_64-linux-gnu -L/usr/lib/…/lib -L/usr/lib/gcc/x86\_64-linux-gnu/7/…/…/… /tmp/cc4TiOCg.o -lSM -luuid -lgcc --push-state --as-needed -lgcc\_s --pop-state -lc -lgcc --push-state --as-needed -lgcc\_s --pop-state /usr/lib/gcc/x86\_64-linux-gnu/7/crtendS.o /usr/lib/gcc/x86\_64-linux-gnu/7/…/…/…/x86\_64-linux-gnu/crtn.o  
COLLECT\_GCC\_OPTIONS=’-v’ ‘-mtune=generic’ ‘-march=x86-64’

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 15, 2018, 10:00pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/15 "2018-11-15T22:00:34Z")

</div>

A segfault is expected. I guess more will have to be done to track down where the libuuid requirement is actually coming from and how to get it into the build.

---

<div class="post-metadata">

### Author: ![gosia](https://discourse.paraview.org/user_avatar/discourse.paraview.org/gosia/32/9176_2.png) [@gosia](https://discourse.paraview.org/u/gosia)
#### Post date: [November 16, 2018, 9:27am UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/16 "2018-11-16T09:27:13Z")

</div>

dear Ben,  
thank you for your continuous help,

finally i decided to try with paraview 5.6.0 - there the error was the same at first, but then adding -luuid as in:

X11\_SM\_LIB:FILEPATH=/usr/lib/x86\_64-linux-gnu/libSM.so;-luuid

in CMakeCache.txt helped and paraview compiled without problems,  
there must be some difference between PV 5.5.2 and 5.6.0 related to that error, as i didn’t install/reinstall any other software on my laptop in between,

thanks again!  
best wishes,  
gosia

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.paraview.org/u/ben.boeckel)
#### Post date: [November 16, 2018, 4:11pm UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/17 "2018-11-16T16:11:03Z")

</div>

Thanks for reporting back. There probably is some difference, but if anyone needs to know in the future, bisecting would probably show the change which fixed it.

---

<div class="post-metadata">

### Author: ![TimJim](https://discourse.paraview.org/user_avatar/discourse.paraview.org/timjim/32/1270_2.png) [@TimJim](https://discourse.paraview.org/u/TimJim)
#### Post date: [April 3, 2019, 7:14am UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/18 "2019-04-03T07:14:42Z")

</div>

Hi, I don’t know if I should start a new thread but I’m having the same issue with ParaView 5.6.0.

I tried adding the following to my CMakeCache.txt as suggested above:

X11\_SM\_LIB:FILEPATH=/usr/lib/x86\_64-linux-gnu/libSM.so;-luuid

but I do not seem to be able to get past this issue. Running make with VERBOSE=1, the result line which fails is:

$ cd /opt/paraview/ParaView-5.6.0\_build/CommandLineExecutables && /opt/cmake/cmake-3.11.0/bin/cmake -E cmake\_link\_script CMakeFiles/pvpython.dir/link.txt --verbose=1  
/usr/bin/c++ -fPIC -O3 -DNDEBUG -rdynamic CMakeFiles/pvpython.dir/pvpython.cxx.o -o …/bin/pvpython -Wl,-rpath,/opt/paraview/ParaView-5.6.0\_build/lib:/home/tjim/anaconda3/envs/pv/lib: …/lib/libvtkPVServerManagerApplication-pv5.6.so.1 …/lib/libvtkUtilitiesPythonInitializer-pv5.6.so.1 …/lib/libvtkPVServerManagerCore-pv5.6.so.1 …/lib/libvtkPVServerImplementationCore-pv5.6.so.1 …/lib/libvtkPVClientServerCoreCore-pv5.6.so.1 …/lib/libvtkFiltersParallel-pv5.6.so.1 …/lib/libvtkFiltersExtraction-pv5.6.so.1 …/lib/libvtkFiltersModeling-pv5.6.so.1 …/lib/libvtkFiltersGeometry-pv5.6.so.1 …/lib/libvtkFiltersProgrammable-pv5.6.so.1 …/lib/libvtkPVVTKExtensionsCore-pv5.6.so.1 …/lib/libvtkPVCommon-pv5.6.so.1 …/lib/libvtkClientServer-pv5.6.so.1 …/lib/libvtkIOXMLParser-pv5.6.so.1 …/lib/libvtkFiltersSources-pv5.6.so.1 …/lib/libvtkFiltersGeneral-pv5.6.so.1 …/lib/libvtkFiltersCore-pv5.6.so.1 …/lib/libvtkIOImage-pv5.6.so.1 …/lib/libvtkParallelCore-pv5.6.so.1 …/lib/libvtkIOLegacy-pv5.6.so.1 …/lib/libvtkIOCore-pv5.6.so.1 …/lib/libvtkCommonExecutionModel-pv5.6.so.1 …/lib/libvtkCommonDataModel-pv5.6.so.1 …/lib/libvtkCommonSystem-pv5.6.so.1 …/lib/libvtkCommonTransforms-pv5.6.so.1 …/lib/libvtkPVVTKExtensionsSIL-pv5.6.so.1 …/lib/libprotobuf.so -lpthread …/lib/libvtkjsoncpp-pv5.6.so.1 …/lib/libvtkPythonInterpreter-pv5.6.so.1 …/lib/libvtkCommonMisc-pv5.6.so.1 …/lib/libvtkCommonMath-pv5.6.so.1 /home/tjim/anaconda3/envs/pv/lib/libpython3.7m.so …/lib/libvtkWrappingPython37Core-pv5.6.so.1 …/lib/libvtkCommonCore-pv5.6.so.1 …/lib/libvtksys-pv5.6.so.1 -ldl -Wl,-rpath-link,/opt/paraview/ParaView-5.6.0\_build/lib  
//usr/lib64/libSM.so.6: undefined reference to `uuid_generate@UUID_1.0' //usr/lib64/libSM.so.6: undefined reference to`uuid\_unparse\_lower@UUID\_1.0’  
collect2: error: ld returned 1 exit status

Can you give any advice?

Many thanks!  
Tim

---

<div class="post-metadata">

### Author: ![kai1337](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/f1d935/32.png) [@kai1337](https://discourse.paraview.org/u/kai1337)
#### Post date: [May 21, 2019, 7:35am UTC](https://discourse.paraview.org/t/pv-compilation-problems-with-libsm-and-uuid/884/19 "2019-05-21T07:35:20Z")

</div>

> [@ben.boeckel](#):
>
> Try adding `-luuid` to `X11_SM_LIBRARY` . I don’t know if it should take a space or semicolon, so I’d try both to see which works.

Similar to what Ben said I think one just needs to do this in the CMake-way. Therefore, add the following line to the file ParaView-v\*/CMakeLists.txt:  
`SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -luuid")`  
I’m not sure where to put it, I just placed it before the first `include(...)` statement. Solved the issue at least for me.
