Error compiling ART

When trying to compile ART I get the following error:

Program name: art
Build type: release
Build without updating: false

-- CMAKE_BUILD_TYPE: release
-- Found OpenMP_C: -fopenmp  
-- Found OpenMP_CXX: -fopenmp  
-- Found OpenMP: TRUE   
-- tcmalloc not found
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
_el
    linked by target "rtengine" in directory /home/vato/programs/code-art/rtengine
    linked by target "rth-cli" in directory /home/vato/programs/code-art/rtgui
    linked by target "rth" in directory /home/vato/programs/code-art/rtgui

-- Configuring incomplete, errors occurred!
See also "/home/vato/programs/code-art/build/CMakeFiles/CMakeOutput.log".
See also "/home/vato/programs/code-art/build/CMakeFiles/CMakeError.log".

I used Morgan’s script: Bitbucket and checked all the dependencies on Linux - RawPedia.

What am I missing?

I think you missed that you need to install the tcmalloc library beforehand.

Unfortunately that is not it. I installed the library and the result is the same.

Hmmm ok, maybe the script tries to locate the tcmalloc library and writes corresponding option to if it is found.
Try to copy and paste the content of the error logs here (or better, through pastebin.com).

Hmm, I just tried to compile ART from the git master branch, don’t have tcmalloc installed, all went well. Here’s my cmake:

cmake -DCMAKE_BUILD_TYPE="release"  -DPROC_TARGET_NUMBER="2" -DOPTION_OMP="ON" ..

Probably a dependency from one of the other -D switches
 ??

Hi,

You can compile ART without tcmalloc, just set ENABLE_TCMALLOC:BOOL=OFF in the CMakeCache.txt file.

HTH

I’m trying to compile on openSUSE Leap 15.1 on a quite fresh intall. On another computer with the same OS but an older install the compilation worked. After

-- tcmalloc not found

it continued.

I tried this

but it did not make a difference.

On the older installation I must have some program or library installed that allows for the compilation. It is not mentioned in the dependencies on Linux - RawPedia and I can’t figure out what it might be.

After duckducking for hours I think it might have something to do with this

Please set them or make sure they are set and tested correctly in the CMake files:
_el

Specifically with the “_el” part. There it should say what is missing, but I don’t know what “_el” might be.

hi @vato,

can you try what @sguyader suggested? maybe we can figure out what is going wrong
 thanks!

CMakeOutput.log - Pastebin.com for CMakeOutput.log
CMakeError.log - Pastebin.com for CMakeError.log

Thanks

Hi,
can you try building like this?

$ cd /path/to/ART
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_BUNDLE=ON
$ make -j4

and see if that works? If not, can you paste the console output here or on pastebin? Thanks!

Output - Pastebin.com Unfortunately it gives the same error. :frowning:

Is it possible that the cloning step got screwed?
Can you delete your local source tree and try again from scratch?

@vato can you share some more details about your os version? thanks!

~/bin/art/build> neofetch 
vato@Desktop 
OS: openSUSE Leap 15.1 x86_64 
Kernel: 4.12.14-lp151.28.36-default 
Uptime: 1 hour, 8 mins 
Packages: 5466 (rpm) 
Shell: bash 4.4.23 
Resolution: 1920x1080 
DE: Plasma 
WM: KWin 
WM Theme: Breeze 
Theme: Breeze-Dark [GTK2/3] 
Icons: breeze-dark [GTK2/3] 
Terminal: yakuake 
Terminal Font: Hack 10 
CPU: Intel i5-6400 (4) @ 3.300GHz 
GPU: Intel HD Graphics 530 
Memory: 2581MiB / 32036MiB 

Here is the list of all the installed packages: rpm - Pastebin.com

I have actually tried several times, including with fresh cloning.

Can you try with the following patch applied? (save this to a file, e.g. p.patch, and then do patch -p1 < p.patch from the top dir of ART)

diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -323,10 +323,11 @@
     if(EXIV2_LIBRARY_DIRS)
         find_library(_el ${l} PATHS ${EXIV2_LIBRARY_DIRS} NO_DEFAULT_PATH)
     else()
-        find_library(_el ${l} PATHS ${EXIV2_LIBRARY_DIRS})
+        find_library(_el ${l}) # PATHS ${EXIV2_LIBRARY_DIRS})
     endif()
     set(EXIV2_LIBRARIES ${EXIV2_LIBRARIES} ${_el})
 endforeach()
+message(STATUS "Exiv2 libraries: ${EXIV2_LIBRARIES}")
 
 if(WIN32)
     add_definitions(-DWIN32)
@@ -546,10 +547,12 @@
     if(LENSFUN_LIBRARY_DIRS)
         find_library(_el ${l} PATHS ${LENSFUN_LIBRARY_DIRS} NO_DEFAULT_PATH)
     else()
-        find_library(_el ${l} PATHS ${LENSFUN_LIBRARY_DIRS})
+        find_library(_el ${l}) # PATHS ${LENSFUN_LIBRARY_DIRS})
     endif()
     set(LENSFUN_LIBRARIES ${LENSFUN_LIBRARIES} ${_el})
 endforeach()
+message(STATUS "lensfun libraries: ${LENSFUN_LIBRARIES}")
+
 include(CheckCXXSourceCompiles)
 set(CMAKE_REQUIRED_INCLUDES ${LENSFUN_INCLUDE_DIRS})
 set(CMAKE_REQUIRED_LIBRARIES ${LENSFUN_LIBRARIES})

I patched the CMakeLists.txt as per your instructions, removed the build directory, recreated it and tried again:

~/bin/art/build> cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_BUNDLE=ON                                                                                                                                              
-- The C compiler identification is GNU 7.5.0                                                                                                                                                                       
-- The CXX compiler identification is GNU 7.5.0                                                                                                                                                                     
-- Check for working C compiler: /usr/bin/cc                                                                                                                                                                        
-- Check for working C compiler: /usr/bin/cc -- works                                                                                                                                                               
-- Detecting C compiler ABI info                                                                                                                                                                                    
-- Detecting C compiler ABI info - done                                                                                                                                                                             
-- Detecting C compile features                                                                                                                                                                                     
-- Detecting C compile features - done                                                                                                                                                                              
-- Check for working CXX compiler: /usr/bin/c++                                                                                                                                                                     
-- Check for working CXX compiler: /usr/bin/c++ -- works                                                                                                                                                            
-- Detecting CXX compiler ABI info                                                                                                                                                                                  
-- Detecting CXX compiler ABI info - done                                                                                                                                                                           
-- Detecting CXX compile features                                                                                                                                                                                   
-- Detecting CXX compile features - done                                                                                                                                                                            
-- CMAKE_BUILD_TYPE: Release                                                                                                                                                                                        
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")                                                                                                                                                    
-- Checking for module 'gtk+-3.0>=3.16'                                                                                                                                                                             
--   Found gtk+-3.0, version 3.22.30                                                                                                                                                                                
-- Checking for module 'gtkmm-3.0>=3.16'                                                                                                                                                                            
--   Found gtkmm-3.0, version 3.22.2                                                                                                                                                                                
-- Checking for module 'glib-2.0>=2.44'                                                                                                                                                                             
--   Found glib-2.0, version 2.54.3                                                                                                                                                                                 
-- Checking for module 'glibmm-2.4>=2.44'                                                                                                                                                                           
--   Found glibmm-2.4, version 2.52.1                                                                                                                                                                               
-- Checking for module 'cairomm-1.0'                                                                                                                                                                                
--   Found cairomm-1.0, version 1.12.2                                                                                                                                                                              
-- Checking for module 'gio-2.0>=2.44'                                                                                                                                                                              
--   Found gio-2.0, version 2.54.3                                                                                                                                                                                  
-- Checking for module 'giomm-2.4>=2.44'                                                                                                                                                                            
--   Found giomm-2.4, version 2.52.1                                                                                                                                                                                
-- Checking for module 'gthread-2.0>=2.44'                                                                                                                                                                          
--   Found gthread-2.0, version 2.54.3                                                                                                                                                                              
-- Checking for module 'gobject-2.0>=2.44'                                                                                                                                                                          
--   Found gobject-2.0, version 2.54.3                                                                                                                                                                              
-- Checking for module 'sigc++-2.0>=2.3.1'                                                                                                                                                                          
--   Found sigc++-2.0, version 2.10.0                                                                                                                                                                               
-- Checking for module 'lensfun>=0.2'
--   Found lensfun, version 0.3.2.0
-- Checking for module 'librsvg-2.0>=2.40'
--   Found librsvg-2.0, version 2.42.3
-- Checking for module 'exiv2>=0.24'
--   Found exiv2, version 0.27.2
-- Exiv2 libraries: _el-NOTFOUND
-- Checking for module 'lcms2>=2.6'
--   Found lcms2, version 2.9
-- Checking for module 'expat>=2.1'
--   Found expat, version 2.2.5
-- Checking for module 'fftw3f'
--   Found fftw3f, version 3.3.6-pl2
-- Checking for module 'libtiff-4>=4.0.4'
--   Found libtiff-4, version 4.1.0
-- Found JPEG: /usr/lib64/libjpeg.so  
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib64/libpng.so (found version "1.6.34") 
-- Checking for module 'libcanberra-gtk3'
--   Found libcanberra-gtk3, version 0.30
-- Found OpenMP_C: -fopenmp (found version "4.5") 
-- Found OpenMP_CXX: -fopenmp (found version "4.5") 
-- Found OpenMP: TRUE (found version "4.5")  
-- Performing Test _fftw3f_multithread
-- Performing Test _fftw3f_multithread - Failed
-- lensfun libraries: /usr/lib64/liblensfun.so
-- Performing Test LENSFUN_HAS_LOAD_DIRECTORY
-- Performing Test LENSFUN_HAS_LOAD_DIRECTORY - Success
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
_el
    linked by target "rtengine" in directory /home/andreas/bin/art/rtengine
    linked by target "rth-cli" in directory /home/andreas/bin/art/rtgui
    linked by target "rth" in directory /home/andreas/bin/art/rtgui

-- Configuring incomplete, errors occurred!
See also "/home/andreas/bin/art/build/CMakeFiles/CMakeOutput.log".
See also "/home/andreas/bin/art/build/CMakeFiles/CMakeError.log".

there you go. Did you install the dev package of exiv2? pkg-config seems to say so, but then CMake somehow doesn’t find it


I managed to compile ART!

I first deinstalled all packages for libexiv 0.27, then I ran the cmake command and it worked. The following make command stopped at some point so I reinstalled libexiv 0.27 and the headers. From then on make and make install worked.

Something must be wrong with the libexiv 0.26 and libexiv 0.27 packages. The latter come from a different repository so that might be the problem.

Thank you for your help

2 Likes

Hi,

Not the same error but I have similar problems with compiling ART with libexiv2 0.25. Seems that 0.27 is a minimum requirement. I’m trying to build package for Ubuntu 18.04 (just to support LTS version since it is still supported), but getting:

[ 37%] Building CXX object rtengine/CMakeFiles/rtengine.dir/metadata.cc.o
cd /build/art-1.0/obj-x86_64-linux-gnu/rtengine && /usr/bin/c++ -DAUTO_GDK_FLUSH=0 -DMYFILE_MMAP -DNDEBUG -DRT_FFTW3F_OMP -DSTRICT_MUTEX=1 -DTRACE_MYRWMUTEX=0 -D_DNDEBUG -I/build/art-1.0/obj-x86_64-linux-gnu/rtengine -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/include/sigc+±2.0 -I/usr/lib/x86_64-linux-gnu/sigc+±2.0/include -I/usr/include/gtkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gtkmm-3.0/include -I/usr/include/atkmm-1.6 -I/usr/include/gtk-3.0/unix-print -I/usr/include/gdkmm-3.0 -I/usr/lib/x86_64-linux-gnu/gdkmm-3.0/include -I/usr/include/giomm-2.4 -I/usr/lib/x86_64-linux-gnu/giomm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/lib/x86_64-linux-gnu/pangomm-1.4/include -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gio-unix-2.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/atk-1.0 -I/usr/include/cairomm-1.0 -I/usr/lib/x86_64-linux-gnu/cairomm-1.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/lensfun -I/usr/include/librsvg-2.0 -O3 -std=c++11 -Werror=unused-label -Wall -Wuninitialized -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -ftree-vectorize -o CMakeFiles/rtengine.dir/metadata.cc.o -c /build/art-1.0/rtengine/metadata.cc
/build/art-1.0/rtengine/metadata.cc: In function ‘Exiv2::Image::AutoPtr rtengine::{anonymous}::open_exiv2(const Glib::ustring&)’:
/build/art-1.0/rtengine/metadata.cc:71:35: error: ‘kerErrorMessage’ is not a member of 'Exiv2’
** throw Exiv2::Error(Exiv2::kerErrorMessage, “exiv2: invalid image”);**