Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.