[MacPorts] #60310: gnucash @3.9: Could NOT find Threads (missing: Threads_FOUND)

MacPorts noreply at macports.org
Sun Jun 28 02:43:17 UTC 2020


#60310: gnucash @3.9: Could NOT find Threads (missing: Threads_FOUND)
----------------------+----------------------
  Reporter:  hapaguy  |      Owner:  drkp
      Type:  defect   |     Status:  assigned
  Priority:  Normal   |  Milestone:
 Component:  ports    |    Version:
Resolution:           |   Keywords:  catalina
      Port:  gnucash  |
----------------------+----------------------

Comment (by kencu):

 On 10.15, the initial configuration of {{{gnucash}}} fails, as above.

 looking at {{{build/CMakeFiles/CMakeError.log}}}, we see this:
 {{{
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/build/CMakeFiles/CMakeTmp/src.c:3:7:
 error: no previous prototype for function 'test_func' [-Werror,-Wmissing-
 prototypes]
 void* test_func(void* data)
       ^
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gnome_gnucash/gnucash/work/build/CMakeFiles/CMakeTmp/src.c:3:1:
 note: declare 'static' if the function is not intended to be used outside
 of this translation unit
 void* test_func(void* data)
 ^
 static
 1 error generated.
 }}}

 Well, OK, Xcode 11 wants a function prototype. The test is kept in this
 file:
 {{{
 /opt/local/share/cmake-3.17/Modules/CheckForPthreads.c
 }}}
 and editing that file to add a function prototype:
 {{{
 #include <pthread.h>

 /* ADD THIS FUNCTION PROTOTYPE */
 void* start_routine(void*);

 void* start_routine(void* args)
 {
   return args;
 }

 int main(void)
 {
   /* This is a compile and link test, no code to actually run things. */
   pthread_t thread;
   pthread_create(&thread, 0, start_routine, 0);
   pthread_join(thread, 0);
   return 0;
 }
 }}}
 and then all is well, {{{pthreads}}} are found, {{{gnucash}}} finishes
 configuring, and installs.

 {{{
 % port -v installed gnucash
 The following ports are currently installed:
   gnucash @3.9_0 (active) platform='darwin 19' archs='x86_64'
 date='2020-06-27T19:42:28-0700'
 }}}

 So - {{{cmake}}} will need a patch for this, for now, until the inevitable
 next release, wherein we find out this has already, no doubt, been
 reported and fixed upstream in some commit that I'm sure someone will find
 and paste the link to here.

-- 
Ticket URL: <https://trac.macports.org/ticket/60310#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list