Installing GCC and other Utils

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
radiatejava
Posts: 6
Joined: Fri Feb 20, 2009 7:52 am

Installing GCC and other Utils

Post by radiatejava »

I have a platform whose base is Linux but not everything is available on that. Only necessary executables are available and any individual executable can run on that. It is 32-bit and uname -a shows Linux 2.6.11.11.

Problem is I am trying to install gcc compiler on that to debug an issue. Even RPM utility is not there. Can anyone guide me how to install gcc on such a platform ?

Appreciate your response.
User avatar
yemista
Member
Member
Posts: 299
Joined: Fri Dec 26, 2008 12:31 pm
Location: Boston
Contact:

Re: Installing GCC and other Utils

Post by yemista »

Whats the platform?
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Installing GCC and other Utils

Post by Solar »

Is there some other package manager? Try rpm, apt-get, yast.
Every good solution is obvious once you've found it.
AntiRush
Posts: 5
Joined: Wed Sep 10, 2008 9:29 am

Re: Installing GCC and other Utils

Post by AntiRush »

yum? I can't imagine a linux distro that has neither a package manager or a prebuilt binary available somewhere. What platform is it?
radiatejava
Posts: 6
Joined: Fri Feb 20, 2009 7:52 am

Re: Installing GCC and other Utils

Post by radiatejava »

This is a customised Linux - basically Cisco blades (used in switches). They normally have only executables and only those which are needed. These blades are never for any dev work.
User avatar
narke
Member
Member
Posts: 119
Joined: Wed Dec 26, 2007 3:37 am
Location: France

Re: Installing GCC and other Utils

Post by narke »

You can try to download Slackware package (gcc-4.2.4-i486-1.tgz) from here: http://carroll.cac.psu.edu/pub/linux/di ... ackware/d/ .
Then do:
gunzip gcc-4.2.4-i486-1.tgz
tar -xvf gcc-4.2.4-i486-1.tgz

And move the binaries which will be in the untared directory to your system /usr/bin etc...
OS for PowerPC Macs: https://github.com/narke/Einherjar
Operating system: colorForth computing environment for x86.: https://github.com/narke/Roentgenium
radiatejava
Posts: 6
Joined: Fri Feb 20, 2009 7:52 am

Re: Installing GCC and other Utils

Post by radiatejava »

I can give your approach a try but not sure if that will work. Meanwhile, I have these 2 ques:

1. how does a user install first install gcc, rpm, make on a system where these are not available ?
2. I am sure there are other ways. I basically think there may be self installation files for these eg something like gcc_install.bin. Any self installer files for gcc etc on linux ?
User avatar
Steve the Pirate
Member
Member
Posts: 152
Joined: Fri Dec 15, 2006 7:01 am
Location: Brisbane, Australia
Contact:

Re: Installing GCC and other Utils

Post by Steve the Pirate »

radiatejava wrote:I can give your approach a try but not sure if that will work. Meanwhile, I have these 2 ques:

1. how does a user install first install gcc, rpm, make on a system where these are not available ?
Two ways: If the system doesn't have these utilities at all, they would have to do it using a cross-compiler. This is a compiler that runs on one system, but makes binaries that run on another.

The other way is that someone can just make a package of them, and distribute that - this is generally how most software is distributed on Linux.
radiatejava wrote:2. I am sure there are other ways. I basically think there may be self installation files for these eg something like gcc_install.bin. Any self installer files for gcc etc on linux ?
It's possible, but very unlikely - as I said, most software is distributed as packages or source code, which would require either a package manager or a compiler, which you don't seem to have.

I think that the only way you're going to be able to do it is the way narke suggests.
My Site | My Blog
Symmetry - My operating system.
radiatejava
Posts: 6
Joined: Fri Feb 20, 2009 7:52 am

Re: Installing GCC and other Utils

Post by radiatejava »

As suggested, I have built and copied gcc and binutils to my platform. But I get this error now in a gcc program:

i686-pc-linux-gnu/bin/ld: cannot open crt1.o: No such file or directory

Any package still missing ?
radiatejava
Posts: 6
Joined: Fri Feb 20, 2009 7:52 am

Re: Installing GCC and other Utils

Post by radiatejava »

This was because I did not have full version of glibc installed. I created the glibc but then I get this err for which I do not see any satisfactory response on the net:

/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol_skip@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_start_profile@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_check_map_versions@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_get_origin@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_dst_substitute@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_init@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_dst_count@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_signal_error@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_debug_printf@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_map_object_deps@GLIBC_PRIVATE'
User avatar
narke
Member
Member
Posts: 119
Joined: Wed Dec 26, 2007 3:37 am
Location: France

Re: Installing GCC and other Utils

Post by narke »

radiatejava wrote:This was because I did not have full version of glibc installed. I created the glibc but then I get this err for which I do not see any satisfactory response on the net:

/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol_skip@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_lookup_versioned_symbol@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_start_profile@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_check_map_versions@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_get_origin@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_dst_substitute@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_init@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_dst_count@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_signal_error@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_debug_printf@GLIBC_PRIVATE'
/home/sburnwal/glibc-2.3.2-build/lib/libc.so.6: undefined reference to `_dl_map_object_deps@GLIBC_PRIVATE'
It seems like the glibc shared library is not compatible with you gcc binary.
Maybe the gcc binary which you have was not compiled with the same glibc version which is installed on your system.
OS for PowerPC Macs: https://github.com/narke/Einherjar
Operating system: colorForth computing environment for x86.: https://github.com/narke/Roentgenium
Post Reply