Project

General

Profile

Actions

Build Tips and Tricks

There are so many things that can disturb the build, it's not possible to document them all. However, here are solutions to common issues reported by users.

1 Fetch the build from the buildserver

You can fetch builds from the buildserver. The trunk is built every night about 02:30 in England. http://exiv2.dyndns.org:8080/userContent/builds/

The builds are organised by SVN, Date, Platform and "Latest". 16 Platforms are built: Linux (64 bit shared), MacOS-X (64 bit shared), Cygwin (64 bit shared), MinGW/32, MSVC (32 and 64 bit DLLs on Visual Studio 2005/8/10/12/13/15). Please see ReadMe.txt in the bundle for information about the build. The build contains libraries, header files, executable versions of the sample programs, build and test logs.

2 sudo for Cygwin and MinGW users

#!/bin/bash

## sudo - dummy script
"$@" 

# That's all Folks
## 

3 Building in clean directories

When the exiv2 directory has been polluted by a failed build, or you wish to sync to an older revision, clean your machine:

$ sudo make distclean
Then proceed to build in the usual way. For autotools users:
$ make config ; ./configure ; make ; sudo make install ; make samples
For CMake users:
sudo rm -rf build ; mkdir build ; cd build ; cmake .. ; make

4 Version of CMake

If you see the message CMake Error: Could not find CMAKE_ROOT, you are probably using the default /bin/cmake. Download and build cmake from source and use /usr/local/bin/cmake.exe.

If you are building using CMake on MinGW, you must build cmake from source. The distributed binaries Windows versions of CMake with installers are for use in cmd.exe/dos. They will not work for MinGW.

If you are building using CMake on Windows with Visual Studio, download and install a recent version of CMake. Use the batch files in contrib/cmake/msvc.

5 NLS (Natural Language Support)

If you get a message such as undefined reference to `libintl_bindtextdomain', there is something wrong with your installation of gettext which is part of the NLS. You can disable NLS as follow. For autotools users:

$ make distclean ; make config ; ./configure --disable-nls ; make etc...
For CMake users:
$ rmdir build ; make build ; cd build ; cmake -DEXIV2_ENABLE_NLS=OFF .. ; make etc...

6 CLion, Linux, and CMake

When using CLion under Linux (possibly on other OSes) you may get linker errors where it reports to be unable to find certain libraries you may be required to edit src/CMakeList.txt and add the library paths used by your particular flavor of Linux, an example of the paths for Ubuntu 16.04.1 :

 set(LINK_DIRECTORIES
        /usr/lib
        /usr/lib/x86_64-linux-gnu
        /usr/lib/i386-linux-gnu
        /usr/local/lib
)

link_directories($(LINK_DIRECTORIES))

Note: These lines would be added to the top of src/CMakeList.txt

Updated by Robin Mills about 5 years ago · 11 revisions