VxWorks
@ 26-10-2007, 00:16
В общих чертах, хочу скомпилировать FUSE на дримбокс из-под Fedora Core 7, которая бегает под VMWare на Windows XP (я знаю, что я извращенец, но это к делу не относится :)).
Так вот, мне нужно кросс-компилить FUSE. Компилятор (и все к нему прилагающееся) утащил из CVS и скомпилировал имидж на дримбокс, благо мозгов для этого не надо - за меня уже подумали.
А вот FUSE - ни в какую. Чтобы я ни делал, он компилирует на комп, а не на дрим.
Запускал конфигурирование такой командой:
./config --prefix=/root/DM/root/cdk --host=powerpc-tuxbox-linux-gnu
make clean
make
config показывает все правильно, мол host и target - powerpc-tuxbox-linux-gnu. А make - все равно компилит gcc и отказывается лезть в /root/DM/root/cdk/bin за powerpc-tuxbox-linux-gnu-gcc
Где я дурак?
jinrou
@ 26-10-2007, 20:17
дык prefix указывает, на то куда файлы будут проинсталлированы, а не то откуда брать компилятор
в студию
PS хотя подозреваю тебе просто нужно сказать
export CC=/path/to/powerpc-tuxbox-linux-gnu-gcc
./configure
make
вот чего не приходилось - это кросс-компилить. Но по идее надо как-то довольно сильно помучаться с тем, чтоб были подключены именно нужные библиотеки. Потому как gcc может быть и родной (и таки скорее всего должен быть родной, интелевый), а вот библиотеки должны браться ррс-вые.
VxWorks
@ 27-10-2007, 12:03
Поменял на
./config --prefix=/root/ITGATE/root/cdk --host=powerpc-tuxbox-linux-gnu CC=/root/ITGATE/root/cdk/bin/powerpc-tuxbox-linux-gnu-gcc
Теперь вроде все хорошо, директория правильная и все такое. Make использует powerpc-tuxbox-linux-gnu-gcc.
Но в результате компиляции, получается файл, запускаемый на компе. То бишь, компиляция выполнена неправильно. Что за прикол.
jinrou
@ 27-10-2007, 12:25
VxWorks
а ты какую версию fuse собираешь?
и очень хочется ./configure --help :wink:
VxWorks
@ 27-10-2007, 15:00
QUOTE |
а ты какую версию fuse собираешь? |
2.7.1
QUOTE |
и очень хочется ./configure --help :wink: |
`configure' configures fuse 2.7.1 to adapt to many kinds of systems.
Usage: ./configure [OPTION]... [VAR=VALUE]...
To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.
Defaults for the options are specified in brackets.
Configuration:
-h, --help display this help and exit
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
-q, --quiet, --silent do not print `checking...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for `--cache-file=config.cache'
-n, --no-create do not create output files
--srcdir=DIR find the sources in DIR [configure dir or `..']
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/fuse]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Program names:
--program-prefix=PREFIX prepend PREFIX to installed program names
--program-suffix=SUFFIX append SUFFIX to installed program names
--program-transform-name=PROGRAM run sed PROGRAM on installed program names
System types:
--build=BUILD configure for building on BUILD [guessed]
--host=HOST cross-compile to build programs to run on HOST [BUILD]
--target=TARGET configure for building compilers for TARGET [HOST]
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-shared[=PKGS] build shared libraries [default=yes]
--enable-static[=PKGS] build static libraries [default=yes]
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-dependency-tracking speeds up one-time build
--enable-dependency-tracking do not reject slow dependency extractors
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-kernel-module Compile kernel module
--enable-lib Compile with library
--enable-util Compile with util
--enable-example Compile with examples
--disable-mtab Disable and ignore usage of /etc/mtab
--disable-rpath do not hardcode runtime library paths
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic try to use only PIC/non-PIC objects [default=use
both]
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
--with-pkgconfigdir=DIR pkgconfig file in DIR [LIBDIR/pkgconfig]
--with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib
--with-gnu-ld assume the C compiler uses GNU ld default=no
--with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
--without-libiconv-prefix don't search for libiconv in includedir and libdir
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Brait
@ 30-10-2007, 11:43
Дык, VxWorks!
"Если что-то не получается - прочитайте в конце концов инструкцию!"...
QUOTE (VxWorks @ 27-10-2007, 21:00) |
System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] |
Указывай --build=powerpc-tuxbox-linux-gnu, после чего ./config сам вычислит из --build'а значение для --host, а из --host'а - значение для --target.
(см. описание, слова в квадратных скобках - это значения по DEFAULT'у).
VxWorks
@ 30-10-2007, 23:45
Дык, Брайт!
Ругается он на build, говорит, что если я хочу кросс-компилировать, надо юзать host.
VxWorks
@ 31-10-2007, 02:19
OK, скомпилировалось все как надо.
Для FUSE:
./configure --host=powerpc-tuxbox-linux-gnu CC=/root/ITGATE/root/cdk/bin/powerpc-tuxbox-linux-gnu-gcc --prefix=/var/fuse
Для djmount:
./configure --host=powerpc-tuxbox-linux-gnu CC=/root/ITGATE/root/cdk/bin/powerpc-tuxbox-linux-gnu-gcc --prefix=/var/djmount --with-fuse-prefix=/var/fuse
Закинул все на дримбокс - одна засада, пишет что
symbol nl_langinfo, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
чего делать? :help:
Stranger
@ 31-10-2007, 06:20
не извращаться
VxWorks
@ 31-10-2007, 11:11
В смысле? Есть лучше идеи?
Stranger
@ 31-10-2007, 16:21
нет
yury_usa
@ 31-10-2007, 16:35
Я Воркса понимаю, у него спортивный интерес к этому делу :diablo:
а если попробовать всё статически собрать, чтоб он к внешним библиотекам не совался?
VxWorks
@ 31-10-2007, 17:43
Надо будет подумать :) Я думаю, что он обращается не к той библиотеке, которая нужна.
библиотеке на билд-машине и на хосте одинаковые?
VxWorks
@ 31-10-2007, 19:25
Разные - на билде более новая, я только вчера скомпилил новый имидж из CVS. Может, в этом причина.