Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#35546 closed defect (fixed)

Pinfo will not build with Clang from Xcode 4.4

Reported by: greeneg (Gary Greene) Owned by: master@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: clang mountainlion haspatch Cc: ryandesign (Ryan Carsten Schmidt)
Port: pinfo

Description (last modified by ryandesign (Ryan Carsten Schmidt))

On Mountain Lion and Xcode 4.4 (4F250)'s version of clang, pinfo will not build. If you add the following snippet to the Portfile, it will however:

if {${configure.compiler} == "clang"} {
    configure.compiler llvm-gcc-4.2
}

Attached is my updated version of the Portfile. Thanks.

Attachments (3)

Portfile (1.1 KB) - added by greeneg (Gary Greene) 12 years ago.
Updated version of pinfo's Portfile to use LLVM compiler
pinfo-0.6.9.main.log (30.8 KB) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.
pinfo.diff (541 bytes) - added by ryandesign (Ryan Carsten Schmidt) 12 years ago.

Download all attachments as: .zip

Change History (9)

Changed 12 years ago by greeneg (Gary Greene)

Attachment: Portfile added

Updated version of pinfo's Portfile to use LLVM compiler

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

Cc: ryandesign@… added
Description: modified (diff)
Keywords: clang haspatch added
Owner: changed from macports-tickets@… to master@…

Simpler: just add this line:

compiler.blacklist clang

Instead of a complete new Portfile, you should provide a unified diff of your changes so that they are easier to review. I'll attach this.

When you report that a port will not build, you should attach the main.log file so that we can see how it failed. I'll attach this too. The error it shows is:

:info:build Undefined symbols for architecture x86_64:
:info:build   "_buildcommand", referenced from:
:info:build       _openinfo in pinfo-filehandling_functions.o
:info:build   "_builddircommand", referenced from:
:info:build       _opendirfile in pinfo-filehandling_functions.o
:info:build ld: symbol(s) not found for architecture x86_64

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: pinfo-0.6.9.main.log added

Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: pinfo.diff added

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Keywords: mountainlion added
Resolution: fixed
Status: newclosed
Summary: Pinfo will not build with ClangPinfo will not build with Clang from Xcode 4.4

It was stated in comment:ticket:35549:1 that the port built fine with clang on Lion. Not knowing whether this was because of a difference in the OS or in the Xcode version, I assumed the latter, and as part of r96281 I blacklisted clang only with Xcode 4.4 and up.

However, the Lion buildbot (which last I heard was using Xcode 4.3.2) failed to build pinfo, with the same error message as above. I then tried building with macports-clang-3.0 on my Mountain Lion machine, and it also failed as above. So in the absence of an actual main.log showing a successful build with some version of clang, I went back to blacklisting clang always, as I had originally planned, in r96297.

comment:3 Changed 12 years ago by master@…

OK, it is not worth investigating why it built for me on Lion and failed in other cases. I'll recheck the case when I get a clean updated environment on a new Mountain Lion Mac.

comment:4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Is it possible you were using Xcode 4.0 or 4.1? On those versions of Xcode, MacPorts would default to using llvm-gcc-4.2, not clang.

comment:5 Changed 12 years ago by jmroot (Joshua Root)

Did you try clang with -std=gnu89?

comment:6 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Thanks, that seems to work. r96305

Note: See TracTickets for help on using tickets.