Opened 11 years ago

Closed 11 years ago

#41467 closed defect (fixed)

cmake 2.8.12 configure fails: in libnotify.dylib, file was built for unsupported file format which is not the architecture being linked

Reported by: spacecataz Owned by: cssdev
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: lion Cc: ryandesign (Ryan Carsten Schmidt)
Port: cmake

Description

Greetings.

While updating outdated ports to macports 2.2.1, I have found that cmake fails on configure. I do not see recent similar tickets; the usual fixes do not help (i.e., cleaning the port, upgrading dependencies, etc.)

The error is below, the logfile is attached.

--->  Configuring cmake
Error: org.macports.configure for port cmake returned: configure failure: command execution failed
Please see the log file for port cmake for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/main.log
Error: Unable to upgrade port: 1
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets

Attachments (1)

main.log (229.2 KB) - added by spacecataz 11 years ago.
Logfile

Download all attachments as: .zip

Change History (4)

Changed 11 years ago by spacecataz

Attachment: main.log added

Logfile

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

Cc: ryandesign@… added
Keywords: lion added
Owner: changed from macports-tickets@… to css@…
Summary: cmake 2.8.12 configure failscmake 2.8.12 configure fails: in libnotify.dylib, file was built for unsupported file format which is not the architecture being linked

Hmm, the log says:

:info:configure   Linking C executable cmTryCompileExec61975824
:info:configure
:info:configure   
:info:configure   /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cmake/cmake/work/cmake-2.8.12-i386/Bootstrap.cmk/cmake
:info:configure   -E cmake_link_script CMakeFiles/cmTryCompileExec61975824.dir/link.txt
:info:configure   --verbose=1
:info:configure
:info:configure   /usr/bin/llvm-gcc-4.2 -pipe -Os -arch i386 -isysroot
:info:configure   /Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7
:info:configure   -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib
:info:configure   -Wl,-headerpad_max_install_names -arch i386
:info:configure   CMakeFiles/cmTryCompileExec61975824.dir/testCCompiler.c.o -o
:info:configure   cmTryCompileExec61975824
:info:configure
:info:configure   ld: in /opt/local/lib/libnotify.dylib, file was built for unsupported file
:info:configure   format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 6
:info:configure   0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386):
:info:configure   /opt/local/lib/libnotify.dylib for architecture i386
:info:configure
:info:configure   collect2: ld returned 1 exit status
:info:configure
:info:configure   make[1]: *** [cmTryCompileExec61975824] Error 1
:info:configure
:info:configure   make: *** [cmTryCompileExec61975824/fast] Error 2

This is curious because I don't see why cmake would be trying to use libnotify. It's not listed as a dependency in the port, and I see no mention of libnotify in the compile line.

We've seen this once before, in #30697. That was also on Lion, also with llvm-gcc-4.2. There, the solution was to uninstall libnotify, which I recommend to you as well. Or if you actually need libnotify (or another port you've installed does), then the workaround would be to reinstall libnotify with the universal variant, i.e.:

sudo port upgrade --enforce-variants libnotify +universal

The fact that MacPorts chose to compile with llvm-gcc-4.2 instead of clang also suggests you are running Xcode 4.0 or 4.1; consider upgrading to Xcode 4.6.3.

comment:2 Changed 11 years ago by spacecataz

Enforcing universal libnotify did work; this ticket should be closed. Thank you for your help. I will upgrade Xcode; however, my timeline for doing so is not immediate, so I will not be reporting on how this affects this issue.

comment:3 Changed 11 years ago by cssdev

Resolution: fixed
Status: newclosed

Ok, closing, but I would probably consider upgrading to Xcode 4.6.3 the best solution.

Note: See TracTickets for help on using tickets.