Re: Kernel cross compilation error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



you can download  .deb file for the gcc, you will also need the denepdencies.

Once you get them you can go sudo dpkg -i <filename.deb>

On 11/26/06, Willy Tarreau <w@xxxxxx> wrote:
On Sun, Nov 26, 2006 at 03:22:08PM +0530, atoka wrote:
> On 11/26/06, Willy Tarreau <w@xxxxxx> wrote:
> >On Sun, Nov 26, 2006 at 02:58:46PM +0530, atoka wrote:
> >> On 11/26/06, Willy Tarreau <w@xxxxxx> wrote:
> >> >On Sun, Nov 26, 2006 at 02:10:54PM +0530, atoka wrote:
> >> >> On 11/26/06, Willy Tarreau <w@xxxxxx> wrote:
> >> >> >On Sun, Nov 26, 2006 at 11:53:18AM +0530, atoka wrote:
> >> >> >> On 11/24/06, Willy Tarreau <w@xxxxxx> wrote:
> >> >> >> >On Fri, Nov 24, 2006 at 12:15:06PM +0530, atoka wrote:
> >> >> >> >> On 11/24/06, Willy Tarreau <w@xxxxxx> wrote:
> >> >> >> >> >On Fri, Nov 24, 2006 at 11:20:17AM +0530, atoka wrote:
> >> >> >> >> >> hi everyone,
> >> >> >> >> >>        im a kernel newbie. im using a debian linux(ie
> >ubuntu).i
> >> >did
> >> >> >> >> >> cross compilation for ia64 on my system which is ia32. Now im
> >> >> >trying
> >> >> >> >> >> to cross compile ia64 kernel but im getting some error.
> >before
> >> >> >> >> >> compiling kernel, i did made changes in Makefile to specify
> >my
> >> >> >> >> >> ia64-linux compiler and libraries .
> >> >> >> >> >
> >> >> >> >> >You should not have changed the contents of your makefile but
> >just
> >> >> >> >> >passed it some parameters.
> >> >> >> >>
> >> >> >> >>
> >> >> >> >> i have made following changes in Makefile,
> >> >> >> >>
> >> >> >> >> AS            = $(CROSS_COMPILE)ia64-linux-as
> >> >> >> >> LD            = $(CROSS_COMPILE)ia64-linux-ld
> >> >> >> >> CC            = $(CROSS_COMPILE)ia64-linux-gcc
> >> >> >> >> CPP           = $(CC) -ia64-linux-E
> >> >> >> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >> >> >> >error here : you should have left :
> >> >> >> >
> >> >> >> > CPP = $(CC) -E
> >> >> >> >
> >> >> >> >> AR            = $(CROSS_COMPILE)ia64-linux-ar
> >> >> >> >> NM            = $(CROSS_COMPILE)ia64-linux-nm
> >> >> >> >> STRIP         = $(CROSS_COMPILE)ia64-linux-strip
> >> >> >> >> OBJCOPY               = $(CROSS_COMPILE)ia64-linux-objcopy
> >> >> >> >> OBJDUMP               = $(CROSS_COMPILE)ia64-linux-objdump
> >> >> >> >>
> >> >> >> >> won't it work?
> >> >> >> >
> >> >> >> >It should work. Anyway, it would have been a lot easier to set
> >> >> >> >CROSS_COMPILE=ia64-linux (either in the makefile or on the command
> >> >> >> >line).
> >> >> >> >
> >> >> >> >Willy
> >> >> >> >
> >> >> >>
> >> >> >> i kept the HOST gcc as it is,
> >> >> >> changed CPP= $(CC) -ia64-linux-E to
> >> >> >> CPP = $(CC) -E
> >> >> >>
> >> >> >> and run make ARCH=ia64 defconfig
> >> >> >> and make ARCH=ia64 menuconfig command but its giving following
> >> >errors..
> >> >> >>
> >> >> >>
> >> >> >> root@atoka-desktop:/linux-2.6.18# make ARCH=ia64 defconfig
> >> >> >>  HOSTCC  scripts/basic/fixdep
> >> >> >> /bin/sh: gcc: command not found
> >> >> >> make[1]: *** [scripts/basic/fixdep] Error 127
> >> >> >> make: *** [scripts_basic] Error 2
> >> >> >>
> >> >> >>
> >> >> >> root@atoka-desktop:/linux-2.6.18# make ARCH=ia64 menuconfig
> >> >> >>  HOSTCC  scripts/basic/fixdep
> >> >> >> /bin/sh: gcc: command not found
> >> >> >> make[1]: *** [scripts/basic/fixdep] Error 127
> >> >> >> make: *** [scripts_basic] Error 2
> >> >> >> root@atoka-desktop:/linux-2.6.18#
> >> >> >>
> >> >> >>
> >> >> >> by the way do i need to have HOST gcc installed in my system??
> >> >> >
> >> >> >yes of course, because some tools such as fixdep and dialog are
> >compiled
> >> >> >on your system to be used locally during the build process. You can
> >> >install
> >> >> >any version, it is not much important for those tools. Of course, you
> >> >will
> >> >> >need binutils too, so that the ".o" can be linked as a binary
> >> >executable.
> >> >> >
> >> >> >Willy
> >> >> >
> >> >> >
> >> >>
> >> >> i already have binutils installed in my system.but i have problem
> >> >> installing gcc.
> >> >> im not getting proper gcc binaries version for ubuntu, also i don't
> >> >> have net connected to my ubuntu linux, so i can't use  sudo apt-get
> >> >> install gcc command...can you help..
> >> >
> >> >Well, I have no idea how those packages work. That's what I hate in
> >those
> >> >distros, everything works magically until one day, and users are lost.
> >> >I suspect you can download a package for your distro from its ftp site
> >> >and transfer it to your machine, then install it with some package
> >> >management
> >> >utility provided with the distro.
> >> >
> >> >If you cannot manage to do that, another solution would be to download
> >> >gcc-3.4
> >> >sources, extract them and configure/make/make install to have a working
> >> >gcc.
> >> >It might be easier and take less time than trying to figure out how to
> >> >install
> >> >a package by hand on the distro and resolve the dependencies...
> >> >
> >> >Regards,
> >> >willy
> >> >
> >> >
> >>
> >> i tried installing gcc from the source code i used gcc-4.0.2
> >>
> >> but got following error
> >>
> >> ./configure: line 2339: cc: command not found
> >> *** The command 'cc -o conftest -g conftest.c' failed.
> >> *** You must set the environment variable CC to a working compiler
> >>
> >> i even tried few other versions but got the same error.
> >
> >Ah yes, sorry, I'm stupid. Since you have no gcc on your machine, you
> >cannot install from sources as you already need gcc to build it... So
> >you must find a way to find and install the pre-built gcc package for
> >your distro.
> >
> >Willy
> >
> >
>
> thats what im saying,since i don't have gcc installed i can't do that..
> i m not able to get the  pre-built gcc package for my distro. i m
> using Ubuntu 6.06. i even got a gcc-3.4 binary pkg but it was just
> 505kb.

seems rather small.

> When i tried to compile my hello.c program it gave errors as
>
> stdio.h not found
> stdlib.h not found
>
> I don't think its a complete pkg.

OK, you also need the libraries, the headers, etc... Most probably, the
packages will be named glibc-devel and/or glibc-headers, and you'll
probably also need kernel-headers and libncurses-devel (to build lxdialog).
I understand this seems complicated, but setting up a build environment
on a machine which was not installed with this goal is rather tough.

> where  can i find one?

probably that you can find those packages on the same site you found
the gcc binary. Otherwise, check your distro's repository. As I said,
I have no idea how to install anything on that distro, nor where to
find the packages.

> -Atoka

Cheers,
Willy


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/




--
wbr, Alex

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux