Ubuntu's 18.04's Cmake is too old. target_compile_definitions for imported modules was introduced in Cmake 3.11 and Ubuntu 18.04 has 3,10.1.
Our currently advertised minimum cmake *is* 3.10, but we didn't bump it for 5.0 and we usually do. I'm inclined to bump the minimum Cmake instead of going back got `pkg_check_modules`. Regards, John Ralls > On Mar 29, 2023, at 11:57 AM, Tom Weichmann <tommyc...@gmail.com> wrote: > > Hi All, > > I'm still running Ubuntu 18.04 LTS which is still supported by Ubuntu > albeit a bit old. I've been happily building all of the 4.x versions from > source since the latest is not in this distro's repositories. Now i'm > trying to build version 5,0 and I'm running into a failure with cmake: > > ----------------------------------------------- > ~/dev/build-gnucash-5.0 > % cmake -DCMAKE_INSTALL_PREFIX=/usr/local ../gnucash-5.0 > -- The C compiler identification is GNU 8.4.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 > -- Found UnixCommands: /bin/bash > -- Looking for pthread.h > -- Looking for pthread.h - found > -- Looking for pthread_create > -- Looking for pthread_create - not found > -- Looking for pthread_create in pthreads > -- Looking for pthread_create in pthreads - not found > -- Looking for pthread_create in pthread > -- Looking for pthread_create in pthread - found > -- Found Threads: TRUE > -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") > -- Checking for module 'glib-2.0>=2.56.1' > -- Found glib-2.0, version 2.56.4 > -- Checking for module 'gio-2.0' > -- Found gio-2.0, version 2.56.4 > -- Checking for module 'gobject-2.0' > -- Found gobject-2.0, version 2.56.4 > -- Checking for module 'gmodule-2.0' > -- Found gmodule-2.0, version 2.56.4 > -- Checking for module 'gthread-2.0' > -- Found gthread-2.0, version 2.56.4 > -- Checking for module 'libxml-2.0>=2.9.4' > -- Found libxml-2.0, version 2.9.4 > -- Checking for module 'libxslt' > -- Found libxslt, version 1.1.29 > -- Checking for module 'webkit2gtk-4.0>=2.14.0' > -- Found webkit2gtk-4.0, version 2.32.4 > -- Checking for module 'gtk+-3.0>=3.22.30' > -- Found gtk+-3.0, version 3.22.30 > -- Checking for module 'zlib' > -- Found zlib, version 1.2.11 > -- Found Gettext: /usr/local/bin/msgmerge (found suitable version "0.21.1", > minimum required is "0.19.6") > -- Found SWIG: /usr/bin/swig3.0 (found suitable version "3.0.12", minimum > required is "3.0.12") > -- Using guile-2.2.x > -- Using guile SRFI-64 > -- Using guile textual-ports > -- Checking for module 'gwenhywfar>=5.6.0' > -- Found gwenhywfar, version 5.9.0 > -- Checking for module 'aqbanking>=6.2.0' > -- Found aqbanking, version 6.5.3 > -- Looking for AB_Banking_RuntimeConfig_SetCharValue > -- Looking for AB_Banking_RuntimeConfig_SetCharValue - not found > -- Checking for module 'gwengui-gtk3' > -- Found gwengui-gtk3, version 5.9.0 > -- Checking for module 'libofx' > -- Found libofx, version 0.9.12 > -- Performing Test HAVE_OFX_BUG_39 > -- Performing Test HAVE_OFX_BUG_39 - Failed > -- Found LibXslt: xslt;xml2 (found version "1.1.29") > -- Found Perl: /usr/bin/perl (found version "5.26.1") > -- Checking for module 'icu-uc' > -- Found icu-uc, version 60.2 > -- Checking for module 'icu-i18n' > -- Found icu-i18n, version 60.2 > -- Checking for module 'libsecret-1>=0.18' > -- Found libsecret-1, version 0.18.6 > -- Boost 1.67.0 found. > -- Found Boost components: > date_time;filesystem;locale;program_options;regex;system > -- Performing Test have_stringop_truncation > -- Performing Test have_stringop_truncation - Success > -- Checking for GTEST > -- Check if compiler accepts -pthread > -- Check if compiler accepts -pthread - no > -- Checking for GMOCK > -- Looking for include file dirent.h > -- Looking for include file dirent.h - found > -- Looking for include file dlfcn.h > -- Looking for include file dlfcn.h - found > -- Looking for include file glob.h > -- Looking for include file glob.h - found > -- Looking for include file inttypes.h > -- Looking for include file inttypes.h - found > -- Looking for include file limits.h > -- Looking for include file limits.h - found > -- Looking for include file locale.h > -- Looking for include file locale.h - found > -- Looking for include file memory.h > -- Looking for include file memory.h - found > -- Looking for include file stdint.h > -- Looking for include file stdint.h - found > -- Looking for include file stdlib.h > -- Looking for include file stdlib.h - found > -- Looking for include file string.h > -- Looking for include file string.h - found > -- Looking for include file strings.h > -- Looking for include file strings.h - found > -- Looking for include file sys/stat.h > -- Looking for include file sys/stat.h - found > -- Looking for include file sys/time.h > -- Looking for include file sys/time.h - found > -- Looking for include file sys/times.h > -- Looking for include file sys/times.h - found > -- Looking for include file sys/types.h > -- Looking for include file sys/types.h - found > -- Looking for include file sys/wait.h > -- Looking for include file sys/wait.h - found > -- Looking for include file unistd.h > -- Looking for include file unistd.h - found > -- Looking for include file utmp.h > -- Looking for include file utmp.h - found > -- Looking for include file wctype.h > -- Looking for include file wctype.h - found > -- Check if the system is big endian > -- Searching 16 bit integer > -- 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 > CMake Error at CMakeLists.txt:776 (target_compile_definitions): > Cannot specify compile definitions for imported target "PkgConfig::GLIB2". > > > CMake Error at CMakeLists.txt:782 (target_compile_definitions): > Cannot specify compile definitions for imported target "PkgConfig::GTK3". > > > -- Performing Test standard_math_library_linked_to_automatically > -- Performing Test standard_math_library_linked_to_automatically - Success > -- Configuring incomplete, errors occurred! > See also "/home/tom/dev/build-gnucash-5.0/CMakeFiles/CMakeOutput.log". > See also "/home/tom/dev/build-gnucash-5.0/CMakeFiles/CMakeError.log". > ---------------------------------------- > > I've checked all of the required deps in the README.dependencies and > believe I have them all. I've googled around and I don't see any answers. > Has anyone else run into a similar error building on other platforms? > _______________________________________________ > gnucash-user mailing list > gnucash-user@gnucash.org > To update your subscription preferences or to unsubscribe: > https://lists.gnucash.org/mailman/listinfo/gnucash-user > ----- > Please remember to CC this list on all your replies. > You can do this by using Reply-To-List or Reply-All. _______________________________________________ gnucash-user mailing list gnucash-user@gnucash.org To update your subscription preferences or to unsubscribe: https://lists.gnucash.org/mailman/listinfo/gnucash-user ----- Please remember to CC this list on all your replies. You can do this by using Reply-To-List or Reply-All.