Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#582 closed defect (fixed)

arb 6.0 failed to build on the Snow Leopard (10.6) buildslave (using Xcode's gcc 4.2

Reported by: mcottrell Owned by: westram
Priority: major Milestone:
Component: no idea Version: arb-6.0
Keywords: arb6.0-hotfix Cc:

Description

The guys at MacPorts? discovered that arb 6 does not build successfully on an older version of OS X. The text below is from Ryan Schmidt and the complete MacPorts? ticket is here: https://trac.macports.org/ticket/44367

The problem seems to be this line of SOURCE_TOOLS/arb_compiler_version.pl:

 if ($detailedVersion =~ /apple.*llvm.*clang/oi) { $detectedCompiler = 'clang'; }

It assumes clang —version will contain output matching /apple.*llvm.*clang/oi but it was only in Xcode 4.6 that Apple changed the output from "Apple clang" to "Apple LLVM" so the above line will fail on earlier versions of clang from Xcode versions 3.2.3 through 4.5.x inclusive.

Ryan Schmidt suggested the following fix. Check the return value of:

$CC -dM -E -x c /dev/null | grep -q __clang__

0 means it's clang, 1 means it isn't.

Hope that helps, Matt

Attachments (1)

patch-ARB-arb_compiler_version.pl.diff (11.5 KB) - added by mcottrell 10 years ago.
Correctly identify compiler on OS X

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 years ago by westram

  • Owner changed from devel to westram
  • Priority changed from normal to major
  • Status changed from new to accepted

comment:2 Changed 10 years ago by westram

  • Owner changed from westram to mcottrell
  • Status changed from accepted to assigned

[12604] applies the suggested check.

Matt, could you ask someone to test whether arb_compiler_version.pl works as expected on that 'older version of OS X'?

comment:3 Changed 10 years ago by mcottrell

Okay, I passed that patch onto the folks at MacPorts? for them to test. I'm not very optimistic that they will actually do that for me, but I'll keep my fingers crossed. I don't have the OS X and Xcode version installed that caused the problem. I'll let you know if they do anything with it. Thanks.

comment:4 follow-ups: Changed 10 years ago by mcottrell

I found a machine running the older OS and my test indicates that this patch fails because 10.6 has gcc 4.2.1 not clang.

The lowest version of gcc allowed by the arb Makefile is 4.3.1. If that really is the case, then maybe I will need to set a flag in MacPorts? telling users that arb cannot be build on 10.6.

I'm going to ask the folks at MacPorts? about this too.

comment:5 in reply to: ↑ 4 Changed 10 years ago by westram

Replying to mcottrell:

I found a machine running the older OS and my test indicates that this patch fails because 10.6 has gcc 4.2.1 not clang.

Could you post the relevant part of the output (some lines around the "Problems detecting compiler type:" part) here?

comment:6 in reply to: ↑ 4 Changed 10 years ago by westram

Replying to mcottrell:

The lowest version of gcc allowed by the arb Makefile is 4.3.1. If that really is the case, then maybe I will need to set a flag in MacPorts? telling users that arb cannot be build on 10.6.

9 months ago [10993] removed general support for gcc 4.2.1, while still allowing to use clang (which identified as gcc 4.2.1). At least that is what i read from that patch..

Maybe both compilers are installed and you did not call clang? (just a guess)

comment:7 Changed 10 years ago by mcottrell

Ryan Schmidt at MacPorts? chipped in to help solve this problem detecting the compiler on OS X. I am attaching a patch file that is now being applied when folks install arb 6.0.1 from MacPorts?. It would be great if you would apply this patch so that we can simplify the MacPort? and keep patching to a minimum.

Changed 10 years ago by mcottrell

Correctly identify compiler on OS X

comment:8 Changed 10 years ago by westram

  • Owner changed from mcottrell to westram
  • Status changed from assigned to _started

comment:9 follow-up: Changed 10 years ago by westram

  • Resolution set to fixed
  • Status changed from _started to closed

by [12682]

please wait for arb 6.0.2 release and reopen if still broken

comment:10 in reply to: ↑ 9 Changed 10 years ago by westram

please wait for arb 6.0.2 release

now available at http://download.arb-home.de/release/arb-6.0.2/

comment:11 Changed 9 years ago by westram

  • Keywords arb6.0-hotfix added

mark arb6.0.x hotfixes

Note: See TracTickets for help on using tickets.