[GNC] cMakeError.log errors - building Gnucash 3.10

finfort at gmail.com finfort at gmail.com
Sun Apr 12 07:25:16 EDT 2020


I have these errors in cMakeError.log after cmake:

Can anybody explain how to fix that?

--------------------

Performing C++ SOURCE FILE Test HAVE_OFX_BUG_39 failed with the 
following output:
Change Dir: /home/dfg/Applications/build-gnucash-3.10/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_5918e"
[1/2] Building CXX object CMakeFiles/cmTC_5918e.dir/src.cxx.o
[2/2] Linking CXX executable cmTC_5918e
FAILED: cmTC_5918e
: && /usr/bin/c++  -DHAVE_OFX_BUG_39 
CMakeFiles/cmTC_5918e.dir/src.cxx.o  -o cmTC_5918e  -lofx && :
/usr/bin/ld: CMakeFiles/cmTC_5918e.dir/src.cxx.o: in function `main':
src.cxx:(.text+0xb5): undefined reference to 
`ofxdate_to_time_t(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> >)'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Return value: 1
Source file was:

#include <time.h>
#include <stdlib.h>
#include <string>
extern time_t ofxdate_to_time_t(const std::string ofxdate);

int main(int argc, char** argv)
{
     const std::string timestr = "20160319000000";
     struct tm ts;
     ts.tm_year = 116;
     ts.tm_mon = 2;
     ts.tm_mday = 19;
#ifdef _WIN32
     putenv("TZ=PST-8PDT-7,M 4.1.0/0,M 10.6.0/0");
#else
     setenv("TZ", "PST 08P DT 07 M 4.1.0, M 10.6.0", 1);
#endif
     time_t t = ofxdate_to_time_t(timestr);
     if (t == mktime(&ts))
         exit(1);
     exit(0);
}

Determining if the pthread_create exist failed with the following output:
Change Dir: /home/dfg/Applications/build-gnucash-3.10/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_2d065"
[1/2] Building C object CMakeFiles/cmTC_2d065.dir/CheckSymbolExists.c.o
[2/2] Linking C executable cmTC_2d065
FAILED: cmTC_2d065
: && /usr/bin/cc -Wno-error=deprecated-declarations -std=gnu11 
-Wno-error=parentheses -Werror -Wdeclaration-after-statement 
-Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations 
-Wno-unused CMakeFiles/cmTC_2d065.dir/CheckSymbolExists.c.o  -o 
cmTC_2d065 && :
/usr/bin/ld: CMakeFiles/cmTC_2d065.dir/CheckSymbolExists.c.o: in 
function `main':
CheckSymbolExists.c:(.text+0x1f): undefined reference to `pthread_create'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

File 
/home/dfg/Applications/build-gnucash-3.10/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
   (void)argv;
#ifndef pthread_create
   return ((int*)(&pthread_create))[argc];
#else
   (void)argc;
   return 0;
#endif
}

Determining if compiler accepts -pthread failed with the following output:
Change Dir: /home/dfg/Applications/build-gnucash-3.10/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_12d58"
[1/2] Building C object CMakeFiles/cmTC_12d58.dir/CheckForPthreads.c.o
FAILED: CMakeFiles/cmTC_12d58.dir/CheckForPthreads.c.o
/usr/bin/cc   -Wno-error=deprecated-declarations -std=gnu11 
-Wno-error=parentheses -Werror -Wdeclaration-after-statement 
-Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations 
-Wno-unused -o CMakeFiles/cmTC_12d58.dir/CheckForPthreads.c.o   -c 
/usr/share/cmake-3.13/Modules/CheckForPthreads.c
/usr/share/cmake-3.13/Modules/CheckForPthreads.c:3:7: error: no previous 
prototype for ‘start_routine’ [-Werror=missing-prototypes]
     3 | void* start_routine(void* args)
       |       ^~~~~~~~~~~~~
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.


Determining if the function pthread_create exists in the pthreads failed 
with the following output:
Change Dir: /home/dfg/Applications/build-gnucash-3.10/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/ninja" "cmTC_59318"
[1/2] Building C object CMakeFiles/cmTC_59318.dir/CheckFunctionExists.c.o
[2/2] Linking C executable cmTC_59318
FAILED: cmTC_59318
: && /usr/bin/cc -Wno-error=deprecated-declarations -std=gnu11 
-Wno-error=parentheses -Werror -Wdeclaration-after-statement 
-Wno-pointer-sign -Wall -Wmissing-prototypes -Wmissing-declarations 
-Wno-unused -DCHECK_FUNCTION_EXISTS=pthread_create 
CMakeFiles/cmTC_59318.dir/CheckFunctionExists.c.o  -o cmTC_59318 
-lpthreads && :
/usr/bin/ld: cannot find -lpthreads
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.





More information about the gnucash-user mailing list