Seperate include directory for i486-mingw32 cross-compiler toolchain
I've installed the mingw32 cross-compiler. I noticed that when using this compiler, a seperate, non-standard include directory is used. So instead of copying all of the dependencies headers to compile the software, is there an easier way of including both directories?
Thanks.
I've installed the mingw32 cross-compiler. I noticed that when using this compiler, a seperate, non-standard include directory is used. So instead of copying all of the dependencies headers to compile the software, is there an easier way of including both directories?
Thanks.
Similar Messages
-
[SOLVED] mingw32 cross compile won't link with static libraries
Hi all,
I'm trying to cross compile an app I have written to i486-mingw32. I'm running Arch 64-bit (under which it compiles fine natively), and I have installed the mingw32 binaries along with mingw32-boost-static from AUR.
All seems well, but unfortunately when I cross compile my code libtool refuses to link to the static Boost libraries:
*** Warning: Trying to link with static lib archive /usr/i486-mingw32/lib/libboost_filesystem-mt-s.a.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because the file extensions .a of this argument makes me believe
*** that it is just a static archive that I should not use here.
This then leads to undefined references as the library is not linked in. But as I *want* the static version of the library, does anyone know how to tell libtool to accept the .a file and link it?
Last edited by Malvineous (2011-05-02 02:44:48)Just to follow up on this, I discovered the problem. It turns out libtool was doing the correct thing, and refusing to link the static library in with the shared one (otherwise later this could result in something being defined multiple times.) The undefined references were unrelated to the error above, and the code that was causing them (in a different Boost header file) could be easily #defined out.
When the time came to link the actual executables, libtool did include all the necessary libraries and everything worked as it should! -
Automake with a separate include directory (also curses)
I am building a program, and I am trying (unsuccessfully) to add autotools support to it, for easier distribution. However, because I chose to have a separate include/ directory for my header files, I am encountering innumerable difficulties. I have a top level Makefile.am, and another in src/, and this one should be the one that does the including, I think. Even if I specify the header files in sources, they are not included. I do know about AM_CPPFLAGS, but somehow, this seems like the wrong thing to do.
I guess what I'm really wondering is there any way to include header files from a separate directory without using AM_CPPFLAGS="$AM_CPPFLAGS -I../include", which seems like it won't include the sources in the distribution, according to what I have read.
A separate problem I am having is that I am not able to include libraries with my program. It depends on ncurses, so how do I specify the -lncurses option? Again with AM_CPPFLAGS? I would rather not.Maybe my old post will help, or at least move you along a bit: https://bbs.archlinux.org/viewtopic.php … 2#p1255512
Specifically, see my "configure.ac" file, the section for "AC_CHECK_LIB" is used to include a library (like ncurses). -
Compiling a program with i486-mingw32-g++ with a static binary[SOLVED]
Hi,
I need to compile a program for win with whatever open cross compiler, I tried mingw32-g++, with the following command>
i486-mingw32-g++ main.cpp main.h `/usr/i486-mingw32/bin/wx-config --libs` `/usr/i486-mingw32/bin/wx-config --cxxflags` -o test.exe
but now my program depends on the dll lib mingwm10.dll which kind a sucks cause my goal is to have one executable file.
Is there any other compiler or a command switch to make a static binary ?
Last edited by gnu_D (2009-08-10 11:07:59)Ok, I did searched that, and I come up with this.
Which means I need to remove the -mthread option, there is only one problem, if I compile like this>
i486-mingw32-g++ `/usr/i486-mingw32/bin/wx-config --libs` `/usr/i486-mingw32/bin/wx-config --cxxflags` -o test.exe
then I have to expand the command like this>
i486-mingw32-g++ main.cpp main.h -Wl,--subsystem,windows -mwindows /usr/i486-mingw32/lib/libwx_mswu_richtext-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_mswu_aui-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_mswu_xrc-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_mswu_qa-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_mswu_html-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_mswu_adv-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_mswu_core-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_baseu_xml-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_baseu_net-2.8-i486-mingw32.a /usr/i486-mingw32/lib/libwx_baseu-2.8-i486-mingw32.a -lwxregexu-2.8-i486-mingw32 -lwxexpat-2.8-i486-mingw32 -lwxtiff-2.8-i486-mingw32 -lwxjpeg-2.8-i486-mingw32 -lwxpng-2.8-i486-mingw32 -lwxzlib-2.8-i486-mingw32 -lrpcrt4 -loleaut32 -lole32 -luuid -lwinspool -lwinmm -lshell32 -lcomctl32 -lcomdlg32 -lctl3d32 -ladvapi32 -lwsock32 -lgdi32 -I/usr/i486-mingw32/lib/wx/include/i486-mingw32-msw-unicode-release-static-2.8 -I/usr/i486-mingw32/include/wx-2.8 -D__WXMSW__-fno-rtti -o
If someone can scrap me a Makefile which will do that will be lovely. -
Good instructions for making a GCC cross compiler?
Hi
I think this might be the best place to ask this since people probably have been making cross compilers. I am interested in trying to make a cross compiler of GCC targetting Plan9/i386. There is an old 3.0 version of GCC (http://cm.bell-labs.com/sources/extra/gcc/) ported to Plan9.
The thing that confuses me a bit about cross compilers is the use of binutils for the target architecture. How does that actually work? The host OS/architecture would not be able to execute those binaries. It feels a bit like a chicken-and-egg issure and I am not really sure how to get started. I have been trying to read up a bit on the PKGBUILDs for cross-arm but the whole theoretical issue of how to actually get the thing working in the first place is still a bit unclear to me.
Some good instructions/links/help would be appreciated
I could post my temporary PKGBUILD here if people want to help out with the actual build...A small update to my attempts:
This is my binutils package, it has failed at multiple levels during my attempts. The binutils ported to Plan9 are relatively old so some stuff needs to be patched up to build. Now it fails on not being able to recognize arlex.o . This seems a bit odd I think.
# Adapted from cross-arm-elf, cross-i686-pc-gnu and cross-i686-pc-mingw32
pkgname=cross-i386-plan9-binutils
pkgver=2.11.2
pkgrel=1
pkgdesc="The GNU Compiler Collection - Cross compiler for Plan9 i386 target"
arch=('i686' 'x86_64')
license=('GPL')
url="http://plan9.bell-labs.com/wiki/plan9/porting_alien_software_to_plan_9/index.html"
depends=('glibc' 'zlib')
options=('!libtool' '!distcc' '!ccache')
source=('http://plan9.bell-labs.com/sources/extra/gcc/gnusrc.tgz' \
'bucommh.patch')
md5sums=('39d23b7223b68de4cf333205257112ce' \
'2945c4e40dbcd966217ed1349195e312')
_target=i386-lucent-plan9
_sysroot=/usr/lib/cross-${_target}
build() {
rm -rf ${srcdir}/build
mkdir ${srcdir}/build #starting fresh
msg "building and packaging binutils"
cp -ar ${srcdir}/binutils-2.11.2/* ${srcdir}/build/
cd ${srcdir}/build
msg "cheating broken references to Plan9-ported GNU binutils"
ln -s /usr/bin/ar "${_target}-ar"
ln -s /usr/bin/as "${_target}-as"
ln -s /usr/bin/ld "${_target}-ld"
ln -s /usr/bin/ranlib "${_target}-ranlib"
PATH=${srcdir}/build:$PATH
CFLAGS='-O2 -static'
msg "patching up stuff"
cd ${srcdir}/build/binutils
patch bucomm.h -i $srcdir/bucommh.patch
msg "going back to build directory and start configure"
cd ${srcdir}/build
./configure --prefix=${_sysroot} --bindir=/usr/bin \
--with-sysroot=${_sysroot} \
--build=$CHOST --host=$CHOST --target=${_target} \
--with-gcc --with-gnu-as --with-gnu-ld \
--enable-shared --without-included-gettext \
--disable-nls --disable-debug
msg "fixing some corrupt libraries"
cp /usr/lib/libiberty.a ${srcdir}/build/libiberty/
msg "finally making the actual binutils"
cd ${srcdir}/build
make
make DESTDIR=$pkgdir/ install
# clean-up cross compiler root
rm -r ${pkgdir}/${_sysroot}/share/{info,man}
# needed for gcc build
install -dm755 ${pkgdir}/${_sysroot}/include
this is the bucommh.patch:
81c81
< extern char *sbrk ();
> extern void *sbrk ();
Last edited by W.F.Cody (2011-09-13 18:57:17) -
Problems cross-compiling imagemagick with mingw32
I am trying to cross-compile imagemagick dlls for Windows with mingw32.
I installed the mingw32 package and ran
./configure --host=i486-mingw32 --with-perl=no --enable-static=no
The output shows something like this:
JPEG v1 --with-jpeg=yes no (failed tests)
JPEG-2000 --with-jp2=yes no (failed tests)
LCMS v1 --with-lcms=yes no (failed tests)
LCMS v2 --with-lcms2=yes no
LQR --with-lqr=yes no
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes no
PERL --with-perl=no no
PNG --with-png=yes no (failed tests)
RSVG --with-rsvg=yes yes
TIFF --with-tiff=yes no (failed tests)
In config.log the test failures are shown as follows:
configure:27841: checking for jpeg_read_header in -ljpeg
configure:27866: i486-mingw32-gcc -std=gnu99 -std=gnu99 -o conftest.exe -g -O2 -Wall -I/usr/include/freetype2 -D_DLL -D_MT -I/usr/include -L/usr/lib conftest.c -ljpeg -lX11 -lm >&5
/usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
The compiler/linker configuration looks correct to me:
X11 Configuration:
X_CFLAGS = -I/usr/include
X_PRE_LIBS =
X_LIBS = -L/usr/lib
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 6.6.4
CC = i486-mingw32-gcc -std=gnu99 -std=gnu99
CFLAGS = -g -O2 -Wall
CPPFLAGS = -I/usr/local/include/ImageMagick -D_DLL -D_MT
PCFLAGS = -D_DLL -D_MT
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/usr/lib
MAGICK_LDFLAGS = -L/usr/local/lib -L/usr/lib
LIBS = -lMagickCore -lfontconfig -lX11 -pthread -lrsvg-2 -lm -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgdi32 -lm
CXX = i486-mingw32-g++
CXXFLAGS = -g -O2
FEATURES =
Why can't it find the X11 library?I am trying to cross-compile imagemagick dlls for Windows with mingw32.
I installed the mingw32 package and ran
./configure --host=i486-mingw32 --with-perl=no --enable-static=no
The output shows something like this:
JPEG v1 --with-jpeg=yes no (failed tests)
JPEG-2000 --with-jp2=yes no (failed tests)
LCMS v1 --with-lcms=yes no (failed tests)
LCMS v2 --with-lcms2=yes no
LQR --with-lqr=yes no
Magick++ --with-magick-plus-plus=yes yes
OpenEXR --with-openexr=yes no
PERL --with-perl=no no
PNG --with-png=yes no (failed tests)
RSVG --with-rsvg=yes yes
TIFF --with-tiff=yes no (failed tests)
In config.log the test failures are shown as follows:
configure:27841: checking for jpeg_read_header in -ljpeg
configure:27866: i486-mingw32-gcc -std=gnu99 -std=gnu99 -o conftest.exe -g -O2 -Wall -I/usr/include/freetype2 -D_DLL -D_MT -I/usr/include -L/usr/lib conftest.c -ljpeg -lX11 -lm >&5
/usr/lib/gcc/i486-mingw32/4.5.0/../../../../i486-mingw32/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
The compiler/linker configuration looks correct to me:
X11 Configuration:
X_CFLAGS = -I/usr/include
X_PRE_LIBS =
X_LIBS = -L/usr/lib
X_EXTRA_LIBS =
Options used to compile and link:
PREFIX = /usr/local
EXEC-PREFIX = /usr/local
VERSION = 6.6.4
CC = i486-mingw32-gcc -std=gnu99 -std=gnu99
CFLAGS = -g -O2 -Wall
CPPFLAGS = -I/usr/local/include/ImageMagick -D_DLL -D_MT
PCFLAGS = -D_DLL -D_MT
DEFS = -DHAVE_CONFIG_H
LDFLAGS = -L/usr/lib
MAGICK_LDFLAGS = -L/usr/local/lib -L/usr/lib
LIBS = -lMagickCore -lfontconfig -lX11 -pthread -lrsvg-2 -lm -lgdk_pixbuf-2.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 -lgdi32 -lm
CXX = i486-mingw32-g++
CXXFLAGS = -g -O2
FEATURES =
Why can't it find the X11 library? -
Create a cross compiler for arm
I am struggling with building a cross toolchain, essentially it boils down to building these packages (in thegiven order):
binutils gcc-base newlib gcc
When done I am trying to compile a dummy cpp algorithm (euler gcd/ggT search) with no includes.
What the cross toolchain spits at me is the following:
$ arm-unknown-eabi-gcc -march=armv5te ./euklidisch_ggt.c -o ./euklidisch_ggt.bin.armv5te
/usr/bin/arm-unknown-eabi-ld: skipping incompatible /usr/lib/gcc/arm-unknown-eabi/4.5.2/../../../../arm-unknown-eabi/lib/libc.a when searching for -lc
/usr/bin/arm-unknown-eabi-ld: skipping incompatible /usr/arm-unknown-eabi/lib/libc.a when searching for -lc
/usr/bin/arm-unknown-eabi-ld: cannot find -lc
collect2: ld returned 1 exit status
I wrote a little script to build it (as I got pretty much fed up doing it all by hund, round #7 just failed again)
Note: it is semi-automated, you will still be requested to give your passwd to agree with install and blah
Note: use it with arg "cleanup" to get rid of old installed packages (run as root)
Note: use it to compile as user
#!/bin/bash
BUILDERUSER=buildmonkey
PREFIX="/usr"
TARGET="arm-unknown-eabi"
PKGBUILDDIR="/home/${BUILDERUSER}/PKGBUILD"
PKGS="binutils gcc-base newlib gcc"
export PREFIX
export TARGET
export BUILDERUSER
export PKGS
export PKGBUILDDIR
function cleanup
for j in ${PKGS}
do
export j
echo "Removing package ${TARGET}-${j}"
su -c'pacman -R ${TARGET}-${j}'
done
function compile_and_install
cd ${PKGBUILDDIR}
echo ""
echo ""
echo "Compileing ${TARGET}-${1} ... "
echo ""
echo ""
cd ./${TARGET}-${1}
rm ./${TARGET}-${1}*
makepkg -f || return 1
su -c 'pacman -U ./${TARGET}-${1}*'
echo ""
if [ "${1}" == "cleanup" ]; then
echo "cleanup requested...."
cleanup
exit 0
fi
if [ "$(id -u)" == "0" ]; then
echo "This script must not be run as root!!" 1>&2
exit 1
fi
echo ""
if [ -d "${PKGBUILDDIR}" ]; then
echo "PKGBUILD directory is ${PKGBUILDDIR}"
else
echo "PKGBUILD directory ${PKGBUILDDIR} is missing!!"
exit 1
fi
echo "PKGs are ${PKGS}"
echo ""
for i in ${PKGS}
do
compile_and_install ${i}
done
exit 0
The packagebuilds are as following (hacked away versions of the ones existing in AUR, which give me linker errors)
binutils
pkgname=arm-unknown-eabi-binutils
pkgver=2.21
pkgrel=1
pkgdesc="A set of programs to assemble and manipulate binary and object files"
arch=(i686 x86_64)
license=(GPL)
options=(!libtool)
url="http://sources.redhat.com/binutils"
depends=('glibc' 'zlib')
source=(ftp://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.bz2)
md5sums=('c84c5acc9d266f1a7044b51c85a823f5')
build() {
cd $srcdir/binutils-${pkgver}
[ $NOEXTRACT -eq 1 ] || ./configure\
--prefix=${PREFIX} \
--program-prefix=${TARGET}- \
--enable-shared \
--disable-multilib \
--with-lib-path=${PREFIX}/lib/binutils/{TARGET} \
--disable-nls \
--target=${TARGET} \
--build=${CHOST} \
--host=${CHOST}
# mkdir -p $pkgdir/${PREFIX}/lib/binutils
sed -i 's|know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));|{know (S_GET_VALUE (frag->tc_frag_data.last_map) < S_GET_VALUE (symbolP));}|' gas/config/tc-arm.c || return 1
make configure-host
make tooldir=$pkgdir/${PREFIX}
make prefix=$pkgdir/${PREFIX} tooldir=$pkgdir/${PREFIX} install
mkdir -p $pkgdir/${PREFIX}/lib/binutils/${TARGET}
cp -v include/libiberty.h $pkgdir/${PREFIX}/lib/binutils/${TARGET}
rm -f $pkgdir/${PREFIX}/man/man1/{dlltool,nlmconv,windres}*
rm -f $pkgdir/usr/bin/ar
rm -f $pkgdir/usr/bin/as
rm -f $pkgdir/usr/bin/ld
rm -f $pkgdir/usr/bin/nm
rm -f $pkgdir/usr/bin/objdump
rm -f $pkgdir/usr/bin/ranlib
rm -f $pkgdir/usr/bin/strip
rm -f $pkgdir/usr/bin/objcopy
rm -f $pkgdir/usr/lib/libiberty.a
rm -rf $pkgdir/usr/share
rm -rf $pkgdir/usr/lib/ldscripts
gcc-base
pkgname=arm-unknown-eabi-gcc-base
pkgver=4.5.2
pkgrel=1
pkgdesc="The GNU Compiler Collection"
arch=(i686 x86_64)
license=('GPL' 'LGPL')
url="http://gcc.gnu.org"
depends=('arm-unknown-eabi-binutils' 'libmpc' 'libelf' 'cloog-ppl')
options=(!libtool !emptydirs zipman docs !strip)
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-core-${pkgver}.tar.bz2)
md5sums=('aa9e36bec080452372bfba793428ee82')
build() {
cd $srcdir/gcc-$pkgver
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
[ $NOEXTRACT -eq 1 ] || rm -rf build
mkdir build
cd build
[ $NOEXTRACT -eq 1 ] || ../configure --prefix=${PREFIX} \
--target=${TARGET} \
--host=$CHOST \
--build=$CHOST \
--enable-shared \
--disable-nls \
--enable-languages=c \
--enable-multilib \
--with-local-prefix=${PREFIX}/lib/${TARGET} \
--with-as=${PREFIX}/bin/${TARGET}-as \
--with-ld=${PREFIX}/bin/${TARGET}-ld \
--enable-softfloat \
--with-float=soft \
--with-newlib
make all-gcc all-target-libgcc
make DESTDIR=$pkgdir install-gcc install-target-libgcc
rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
rm -f $pkgdir/usr/share/man/man7/gfdl.7*
rm -f $pkgdir/usr/share/man/man7/gpl.7*
rm -rf $pkgdir/usr/share/info
cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/
rm -rf $pkgdir/usr/libexec
# strip it manually
strip $pkgdir/usr/bin/* 2>/dev/null || true
find $pkgdir/usr/lib -type f -exec arm-none-eabi-strip {} \; 2>/dev/null || true
newlib
pkgname=arm-unknown-eabi-newlib
pkgver=1.19.0
pkgrel=1
pkgdesc="Newlib is a C library intended for use on embedded systems."
arch=('i686' 'x86_64')
groups=('devel')
url="http://sourceware.org/newlib/"
license=('GPL')
depends=('arm-unknown-eabi-binutils' 'arm-unknown-eabi-gcc-base')
source=(ftp://sources.redhat.com/pub/newlib/newlib-${pkgver}.tar.gz)
md5sums=('0966e19f03217db9e9076894b47e6601')
build() {
cd ${srcdir}
rm -rf build
mkdir build
cd build
export CFLAGS="-O2"
../newlib-${pkgver}/configure \
--target=${TARGET} \
--prefix=${PREFIX} \
--enable-interwork \
--enable-multilib \
--with-gnu-as \
--with-gnu-ld \
--with-float=soft \
--disable-nls || return 1
make || return 1
make -j1 DESTDIR=${pkgdir} install || return 1
rm -rf ${pkgdir}/usr/share/info
return 0
gcc:
pkgname=arm-unknown-eabi-gcc
pkgver=4.5.2
pkgrel=1
pkgdesc="The GNU Compiler Collection - Cross compiler for ARM target"
arch=(i686 x86_64)
license=('GPL' 'LGPL')
url="http://gcc.gnu.org"
#an installed libc/newlib is needed for libstdc++ compile
depends=('arm-unknown-eabi-binutils>=2.18' 'cloog-ppl>=0.15.3' 'arm-unknown-eabi-newlib>=1.18.0')
# cross-arm-none-eabi-gcc is an superset of cross-arm-none-eabi-gcc-base
conflicts=('arm-unknown-eabi-gcc-base')
provides=("arm-unknown-eabi-gcc-base=${pkgver}")
options=(!libtool !emptydirs !strip zipman docs)
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2)
md5sums=('d6559145853fbaaa0fd7556ed93bce9a')
build() {
cd ${srcdir}/gcc-$pkgver
export CFLAGS="-O2 -pipe"
export CXXFLAGS="-O2 -pipe"
rm -rf build
mkdir build
cd build
../configure \
--prefix=${PREFIX} \
--target=${TARGET} \
--build=${CHOST} \
--host=${CHOST} \
--disable-nls \
--enable-multilib \
--enable-languages=c,c++ \
--enable-__cxa_atexit \
--enable-interwork \
--with-local-prefix=${PREFIX}/lib/${TARGET} \
--with-as=${PREFIX}/bin/${TARGET}-as \
--with-ld=${PREFIX}/bin/${TARGET}-ld \
--with-newlib \
--with-float=soft
make all-gcc all-target-libgcc all-target-libstdc++-v3 || return 1
make DESTDIR=${pkgdir} install-gcc install-target-libgcc install-target-libstdc++-v3 || return 1
rm -f $pkgdir/usr/share/man/man7/fsf-funding.7*
rm -f $pkgdir/usr/share/man/man7/gfdl.7*
rm -f $pkgdir/usr/share/man/man7/gpl.7*
rm -rf $pkgdir/usr/share/info
rm -rf $pkgdir/usr/share/gcc-4.5.2
cp -r $pkgdir/usr/libexec/* $pkgdir/usr/lib/ && \
rm -rf $pkgdir/usr/libexec
I already read linux from scratch howto for building cross compilers, though partly it contradicts with AUR comments especially in regard to --with-sysroot and --with-build-sysroot
If someone can please shed some light on this, the gcc doc is not very helpfull
Note: I know that a bare metal arm elf cross compiler exisis in the archlinux repository but that is not sufficient as I need different targets with some special options (where can I get the PKGBUILD from packages within the ABS?)Current targets are armv7vfpv3 and armv5te softfloat, this compiler(s) (afaik softfloat and hardfloat can not be put into one compiler, correct me if I am wrong) will be used as basis for kernel compileing for these architectures plus the basic packages (afaik called bootstrapping).
And I knew it was not really newby stuff, but .. well .. after searching like 5 mins for an appropriate subforum I gave up and posted it just here, sorry
The point is this is the basis for a lot of core packages and I just want to do it right (and atm it ain't working at all )
Last edited by drahnr (2011-04-05 22:36:11) -
Trying to cross compile for ARM phone (android galaxy S4)
i am trying to cross compile for my galaxy S4 on my 64 bit arch install, and ran into a host of issues. Currently at a specific error message in the code box below, after downloading the android NDK at https://developer.android.com/tools/sdk/ndk/index.html and running:
android-ndk-r9d/build/tools/make-standalone-toolchain.sh
this gave me android-ndk-gcc (directory)
so i read up some basics on how to set the compiler via:
'export CC=/home/earth/android-ndk-gcc/bin/arm-linux-androideabi-gcc'
then i downloaded Bash's source code and tried to run variations of ./configure with no success until i tried:
'./configure --host=arm-linux --enable-static-link --without-bash-malloc'
which resulted in successful whatever configure does (sets up make file stuff?)
the result of 'make' was (only posting the one compile iteration that resulted in an error):
/home/earth/android-ndk-gcc/bin/arm-linux-androideabi-gcc -c -I. -I../.. -I../.. -I../../lib -I../../include -I. -I../../lib/intl -I/home/earth/project/bash-4.3/lib/intl -DHAVE_CONFIG_H -DSHELL -g -O2 oslib.c
oslib.c:238:1: error: redefinition of 'mkfifo'
/home/earth/android-ndk-gcc/bin/../sysroot/usr/include/sys/stat.h:129:23: note: previous definition of 'mkfifo' was here
oslib.c: In function 'mkfifo':
oslib.c:239:12: error: argument 'path' doesn't match prototype
/home/earth/android-ndk-gcc/bin/../sysroot/usr/include/sys/stat.h:129:23: error: prototype declaration
oslib.c:240:10: error: argument 'mode' doesn't match prototype
/home/earth/android-ndk-gcc/bin/../sysroot/usr/include/sys/stat.h:129:23: error: prototype declaration
Makefile:78: recipe for target 'oslib.o' failed
make[1]: *** [oslib.o] Error 1
make[1]: Leaving directory '/home/earth/project/bash-4.3/lib/sh'
Makefile:643: recipe for target 'lib/sh/libsh.a' failed
make: *** [lib/sh/libsh.a] Error 1
I am in no way experienced with compiling things, but i did manage to compile a simple helloworld.c program for my phone and run it successfully on the phone, which tells me the compiler works okay.
Can anyone give me more information on what's happening? Google returns almost nothing on any of these errors, especially the oslib.c errors.You should check out the Android NDK documentation. The NDK comes with a cross compiler specifically for android, with the correct versions of libraries, etc. It comes with some examples showing how to build stuff for it.
EDIT: There is also an AUR package for it.
Last edited by tom5760 (2011-04-04 15:56:25) -
License for cross-compilation for solaris 10 sparc on Linux x86
I'd like to do cross-compilation for solaris 10 sparc on Linux x86 using gcc (for linux). To do that, I have to copy libraries (/lib/64) and includes (/usr/include) from a sparc machine to my linux machine.
The compilation will be run on about (up to) 50 Linux machines (by various developers). We also have 3 solaris-10-SPARC machines.
I wonder if Solaris license allows me to copy the includes and libs to perform compilation elsewhere.
I also checked "OTN License Agreement for Oracle Solaris", but it looks like Oracle allows for installing "the programs" on up to 3 machines, but I need it on 50.
Thanks for any suggestions or redirections to a proper place where I can get an answer.
MarekWhen installing Solaris 10 01/06 on a Dell 1850 I receive an error message during the install saying "no disk found". I assume that the drive/controller is not recognized. The Dell 1850 is listed under the HCL for Solaris 10 10/06. I don't believe I can use the Solaris(TM) Device Driver for the LSI MegaRAID Adapter floppy with 1/06. I don�t have any other Solaris boxes up so I can�t build a jump start server. Any suggestions?
-
Revision: 12936
Revision: 12936
Author: [email protected]
Date: 2009-12-14 19:40:23 -0800 (Mon, 14 Dec 2009)
Log Message:
-make sure the bundles directory for airspark is not included in the package fixes bug SDK-24552
-remove (from svn) the en_US/docs directories for textLayout because these directories and dita files are created by asdoc in the doc target
-updated the main build.xml to not include the playerglobal project
-updated fat-swc targets in osmf,automation_spark,automation_flashflexkit,automation,airspark, and textlayout to remove the doc directory.
QE notes: make sure copylocales works properly
Doc notes: no
Bugs: SDK-24552
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no
Ticket Links:
http://bugs.adobe.com/jira/browse/SDK-24552
http://bugs.adobe.com/jira/browse/SDK-24552
Modified Paths:
flex/sdk/trunk/build.xml
flex/sdk/trunk/frameworks/projects/airspark/build.xml
flex/sdk/trunk/frameworks/projects/automation/build.xml
flex/sdk/trunk/frameworks/projects/automation_flashflexkit/build.xml
flex/sdk/trunk/frameworks/projects/automation_spark/build.xml
flex/sdk/trunk/frameworks/projects/osmf/build.xml
flex/sdk/trunk/frameworks/projects/textLayout/build.xml
Removed Paths:
flex/sdk/trunk/frameworks/projects/airframework/bundles/en_US/docs/
flex/sdk/trunk/frameworks/projects/automation/bundles/en_US/docs/
flex/sdk/trunk/frameworks/projects/automation_flashflexkit/bundles/en_US/docs/
flex/sdk/trunk/frameworks/projects/automation_spark/bundles/en_US/docs/
flex/sdk/trunk/frameworks/projects/framework/bundles/en_US/docs/
flex/sdk/trunk/frameworks/projects/rpc/bundles/en_US/docs/
flex/sdk/trunk/frameworks/projects/textLayout/bundles/en_US/docs/Well, I've tried compiling a package and I have modified the PKGBUILD file to look like this now. (Keeping it as simple as possible)
pkgname=dvbcut-svn
pkgver=16
pkgrel=1
pkgdesc="DVBCUT-svn is an application that allows you to
edit MPEG files. ie: Remove TV ads. (SVN version: Fri, 01 Dec 2006)."
url="http://dvbcut.sourceforge.net"
depends=('qt' 'libao')
makedepends=('subversion' 'scons')
conflicts=('dvbcut' 'ffmpeg')
provides=('dvbcut')
source=()
md5sums=()
_svntrunk=https://svn.sourceforge.net/svnroot/dvbcut/trunk
_svnmod=dvbcut
build() {
cd $startdir/src
svn co $_svntrunk --config-dir ./ -r $pkgver $_svnmod
cd $_svnmod
msg "SVN checkout done or server timeout"
msg "Starting make..."
make || return 1
# vim:syntax=sh
I then run makepkg PKGBUILD and let it do its thing
It ends with this...
scons: done building targets.
==> Removing info/doc files...
==> Compressing man pages...
==> Stripping debugging symbols from libraries...
==> Stripping symbols from binaries...
==> Generating .PKGINFO file...
==> Generating .FILELIST file...
tar: *: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
==> Compressing package...
tar: *: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
==> Finished making: dvbcut-svn (Sun Jan 21 19:08:28 UTC 2007)
I'm not sure what's causing this error message.
tar: *: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
I'll try installing it and see how it goes. -
Using makepkg to cross-compile (for sparc64)
I recently acquired a Sun Ultra 5 system with a TI UltraSparc IIi CPU (sparc64). I am in the middle of doing some compiling on it using Debian as the host system while dabbling into cross-compiling for it. It would be superb to have a sparc64 toolchain installed and in the $PATH on a modern x86_64 system while using makepkg to cross-compile sparc64 packages. I would copy /etc/makepkg.conf to a working directory, make the necessary changes, and run makepkg --config /working/dir/makepkg.conf. makepkg would then (theoretically) pick up that I'm cross compiling, see the proper toolchain in the path, and cross compile.
Is this possible? If not, what kind of work/patching would be necessary to make it happen?cedeel wrote:A Sparc64 chroot isn't possible. The closest thing would be to run a chroot-like environment in QEMU.
A cross toolchain should be preferred, although I have no idea on how to set it up.
Yeah. I'm building a toolchain atm. As long as the PKGBUILDs know that I'm cross compiling, I should be okay. There will be a bit of hand-cranking needed since not all sources use autotools. Not really looking forward to cross-compiling openssl, and the kernel will take a bit of screwing around to work right, but, meh, that's part of the fun, right? There's only 100-ish packages for a base install, so just getting to a functional system won't be too bad.
I'm going to experiment with an auto-build system when I have the system running. I'm very comfortable with bash scripting and am learning c++, so I have some good ideas. I work as a sysadmin too, so I could even give some of the meatier servers at work an extra job to do. That is, if all goes well
Last edited by synthead (2012-01-02 20:18:18) -
Announcing availability of x86 hosted cross compiler for SPARC/Solaris
We are pleased to announce the release for GCC For Sun Systems 4.2.0 cross compilers!
This is a Solaris/x86 hosted compiler with target code generation for
SPARC/Solaris systems. If you develop on your OpenSolaris, or Solaris
x86 laptop or desktop, you can now start compiling your sources for
SPARC systems. Almost all features available in the
native SPARC GCC For Sun Systems 4.2.0 compiler are available
for use in the cross compiler. Please refer to the mini cross compiler howto
page for additional details on install and usage, and gotchas in cross
development environment.
Please continue to provide us your feedback and issues, which helps
us make the product better.
Thanks
GCCFSS teamCan GCCFSS also cross compile from in reverse - from SPARC to x86/x64?
Thank you -
Cross compiling apps on solaris 8 for solaris 10 x86 and x64
Hi All,
We have a few applications built on Solaris 8. and we want to build the same apps on Solaris 10 x86 and x64 but the problem is clearcase does not support Solaris 10 yet.
Can we cross compile the apps on Solaris 8 for Solaris 10 x86 and x64 ? and how ?
waiting for any info on this.
TIA,
warm regards,
GirishFYI, I noticed the reply on Sun Studio General Forum:
If you build an app on one version of Solaris, the app will run on later Solaris versions. So in particular, you can build an x86 application on Solaris 8 and run it on Solaris 9 and 10.
Unfortunately, an x64 application must be built on a Solaris x64 system, which first became available with Solaris 10. -
Revision: 20582
Revision: 20582
Author: [email protected]
Date: 2011-03-03 12:35:14 -0800 (Thu, 03 Mar 2011)
Log Message:
Add support for <destination-include directory-path="mydir"/>.
This will process each file ending in ".xml" as an individual <destination-include file-path=""/> element, allowing a web application to define a directory of destination configuration snippets.
Added a new API to ConfigurationFileResolver.java: getFiles(String dir).
This returns a list of XML files contained in this directory relative to the current configuration file.
Updated both the ServletResourceResolver and the LocalFileResolver with implementations.
Modified Paths:
blazeds/trunk/modules/common/src/flex/messaging/config/ConfigurationConstants.java
blazeds/trunk/modules/common/src/flex/messaging/config/ConfigurationFileResolver.java
blazeds/trunk/modules/common/src/flex/messaging/config/LocalFileResolver.java
blazeds/trunk/modules/core/src/flex/messaging/config/ServerConfigurationParser.java
blazeds/trunk/modules/core/src/flex/messaging/config/ServletResourceResolver.javaRemember that Arch Arm is a different distribution, but we try to bend the rules and provide limited support for them. This may or may not be unique to Arch Arm, so you might try asking on their forums as well.
-
Cross compiling for ARM (Android)
Hello, everyone. I just rooted my Android phone (an LG Ally), and decided that a fun way to try and use my newfound freedom would be to cross-compile some programs for it like Busybox, Lua, a fresh copy of Python, and possibly even pacman. (Being able to use makepkg to compile phone software would be awesome.)
I found the cross-arm-elf-binutils and cross-arm-gcc-base packages in community, so now the question is...how do I use them? From what I understand, it essentially comes down to bulding the software like normal, but using the executables from the cross-compiling package instead of the system installed ones. Is that basically right? Can you recommend any articles on cross-compiling in general, and for Android in particular?You should check out the Android NDK documentation. The NDK comes with a cross compiler specifically for android, with the correct versions of libraries, etc. It comes with some examples showing how to build stuff for it.
EDIT: There is also an AUR package for it.
Last edited by tom5760 (2011-04-04 15:56:25)
Maybe you are looking for
-
I purchased Pages on the App store a while back and I can't get it any more on my computer. I have an early 2006 MacBook Pro with Mac OS X Snow Leopard 10.6.8, which is the highest it would go to, and it isn't compatible with the new Pages version. H
-
Error message when i plug mini into itunes
when i plug the mini into the usb and itunes opens, i get an error message that says "the software requiered for communicating with the ipod is not installed correctly, Please reinstall itunes to install the ipod's software
-
HT1923 OS X 10.8.2 and iTunes 11
I am stymied with my MacBook Pro running OS X 10.8.2 and iTunes 11. Every time I start iTunes, after a few seconds I get the spinning beach ball and have to force quite. I have update to the newest iTunes. Any ideas or suggestions?
-
Preferred Language per Contact
I'm quite a fan of iOS. However, as a European Citizen I'm quite used to communicate with different people in different languages. However I generally use the same language with the same person over and over. When writing emails or iMessages, I have
-
Mass Change in Recipe Management
Is anyone doing non-status related mass changes in RM? Specifically, is anyone substituting substance X for substance Y in dependent formulas inside recipes? If so, was the related work in-house ABAP development or SAP CDP? Any helpful hints would