Opened 4 years ago

Closed 4 years ago

#60907 closed defect (fixed)

cmake @3.18.0_1 does not build on PPC Tiger, Mac OS X 10.4.11, because of 'Undefined symbols: "_lutimes"'

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.6.3
Keywords: tiger Cc:
Port: cmake

Description

/opt/local/bin/g++-mp-7 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-framework -Wl,ApplicationServices /opt/local/lib/libMacportsLegacySupport.dylib -arch ppc -framework CoreFoundation -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -arch ppc       -DCMAKE_BOOTSTRAP    -DCMake_HAVE_CXX_MAKE_UNIQUE=1   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.18.0/Bootstrap.cmk   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.18.0/Source   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.18.0/Source/LexerParser   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.18.0/Utilities/std   -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.18.0/Utilities  cmAddCustomCommandCommand.o cmAddCustomTargetCommand.o cmAddDefinitionsCommand.o cmAddDependenciesCommand.o cmAddExecutableCommand.o cmAddLibraryCommand.o cmAddSubDirectoryCommand.o cmAddTestCommand.o cmArgumentParser.o cmBinUtilsLinker.o cmBinUtilsLinuxELFGetRuntimeDependenciesTool.o cmBinUtilsLinuxELFLinker.o cmBinUtilsLinuxELFObjdumpGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOGetRuntimeDependenciesTool.o cmBinUtilsMacOSMachOLinker.o cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEGetRuntimeDependenciesTool.o cmBinUtilsWindowsPEDumpbinGetRuntimeDependenciesTool.o cmBinUtilsWindowsPELinker.o cmBinUtilsWindowsPEObjdumpGetRuntimeDependenciesTool.o cmBreakCommand.o cmBuildCommand.o cmCMakeMinimumRequired.o cmCMakePolicyCommand.o cmCPackPropertiesGenerator.o cmCacheManager.o cmCheckCustomOutputs.o cmCommand.o cmCommandArgumentParserHelper.o cmCommands.o cmCommonTargetGenerator.o cmComputeComponentGraph.o cmComputeLinkDepends.o cmComputeLinkInformation.o cmComputeTargetDepends.o cmConditionEvaluator.o cmConfigureFileCommand.o cmContinueCommand.o cmCoreTryCompile.o cmCreateTestSourceList.o cmCustomCommand.o cmCustomCommandGenerator.o cmCustomCommandLines.o cmDefinePropertyCommand.o cmDefinitions.o cmDepends.o cmDependsC.o cmDocumentationFormatter.o cmEnableLanguageCommand.o cmEnableTestingCommand.o cmExecProgramCommand.o cmExecuteProcessCommand.o cmExpandedCommandArgument.o cmExportBuildFileGenerator.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmExportSet.o cmExportTryCompileFileGenerator.o cmExprParserHelper.o cmExternalMakefileProjectGenerator.o cmFileCommand.o cmFileCopier.o cmFileInstaller.o cmFileTime.o cmFileTimeCache.o cmFileTimes.o cmFindBase.o cmFindCommon.o cmFindFileCommand.o cmFindLibraryCommand.o cmFindPackageCommand.o cmFindPathCommand.o cmFindProgramCommand.o cmForEachCommand.o cmFunctionBlocker.o cmFunctionCommand.o cmFSPermissions.o cmGeneratedFileStream.o cmGeneratorExpression.o cmGeneratorExpressionContext.o cmGeneratorExpressionDAGChecker.o cmGeneratorExpressionEvaluationFile.o cmGeneratorExpressionEvaluator.o cmGeneratorExpressionLexer.o cmGeneratorExpressionNode.o cmGeneratorExpressionParser.o cmGeneratorTarget.o cmGetCMakePropertyCommand.o cmGetDirectoryPropertyCommand.o cmGetFilenameComponentCommand.o cmGetPipes.o cmGetPropertyCommand.o cmGetSourceFilePropertyCommand.o cmGetTargetPropertyCommand.o cmGetTestPropertyCommand.o cmGlobalCommonGenerator.o cmGlobalGenerator.o cmGlobalUnixMakefileGenerator3.o cmGlobVerificationManager.o cmHexFileConverter.o cmIfCommand.o cmIncludeCommand.o cmIncludeGuardCommand.o cmIncludeDirectoryCommand.o cmIncludeRegularExpressionCommand.o cmInstallCommand.o cmInstallCommandArguments.o cmInstallDirectoryGenerator.o cmInstallExportGenerator.o cmInstallFilesCommand.o cmInstallFilesGenerator.o cmInstallGenerator.o cmInstallScriptGenerator.o cmInstallSubdirectoryGenerator.o cmInstallTargetGenerator.o cmInstallTargetsCommand.o cmInstalledFile.o cmLDConfigLDConfigTool.o cmLDConfigTool.o cmLinkDirectoriesCommand.o cmLinkItem.o cmLinkItemGraphVisitor.o cmLinkLineComputer.o cmLinkLineDeviceComputer.o cmListCommand.o cmListFileCache.o cmLocalCommonGenerator.o cmLocalGenerator.o cmLocalUnixMakefileGenerator3.o cmMSVC60LinkLineComputer.o cmMacroCommand.o cmMakeDirectoryCommand.o cmMakefile.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityTargetGenerator.o cmMarkAsAdvancedCommand.o cmMathCommand.o cmMessageCommand.o cmMessenger.o cmNewLineStyle.o cmOSXBundleGenerator.o cmOptionCommand.o cmOrderDirectories.o cmOutputConverter.o cmParseArgumentsCommand.o cmPathLabel.o cmPolicies.o cmProcessOutput.o cmProjectCommand.o cmPropertyDefinition.o cmPropertyMap.o cmReturnCommand.o cmRulePlaceholderExpander.o cmRuntimeDependencyArchive.o cmScriptGenerator.o cmSearchPath.o cmSeparateArgumentsCommand.o cmSetCommand.o cmSetDirectoryPropertiesCommand.o cmSetPropertyCommand.o cmSetSourceFilesPropertiesCommand.o cmSetTargetPropertiesCommand.o cmSetTestsPropertiesCommand.o cmSiteNameCommand.o cmSourceFile.o cmSourceFileLocation.o cmState.o cmStateDirectory.o cmStateSnapshot.o cmString.o cmStringAlgorithms.o cmStringReplaceHelper.o cmStringCommand.o cmSubcommandTable.o cmSubdirCommand.o cmSystemTools.o cmTarget.o cmTargetCompileDefinitionsCommand.o cmTargetCompileFeaturesCommand.o cmTargetCompileOptionsCommand.o cmTargetIncludeDirectoriesCommand.o cmTargetLinkLibrariesCommand.o cmTargetLinkOptionsCommand.o cmTargetPrecompileHeadersCommand.o cmTargetPropCommandBase.o cmTargetPropertyComputer.o cmTargetSourcesCommand.o cmTest.o cmTestGenerator.o cmTimestamp.o cmTryCompileCommand.o cmTryRunCommand.o cmUnsetCommand.o cmUVHandlePtr.o cmUVProcessChain.o cmVersion.o cmWhileCommand.o cmWorkingDirectory.o cmake.o cmakemain.o cmcmd.o string_view.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmExprLexer.o cmExprParser.o cmListFileLexer.o Directory.o EncodingCXX.o FStream.o Glob.o RegularExpression.o SystemTools.o EncodingC.o ProcessUNIX.o String.o System.o Terminal.o uv-src-strscpy.c.o uv-src-timer.c.o uv-src-uv-common.c.o uv-src-unix-cmake-bootstrap.c.o uv-src-unix-core.c.o uv-src-unix-fs.c.o uv-src-unix-loop.c.o uv-src-unix-loop-watcher.c.o uv-src-unix-no-fsevents.c.o uv-src-unix-pipe.c.o uv-src-unix-poll.c.o uv-src-unix-posix-hrtime.c.o uv-src-unix-posix-poll.c.o uv-src-unix-process.c.o uv-src-unix-signal.c.o uv-src-unix-stream.c.o  -o cmake
Undefined symbols:
  "_lutimes", referenced from:
      _uv__fs_work in uv-src-unix-fs.c.o
ld: symbol(s) not found
collect2: error: ld returned 1 exit status
gmake: *** [Makefile:2: cmake] Error 1

/usr/include/sys/time.h has:

int	utimes(const char *, const struct timeval *);

/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.18.0/Bootstrap.cmk/make_bootstrap.log has two different things:

#ifdef TEST_KWSYS_CXX_HAS_UTIMES
#  include <sys/time.h>
int main()
{
  struct timeval* current_time = 0;
  return utimes("/example", current_time);
}
#endif

#ifdef TEST_KWSYS_CXX_HAS_UTIMENSAT
#  include <fcntl.h>
#  include <sys/stat.h>
#  if defined(__APPLE__)
#    include <AvailabilityMacros.h>
#    if MAC_OS_X_VERSION_MIN_REQUIRED < 101300
#      error "utimensat not available on macOS < 10.13"
#    endif
#  endif
int main()
{
  struct timespec times[2] = { { 0, UTIME_OMIT }, { 0, UTIME_NOW } };
  return utimensat(AT_FDCWD, "/example", times, AT_SYMLINK_NOFOLLOW);
}
#endif

The C source file is /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_devel_cmake/cmake/work/cmake-v3.18.0/Utilities/cmlibuv/src/unix/fs.c. It has:

  215	UV_UNUSED(static struct timeval uv__fs_to_timeval(double time)) {
  216	  struct timeval tv;
  217	  tv.tv_sec  = time;
  218	  tv.tv_usec = (uint64_t)(time * 1000000) % 1000000;
  219	  return tv;
  220	}
  221	
  222	static ssize_t uv__fs_futime(uv_fs_t* req) {
  223	#if defined(__linux__)                                                        \
  224	    || defined(_AIX71)                                                        \
  225	    || defined(__HAIKU__)
  226	  /* utimesat() has nanosecond resolution but we stick to microseconds
  227	   * for the sake of consistency with other platforms.
  228	   */
  229	  struct timespec ts[2];
  230	  ts[0] = uv__fs_to_timespec(req->atime);
  231	  ts[1] = uv__fs_to_timespec(req->mtime);
  232	#if defined(__ANDROID_API__) && __ANDROID_API__ < 21
  233	  return utimensat(req->file, NULL, ts, 0);
  234	#else
  235	  return futimens(req->file, ts);
  236	#endif
  237	#elif defined(__APPLE__)                                                      \
  238	    || defined(__DragonFly__)                                                 \
  239	    || defined(__FreeBSD__)                                                   \
  240	    || defined(__FreeBSD_kernel__)                                            \
  241	    || defined(__NetBSD__)                                                    \
  242	    || defined(__OpenBSD__)                                                   \
  243	    || defined(__sun)
  244	  struct timeval tv[2];
  245	  tv[0] = uv__fs_to_timeval(req->atime);
  246	  tv[1] = uv__fs_to_timeval(req->mtime);
  247	# if defined(__sun)
  248	  return futimesat(req->file, NULL, tv);
  249	# else
  250	  return futimes(req->file, tv);
  251	# endif
  252	#elif defined(__MVS__)
  253	  attrib_t atr;
  254	  memset(&atr, 0, sizeof(atr));
  255	  atr.att_mtimechg = 1;
  256	  atr.att_atimechg = 1;
  257	  atr.att_mtime = req->mtime;
  258	  atr.att_atime = req->atime;
  259	  return __fchattr(req->file, &atr, sizeof(atr));
  260	#else
  261	  errno = ENOSYS;
  262	  return -1;
  263	#endif
  264	}

Said C header file /usr/include/sys/time.h has also:

   75	/*
   76	 * Structure returned by gettimeofday(2) system call,
   77	 * and used in other calls.
   78	 */
   79	#ifndef _TIMEVAL
   80	#define _TIMEVAL
   81	struct timeval {
   82		time_t		tv_sec;		/* seconds */
   83		suseconds_t	tv_usec;	/* and microseconds */
   84	};
   85	#endif	/* _TIMEVAL */

Attachments (1)

main.log (320.6 KB) - added by ballapete (Peter "Pete" Dyballa) 4 years ago.
Main.log from PPC Tiger

Download all attachments as: .zip

Change History (6)

Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 4 years ago by michaelld (Michael Dickens)

I see this too. Looking into it.

comment:2 Changed 4 years ago by kencu (Ken)

I pegged Tiger at the 3.17.x version, pending 3.19 that should use the system libuv and hopefully get around this.

comment:3 Changed 4 years ago by ballapete (Peter "Pete" Dyballa)

Meanwhile cmake @3.19.7 built and installed…

comment:4 Changed 4 years ago by mf2k (Frank Schima)

Cc: michaelld@… removed
Owner: set to michaelld
Status: newassigned

comment:5 Changed 4 years ago by kencu (Ken)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.