[MacPorts] #62299: remake @4.2.1-dbg-1.4_1: error: Somebody has to work out how to handle if getimeofday is not around

MacPorts noreply at macports.org
Sun Feb 14 19:22:43 UTC 2021


#62299: remake @4.2.1-dbg-1.4_1: error: Somebody has to work out how to handle if
getimeofday is not around
-------------------------+--------------------
 Reporter:  cooljeanius  |      Owner:  (none)
     Type:  defect       |     Status:  new
 Priority:  Normal       |  Milestone:
Component:  ports        |    Version:  2.6.4
 Keywords:               |       Port:  remake
-------------------------+--------------------
 remake fails to install with this error:
 {{{
 main.c:739:11: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
       if (streq (output_sync_option, "none"))
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 main.c:741:16: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
       else if (streq (output_sync_option, "line"))
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 main.c:743:16: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
       else if (streq (output_sync_option, "target"))
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 main.c:745:16: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
       else if (streq (output_sync_option, "recurse"))
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 main.c:1303:13: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
         if (streq (v->name, "SHELL"))
             ^~~~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 profile.c:118:3: error: Somebody has to work out how to handle if
 getimeofday is not around
 # error Somebody has to work out how to handle if getimeofday is not
 around
   ^
 1 error generated.
 make[2]: *** [profile.o] Error 1
 make[2]: *** Waiting for unfinished jobs....
 read.c:2075:11: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
       if (streq (name, ".POSIX"))
           ^~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 read.c:2087:16: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
       else if (streq (name, ".SECONDEXPANSION"))
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 read.c:2090:16: warning: result of comparison against a string literal is
 unspecified (use an explicit string comparison function instead)
 [-Wstring-compare]
       else if (streq (name, ".ONESHELL"))
                ^~~~~~~~~~~~~~~~~~~~~~~~~
 ./make.h:260:9: note: expanded from macro 'streq'
    ((a) == (b) || \
         ^  ~~~
 5 warnings generated.
 3 warnings generated.
 make[2]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_remake/remake/work/remake-4.2.1+dbg-1.4'
 make[1]: *** [all-recursive] Error 1
 make[1]: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_remake/remake/work/remake-4.2.1+dbg-1.4'
 make: *** [all] Error 2
 make: Leaving directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_remake/remake/work/remake-4.2.1+dbg-1.4'
 Command failed:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_remake/remake/work/remake-4.2.1+dbg-1.4"
 && /usr/bin/make -j16 -w all
 Exit code: 2
 Error: Failed to build remake: command execution failed
 DEBUG: Error code: CHILDSTATUS 38837 2
 }}}
 The code around the error in question looks like this:
 {{{
 #ifndef HAVE_GETTIMEOFDAY
 # error Somebody has to work out how to handle if getimeofday is not
 around
 #endif
 }}}
 So this means that the configure script failed to define HAVE_GETTIMEOFDAY
 for us. Checking in config.log to see how the conftest for it turned out,
 I found this:
 {{{
 configure:9250: checking for standard gettimeofday
 configure:9269: /usr/bin/clang -o conftest -pipe -Os
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch x86_64
 -I/opt/local/include
 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
 -L/opt/local/lib -Wl,-headerpad_max_install_names
 -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -arch
 x86_64 conftest.c  >&5
 conftest.c:58:21: error: implicitly declaring library function 'exit' with
 type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-
 declaration]
                     exit (gettimeofday (&t, 0) != 0
                     ^
 conftest.c:58:21: note: include the header <stdlib.h> or explicitly
 provide a declaration for 'exit'
 1 error generated.
 configure:9269: $? = 1
 configure: program exited with status 1
 }}}
 So, this turns out to be another case of -Werror=implicit-function-
 declaration being on by default causing stuff to break again.

-- 
Ticket URL: <https://trac.macports.org/ticket/62299>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list