Opened 10 years ago

Closed 5 years ago

#45685 closed defect (fixed)

cmake fails because of XML linking error (expat issue?)

Reported by: jpsdotcom@… Owned by: michaelld (Michael Dickens)
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: yosemite Cc:
Port: cmake

Description (last modified by neverpanic (Clemens Lang))

Am using OS X Yosemite & XCode 6.1

from main.log after "port install cmake" fails:
:info:build Linking CXX executable ../bin/ccmake
:info:build [ 88%] ld: warning: ignoring file /Library/Frameworks/expat.framework/expat, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/expat.framework/expat
:info:build Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmParseGTMCoverage.cxx.o
:info:build Undefined symbols for architecture x86_64:
:info:build   "_XML_ErrorString", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_GetCurrentColumnNumber", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_GetCurrentLineNumber", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_GetErrorCode", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_Parse", referenced from:
:info:build       cmXMLParser::CleanupParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build       cmXMLParser::ParseBuffer(char const*, unsigned long) in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_ParserCreate", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_ParserFree", referenced from:
:info:build       cmXMLParser::CleanupParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_SetCharacterDataHandler", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_SetElementHandler", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_SetUserData", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [bin/ccmake] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.0.2'
:info:build make[1]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2

Attachments (1)

main.log (1.2 MB) - added by jpsdotcom@… 10 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 years ago by jpsdotcom@…

I didn't realize how bad the formatting would be, so here is the snip from main.log, again:

:info:build Linking CXX executable ../bin/ccmake
:info:build [ 88%] ld: warning: ignoring file /Library/Frameworks/expat.framework/expat, file was built for i386 which is not the architecture being linked (x86_64): /Library/Frameworks/expat.framework/expat
:info:build Building CXX object Source/CMakeFiles/CTestLib.dir/CTest/cmParseGTMCoverage.cxx.o
:info:build Undefined symbols for architecture x86_64:
:info:build   "_XML_ErrorString", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_GetCurrentColumnNumber", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_GetCurrentLineNumber", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_GetErrorCode", referenced from:
:info:build       cmXMLParser::ReportXmlParseError() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_Parse", referenced from:
:info:build       cmXMLParser::CleanupParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build       cmXMLParser::ParseBuffer(char const*, unsigned long) in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_ParserCreate", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_ParserFree", referenced from:
:info:build       cmXMLParser::CleanupParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_SetCharacterDataHandler", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_SetElementHandler", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build   "_XML_SetUserData", referenced from:
:info:build       cmXMLParser::InitializeParser() in libCMakeLib.a(cmXMLParser.cxx.o)
:info:build ld: symbol(s) not found for architecture x86_64
:info:build clang: error: linker command failed with exit code 1 (use -v to see invocation)
:info:build make[2]: *** [bin/ccmake] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-3.0.2'
:info:build make[1]: *** [Source/CMakeFiles/ccmake.dir/all] Error 2

comment:2 Changed 10 years ago by arnaud.fribault@…

Hi,

I'm running into the same problem.

What I did :

"expat" dependency seems to be the culprit : it doesn't contain a x86_64 slice as expected. Expat version is 2.0.0.

I'm running Yosemite with Xcode6.1 (latest command line tools installed) on a 3,4 GHz Intel Core i7.

Thx

Arnaud F.

comment:3 Changed 10 years ago by eborisch (Eric A. Borisch)

Attach the config/build log. It appears to be grabbing the wrong expat.

comment:4 Changed 10 years ago by neverpanic (Clemens Lang)

Description: modified (diff)
Keywords: cmake removed
Owner: changed from macports-tickets@… to css@…
Port: cmake added

Please use WikiFormatting when posting in trac, and fill in the port field when reporting bugs against ports. Please also Cc the maintainer, if any.

As per the wiki:FAQ#buildfails, please also try sudo port clean cmake followed by sudo port -t install cmake (which will hide your bogus copy of expat in /Library/Frameworks from cmake's build system at the cost of performance).

Last edited 10 years ago by neverpanic (Clemens Lang) (previous) (diff)

comment:5 in reply to:  4 Changed 10 years ago by jpsdotcom@…

As per the wiki:FAQ#buildfails, please also try sudo port clean cmake followed by sudo port -t install cmake (which will hide your bogus copy of expat in /Library/Frameworks from cmake's build system at the cost of performance).

This doesn't work. Same issue.

comment:6 Changed 10 years ago by mf2k (Frank Schima)

Attach the main.log.

Changed 10 years ago by jpsdotcom@…

Attachment: main.log added

comment:7 in reply to:  6 Changed 10 years ago by jpsdotcom@…

Replying to mf2k@…:

Attach the main.log.

Attached.

comment:8 Changed 10 years ago by neverpanic (Clemens Lang)

It still picks up exapt.framework from /Library/Frameworks:

:info:configure -- Found EXPAT: /Library/Frameworks/expat.framework (found version "2.1.0")

possibly due to a /usr/lib/pkgconfig/expat.pc file or other pkg-config file installed by whatever 3rd-party-installer shipped your expat.framework. The solution is simple: Move, or remove expat.framework from /Library/Frameworks. Stuff in /Library/Frameworks cannot be avoided by MacPorts easily. See wiki:FAQ#usrlocal (but exchange /usr/local with /Library/Frameworks, for which the same applies).

comment:9 Changed 10 years ago by facardillo@…

I can install cmake without receiving any error message, but when I run it on a OS X 10.10.1 machine I get this error:

-> cmake
dyld: Library not loaded: /opt/local/lib/libexpat.1.dylib
  Referenced from: /opt/local/bin/cmake
  Reason: Incompatible library version: cmake requires version 8.0.0 or later, but libexpat.1.dylib provides version 7.0.0
Trace/BPT trap: 5

comment:10 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from css@… to michaelld@…

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

Resolution: fixed
Status: newclosed

this no longer occurs

Note: See TracTickets for help on using tickets.