Opened 16 years ago

Closed 15 years ago

Last modified 15 years ago

#18025 closed defect (wontfix)

cmake: build failure for 4-way universal: missing required architecture x86_64 in file

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: cssdev
Priority: Normal Milestone:
Component: ports Version: 1.7.0
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: cmake

Description

I'm on Mac OS X 10.4.11 Tiger on an Intel Mac. In my macports.conf I have universal_archs set to all four architectures (ppc i386 ppc64 x86_64) and cmake gives complaints like:

ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks//Carbon.framework/Carbon, missing required architecture x86_64 in file

and

ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks//Carbon.framework/Carbon, missing required architecture ppc64 in file

Carbon is not available on 64-bit, so cmake should not be attempting to use it when built on 64-bit architectures.

/usr/bin/g++-4.0 -L/mp/lib -arch ppc -arch i386 -arch ppc64 -arch x86_64 -framework Carbon -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch ppc -arch i386 -arch ppc64 -arch x86_64 -I/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_cmake/work/cmake-2.6.2/Source   -I/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_cmake/work/cmake-2.6.2/Bootstrap.cmk  cmake.o cmakemain.o cmakewizard.o cmCommandArgumentLexer.o cmCommandArgumentParser.o cmCommandArgumentParserHelper.o cmDepends.o cmDependsC.o cmDocumentationFormatter.o cmDocumentationFormatterText.o cmPolicies.o cmProperty.o cmPropertyMap.o cmPropertyDefinition.o cmPropertyDefinitionMap.o cmMakeDepend.o cmMakefile.o cmExportFileGenerator.o cmExportInstallFileGenerator.o cmInstallDirectoryGenerator.o cmGeneratedFileStream.o cmGlobalGenerator.o cmLocalGenerator.o cmInstallGenerator.o cmInstallExportGenerator.o cmInstallFilesGenerator.o cmInstallScriptGenerator.o cmInstallTargetGenerator.o cmSourceFile.o cmSourceFileLocation.o cmSystemTools.o cmVersion.o cmFileTimeComparison.o cmGlobalUnixMakefileGenerator3.o cmLocalUnixMakefileGenerator3.o cmMakefileExecutableTargetGenerator.o cmMakefileLibraryTargetGenerator.o cmMakefileTargetGenerator.o cmMakefileUtilityTargetGenerator.o cmBootstrapCommands.o cmCommands.o cmTarget.o cmTest.o cmCustomCommand.o cmDocumentVariables.o cmCacheManager.o cmListFileCache.o cmComputeLinkDepends.o cmComputeLinkInformation.o cmOrderDirectories.o cmComputeTargetDepends.o cmComputeComponentGraph.o cmExprLexer.o cmExprParser.o cmExprParserHelper.o cmListFileLexer.o Directory.o Glob.o RegularExpression.o SystemTools.o ProcessUNIX.o String.o System.o -o cmake
ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks//Carbon.framework/Carbon, missing required architecture x86_64 in file
Undefined symbols for architecture x86_64:
  _CFRelease, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFURLCreateWithFileSystemPath, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFBundleCopyExecutableURL, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFBundleCreate, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFStringGetCString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFURLGetString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFStringCreateWithCString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _kCFAllocatorDefault, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
ld64-62.1 failed: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
ld64 warning: in /Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks//Carbon.framework/Carbon, missing required architecture ppc64 in file
Undefined symbols for architecture ppc64:
  _CFRelease, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFURLCreateWithFileSystemPath, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFBundleCopyExecutableURL, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFBundleCreate, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFStringGetCString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFURLGetString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFStringCreateWithCString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _kCFAllocatorDefault, referenced from:
      _kCFAllocatorDefault$non_lazy_ptr in cmBootstrapCommands.o
ld64-62.1 failed: symbol(s) not found for architecture ppc64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccd7W6JM.out (No such file or directory)
make: *** [cmake] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /mp/var/macports/build/_Users_rschmidt_macports_dports_devel_cmake/work/cmake-2.6.2/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
Error: Target org.macports.configure returned: configure failure: shell command " cd "/mp/var/macports/build/_Users_rschmidt_macports_dports_devel_cmake/work/cmake-2.6.2" && ./configure --prefix=/mp --mandir=/share/man --docdir=/share/doc/cmake --disable-dependency-tracking " returned error 9
Command output: Undefined symbols for architecture ppc64:
  _CFRelease, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFURLCreateWithFileSystemPath, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFBundleCopyExecutableURL, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFBundleCreate, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFStringGetCString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFURLGetString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _CFStringCreateWithCString, referenced from:
      cmFindProgramCommand::GetBundleExecutable(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)in cmBootstrapCommands.o
  _kCFAllocatorDefault, referenced from:
      _kCFAllocatorDefault$non_lazy_ptr in cmBootstrapCommands.o
ld64-62.1 failed: symbol(s) not found for architecture ppc64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/tmp//ccd7W6JM.out (No such file or directory)
make: *** [cmake] Error 1
---------------------------------------------
Error when bootstrapping CMake:
Problem while running make
---------------------------------------------
Log of errors: /mp/var/macports/build/_Users_rschmidt_macports_dports_devel_cmake/work/cmake-2.6.2/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------

Warning: the following items did not execute (for cmake): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.

Attachments (2)

cmake-4-way-universal.txt (40.6 KB) - added by ryandesign (Ryan Carsten Schmidt) 16 years ago.
patch-Portfile.diff (609 bytes) - added by cssdev 16 years ago.
Replace Carbon with CoreFoundation when linking bootstrap

Download all attachments as: .zip

Change History (15)

comment:1 Changed 16 years ago by jmroot (Joshua Root)

Carbon is available as 64-bit on Leopard, just not on Tiger.

comment:2 in reply to:  1 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to jmr@…:

Carbon is available as 64-bit on Leopard, just not on Tiger.

I see that cmake does build universal for all four architectures on Leopard, but are you sure Leopard has 64-bit Carbon? Apple's page about Carbon says "Carbon is a 32-bit procedural API" and Ars Technica says "Though several non-GUI parts of the Carbon API that are shared with Cocoa will be supported in 64-bit mode in Leopard, the GUI portions of the Carbon API will not." We recently had to remove some Carbon calls from Carbon functions cairo in 64-bit mode; I assumed it was for this reason.

comment:3 Changed 16 years ago by Veence (Vincent)

Definitely, Carbon IS NOT 64-bit capable. Only Cocoa is, and this is not going to evolve in 10.6 Snow Leopard. Carbon is now considered legacy by Apple, the new developments will focus on Cocoa. So, as long as softwares rely on Carbon, they will be 32-bit only. This also includes WxWidgets, for example, until WxCocoa is out.

comment:4 Changed 16 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: mcalhoun@… added

Cc Me!

comment:5 Changed 16 years ago by cssdev

Status: newassigned

I'll have to dig a little more into how it's actually using Carbon. CMake's installer tool, CPack, uses Carbon to launch some scripts. Until there are upstream changes, I think that CMake needs to remain 32-bit only. (Although it should still be able to configure 64-bit builds.)

comment:6 Changed 16 years ago by cssdev

Some of the CMake bug reports (such as #4348 and #6051) might be related to these errors. It's not entirely clear if the cmake build dashboard includes a 64-bit build.

It looks like CMake is lazily linking against Carbon when it instead needs to link only against CoreFoundation.

Could you attach a verbose build log?

Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: cmake-4-way-universal.txt added

comment:7 in reply to:  6 Changed 16 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to css@…:

Could you attach a verbose build log?

Sure, it's attached.

Changed 16 years ago by cssdev

Attachment: patch-Portfile.diff added

Replace Carbon with CoreFoundation when linking bootstrap

comment:8 Changed 16 years ago by cssdev

Could you apply this patch and see if it works? It seems to work on my machine ... replacing Carbon with CoreFoundation pulls in the correct symbols, yet CoreFoundation is available universally.

comment:9 Changed 16 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

comment:10 Changed 15 years ago by tobypeterson

Resolution: invalid
Status: assignedclosed

This is not a legitimate bug - you should not be building 4-way on Tiger, since it only provides i386/ppc libraries/frameworks.

comment:11 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: closedreopened

I've built tons of ports 4-way universal on Tiger. If the maintainer doesn't want to fix this port to build 4-way universal on Tiger, then that's "wontfix", not "invalid". But that's for the maintainer to decide, since there is no MacPorts policy that says we won't support 4-way universal builds on Tiger.

comment:12 Changed 15 years ago by tobypeterson

Resolution: wontfix
Status: reopenedclosed

Ok, marking wontfix (it's really cantfix). CoreFoundation is not 64-bit on Tiger, and cmake requires CoreFoundation, thus this bug cannot be fixed.

comment:13 in reply to:  12 Changed 15 years ago by cssdev

Replying to toby@…:

Ok, marking wontfix (it's really cantfix). CoreFoundation is not 64-bit on Tiger, and cmake requires CoreFoundation, thus this bug cannot be fixed.

That makes sense ... I no longer have access to a Tiger system, so that's good confirmation that the proposed patch wouldn't fix the problem anyway. Thanks for the clarification!

Note: See TracTickets for help on using tickets.