GCC with-gxx-include-dir está configurado como simulador de iOS 11.4

1

Estoy intentando compilar enlace que requiere que ejecute autoconf y luego ./configure . Estaba funcionando hace unos días, pero ahora esto sucede:

checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '502' is supported by ustar format... yes
checking whether GID '20' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether make supports nested variables... (cached) yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in '/Users/rajiv/libzmq/libzmq-4.2.5':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use '--host'.
See 'config.log' for more details

config.log muestra:

configure:4489: checking whether we are cross compiling
configure:4497: gcc -o conftest    conftest.c  >&5
configure:4501: $? = 0
configure:4508: ./conftest
dyld: mach-o, but built for simulator (not macOS)
./configure: line 4510: 98877 Abort trap: 6           ./conftest$ac_cv_exeext
configure:4512: $? = 134

Después de buscar GitHub por un tiempo, parece que algo podría estar mal con GCC:

$ gcc -v

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/c++/4.2.1

Apple LLVM version 9.1.0 (clang-902.0.39.2)

Target: x86_64-apple-darwin17.7.0

Thread model: posix

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Parece que está intentando include desde el iOS 11.4 SDK. ¿Cómo puedo cambiarlo de nuevo al camino correcto y cómo sucedió este cambio? Lo único que se me ocurre es que instalé una actualización para las Herramientas de la línea de comandos de Xcode y es posible que haya actualizado autoconf con Homebrew

    
pregunta Rajiv 06.07.2018 - 00:58

1 respuesta

1

Estaba viendo un problema similar.

$ gcc -v
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator11.4.sdk/usr/include/c++/4.2.1

En mi caso, el resultado de la configuración incluye como #include <stdlib.h> que hace referencia a las bibliotecas de la plataforma simulador de iOS / iPhone en lugar de las bibliotecas macOS. Esto resultó en que obtuve errores acerca de la arquitectura incorrecta que se estaba utilizando al compilar.

La única solución viable que encontré fue desinstalar Xcode (eliminar la aplicación de /Applications ) y desinstala las herramientas de la línea de comandos . Eso y un reinicio parecieron resolver este problema en mi caso.

    
respondido por el Will Haley 16.07.2018 - 20:24

Lea otras preguntas en las etiquetas