Build error curl/libssh2

Hi, I am getting the following build error:

[ 23%] Linking CXX shared library ../../bin/
/usr/bin/ld: /PHShome/gcs6/build/slicer-4/Slicer-build/curl-install/lib/libcurl.a(libssh2.c.o): in function `ssh_statemach_act':
libssh2.c:(.text+0x322): undefined reference to `libssh2_session_handshake'
/usr/bin/ld: libssh2.c:(.text+0x363): undefined reference to `libssh2_hostkey_hash'
/usr/bin/ld: libssh2.c:(.text+0x40b): undefined reference to `libssh2_session_hostkey'
<and many more>

Missing symbols are defined in /usr/lib/x86_64-linux-gnu/, but libssh2 is not specified in the link command for building target libRemoteIO. Any idea how to fix?

This was mentioned in Build fails in VTK : many undefined references. You can see my fix at the bottom, as discussed in the thread, I’m not sure it’s the correct fix.

@jcfr - any update/opinions on this?


@RafaelPalomar does your new linux build instructions page include description of this solution/workaround? It would be great if you could add it and finalize the page soon (we can always improve it as needed). Thank you!

Is the addition of ssh2 as a library a reasonable fix? or just a workaround?

I’m happy to submit a pull request if it’s an actual fix.

Thanks HH. This works great! (Slicer crashes, but it does compile.)