Opened 11 years ago

Closed 11 years ago

Last modified 9 years ago

#43262 closed defect (fixed)

gmp @6.0.0: error: could not find a working compiler, see config.log for details

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.2.99
Keywords: haspatch Cc: nerdling (Jeremy Lavergne), cooljeanius (Eric Gallager)
Port: gmp

Description

Trying to upgrade gmp universal fails at configuring the i386 part:

:info:configure --->  Configuring gmp for architecture i386
:debug:configure Environment: 
ABI='32'
CC='ccache /usr/bin/clang'
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_gmp/gmp/work/.CC_PRINT_OPTIONS'
CFLAGS='-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
CPATH='/opt/local/include'
CPPFLAGS='-I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
CXX='ccache /usr/bin/clang++ -stdlib=libc++'
CXXFLAGS='-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
F90FLAGS='-Os'
FCFLAGS='-Os'
FFLAGS='-Os'
INSTALL='/usr/bin/install -c'
LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.9'
NM='/usr/bin/nm'
OBJC='ccache /usr/bin/clang'
OBJCFLAGS='-Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
OBJCXX='ccache /usr/bin/clang++'
OBJCXXFLAGS='-Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'
:debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_gmp/gmp/work/gmp-6.0.0-i386" && ./configure --prefix=/opt/local --enable-cxx'
:debug:configure Executing command line:  cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_gmp/gmp/work/gmp-6.0.0-i386" && ./configure --prefix=/opt/local --enable-cxx 
:info:configure checking build system type... coreisbr-apple-darwin13.1.0
:info:configure checking host system type... coreisbr-apple-darwin13.1.0
:info:configure checking for a BSD-compatible install... /usr/bin/install -c
:info:configure checking whether build environment is sane... yes
:info:configure checking for a thread-safe mkdir -p... /opt/local/bin/gmkdir -p
:info:configure checking for gawk... gawk
:info:configure checking whether make sets $(MAKE)... yes
:info:configure checking whether to enable maintainer-specific portions of Makefiles... no
:info:configure checking ABI=32
:info:configure checking whether ccache /usr/bin/clang is gcc... yes
:info:configure checking compiler ccache /usr/bin/clang -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -I/opt/local/include -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk... yes
:info:configure checking compiler ccache /usr/bin/clang -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk has sizeof(long)==4... no
:info:configure configure: error: could not find a working compiler, see config.log for details
:info:configure Command failed:  cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_devel_gmp/gmp/work/gmp-6.0.0-i386" && ./configure --prefix=/opt/local --enable-cxx 
:info:configure Exit code: 1

config.log says:

configure:6840: checking compiler ccache /usr/bin/clang -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk has sizeof(long)==4
configure:6853: ccache /usr/bin/clang -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk -c conftest.c >&5
conftest.c:4:26: error: 'test_array' declared as an array with a negative size
  static int test_array [1 - 2 * (long) (sizeof (long) != 4)];
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
configure:6856: $? = 1
configure:6861: result: no
configure:6903: error: could not find a working compiler, see config.log for details

Attachments (4)

main.log (44.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
main.log without ccache
config.log (18.4 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.
i386 config.log without ccache
Portfile.diff (694 bytes) - added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) 11 years ago.
gmp-sdkroot.diff (519 bytes) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Status: newassigned

There is another bug report (#36704) that indicates that ccache may be a problem when used with gmp.
Without it, does the compile succeed?

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

main.log without ccache

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: config.log added

i386 config.log without ccache

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

No change without ccache; I attached logfiles.

comment:3 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

CFLAGS and CXXFLAGS must be empty when configure is run.
As best I can tell, the problem is:

CFLAGS='-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk'

Could you please try the attached patch to see if it works in clearing CFLAGS.

Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Attachment: Portfile.diff added

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

Ah, that would be because I'm using the patch from #41783.

comment:5 Changed 11 years ago by nerdling (Jeremy Lavergne)

Cc: snc@… added

Cc Me!

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: gmp-sdkroot.diff added

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

Keywords: haspatch added

Thanks, yes, that works. I used the slightly different patch that I've attached: no space between -isysroot and its value, no quotes around it, and no revision increase.

comment:7 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

Fixed in r118841.

comment:8 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:9 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

This causes the -isysroot line to be baked into gmp.h, which we don't want.

comment:10 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Followup in #49801

Note: See TracTickets for help on using tickets.