Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-28-2011, 07:30 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 10

Rep: Reputation: Disabled
Smile how to install gcc-4.4 in other than /usr/

hi, friends i'm new to

its happy that there are so many helping hands are there to help me out.

i have gcc-4.4 installed in my UBUNTU10.10
testuser@testuser-desktop:/usr/include$ ls /usr/bin/gcc*
/usr/bin/gcc  /usr/bin/gcc-4.1  /usr/bin/gcc-4.4  /usr/bin/gccbug-4.1
testuser@testuser-desktop:/usr/include$ gcc -v
Using built-in specs.
Target: i686-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.4.4-14ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.4 --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu
Thread model: posix
gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
this is the detailed version of the gcc i'm using.

my requirement is that i want gcc-4.4 to be insatlled in /Documents.( basically i was searching for that type of gcc which can be carried any where, i mean. a portable gcc, which can be copied in any linux PC. so as to run my programs.)

my portable gcc-4.1.2
testuser@testuser-desktop:/home/testuser/Documents/dk_lin$ ls
bin  gcc  gnu  perl  tmp
testuser@testuser-desktop:/home/testuser/Documents/dk_lin$ cd bin/
testuser@testuser-desktop:/home/testuser/Documents/dk_lin/bin$ ls  cygintl-2.dll    cygpcre-0.dll
cygiconv-2.dll  cygncurses6.dll  cygpcre.dll    make
cygintl-1.dll   cygncurses7.dll  cygwin1.dll    sh
testuser@testuser-desktop:/home/testuser/Documents/dk_lin/bin$ cd ..
testuser@testuser-desktop:/home/testuser/Documents/dk_lin$ cd gcc/
testuser@testuser-desktop:/home/testuser/Documents/dk_lin/gcc$ ls
bin  inc  include  info  lib  libexec  man  readme.txt  share
this is the directory structure of the portable gcc-4.1.2 i had.(i hope you understood, thought i show just the contents of it)

i have a folder which is similar to that. but it is missing few headers which i need like dlfcn.h,dirent.h.... and all that. so, my programs instead of compililng from my gcc/include they are getting compiled from /usr/include, which i dont want. so, i want to update it. checked the net to get such portable gcc. but i couldn'fd find. ifound one link
i downloaded files from the this link, because this structure is very similar structure like my "_lin"(portable gcc). but it is noe allowing to download certain files in /lib like and few other files. i thought those are compiler specific shared objects.

so, i was left with no answer to my question. where to find portable gcc-4.4 ?
so, i seek your help. if you understand my problem. please help me.

Last edited by ge1; 06-28-2011 at 07:51 AM.
Old 06-29-2011, 01:58 AM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914Reputation: 914
Hi, welcome to LQ!

What do you mean by:
basically i was searching for that type of gcc which can be carried any where, i mean. a portable gcc, which can be copied in any linux PC. so as to run my programs.
Which programs, and in which way do they require gcc to run?

Old 06-29-2011, 11:59 PM   #3
LQ Newbie
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled

i mean. i have a folder called Linux in my ~/Documents. i was given that linux, when i joined in the company. they asked me to compile the C-programs using the Linux folder they gave.

the meaning of carrying it to every where is that, a folder which can be copied in a pen drive and just copy the folder in that new system and compile c programs in that system using the folder which was copied there.

after searching for a while I'm thinking that was the gcc-4.1.2 they installed in the folder named "Linux" and they gave it to me. i don't know whether my assumption is correct or not. i think being understood my situation you will help me to figure it out.
Old 06-30-2011, 12:10 AM   #4
LQ Newbie
Registered: Jun 2011
Posts: 10

Original Poster
Rep: Reputation: Disabled
my another question is that, can we compile the programs with a new gcc(which is not in /usr/bin) which is in say ~/Documents.?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/gcc: Permission denied Ariyan Linux - Server 2 04-12-2011 05:37 PM
/usr/bin/gcc not found an_sush Linux - Software 1 07-10-2009 02:43 AM
gcc wont use libary in /usr/loacal/... Skaarj Programming 22 05-09-2009 11:48 AM
export CC=/usr/bin/gcc-4.1 sycamorex Linux - Software 4 01-17-2008 06:32 PM
export CC=/usr/bin/gcc-3.2 - switch gcc version? ferreter Linux - Software 1 08-20-2003 01:07 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration