Closed jake-emerson closed 4 years ago
Thanks for the issue report. On my ubuntu18.04, I wasn't able to reproduce your issue. There may be a problem with your qglviewer version, how did you install it ?
On 18.04, the package version is 2.6.3 (working with qt4 and qt5). With that default package version, everything works fine (both qt5 and qt4) when building DGtal.
Can you please confirm me?
@jake-emerson Cannot test on 18.04 but back in the day you needed:
libqglviewer-dev-qt4, libqglviewer-headers, libqglviewer2-qt4
Moving to version 2.6.3 of QGLViewer fixed my original error. I stuck with qt5
. Thank you!
Now I have an issue with linking GraphicsMagick. I tested my install with the following:
> GraphicsMagick++-config --ldflags --libs
-L/usr/local/lib
-lGraphicsMagick++ -lGraphicsMagick -ljbig -lwebp -lwebpmux -llcms2 -ltiff -lfreetype -ljpeg -lpng16 -lwmflite -lXext -lSM -lICE -lX11 -llzma -lbz2 -lxml2 -lz -lm -lpthread -lgomp
which seems to be fine. However, when I cmake DGtal it is unable to link properly.
I use the following for cmake:
> cmake .. -DWITH_GMP=true -DWITH_ITK=true -DWITH_EIGEN=true -DWITH_CAIRO=true -DWITH_QGLVIEWER=true -DWITH_MAGICK=true -DWITH_QT5=true -DCMAKE_BUILD_TYPE=debug -DVERBOSE=true -DDEBUG_VERBOSE=true /home/jake/DGtal
and make
produces the following (truncated) error:
[ 6%] Linking CXX executable imageBasicSubsampling
/usr/local/lib/libGraphicsMagick++.a(Magick___lib_libGraphicsMagick___la-Geometry.o): In function `Magick::Geometry::operator=(std::__cxx11::basic_string<char, std::char_traits<char>, std::$
llocator<char> > const&)':
Geometry.cpp:(.text+0xcf3): undefined reference to `MagickStrlCpy'
Geometry.cpp:(.text+0xd3d): undefined reference to `GetPageGeometry'
Geometry.cpp:(.text+0xd6c): undefined reference to `MagickStrlCpy'
Geometry.cpp:(.text+0xd89): undefined reference to `MagickFree'
Geometry.cpp:(.text+0xdee): undefined reference to `GetGeometry'
/usr/local/lib/libGraphicsMagick++.a(Magick___lib_libGraphicsMagick___la-Geometry.o): In function `Magick::Geometry::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::al
locator<char> >() const':
Geometry.cpp:(.text+0x11bd): undefined reference to `FormatString'
Geometry.cpp:(.text+0x1216): undefined reference to `FormatString'
Geometry.cpp:(.text+0x12c5): undefined reference to `FormatString'
Geometry.cpp:(.text+0x1340): undefined reference to `FormatString'
/usr/local/lib/libGraphicsMagick++.a(Magick___lib_libGraphicsMagick___la-Image.o): In function `Magick::Image::adaptiveThreshold(unsigned int, unsigned int, double)':
Image.cpp:(.text+0xd80): undefined reference to `GetExceptionInfo'
Image.cpp:(.text+0xdbe): undefined reference to `AdaptiveThresholdImage'
...
/usr/local/lib/libGraphicsMagick++.a(Magick___lib_libGraphicsMagick___la-Functions.o): In function `Magick::CloneString(char**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
Functions.cpp:(.text+0x2a): undefined reference to `CloneString'
collect2: error: ld returned 1 exit status
examples/images/CMakeFiles/imageBasicSubsampling.dir/build.make:222: recipe for target 'examples/images/imageBasicSubsampling' failed
make[2]: *** [examples/images/imageBasicSubsampling] Error 1
CMakeFiles/Makefile2:815: recipe for target 'examples/images/CMakeFiles/imageBasicSubsampling.dir/all' failed
make[1]: *** [examples/images/CMakeFiles/imageBasicSubsampling.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2
I compiled GraphicsMagick as follows:
wget https://sourceforge.net/projects/graphicsmagick/files/graphicsmagick/1.3.31/GraphicsMagick-1.3.31.tar.gz
tar -xzf GraphicsMagick-1.3.31.tar.gz
cd GraphicsMagick-1.3.31
./configure
make
make install
ldconfig /usr/local/lib
Based on this PR I'm wondering if I should just switch to ImageMagick. https://github.com/DGtal-team/DGtal/pull/1366
Scratch that. The FindMagick.cmake
script seems to only look for GraphicsMagick:
https://github.com/DGtal-team/DGtal/blob/1.0/cmake/FindMagick.cmake
@jake-emerson it works here (openSUSE 15.1) with GraphicsMagick 1.3.34
@jake-emerson I suggest compiling GraphicsMagick with --enable-shared --disable-static
@jake-emerson here you can see other compilation flags used by openSUSE package system. See lines starting from %configure
.
Can this PR be closed?
Hi all, I'm having some trouble compiling DGtal. I built
GraphicsMagick
andlibQGLViewer
from sources. When running the following I don't get any errors:However, if I have
sudo apt install qt5-default
then I can't installlibQGLViewer
(it requires Qt4).With
Qt4
I am getting the following error:Is there some way out of this circular dependency problem? Is there a Dockerfile out there somewhere that will work to show a full installation example?