I have no issue in compiling in ubuntu 17.10. I don’t know the reason of your error, but I can share my configuration (it may help):
I compile with gcc 6.4.0
I used Qt5.10 compiled with the Jc’s qt-easy-build script.
this is the string that I used to configure Slicer:
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQt5_DIR=/home/davide/Slicer/Support/qt-everywhere-build-5.10.0/lib/cmake/Qt5 …/Slicer
In general I noticed that if you miss -DQt5_DIR variable (and you setup the Qt5 paths later on, e.g. in ccmake), you can have issue.
I hope helps
Why should you try to build it on Ubuntu. I just unpacked the tar-file and the I could run Slicer rightaway just from the slicer-file in the folder. Created a extra quicklauncher in the menu.
Done!
Correction: I’m not sure why I wrote Ubuntu 17.10 in the title. I’m actually running Pop!_OS. I think it’s based on Ubuntu 17.10, but it might not be the exact same thing. I’ll correct the title.
Yes. I deleted everything in the Slicer build directory and ran these commands again to be 100% sure:
cd S4D
cmake -DCMAKE_BUILD_TYPE:STRING=Debug -DQt5_DIR=/media/vaughan/workspace/lnx/devel/Support/qt-everywhere-build-5.10.0/lib/cmake/Qt5 …/S4
make -j7
I got the same result.
All the Qt definitions I see in ccmake refer to my Qt build (in /media/vaughan/workspace/lnx/devel/Support/). So I’m not sure what’s going on… whether it’s a configuration problem or something gone weird when I built Qt5. As far as I can tell I haven’t deviated from the usual process.
In case it’s relevant here are the versions of various packages/builds I’m using:
GCC: 7.2.0 installed through package manager
Git: 2.14.1
CMake: 3.11.0, built from source with openssl support
I’m not sure where I am supposed to find the build script in the second link you sent. But the links still helped. I can get Slicer to compile now. I ran the following:
From the first message, it seems like the problem is higher, at the Qt build level: the uic program is linked against system Qt libraries rather than against the libraries in its build tree:
/media/vaughan/workspace/lnx/devel/Support/qt-everywhere-build-5.10.0/bin/uic: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.10’ not found (required by /media/vaughan/workspace/lnx/devel/Support/qt-everywhere-build-5.10.0/bin/uic)
So the problem is potentially with Qt or the qt-easy-build discovery process rather than Slicer per se. (but the only thing I can think of is maybe you have LD_LIBRARY_PATH set already, for a Nix or multi-arch configuration? then ld might defer to those during build as in the link from Andras).
@Davide_Punzo@tavaughan when you build with qt-easy-build, do you get QtWebEngine? Did you install anything other than the Slicer prerequisites?
I’ve built on two different systems, and didn’t get QtWebEngine either time. From this list it seems I was missing bison, flex, and gperf (at least)… trying again after installing.
In addition, I noticed that I had to do a clean installation to get to compile the webengine (i.e., this workflow was not working: tried to compile, error, installing additional libraries, trying again to compile). It looked like the configuration script was not really looking again.
P.S.: at a cetain point the script print out the configuration building. This is mine after installing all the libraries in the post (and maybe few others) and doing again a clean building of Qt:
Configure summary:
Build type: linux-g++ (x86_64, CPU features: mmx sse sse2)
Configuration: use_gold_linker sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl compile_examples enable_new_dtags f16c largefile precompile_header rdrnd shani silent shared release c++11 concurrent dbus reduce_exports reduce_relocations stl
Build options:
Mode … release
Optimize release build for size … no
Building shared libraries … yes
Using C++ standard … C++11
Using ccache … no
Using gold linker … yes
Using new DTAGS … yes
Using precompiled headers … yes
Using LTCG … no
Target compiler supports:
SSE … SSE2 SSE3 SSSE3 SSE4.1 SSE4.2
AVX … AVX AVX2
AVX512 … F ER CD PF DQ BW VL IFMA VBMI
Other x86 … AES F16C RDRAND SHA
Build parts … libs tools
Qt modules and options:
Qt Concurrent … yes
Qt D-Bus … yes
Qt D-Bus directly linked to libdbus … yes
Qt Gui … yes
Qt Network … yes
Qt Sql … yes
Qt Testlib … yes
Qt Widgets … yes
Qt Xml … yes
Support enabled for:
Using pkg-config … yes
QML debugging … yes
udev … yes
Using system zlib … yes
Qt Core:
DoubleConversion … yes
Using system DoubleConversion … no
GLib … yes
iconv … no
ICU … yes
Logging backends:
journald … no
syslog … no
slog2 … no
Using system PCRE2 … no
Qt Network:
getifaddrs() … yes
IPv6 ifname … yes
libproxy … no
OpenSSL … yes
Qt directly linked to OpenSSL … no
SCTP … no
Use system proxies … yes
Qt Gui:
Accessibility … yes
FreeType … yes
Using system FreeType … yes
HarfBuzz … yes
Using system HarfBuzz … yes
Fontconfig … yes
Image formats:
GIF … yes
ICO … yes
JPEG … yes
Using system libjpeg … yes
PNG … yes
Using system libpng … yes
EGL … yes
OpenVG … no
OpenGL:
Desktop OpenGL … yes
OpenGL ES 2.0 … no
OpenGL ES 3.0 … no
OpenGL ES 3.1 … no
OpenGL ES 3.2 … no
Vulkan … no
Session Management … yes
Features used by QPA backends:
evdev … yes
libinput … no
INTEGRITY HID … no
mtdev … no
tslib … no
xkbcommon-evdev … no
QPA backends:
DirectFB … no
EGLFS … yes
EGLFS details:
EGLFS i.Mx6 … no
EGLFS i.Mx6 Wayland … no
EGLFS EGLDevice … yes
EGLFS GBM … no
EGLFS Mali … no
EGLFS Raspberry Pi … no
EGL on X11 … yes
LinuxFB … yes
VNC … yes
Mir client … no
X11:
Using system-provided XCB libraries … yes
EGL on X11 … yes
Xinput2 … yes
XCB XKB … yes
XLib … yes
XCB render … yes
XCB GLX … yes
XCB Xlib … yes
Using system-provided xkbcommon … no
Native painting (experimental) … yes
Qt Widgets:
GTK+ … no
Styles … Fusion Windows
Qt PrintSupport:
CUPS … yes
Qt Sql:
DB2 (IBM) … no
InterBase … no
MySql … no
OCI (Oracle) … no
ODBC … no
PostgreSQL … no
SQLite2 … no
SQLite … yes
Using system provided SQLite … no
TDS (Sybase) … no
Qt SerialBus:
Socket CAN … yes
Socket CAN FD … yes
QtXmlPatterns:
XML schema support … yes
Qt QML:
QML interpreter … yes
QML network support … yes
Qt Quick:
Direct3D 12 … no
AnimatedImage item … yes
Canvas item … yes
Support for Qt Quick Designer … yes
Flipable item … yes
GridView item … yes
ListView item … yes
Path support … yes
PathView item … yes
Positioner items … yes
ShaderEffect item … yes
Sprite item … yes
Qt Gamepad:
SDL2 … no
Qt 3D:
Assimp … yes
System Assimp … no
Output Qt3D Job traces … no
Output Qt3D GL traces … no
Use SSE2 instructions … yes
Use AVX2 instructions … no
Aspects:
Render aspect … yes
Input aspect … yes
Logic aspect … yes
Animation aspect … yes
Extras aspect … yes
Qt 3D GeometryLoaders:
Autodesk FBX … no
Qt Wayland Drivers:
EGL … yes
Raspberry Pi … no
XComposite EGL … yes
XComposite GLX … yes
DRM EGL … yes
libhybris EGL … no
Qt Wayland Client … yes
Qt Wayland Compositor … yes
Qt Bluetooth:
BlueZ … no
BlueZ Low Energy … no
Linux Crypto API … no
WinRT Bluetooth API (desktop & UWP) … no
Qt Sensors:
sensorfw … no
Qt Quick Controls 2:
Styles … Default Fusion Imagine Material Universal
Qt Quick Templates 2:
Hover support … yes
Multi-touch support … yes
Qt Positioning:
Gypsy GPS Daemon … no
WinRT Geolocation API … no
Qt Location:
Geoservice plugins:
OpenStreetMap … yes
HERE … yes
Esri … yes
Mapbox … yes
MapboxGL … no
Itemsoverlay … yes
Qt Multimedia:
ALSA … yes
GStreamer 1.0 … yes
GStreamer 0.10 … no
Video for Linux … yes
OpenAL … no
PulseAudio … yes
Resource Policy (libresourceqt5) … no
Windows Audio Services … no
DirectShow … no
Windows Media Foundation … no
Qt WebEngine:
Embedded build … no
Pepper Plugins … yes
Printing and PDF … yes
Proprietary Codecs … no
Spellchecker … yes
Native Spellchecker … no
WebRTC … yes
Use System Ninja … yes
Geolocation … yes
Use ALSA … yes
Use PulseAudio … yes
Optional system libraries used:
re2 … no
icu … no
libwebp, libwebpmux and libwebpdemux . yes
opus … yes
ffmpeg … no
libvpx … no
snappy … no
libsrtp … no
glib … yes
zlib … yes
minizip … yes
libevent … yes
jsoncpp … yes
protobuf … no
libxml2 and libxslt … yes
lcms2 … no
png … yes
harfbuzz … yes
Required system libraries:
fontconfig … yes
dbus … yes
nss … yes
khr … yes
glibc … yes
Required system libraries for qpa-xcb:
libdrm … yes
xcomposite … yes
xcursor … yes
xi … yes
xrandr … yes
xtst … yes
Thanks. The set of dependencies from the ICS link seems to have done it. Now I get a listing for WebEngine in the configure output. Unfortunately as far as I can tell there is no way to make ./configure fail fast if webengine won’t be built (https://github.com/jcfr/qt-easy-build/issues/40).