Checking whether we are cross compiling configure error in

gcc error Добрый вечер. Внезапно! система не может собрать практически ни одну программу, все завершаются с одинаковой ошибкой. Очень прошу помощи, я уже не знаю, что делать. не установлены заголовки библиотек? почистите /tmp и проверьте права на запись и место на диске , ошибка абсурдная можно еще перезагрузиться configure:3416: gcc -o conftest -march=i686 -mtune=generic […]

Содержание

  1. gcc error
  2. Как настроить окружение Linux что бы основным компилятором был кросскопилятор?
  3. Кросс-компиляция Python3 в Ubuntu 12 для ARM

gcc error

Добрый вечер. Внезапно! система не может собрать практически ни одну программу, все завершаются с одинаковой ошибкой.

Очень прошу помощи, я уже не знаю, что делать.

не установлены заголовки библиотек?

почистите /tmp
и проверьте права на запись и место на диске , ошибка абсурдная

можно еще перезагрузиться

configure:3416: gcc -o conftest -march=i686 -mtune=generic -O2 -pipe -Wl,—hash-style=gnu -Wl,—as-needed conftest.c >&5
configure:3420: $? = 0
configure:3427: ./conftest
./configure: line 3429: ./conftest: No such file or directory

флаги тут у него непричем

тех, что требует программа.

Это арч. Причём тут флаги. Алсо, теже самые пакеты отлично ставятся у меня на ноутбуке только только проверил. На ноуте тотже Арч.

Они бы в качестве зависимости установились бы.

опаньки — это откуда такое? %)

с его лога, у него результат компиляции не может быть создан как файл на диске

т.е. с правами на запись, что то не то?

т.е. или
1) поломаны скрипты сборки и каталог для обьектных файлов ими не создан
2) ошибка записи из за прав доступа
3) ошибка записи из за места на диске
. и т п

а какие пакеты ты недавно устанавливал/удалял/обновлял?

1) врятли теже программы собираются на ноутбуке.
3) места навалом.
Сейчас права проверяю.
Меня ещё смущает строчка «Спецификации прочитаны из /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/specs »
На ноутбуке написанно используются встроенные спецификации.

Всё самое новое. Арч же.
Я вчера игрался с LFS и после этого начались проблемы в основной системе.

Спеки тоже покажите

из под root пользователя таже самая ошибка значит проблема не в правах так?

Делал всё точно по книге нервы не выдержали на пункте 5.9. Spec файл программы которая не собирается?

вообще компилятор у вас hello world собирает ?

#include
int main (void)

ну ка соберите вручную

Кое какие программки всё таки собирались, но в большинтсве нет. Специально не проверял. Сейчас попробую скомпилировать hello world на C/C++.

Да hellou world собирается

А работает нормально? Segfault-ов нет?

а conftest который не сложнее hello world обычно — нет

configure:3360: gcc -o conftest -march=i686 -mtune=generic -O2 -pipe -Wl,—hash-style=gnu -Wl,—as-needed conftest.c >&5
configure:3364: $? = 0
configure:3386: result:

conftest не был собран

configure:3408: checking whether we are cross compiling
configure:3416: gcc -o conftest -march=i686 -mtune=generic -O2 -pipe -Wl,—hash-style=gnu -Wl,—as-needed conftest.c >&5
configure:3420: $? = 0
configure:3427: ./conftest
./configure: line 3429: ./conftest: No such file or directory

conftest не был собран

gcc -v -march=i686 -mtune=generic -O2 -pipe -Wl,—hash-style=gnu -Wl,—as-needed

а попробуйте hello world вот с этими флагами собрать

О чудо братья и сестры.
Удолил /usr/lib/gcc/i686-pc-linux-gnu/4.4.3/specs
Теперь gcc -v пишет как положенно:Используются внутренние спецификации.
Использование сторонней спецификации было вызванно наверное выполнением команды в главе 5.8 lfs book

Источник

Как настроить окружение Linux что бы основным компилятором был кросскопилятор?

Платформа на Linux (Ubuntu).
Установлен (в своей папке) кроссплатформенный компилятор.
Соответсвенно, если собираем код под родную платформу, просто использую GCC
Если собираю под кросс платформу, запускаю соответсвующий компилятор типа /home/work/openwrt/. /. gcc

Как . настроить все окружение Linux что бы использовался только хост компилятор (по умолчанию).
Проблема в том что при попытке компилировать библиотеки (например https://github.com/brgl/libgpiod) возникает ошибка, связанная с тем (по моему мнению) что используется компилятор gcc linux, а не кросс компилятор openwrt в моем примере.

  • Вопрос задан более трёх лет назад
  • 180 просмотров

Средний 2 комментария

Уточните пожалуйста.
я установил кросс компилятор, он работает, собирается прошивка, тестове примеры работают на целевой платформе. Этот этап я прошел.

Теперь пытаюсь сделать следующий шаг, установить библиотеку https://github.com/brgl/libgpiod
$ ./autogen.sh —enable-tools=yes —prefix=/home/123
сначала не находил gpio.h
Воспользовался предыдущим ответом установил update-alternatives для gcc

Теперь ошибка:
checking whether we are cross compiling. configure: error: in `/home/developer/work/libgpiod’:
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `—host’.
See `config.log’ for more details

Или я не правильно указываю —prefix=/home/123 ? Какой это путь? Как . правильно указать?

Источник

Кросс-компиляция Python3 в Ubuntu 12 для ARM

Пытаюсь сделать кросс-компиляцию Python 3.5.5 на Ubuntu 12 (в виртуалбокс), чтобы потом перенести на промышленный контроллер (в котором Линукс). Инструкция по вот этой ссылке — http://idiip.jiinii.com/cross-compile-python-3.html. При выполнении ./configure —host=arm-linux-gnueabihf —target=arm-linux-gnueabihf —build=x86_64-linux-gnu —prefix=$HOME/PythonSrc/PythonTarget —disable-ipv6 —enable-shared командная строка выдает такое сообщение:

Опыта немного у меня. Помогите разобраться.

А что в config.log?

Бери abi из ведройда от es проводника и не надо компилить

Landgraf , в файле config.log много чего написано. Я можно сказать пока не понимаю что там и к чему. Я так понимаю не разобравшись с этими логами дальше не продвинутся у меня дела ?
Может подскажете тогда что можно почитать про кросс-компиляцию?

Ищи по error: , последнюю ошибку.

файле config.log много чего написано

Так найди нужное место. Там рядом будет продублировано такое же сообщение от configure, и вообще оно будет в конце портянки с вызовами команд, сразу перед портянкой с переменными.

slovazap , я думаю пока интересна вот эта часть файла config.log?:

Мне вообще не интересна. Вам — скорее всего, ошибка там черным по белому написана, причём несколько раз.

выложи файл на pastebin.com и кинь сюда ссылку хотя бы

arm-linux-gnueabihf-gcc: command not found

Кросс-компилятор же нужно установить сначала. Вроде, так это делается:

Landgraf , файл config.log выложил сюда — https://pastebin.com/9Z8JzDiA . На всякий случай сам файл configure выложил сюда — https://pastebin.com/ZLc9LDZU

xaizek , установил. Но все равно не помогает. Так же все и осталось.

Команда arm-linux-gnueabihf-gcc в консоли работает?

в логах буквально в самом начале написано
./configure: line 4024: arm-linux-gnueabihf-gcc: command not found
попробуй после того как установил, перелогиниться. Если не поможет, смотри почему не находит arm-linux-gnueabihf-gcc

xaizek , как это проверить?

Набрать в консоли arm-linux-gnueabihf-gcc и нажать Enter.

xaizek , выдается сообщение

Landgraf , я инсталлировал arm-linux-gnueabihf-gcc, но компиляция все равно пока не получается. Хотя сообщение выдаваемое командной строкой немного другое теперь.

Файл config.log я выложил по ссылке https://pastebin.com/VTq3kDLW (там я на всякий случай переименовал файл как config_1).

Теперь судя по логам вместо «…arm-linux-gnueabihf-gcc: command not found» пишется сообщение «arm-linux-gnueabihf-gcc: fatal error: no input files». То есть каких-то входных файлов (данных) не хватает?

И еще смутило последнее сообщение «If you meant to cross compile, use `–host’.» (110-я строка файла config_1). Я же использую уточнение «–host=x86_64-linux-gnu», на что он ругается?

Заранее благодарен за помощь.

а что за контроллер то хоть?

может на нем уже debian-подобный дистрибутив какой-то установлен?

или планируется быть установлен?

Теперь судя по логам вместо «…arm-linux-gnueabihf-gcc: command not found» пишется сообщение «arm-linux-gnueabihf-gcc: fatal error: no input files». То есть каких-то входных файлов (данных) не хватает?

Нет, это ошибка не в этом, а здесь:

Что-то ты неправильно кросс-компилируешь. Потому что получается, что ./conftest скомпилировался под arm, а запускается на x86_64. Возможно флаги build/host/target неправильно расставил.

И еще смутило последнее сообщение «If you meant to cross compile, use `–host’.» (110-я строка файла config_1). Я же использую уточнение «–host=x86_64-linux-gnu», на что он ругается?

Да, именно так. Посмотри как по инструкции в твоей же ссылке:

Дело в том, что сборочная система Autotools настолько тупая, что хостом она при кросс-компиляции считает целевую машину, а не ту, на которой ты компилируешь.

Дело в том, что сборочная система Autotools настолько тупая, что хостом она при кросс-компиляции считает целевую машину, а не ту, на которой ты компилируешь.

почему тупая, в документации прямо сказано, что host — это машина ДЛЯ которой ты компилируешь

что host — это машина ДЛЯ которой ты компилируешь

Интересно, какие наркотики употребляли те, кто проектировал Autotools. Хотя… где проектирование и где Autootools.

хост хостит программу, которую мы компилируем, всё логично 🙂

Источник

I have an old version of cabal-install so I downloaded cabal-install 1.20 and When installing it errors out.

Additional note: ghc 7.8.3
OS: CentOS 6.6

Error:

Building network-2.4.2.3...
.......
......
......
usr/bin/ld: cannot find -lHSparsec-3.1.7-ghc7.8.3
collect2: ld returned 1 exit status
error during cabal-install bootstrap:
building the network package failed.

When I try to run «cabal install network-2.5.0.0»,getting following errors

root@gains: cabal install network-2.5.0.0
Resolving dependencies...
Configuring network-2.5.0.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
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 `/tmp/network-2.5.0.023068/network-2.5.0.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
cabal: Error: some packages failed to install:
network-2.5.0.0 failed during the configure step. The exception was:
ExitFailure 1

Faheem Mitha's user avatar

Faheem Mitha

34.1k31 gold badges117 silver badges183 bronze badges

asked Dec 11, 2014 at 10:35

Vidhya's user avatar

4

Error :

checking whether we are cross compiling... configure: error: in `/tmp/network-2.5.0.023068/network-2.5.0.0':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

So, I run command yum groupinstall "development tools", installed c compiler tools and could compile c programs. Then,

checking whether we are cross compiling... configure: error: in /tmp/network-2.5.0.023068/network-2.5.0.0':

I tried mount -o remount,exec,suid /tmp which solved the error.Its because of execution rights issue on the file system.

answered Dec 12, 2014 at 8:38

Vidhya's user avatar

VidhyaVidhya

1311 silver badge6 bronze badges

2

When I run sudo bash configure (./configure doesn’t work), I get this:

checking whether we are cross compiling… configure: error: in
/media/pitaj/Shared/Documents/makeMKV/makemkv-oss': configure: error:
cannot run C compiled programs. If you meant to cross compile, use
—host’. See `config.log’ for more details

In console.log, it says that gcc -V isn’t valid

I’m following this tutorial: http://www.makemkv.com/forum2/viewtopic.php?f=3&t=224

asked May 31, 2014 at 20:28

PitaJ's user avatar

PitaJPitaJ

7529 silver badges17 bronze badges

Most likely the folder you are compiling on is mounted with the noexec option.
For security reasons, tmpfs under /tmp is mounted noexec.

Move the entire folder to a mount that can execute programs or remount the place with different options. Background: The configure script needs to perform some basic tests which also involve compiling and running the compiled test program.

answered May 31, 2014 at 21:48

aquaherd's user avatar

aquaherdaquaherd

6,1001 gold badge28 silver badges39 bronze badges

1

vhmth

Posts: 13
Joined: 2014-02-06T15:49:55-07:00
Authentication code: 6789

Error When Cross-Compiling with Android NDK

Hey all. I’m currently cross-compiling all ImageMagick delegate libs with no problem using the Android NDK. However, when I try to do so with IM itself, I’m getting the error «configure: error: cannot run test program while cross compiling». Any ideas?

Code: Select all

[ 90%] Performing configure step for 'ImageMagick'
cd /home/opsteam/vinay/3rdparty/ImageMagick/ImageMagick-6.8.7-8 && env CC=/usr/local/android-ndk-r9-clang/bin/clang "CFLAGS=-O3 -g -DNDEBUG -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -D__ANDROID__ -g -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fno-strict-aliasing -Wa,--noexecstack -Wl,--fix-cortex-a8 -fPIC" AR=/usr/local/android-ndk-r9-clang//bin/arm-linux-androideabi-ar RANLIB=/usr/local/android-ndk-r9-clang//bin/arm-linux-androideabi-ranlib "CFLAGS=-O3 -g -DNDEBUG -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -D__ANDROID__ -g -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fno-strict-aliasing -Wa,--noexecstack -Wl,--fix-cortex-a8 -fPIC" "CXXFLAGS=-O3 -g -DNDEBUG -std=c++11 -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -D__ANDROID__ -g -ffunction-sections -funwind-tables -fstack-protector -no-canonical-prefixes -fno-strict-aliasing -Wa,--noexecstack -Wl,--fix-cortex-a8" CPPFLAGS=-I/home/opsteam/vinay/3rdparty/ImageMagick/dist/ImageMagick/include LDFLAGS=-L/home/opsteam/vinay/3rdparty/ImageMagick/dist/ImageMagick/linux "LIBS=-ljpeg -lz -lpng" ./configure --host=arm-linux-androideabi --enable-static --disable-shared --disable-installed --prefix=/home/opsteam/vinay/3rdparty/ImageMagick/build/ImageMagick --without-bzlib --without-djvu --without-dps --without-fftw --without-fpx --without-fontconfig --without-freetype --without-jbig --without-jp2 --without-lcms --without-lcms2 --without-lqr --without-lzma --without-magick-plus-plus --without-openexr --without-pango --without-perl --without-tiff --without-webp --without-x --without-xml
configuring ImageMagick 6.8.7-8
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-unknown-linux-androideabi
checking target system type... arm-unknown-linux-androideabi
checking whether build environment is sane... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for arm-linux-androideabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for arm-linux-androideabi-gcc... /usr/local/android-ndk-r9-clang/bin/clang
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... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/android-ndk-r9-clang/bin/clang accepts -g... yes
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C89... none needed
checking whether /usr/local/android-ndk-r9-clang/bin/clang understands -c and -o together... yes
checking dependency style of /usr/local/android-ndk-r9-clang/bin/clang... gcc3
checking how to run the C preprocessor... /usr/local/android-ndk-r9-clang/bin/clang -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for arm-linux-androideabi-gcc... (cached) /usr/local/android-ndk-r9-clang/bin/clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether /usr/local/android-ndk-r9-clang/bin/clang accepts -g... (cached) yes
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C89... (cached) none needed
checking whether /usr/local/android-ndk-r9-clang/bin/clang understands -c and -o together... (cached) yes
checking dependency style of /usr/local/android-ndk-r9-clang/bin/clang... (cached) gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/local/android-ndk-r9-clang//bin/clang++ accepts -g... yes
checking dependency style of /usr/local/android-ndk-r9-clang//bin/clang++... gcc3
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C99... none needed
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... /usr/local/android-ndk-r9-clang/bin/clang -E
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking how to print strings... printf
checking for ld used by /usr/local/android-ndk-r9-clang/bin/clang... /usr/local/android-ndk-r9-clang/arm-linux-androideabi/bin/ld
checking if the linker (/usr/local/android-ndk-r9-clang/arm-linux-androideabi/bin/ld) is GNU ld... yes
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C99... (cached) none needed
checking CFLAGS for maximum warnings... -Wall
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for gawk... (cached) mawk
checking if malloc debugging is wanted... no
checking for __attribute__... yes
checking for gcc architecture flag...
checking for gcc architecture flag... unknown
checking for arm-linux-androideabi-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: using cross tools not prefixed with host triplet
checking pkg-config is at least version 0.9.0... yes
checking if LD -Wl,--version-script works... yes
checking size of size_t... 4
checking for C compiler vendor... clang
checking CFLAGS for maximum warnings... (cached) -Wall
checking for linker lazyload option... none
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... no
checking for /usr/local/android-ndk-r9-clang/bin/clang option to support OpenMP... unsupported
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... (cached) no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for native large file support... configure: error: in `/home/opsteam/vinay/3rdparty/ImageMagick/ImageMagick-6.8.7-8':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
make[6]: *** [ImageMagick-prefix/src/ImageMagick-stamp/ImageMagick-configure] Error 1
make[6]: Leaving directory `/home/opsteam/vinay/3rdparty/ImageMagick'
make[5]: *** [CMakeFiles/ImageMagick.dir/all] Error 2
make[5]: Leaving directory `/home/opsteam/vinay/3rdparty/ImageMagick'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/opsteam/vinay/3rdparty/ImageMagick'
make[3]: *** [ImageMagick-prefix/src/ImageMagick-stamp/ImageMagick-build] Error 2
make[3]: Leaving directory `/home/opsteam/vinay/3rdparty/build/android'
make[2]: *** [CMakeFiles/ImageMagick.dir/all] Error 2
make[2]: Leaving directory `/home/opsteam/vinay/3rdparty/build/android'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/opsteam/vinay/3rdparty/build/android'
make: *** [android] Error 2

vhmth

Posts: 13
Joined: 2014-02-06T15:49:55-07:00
Authentication code: 6789

Re: Error When Cross-Compiling with Android NDK

Post

by vhmth » 2014-03-25T14:03:13-07:00

Thanks for the link! After looking through it, it seems like the issue the OP was facing is not the same issue I am facing. I am simply seeing the error of «cannot run test program while cross compiling». When I leave out the «—host=…» flag, it gives me the error:

Code: Select all

checking whether we are cross compiling... configure: error: in `/home/opsteam/vinay/3rdparty/ImageMagick/ImageMagick-6.8.8-9':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.

After reading that thread, I tried updating IM to the latest (6.8.8-9), but I’m getting the same results. Has anyone else noticed this error? It seems like this page has a list of libraries that do/do not work when cross-compiling, and the same error is being reported there:

http://git.uclibc.org/buildroot/tree/sc … 52f93cb11e

If it helps, here’s the entire output of the configure:

Code: Select all

[ 90%] Performing configure step for 'ImageMagick'
configure: WARNING: unrecognized options: --without-jp2
configuring ImageMagick 6.8.8-9
checking build system type... x86_64-unknown-linux-gnu
checking host system type... arm-linux-eabi
checking target system type... arm-linux-eabi
checking whether build environment is sane... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for arm-linux-eabi-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for arm-linux-eabi-gcc... /usr/local/android-ndk-r9-clang/bin/clang
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... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/local/android-ndk-r9-clang/bin/clang accepts -g... yes
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C89... none needed
checking whether /usr/local/android-ndk-r9-clang/bin/clang understands -c and -o together... yes
checking dependency style of /usr/local/android-ndk-r9-clang/bin/clang... gcc3
checking how to run the C preprocessor... /usr/local/android-ndk-r9-clang/bin/clang -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for arm-linux-eabi-gcc... (cached) /usr/local/android-ndk-r9-clang/bin/clang
checking whether we are using the GNU C compiler... (cached) yes
checking whether /usr/local/android-ndk-r9-clang/bin/clang accepts -g... (cached) yes
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C89... (cached) none needed
checking whether /usr/local/android-ndk-r9-clang/bin/clang understands -c and -o together... (cached) yes
checking dependency style of /usr/local/android-ndk-r9-clang/bin/clang... (cached) gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether /usr/local/android-ndk-r9-clang//bin/clang++ accepts -g... yes
checking dependency style of /usr/local/android-ndk-r9-clang//bin/clang++... gcc3
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C99... none needed
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... /usr/local/android-ndk-r9-clang/bin/clang -E
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking how to print strings... printf
checking for ld used by /usr/local/android-ndk-r9-clang/bin/clang... /usr/local/android-ndk-r9-clang/arm-linux-androideabi/bin/ld
checking if the linker (/usr/local/android-ndk-r9-clang/arm-linux-androideabi/bin/ld) is GNU ld... yes
checking for /usr/local/android-ndk-r9-clang/bin/clang option to accept ISO C99... (cached) none needed
checking CFLAGS for maximum warnings... -Wall
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... (cached) /bin/sed
checking for gawk... (cached) mawk
checking if malloc debugging is wanted... no
checking for __attribute__... yes
checking for gcc architecture flag...
checking for gcc architecture flag... unknown
checking for arm-linux-eabi-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
configure: WARNING: using cross tools not prefixed with host triplet
checking pkg-config is at least version 0.9.0... yes
checking if LD -Wl,--version-script works... yes
checking size of size_t... 4
checking for C compiler vendor... clang
checking CFLAGS for maximum warnings... (cached) -Wall
checking for linker lazyload option... none
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... no
checking for /usr/local/android-ndk-r9-clang/bin/clang option to support OpenMP... unsupported
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... (cached) no
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... unknown
checking for _LARGE_FILES value needed for large files... unknown
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for native large file support... configure: error: in `/home/opsteam/vinay/3rdparty/ImageMagick/ImageMagick-6.8.8-9':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
make[6]: *** [ImageMagick-prefix/src/ImageMagick-stamp/ImageMagick-configure] Error 1
make[6]: Leaving directory `/home/opsteam/vinay/3rdparty/ImageMagick'
make[5]: *** [CMakeFiles/ImageMagick.dir/all] Error 2
make[5]: Leaving directory `/home/opsteam/vinay/3rdparty/ImageMagick'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/opsteam/vinay/3rdparty/ImageMagick'
make[3]: *** [ImageMagick-prefix/src/ImageMagick-stamp/ImageMagick-build] Error 2
make[3]: Leaving directory `/home/opsteam/vinay/3rdparty/build/android'
make[2]: *** [CMakeFiles/ImageMagick.dir/all] Error 2
make[2]: Leaving directory `/home/opsteam/vinay/3rdparty/build/android'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/opsteam/vinay/3rdparty/build/android'
make: *** [android] Error 2

bindesh

Posts: 1
Joined: 2016-03-12T02:45:10-07:00
Authentication code: 1151

Re: Error When Cross-Compiling with Android NDK

Post

by bindesh » 2016-03-12T02:54:38-07:00

Hi vhmth,

I tried to build ImageMagick using Android.mk files but it takes a lot of time to set flags of various kind when version changes. Therefore i created a script for cross-compilation using configure script as you are doing. However i see your log it says some problem after trying large file support. 64 Bit long addresses. Try disabling largefile by adding flag —disable-largefile.

I am sharing my script via my website’s article. Please take a look if it helps you. Do let me know the results using the script. I will update my script and article if required. The script disables many features to let library work on most of Android devices. It does not build Magick++.

I have build old versions and latest ImageMagick-6.9.3-2 using this configure script.

http://www.ourinnovativemind.in/2016/03 … -with.html
http://www.ourinnovativemind.blogspot.c … -with.html

«cannot run C compiled programs» when running `rvm install`

If you get this error in your config.log when running rvm install <version>, you may have the wrong rvm_archflags set in your ~/.rvmrc.

Mine was set to:

rvm_archflags="-arch x86_64"

When it should have been:

rvm_archflags="-arch i386"

I don’t know how that happened, but there you go. Hopefully this has solved it for you.


This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters

Show hidden characters

[2011-01-06 13:06:32] ./configure —prefix=/Users/aanand/.rvm/rubies/ruby-1.9.2-p136 —enable-shared
checking build system type… i386-apple-darwin10.5.0
checking host system type… i386-apple-darwin10.5.0
checking target system type… i386-apple-darwin10.5.0
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/aanand/.rvm/src/ruby-1.9.2-p136′:
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `—host’.
See `config.log’ for more details
  • Печать

Страницы: [1]   Вниз

Тема: Не собирается GTK  (Прочитано 1425 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
Grovello

Добрый день, я захотел изучить GTK+, но у меня никак не получается собрать его и eclipse ни в какую не хочет видеть либы.
Я скачал gtk+-3.8.4.tar.xz разархивировал и попытался выполнить ./configure, но он мне выкидывает 

andrey-PC gtk+-3.8.4 #  ./configure
bash: ./configure: Permission denied
А если запускать как скрипт sh configure то он вылетает с ошибкой

checking whether we are cross compiling... configure: error: in `/media/andrey/6CCEF58BCEF54DB8/gtk+-3.8.4':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
При попытке сделать make он так же не видит Makefile.in.
Никак не могу понять, как заставить его нормально собрать GTK+, что бы eclipse видел либы

config.log


Оффлайн
peregrine

Grovello, а зачем от рута это делать? От юзера надо.


Оффлайн
MooSE

А зачем собирать когда можно поставить их репозитория?


Оффлайн
Grovello

Grovello, а зачем от рута это делать? От юзера надо.

В данном случае, разницы я не вижу, просто под рутом сидел.

А зачем собирать когда можно поставить их репозитория?
Поиск по GTK gtklib ничего не дал толком.
Сейчас я решил просто скачать Anjuta и работать в ней, так будет проще.


Оффлайн
MooSE

ну дык ставишь anjuta из репозитория и всё что надо подтягивается по зависимостям.


  • Печать

Страницы: [1]   Вверх

Понравилась статья? Поделить с друзьями:
  • Checking libraries copying library jinput error copying library jinput
  • Checking for apr no configure error apr not found please read the documentation
  • Checking file system on c как исправить windows 7
  • Checking error authentication method locked перевод
  • Checking engine version error 6006 missing latest engine files update engine to fix it