Project

General

Profile

Bug #10953

Compiling darktable 2.0.2, PCLinuxOS, implicit declaration of function ‘strncmp’

Added by Anonymous over 3 years ago. Updated 2 months ago.

Status:
Incomplete
Priority:
Low
Assignee:
-
Category:
Buildsystem
Target version:
-
Start date:
03/17/2016
Due date:
% Done:

20%

Affected Version:
2.0.2
System:
unknown
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Hi

I'm trying to build rpm package for personal use. After installing all build requirements called by cmake script I have error in make process.

cmake
@cmake DCMAKE_INSTALL_PREFIX=/usr -DBINARY_PACKAGE_BUILD=ON ..
-
The CXX compiler identification is GNU 4.9.2
-- The C compiler identification is GNU 4.9.2
-- 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
-- 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
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- Found little endian system. Good.
WARNING: CMAKE_BUILD_TYPE is not defined!
Defaulting to CMAKE_BUILD_TYPE=RelWithDebInfo. Use ccmake to set a proper value.
-- Looking for external programs
-- Found perl
-- Found intltool-merge
-- Found xsltproc
-- Found xmllint
-- All external programs found
-- Found Gettext
-- Found msgfmt to convert language file. Translation enabled
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: fopenmp
-
Found PkgConfig: /usr/bin/pkg-config (found version "0.29")
-- checking for module 'gtk+-3.0'
-- found gtk+-3.0, version 3.14.14
-- checking for module 'gdk-pixbuf-2.0'
-- found gdk-pixbuf-2.0, version 2.32.2
-- checking for module 'glib-2.0'
-- found glib-2.0, version 2.46.2
-- Found Glib
-- checking for module 'pango'
-- found pango, version 1.38.1
-- checking for module 'atk'
-- found atk, version 2.18.0
-- Found GTK3: /usr/lib64/libgtk-3.so (Required is at least version "3.10")
-- Found LibXml2: /usr/lib64/libxml2.so (found suitable version "2.9.3", minimum required is "2.6")
-- checking for one of the modules 'libsoup-2.4;libsoup2'
-- checking for one of the modules 'libsoup-2.2;libsoup2'
-- checking for module 'libgphoto2'
-- found libgphoto2, version 2.5.5.1
-- Found GPHOTO2: /usr/lib64/libgphoto2.so
-- Found OPENEXR: /usr/lib64/libIlmImf.so;/usr/lib64/libImath.so;/usr/lib64/libIex.so;/usr/lib64/libIlmThread.so
-- checking for module 'libwebp'
-- found libwebp, version 0.5.0
-- Found WEBP: /usr/lib64/libwebp.so (Required is at least version "0.3.0")
-- checking for module 'lensfun'
-- found lensfun, version 0.3.2.0
-- Found LENSFUN: /usr/lib64/liblensfun.so
-- checking for module 'gio-2.0'
-- found gio-2.0, version 2.46.2
-- Found GIO
-- Found GThread: /usr/lib64/libgthread-2.0.so
-- Found GModule: /usr/lib64/libgmodule-2.0.so
-- Found PANGOCAIRO: /usr/lib64/libpangocairo-1.0.so
-- Found PThread: /usr/lib64/libpthread.so
-- Found RSVG2: /usr/lib64/librsvg-2.so
-- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.3")
-- Found SQLITE3: /usr/lib64/libsqlite3.so
-- Found CURL: /usr/lib64/libcurl.so (found version "7.47.1")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8")
-- Found PNG: /usr/lib64/libpng.so (found version "1.2.55")
-- Found JPEG: /usr/lib64/libjpeg.so
-- Found TIFF: /usr/lib64/libtiff.so (found version "4.0.6")
-- Found LCMS2: /usr/lib64/liblcms2.so
-- checking for module 'json-glib-1.0'
-- found json-glib-1.0, version 1.0.4
-- Found JsonGlib
-- checking for module 'exiv2'
-- found exiv2, version 0.24
-- Found EXIV2: /usr/lib64/libexiv2.so
-- Internationalization: Enabled
-- Found FLICKCURL: /usr/lib64/libflickcurl.so
-- checking for module 'libopenjpeg1'
-- found libopenjpeg1, version 1.5.1
-- Found OpenJPEG: /usr/lib64/libopenjpeg.so
-- checking for module 'libsecret-1'
-- found libsecret-1, version 0.18.4
-- Found LIBSECRET: /usr/include/libsecret-1;/usr/include/glib-2.0;/usr/lib64/glib-2.0/include
-- checking for module 'gnome-keyring-1'
-- found gnome-keyring-1, version 3.12.0
-- Found GNOMEKEYRING: /usr/lib64/libgnome-keyring.so
-- GnomeKeyring is only supported for versions older than 3.12.0, version 3.12.0 found. Please use libsecret instead.
-- checking for module 'GraphicsMagick'
-- found GraphicsMagick, version 1.3.20
-- Found GraphicsMagick
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS
-- Performing Test HAVE_BUILTIN_CPU_SUPPORTS - Success
-- checking for one of the modules 'lua52;lua5.2;lua-5.2;lua'
-- Lua support: Enabled
-- Found Pugixml: /usr/lib64/libpugixml.so (Required is at least version "1.2")
-- checking for module 'osmgpsmap-1.0'
-- found osmgpsmap-1.0, version 1.0.2
-- Map mode: enabled
-- checking for module 'colord'
-- found colord, version 1.0.9
-- checking for module 'colord-gtk'
-- found colord-gtk, version 0.1.25
-- Found CUPS: /usr/lib64/libcups.so
-- Print mode: enabled
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so
-- Looking for XOpenDisplay in /usr/lib64/libX11.so;/usr/lib64/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Found X11: /usr/lib64/libX11.so
-- building darktable-cmstest with colord support. nice.
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found SDL: /usr/lib64/libSDLmain.a;/usr/lib64/libSDL.so (found version "1.2.15")
-- Found OpenGL: /usr/lib64/libGL.so
CMake Warning at doc/CMakeLists.txt:36 (message):
the sources of the usermanual are missing so you won't be able to generate
it. if this is a release tarball then that's normal.

please grab them from github if you want to work on the manual.

-- Configuring done
-- Generating done
-- Build files have been written to: /home/marcin/Pulpit/darktable-2.0.2/build
@

make
make -j4
[ 0%] [ 0%] Built target locale_ca
Built target locale_cs
[ 0%] Built target locale_da
[ 1%] Built target locale_de
[ 1%] Built target locale_el
[ 1%] Built target locale_es
[ 1%] [ 1%] Built target locale_fr
Built target locale_he
[ 2%] Built target locale_hu
[ 2%] Built target locale_it
[ 2%] Built target locale_ja
[ 2%] [ 2%] Built target locale_nl
Built target locale_pl
[ 3%] [ 3%] Built target locale_pt_BR
Built target locale_pt_PT
[ 3%] [ 3%] Built target locale_sk
Built target locale_ru
[ 4%] Built target locale_sq
[ 4%] [ 4%] Built target locale_uk
Built target locale_sv
[ 4%] Built target lautoc
Scanning dependencies of target darktable.desktop_file
[ 5%] Building C object src/CMakeFiles/metadata_dummy.dir/metadata_gen.c.o
[ 5%] [ 5%] Building C object src/cmstest/CMakeFiles/darktable-cmstest.dir/main.c.o
Generating darktable.desktop
[ 19%] Built target rawspeed
Scanning dependencies of target darktablerc_file
[ 19%] /home/marcin/Pulpit/darktable-2.0.2/build/src/metadata_gen.c: In function ‘dt_metadata_get_keyid’:
/home/marcin/Pulpit/darktable-2.0.2/build/src/metadata_gen.c:8:5: error: implicit declaration of function ‘strncmp’ [-Werror=implicit-function-declaration]
if(strncmp(key, "Xmp.dc.creator", 14) == 0)
^
Generating darktablerc
cc1: some warnings being treated as errors
src/CMakeFiles/metadata_dummy.dir/build.make:62: recipe for target 'src/CMakeFiles/metadata_dummy.dir/metadata_gen.c.o' failed
make[2]: *** [src/CMakeFiles/metadata_dummy.dir/metadata_gen.c.o] Error 1
CMakeFiles/Makefile2:997: recipe for target 'src/CMakeFiles/metadata_dummy.dir/all' failed
make[1]: *** [src/CMakeFiles/metadata_dummy.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/home/marcin/Pulpit/darktable-2.0.2/src/cmstest/main.c: In function ‘main’:
/home/marcin/Pulpit/darktable-2.0.2/src/cmstest/main.c:296:34: error: implicit declaration of function ‘memcmp’ [-Werror=implicit-function-declaration]
&& (size 0 || memcmp(monitor->x_atom_data, tmp_data, size) 0));
^
[ 19%] Built target darktablerc_file
cc1: some warnings being treated as errors
src/cmstest/CMakeFiles/darktable-cmstest.dir/build.make:54: recipe for target 'src/cmstest/CMakeFiles/darktable-cmstest.dir/main.c.o' failed
make2: * [src/cmstest/CMakeFiles/darktable-cmstest.dir/main.c.o] Error 1
CMakeFiles/Makefile2:5969: recipe for target 'src/cmstest/CMakeFiles/darktable-cmstest.dir/all' failed
make1:
[src/cmstest/CMakeFiles/darktable-cmstest.dir/all] Error 2
Merging translations into /home/marcin/Pulpit/darktable-2.0.2/build/data/darktable.desktop.
[ 19%] Built target darktable.desktop_file
Makefile:137: recipe for target 'all' failed
make: *
* [all] Error 2

Building environment:
rpm -qa 'rpm$|gcc|gcc-c++|cmake'
gcc-c++-4.9.2-2pclos2015
libgcc1-4.9.2-2pclos2015
cmake-3.0.2-1pclos2015
gccmakedep-1.0.2-3pclos2011
gcc-cpp-4.9.2-2pclos2015
rpm-4.8.1-7pclos2013
gcc-4.9.2-2pclos2015

I kindly ask for tips how to solve the issue.

rpm-tmp.WRIfYn (2.24 KB) Anonymous, 03/23/2016 08:22 PM

darktable_build.log Magnifier (173 KB) Anonymous, 03/23/2016 08:22 PM

History

#1 Updated by Tobias Ellinghaus over 3 years ago

  • % Done changed from 0 to 20
  • Status changed from New to Incomplete

Both strncmp and memcmp are defined in string.h. Is that file present on your system? You could also see if make VERBOSE=1 shows gcc including the path where that file is.

#2 Updated by Anonymous over 3 years ago

Hi

Thank you for response.

I have string.h in my system:

locate string.h | grep -v -e 'home\|opt'
/usr/include/string.h
/usr/include/bits/string.h
/usr/include/c++/4.9.2/bits/basic_string.h
/usr/include/c++/4.9.2/ext/vstring.h
/usr/include/linux/string.h
/usr/include/linux/netfilter/xt_string.h
/usr/lib/gcc/x86_64-mandriva-linux-gnu/4.9.2/include/cilk/reducer_string.h
/usr/share/man/man0p/string.h.0p.bz2
/usr/src/kernel-devel-4.4.6-pclos1/arch/x86/include/asm/string.h
/usr/src/kernel-devel-4.4.6-pclos1/include/asm-generic/string.h
/usr/src/kernel-devel-4.4.6-pclos1/include/linux/string.h
/usr/src/kernel-devel-4.4.6-pclos1/include/linux/ucs2_string.h
/usr/src/kernel-devel-4.4.6-pclos1/include/uapi/linux/string.h
/usr/src/kernel-devel-4.4.6-pclos1/include/uapi/linux/netfilter/xt_string.h
/var/lib/dkms/vboxguest/5.0.16/build/vboxguest/include/internal/string.h
/var/lib/dkms/vboxguest/5.0.16/build/vboxguest/include/iprt/string.h
/var/lib/dkms/vboxguest/5.0.16/build/vboxguest/r0drv/linux/string.h
/var/lib/dkms/vboxguest/5.0.16/build/vboxsf/include/iprt/string.h

As follows:
rpm -qf /usr/include/string.h
glibc-devel-2.20-8pclos2016

rpm -qf /usr/include/linux/string.h
glibc-headers-devel-4.4.5-1pclos2016

I attached full log from rpmbuild with make set to VERBOSE=1 (2 files).

#3 Updated by Orson Cochran 2 months ago

I got all the codes from this article that was among the all function that was implicit the declaration build system. I have to get some m0ore codes for my project that was on https://www.britishessayhq.com/4-8-10-smartwritingservice-com-review/ this have the all codes about the all language that was up on this.

Also available in: Atom PDF