configure: error: невозможно запустить скомпилированные программы на языке C. при установке libtools-2.4.2 - PullRequest
0 голосов
/ 10 января 2019

Изо всех сил пытался настроить мою среду для запуска инструментов биоинформатики. Проблема началась с постоянной ошибки autogen.sh в autoreconf -fi: command not found для нескольких приложений. Переустановил autoconf, automake, libtools.

В настоящее время установка libtools завершается с ошибкой в ​​./configure, но autoconf и automake успешно установлены. Вот ошибка:

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... libltdl/config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-apple-darwin18.0.0
checking host system type... x86_64-apple-darwin18.0.0
configure: autobuild project... GNU Libtool
configure: autobuild revision... 2.4.2 ()
configure: autobuild hostname... MACUSR
configure: autobuild mode... default
configure: autobuild timestamp... 2019011
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 `/usr/local/libtool-2.4.2':
configure: error: cannot run C compiled programs.

Попробовал Homebrew, он установил все мои инструменты в usr / local / Cellar и ничего не работает, я добавил расположение инструментов в переменную PATH, но не повезло. Отслеживается проблема с проблемой jamf: https://www.jamf.com/jamf-nation/discussions/28764/jamf-quickadd-symlinks-usr-local-bin-causing-install-problems-for-other-apps

Застрял и буду рад советам здесь.

1 Ответ

0 голосов
/ 17 января 2019

Короче говоря, это была старая проблема с gcc. Мой PATH сначала ссылался на anaconda3 / bin, где он запускал любой найденный там gcc. После изменения моего $ PATH, чтобы он указывал на другие корзины до anaconda3, все компилировалось без проблем.

gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
...