LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 12-03-2012, 04:19 AM   #16
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641

# 15

The suggestion was to build a gcc package here,
and then deliver it to you as a binary package.

But only if your build continuously failed.
Please mark the thread as solved, when you have tested
your new gcc and particularly g++ to be OK.

.
 
Old 12-03-2012, 06:26 AM   #17
Azrael84
Member
 
Registered: Nov 2012
Posts: 55

Original Poster
Rep: Reputation: Disabled
Oh I see, yes that is a good idea. I don't think I can message you my username though as I haven't been a member of the forum long enough.

My build seems to have now worked, but my compilation has not (despite being the same src code that compiled with the same version of gcc on my desktop). If I do a -H option it seems that the compiler is still getting some headers from `/usr/include` and similarly some (although not all) libraries from `/usr/lib` etc, I think it does look in my local home dir first (I have set LD_LIBRARY_PATH, LD_RUN_PATH etc to point to there), but I must be missing some needed libs somehow so it seeks the system ones.

On some simpler test code a binary does compile, and indeed doing `ldd myBin` shows it depends on shared libs from /usr which I don't want.

Maybe I should have built with

--with-native-system-header-dir=dirname
Specifies that dirname is the directory that contains native system header files, rather than /usr/include. This option is most useful if you are creating a compiler that should be isolated from the system as much as possible. It is most commonly used with the --with-sysroot option and will cause GCC to search dirname inside the system root specified by that option.

but then I guess I still need the missing headers/libs which I suppose must have come with linux?

Last edited by Azrael84; 12-03-2012 at 06:30 AM.
 
Old 12-03-2012, 08:59 AM   #18
Azrael84
Member
 
Registered: Nov 2012
Posts: 55

Original Poster
Rep: Reputation: Disabled
to give you some more info (most of the headers are included from /home/myusername.. but a few are still taken from the system /usr/include despite my -L flag and LD_LIBRARY_PATH= trying to suggest otherwise. For example

/usr/include/sys/cdefs.h
...... /usr/include/bits/wordsize.h
..... /usr/include/gnu/stubs.h
...... /usr/include/bits/wordsize.h
...... /usr/include/gnu/stubs-64.h
........ /usr/include/stdio.h
........ /usr/include/bits/wchar.h
........ /usr/include/xlocale.h
....... /usr/include/locale.h
........ /usr/include/bits/locale.h
........ /usr/include/pthread.h
......... /usr/include/sched.h
.......... /usr/include/time.h
.......... /usr/include/bits/sched.h
......... /usr/include/time.h
....... /usr/include/wctype.h
.... /usr/include/libio.h


GMP, MPFR are taken from the new ones on my home dir which I think is looked in first, but I guess it then looks in /usr, so I must be missing the above headers in my gcc build is this normal?

It looks to me like all the c++ headers came with gcc but not c headers?

Last edited by Azrael84; 12-03-2012 at 09:02 AM.
 
Old 12-03-2012, 12:50 PM   #19
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,513

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 18

If you installed to --prefix=/usr/, the gcc headers are in /usr/lib/.
Like : /usr/lib/gcc/i486-linux-gnu/4.6.3/include/*
 
  


Reply

Tags
gcc463



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
i have an error Building GCC: requires GMP 4.1+ and MPFR 2.3.0+. robineecc1 Linux From Scratch 17 03-05-2018 05:57 AM
Error building GMP, MPFR, MPC libs with gcc 4.7.0 in cygwin lb_dbd Linux - Newbie 2 04-11-2012 04:23 PM
Finding path of GMP and MPFR for gcc upgrade drosselmeyer Linux - Newbie 2 08-03-2011 07:15 AM
[SOLVED] gcc in CLFS section 5.8.1 does not compile without the omitted mpfr and gmp Openumerix Linux From Scratch 4 11-20-2009 01:35 PM
Why install MPFR and GMP in GCC as opposed to separately? GuyWhoKilledBear Linux - Software 1 08-12-2009 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:40 PM.

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