Re: Cross-compiling on Debian systems?

1999-11-18 Thread ferret


On Thu, 18 Nov 1999, Ben Collins wrote:

> On Thu, Nov 18, 1999 at 09:37:00AM -0800, [EMAIL PROTECTED] wrote:
> > brought it up. And the FTP archive doesn't have a source package)
> > 
> > :# dpkg-cross --install sysvinit_2.76-3.deb libc6_2.0.105-2.deb \
> > dpkg_1.4.0.34.deb mount_2.9g-6.deb ldso_1.9.10-1.deb
> > :Building sysvinit-sparc-cross_2.76-3_all.deb
> > :Building libc6-sparc-cross_2.0.105-2_all.deb
> > :Building dpkg-sparc-cross_1.4.0.34_all.deb
> > :dpkg-cross: package mount doesn't provide any useful files. Skipping.
> 
> 1) Do this on the cross-compile system (ie. the i386)
> 2) You only need libraries and -dev packages. So init, and mount are
>somewhat irrelevant to compilation

:(i386)# dpkg-cross --install libc6_2.0.105-2.deb
:Building libc6-sparc-cross_2.0.105-2_all.deb
:Unpacking libc6-sparc-cross
:dpkg: dependency problems prevent configuration of libc6-sparc-cross:
: libc6-sparc-cross depends on sysvinit-sparc-cross (>= 2.76-1); however:
:  Package sysvinit-sparc-cross is not configured yet.
:dpkg: error processing libc6-sparc-cross (--install):
: dependency problems - leaving unconfigured
:Errors were encountered while processing:
: libc6-sparc-cross
:dpkg -i failed.

-- Ferret no baka



Re: Cross-compiling on Debian systems?

1999-11-18 Thread Ben Collins
On Thu, Nov 18, 1999 at 09:37:00AM -0800, [EMAIL PROTECTED] wrote:
> brought it up. And the FTP archive doesn't have a source package)
> 
> :# dpkg-cross --install sysvinit_2.76-3.deb libc6_2.0.105-2.deb \
> dpkg_1.4.0.34.deb mount_2.9g-6.deb ldso_1.9.10-1.deb
> :Building sysvinit-sparc-cross_2.76-3_all.deb
> :Building libc6-sparc-cross_2.0.105-2_all.deb
> :Building dpkg-sparc-cross_1.4.0.34_all.deb
> :dpkg-cross: package mount doesn't provide any useful files. Skipping.

1) Do this on the cross-compile system (ie. the i386)
2) You only need libraries and -dev packages. So init, and mount are
   somewhat irrelevant to compilation

-- 
 ---===-=-==-=---==-=--
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
` [EMAIL PROTECTED]  -  [EMAIL PROTECTED]  -  [EMAIL PROTECTED]'
 `---=--===-=-=-=-===-==---=--=---'


Re: Cross-compiling on Debian systems?

1999-11-18 Thread ferret


On Thu, 18 Nov 1999, Ben Collins wrote:

> On Thu, Nov 18, 1999 at 02:38:26PM +0100, Erik Mouw wrote:
> > On Wed, 17 Nov 1999 19:52:42 -0800 (PST), [EMAIL PROTECTED] wrote:
> > > ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC-O2 -I./include  -I. -I. \
> > > -I./config  -g0 \
> > >   -finhibit-size-directive -fno-inline-functions -fno-exceptions  \
> > >   -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
> > > as: option `-s' is ambiguous
> > > make[1]: *** [crtbegin.o] Error 1
> > > make[1]: Leaving directory `gcc-m68k-linux-2.8.1'
> > > make: *** [build] Error 2
> > > 
> > > I get the exact same error if I use dpkg-buildpackage. I don't know enough
> > > about building gcc to know what's wrong. And this is the source package
> > > from ftp.ca.debian.org (us.debian.org not responding to me through lynx
> > > for some reason)
> > 
> > Looks like you're using the native binutils instead of cross binutils.
> 
> Installing binutils-multiarch and compiling a native gas handles this.
> 
> > > I also found out I need the binutils-m68k-linux package, and that's being
> > > downloaded as I type..
> > 
> > You also need libc and kernel header files for the target system. The
> > kernel has to be configured for the target system, but that can be done on
> > the build host.
> 
> Install dpkg-cross and convert the native sparc libc6 and libc6-dev
> packages. This will install them into /usr/sparc-linux/{include,lib} for
> the cross-compile.

Installed dpkg-cross (isn't listed in the FTP site but a package search
brought it up. And the FTP archive doesn't have a source package)

:# dpkg-cross --install sysvinit_2.76-3.deb libc6_2.0.105-2.deb \
dpkg_1.4.0.34.deb mount_2.9g-6.deb ldso_1.9.10-1.deb
:Building sysvinit-sparc-cross_2.76-3_all.deb
:Building libc6-sparc-cross_2.0.105-2_all.deb
:Building dpkg-sparc-cross_1.4.0.34_all.deb
:dpkg-cross: package mount doesn't provide any useful files. Skipping.

This looks funny

:Building ldso-sparc-cross_1.9.10-1_all.deb
:Unpacking sysvinit-sparc-cross
:Unpacking libc6-sparc-cross
:Unpacking dpkg-sparc-cross
:Unpacking ldso-sparc-cross
:dpkg: dependency problems prevent configuration of sysvinit-sparc-cross:
: sysvinit-sparc-cross depends on mount-sparc-cross (>= 2.7l-1); however:
:  Package mount-sparc-cross is not installed.
:dpkg: error processing sysvinit-sparc-cross (--install):
: dependency problems - leaving unconfigured
:dpkg: dependency problems prevent configuration of libc6-sparc-cross:
: libc6-sparc-cross depends on sysvinit-sparc-cross (>= 2.76-1); however:
:  Package sysvinit-sparc-cross is not configured yet.
:dpkg: error processing libc6-sparc-cross (--install):
: dependency problems - leaving unconfigured
:dpkg: dependency problems prevent configuration of dpkg-sparc-cross:
: dpkg-sparc-cross depends on libc6-sparc-cross (>= 2.0.99); however:
:  Package libc6-sparc-cross is not configured yet.
: dpkg-sparc-cross depends on libncurses4-sparc-cross; however:
:  Package libncurses4-sparc-cross is not installed.
: dpkg-sparc-cross depends on libstdc++2.9-sparc-cross; however:
:  Package libstdc++2.9-sparc-cross is not installed.
:dpkg: error processing dpkg-sparc-cross (--install):
: dependency problems - leaving unconfigured
:Setting up ldso-sparc-cross (1.9.10-1) ...
:Errors were encountered while processing:
: sysvinit-sparc-cross
: libc6-sparc-cross
: dpkg-sparc-cross
:dpkg -i failed.

All the Sparc packages were moved using dpkg-move running on the Sparc.
I am doing this the right way?

-- Ferret no baka



Re: Cross-compiling on Debian systems?

1999-11-18 Thread ferret


On Thu, 18 Nov 1999, Ben Collins wrote:

> On Thu, Nov 18, 1999 at 02:38:26PM +0100, Erik Mouw wrote:
> > On Wed, 17 Nov 1999 19:52:42 -0800 (PST), [EMAIL PROTECTED] wrote:
> > > ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC-O2 -I./include  -I. -I. \
> > > -I./config  -g0 \
> > >   -finhibit-size-directive -fno-inline-functions -fno-exceptions  \
> > >   -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
> > > as: option `-s' is ambiguous
> > > make[1]: *** [crtbegin.o] Error 1
> > > make[1]: Leaving directory `gcc-m68k-linux-2.8.1'
> > > make: *** [build] Error 2
> > > 
> > > I get the exact same error if I use dpkg-buildpackage. I don't know enough
> > > about building gcc to know what's wrong. And this is the source package
> > > from ftp.ca.debian.org (us.debian.org not responding to me through lynx
> > > for some reason)
> > 
> > Looks like you're using the native binutils instead of cross binutils.
> 
> Installing binutils-multiarch and compiling a native gas handles this.
MM. binutils-multiarch and dpkg-cross are in slink for Sparc, but are
only in potato for i386. Time to compile, most likely.

I'll try this stuff out and then get back to the lists if I have any
further problems.

But let me make sure I have this one right. I need to compile an
i386-binary gas that will compile for sparc?


> 
> > > I also found out I need the binutils-m68k-linux package, and that's being
> > > downloaded as I type..
> > 
> > You also need libc and kernel header files for the target system. The
> > kernel has to be configured for the target system, but that can be done on
> > the build host.
> 
> Install dpkg-cross and convert the native sparc libc6 and libc6-dev
> packages. This will install them into /usr/sparc-linux/{include,lib} for
> the cross-compile.
> 
> -- 
>  ---===-=-==-=---==-=--
> /  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
> ` [EMAIL PROTECTED]  -  [EMAIL PROTECTED]  -  [EMAIL PROTECTED]'
>  `---=--===-=-=-=-===-==---=--=---'
> 


Re: Cross-compiling on Debian systems?

1999-11-18 Thread ferret


On Thu, 18 Nov 1999, Erik Mouw wrote:

> On Wed, 17 Nov 1999 19:52:42 -0800 (PST), [EMAIL PROTECTED] wrote:
> > On Wed, 17 Nov 1999, Ben Collins wrote:
> >> On Wed, Nov 17, 1999 at 02:48:55PM -0800, [EMAIL PROTECTED] wrote:
> >> > I'd like to set up a cross-compiler on my Lintel (AMD 266) to compile
> >> > packages for my Sparc IPX. I'd preferably like to package the
> >> > cross-compiler so I can esaily remove it if I no longer need it.
> >> > 
> >> > The only cross-compiler in the slink packages list is for m68k.
> >> > 
> >> > What do I need to do to set one up?
> >> 
> >> The last cross-compiler I built (for kernel compiles) was using the m68k
> >> cross-compiler package. I just changed the m68k references to sparc, and
> >> ran dpkg-buildpackage -us -uc -rfakeroot (change all of the m68k
> >> references in debian/ to sparc).
> > 
> > I just did a 'debian/rules binary' in 'gcc-m68k-linux-2.8.1' after
> > changing 'm68k' to 'sparc', and I get a build error. Looks like the gcc
> > buildstrap isn't working.
> 
> "make bootstrap" doesn't work for cross compilers, have a look at the
> cross gcc FAQ: http://www.objsw.com/CrossGCC/ .
How was the package suppsed to build itself then, by hand? *g*

> 
> > ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC-O2 -I./include  -I. -I. \
> > -I./config  -g0 \
> >   -finhibit-size-directive -fno-inline-functions -fno-exceptions  \
> >   -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
> > as: option `-s' is ambiguous
> > make[1]: *** [crtbegin.o] Error 1
> > make[1]: Leaving directory `gcc-m68k-linux-2.8.1'
> > make: *** [build] Error 2
> > 
> > I get the exact same error if I use dpkg-buildpackage. I don't know enough
> > about building gcc to know what's wrong. And this is the source package
> > from ftp.ca.debian.org (us.debian.org not responding to me through lynx
> > for some reason)
> 
> Looks like you're using the native binutils instead of cross binutils.
> 
> > I also found out I need the binutils-m68k-linux package, and that's being
> > downloaded as I type..
I can't get the cross' binutils-sparc (package hacked from binutils-m68k)
to build.

dpkg-gencontrol -Pdebian/tmp/binutils -pbinutils-sparc-linux
dpkg-gencontrol: error: source package has two conflicting values -
binutils-sparc-linux and binutils-m68k-linux
make: *** [binary-arch] Error 29

I edited all the references in debian/* from m68k' to sparc', and I don't
know enough about the package to even guess what else might need to be
tweaked.

> 
> You also need libc and kernel header files for the target system. The
> kernel has to be configured for the target system, but that can be done on
> the build host.
> 
> 
> Erik
> 
> -- 
> J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
> of Electrical Engineering, Faculty of Information Technology and Systems,
> Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
> Phone: +31-15-2785859  Fax: +31-15-2781843  Email [EMAIL PROTECTED]
> WWW: http://www-ict.its.tudelft.nl/~erik/
> 
> 


Re: Cross-compiling on Debian systems?

1999-11-18 Thread Ben Collins
On Thu, Nov 18, 1999 at 02:38:26PM +0100, Erik Mouw wrote:
> On Wed, 17 Nov 1999 19:52:42 -0800 (PST), [EMAIL PROTECTED] wrote:
> > ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC-O2 -I./include  -I. -I. \
> > -I./config  -g0 \
> >   -finhibit-size-directive -fno-inline-functions -fno-exceptions  \
> >   -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
> > as: option `-s' is ambiguous
> > make[1]: *** [crtbegin.o] Error 1
> > make[1]: Leaving directory `gcc-m68k-linux-2.8.1'
> > make: *** [build] Error 2
> > 
> > I get the exact same error if I use dpkg-buildpackage. I don't know enough
> > about building gcc to know what's wrong. And this is the source package
> > from ftp.ca.debian.org (us.debian.org not responding to me through lynx
> > for some reason)
> 
> Looks like you're using the native binutils instead of cross binutils.

Installing binutils-multiarch and compiling a native gas handles this.

> > I also found out I need the binutils-m68k-linux package, and that's being
> > downloaded as I type..
> 
> You also need libc and kernel header files for the target system. The
> kernel has to be configured for the target system, but that can be done on
> the build host.

Install dpkg-cross and convert the native sparc libc6 and libc6-dev
packages. This will install them into /usr/sparc-linux/{include,lib} for
the cross-compile.

-- 
 ---===-=-==-=---==-=--
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
` [EMAIL PROTECTED]  -  [EMAIL PROTECTED]  -  [EMAIL PROTECTED]'
 `---=--===-=-=-=-===-==---=--=---'


Re: Cross-compiling on Debian systems?

1999-11-18 Thread Erik Mouw
On Wed, 17 Nov 1999 19:52:42 -0800 (PST), [EMAIL PROTECTED] wrote:
> On Wed, 17 Nov 1999, Ben Collins wrote:
>> On Wed, Nov 17, 1999 at 02:48:55PM -0800, [EMAIL PROTECTED] wrote:
>> > I'd like to set up a cross-compiler on my Lintel (AMD 266) to compile
>> > packages for my Sparc IPX. I'd preferably like to package the
>> > cross-compiler so I can esaily remove it if I no longer need it.
>> > 
>> > The only cross-compiler in the slink packages list is for m68k.
>> > 
>> > What do I need to do to set one up?
>> 
>> The last cross-compiler I built (for kernel compiles) was using the m68k
>> cross-compiler package. I just changed the m68k references to sparc, and
>> ran dpkg-buildpackage -us -uc -rfakeroot (change all of the m68k
>> references in debian/ to sparc).
> 
> I just did a 'debian/rules binary' in 'gcc-m68k-linux-2.8.1' after
> changing 'm68k' to 'sparc', and I get a build error. Looks like the gcc
> buildstrap isn't working.

"make bootstrap" doesn't work for cross compilers, have a look at the
cross gcc FAQ: http://www.objsw.com/CrossGCC/ .

> ./xgcc -B./ -DCROSS_COMPILE -DIN_GCC-O2 -I./include  -I. -I. \
> -I./config  -g0 \
>   -finhibit-size-directive -fno-inline-functions -fno-exceptions  \
>   -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
> as: option `-s' is ambiguous
> make[1]: *** [crtbegin.o] Error 1
> make[1]: Leaving directory `gcc-m68k-linux-2.8.1'
> make: *** [build] Error 2
> 
> I get the exact same error if I use dpkg-buildpackage. I don't know enough
> about building gcc to know what's wrong. And this is the source package
> from ftp.ca.debian.org (us.debian.org not responding to me through lynx
> for some reason)

Looks like you're using the native binutils instead of cross binutils.

> I also found out I need the binutils-m68k-linux package, and that's being
> downloaded as I type..

You also need libc and kernel header files for the target system. The
kernel has to be configured for the target system, but that can be done on
the build host.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email [EMAIL PROTECTED]
WWW: http://www-ict.its.tudelft.nl/~erik/



Re: Cross-compiling on Debian systems?

1999-11-18 Thread Edmund GRIMLEY EVANS
I built a cross-compiler on Intel for SPARC from the binutils and gcc
sources, i.e. without using the Debian packages. If you check the
debian-sparc archives I think my recipe's in there somewhere.
(Otherwise ask me and I can probably find it and e-mail it to you
tonight - in about 12 hours.)

In general I found the bootstrapping process stopped with an error,
but I could install bits by hand and then recontinue the process.

Edmund


Re: Cross-compiling on Debian systems?

1999-11-18 Thread ferret


On Wed, 17 Nov 1999, Ben Collins wrote:

> On Wed, Nov 17, 1999 at 02:48:55PM -0800, [EMAIL PROTECTED] wrote:
> > 
> > I'd like to set up a cross-compiler on my Lintel (AMD 266) to compile
> > packages for my Sparc IPX. I'd preferably like to package the
> > cross-compiler so I can esaily remove it if I no longer need it.
> > 
> > The only cross-compiler in the slink packages list is for m68k.
> > 
> > What do I need to do to set one up?
> 
> The last cross-compiler I built (for kernel compiles) was using the m68k
> cross-compiler package. I just changed the m68k references to sparc, and
> ran dpkg-buildpackage -us -uc -rfakeroot (change all of the m68k
> references in debian/ to sparc).

I just did a 'debian/rules binary' in 'gcc-m68k-linux-2.8.1' after
changing 'm68k' to 'sparc', and I get a build error. Looks like the gcc
buildstrap isn't working.

./xgcc -B./ -DCROSS_COMPILE -DIN_GCC-O2 -I./include  -I. -I. \
-I./config  -g0 \
  -finhibit-size-directive -fno-inline-functions -fno-exceptions  \
  -c ./crtstuff.c -DCRT_BEGIN -o crtbegin.o
as: option `-s' is ambiguous
make[1]: *** [crtbegin.o] Error 1
make[1]: Leaving directory `gcc-m68k-linux-2.8.1'
make: *** [build] Error 2

I get the exact same error if I use dpkg-buildpackage. I don't know enough
about building gcc to know what's wrong. And this is the source package
from ftp.ca.debian.org (us.debian.org not responding to me through lynx
for some reason)

I also found out I need the binutils-m68k-linux package, and that's being
downloaded as I type..

-- Ferret no baka