What does gcc -dumpmachine report for your compiler?

In the package you are building the compiler is specified manually with CC=arm-linux-gnu-gcc. You can change this from debian/rules.

Regards,

  Jussi

Trilok Soni wrote:
Hi,

I am trying to import crosstool built foreign toolchain into
scratchbox apophis. Same as used in maemo.
I am able to successfully import this toolchain and simple hello world
program works fine with arm-linux-gcc compiler
under scratchbox. Following is the .conf I used under meta/alien-tc
for toolchain:

---------------snip----------------------
COMPILER_NAME = ing07ctgcc3.4-glibc2.3.6-arm
COMPILER_PACKAGE = scratchbox-toolchain-ing07ctgcc3.4-glibc2.3.6-arm
ALIEN_TC = yes

CC_VER = 3.4
CC_GCCVER = 3.4.6
CC_FULLVER = 3:$(CC_GCCVER)
CC_DEBIAN_DIR = gcc-3.4-debian

ARCH = arm
SUB_ARCH = $(ARCH)

BINUTILS_FULLVER = 2.16.1-sb1

HEADERS_DIR = $(COMPILER_DIR)/arm-linux/sys-include
LINUX_HEADERS_SUBDIRS = linux asm
LINUX_HEADERS_VER = 2.6.12

LIBC_VER = 2.3.6
LIBC_FILES_BINS = target tmp
LIBC_FILES_LIBS = arm-linux/lib
CHECKSUM_FILE   = ../../$(CONFIG:.conf=.checksums)
-- ---------------snip----------------------

After doing this, I am trying to build zlib under the sbox target
created with this toolchain:

#apt-get source zlib
#cd zlib-1.2.2
#dpkg-buildpackage -rfakeroot -d -uc -us -D

and it fails with following arm-linux-gnu-gcc not found.
-------------------------snip--------------------------
dpkg-buildpackage: source package is zlib
dpkg-buildpackage: source version is 1:1.2.2-4.sarge.2
dpkg-buildpackage: source changed by Michael Stone <[EMAIL PROTECTED]>
dpkg-buildpackage: host architecture arm
dpkg-buildpackage: source version without epoch 1.2.2-4.sarge.2
dpkg-checkbuilddeps: Using Scratchbox tools to satisfy builddeps
dpkg-checkbuilddeps: Dependency provided by Scratchbox: debhelper (>= 4.2)
dpkg-checkbuilddeps: Dependency provided by Scratchbox: dbs (>= 0.21)
 fakeroot debian/rules clean
dh_testdir
/scratchbox/tools/bin/make -f /usr/share/dbs/sys-build.mk source.clean
make[1]: Entering directory `/home/trilok/zlib-1.2.2'
make[2]: Entering directory `/home/trilok/zlib-1.2.2/debian'
make[2]: Leaving directory `/home/trilok/zlib-1.2.2/debian'
make[1]: Leaving directory `/home/trilok/zlib-1.2.2'
dh_clean
rm -rf debian/libc5-tmp
rm -rf debian/nopic-tmp
 dpkg-source -b zlib-1.2.2
dpkg-source: building zlib using existing zlib_1.2.2.orig.tar.gz
dpkg-source: building zlib in zlib_1.2.2-4.sarge.2.diff.gz
dpkg-source: building zlib in zlib_1.2.2-4.sarge.2.dsc
 debian/rules build
/scratchbox/tools/bin/make -f /usr/share/dbs/sys-build.mk source.make
make[1]: Entering directory `/home/trilok/zlib-1.2.2'
make[2]: Entering directory `/home/trilok/zlib-1.2.2/debian'
make[2]: Leaving directory `/home/trilok/zlib-1.2.2/debian'
Extracting upstream tarball upstream/tarballs/zlib-1.2.2.tar.gz successful.
make[1]: Leaving directory `/home/trilok/zlib-1.2.2'
dh_testdir
cd build-tree/zlib-1.2.2 && CC=arm-linux-gnu-gcc CFLAGS="-O3 -g
-D_REENTRANT -fPIC" ./configure --shared
Checking for shared library support...
No shared library support; try without defining CC and CFLAGS
Building static library libz.a version 1.2.2 with arm-linux-gnu-gcc.
Checking for unistd.h... No.
Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()
Checking for snprintf() in stdio.h... No.
  WARNING: snprintf() not found, falling back to sprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of sprintf()... No.
  WARNING: apparently sprintf() does not return a value. zlib
  can build but will be open to possible string-format security
  vulnerabilities.
Checking for errno.h... No.
Checking for mmap support... No.
Checking for snprintf..  No.
Checking for vsnprintf..         No.
/scratchbox/tools/bin/make -C build-tree/zlib-1.2.2 all libz.a test
make[1]: Entering directory `/home/trilok/zlib-1.2.2/build-tree/zlib-1.2.2'
arm-linux-gnu-gcc -O3 -g -D_REENTRANT -fPIC -DNO_snprintf
-DHAS_sprintf_void -DNO_ERRNO_H   -c -o example.o example.c
make[1]: arm-linux-gnu-gcc: Command not found
make[1]: *** [example.o] Error 127
make[1]: Leaving directory `/home/trilok/zlib-1.2.2/build-tree/zlib-1.2.2'
make: *** [debian/stampdir/build] Error 2
-------------------------snip--------------------------

My /scratchbox/compilers/bin doesn't have arm-linux-gnu-gcc symlink to
sb_gcc_wrapper. I think that this is coming
because dpkg-architecture evaluates DEB_HOST_GNU_TYPE as
arm-linux-gnu. How do I change it to arm-linux only?

output of dpkg-architecture under this toolchain target:

DEB_BUILD_ARCH=arm
DEB_BUILD_ARCH_ABI=gnu
DEB_BUILD_ARCH_OS=linux
DEB_BUILD_ARCH_CPU=arm
DEB_BUILD_GNU_CPU=arm
DEB_BUILD_GNU_SYSTEM=linux-gnu
DEB_BUILD_GNU_TYPE=arm-linux-gnu
DEB_HOST_ARCH=arm
DEB_HOST_ARCH_ABI=gnu
DEB_HOST_ARCH_OS=linux
DEB_HOST_ARCH_CPU=arm
DEB_HOST_GNU_CPU=arm
DEB_HOST_GNU_SYSTEM=linux-gnu
DEB_HOST_GNU_TYPE=arm-linux-gnu

Please let me have some hints so that I can build further packages.

--Trilok Soni
_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

_______________________________________________
Scratchbox-users mailing list
Scratchbox-users@lists.scratchbox.org
http://lists.scratchbox.org/cgi-bin/mailman/listinfo/scratchbox-users

Reply via email to