The following is the problem:<br>root@carlos:/tmp/temp# g++ hello.cc -o hello<br>g++: installation problem, cannot exec 'cc1plus': No such file or directory<br><br>Also there is no make tool in that system...<br><br> <br><div class="gmail_quote">On Thu, May 24, 2012 at 4:10 PM, Markos Chandras <span dir="ltr"><<a href="mailto:hwoarang@gentoo.org" target="_blank">hwoarang@gentoo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <div class="HOEnZb"><div class="h5">On Thu, May 24, 2012 at 2:58 PM, Marko Košmerl <<a href="mailto:marko06@gmail.com">marko06@gmail.com</a>> wrote:<br> > On compile time I get warnings:<br> > watcher.cpp:(.text+0x85): warning: Using 'initgroups' in statically linked<br> > applications requires at runtime the shared libraries from the glibc version<br> > used for linking<br> > watcher.cpp:(.text+0x16f): warning: Using 'getpwnam' in statically linked<br> > applications requires at runtime the shared libraries from the glibc version<br> > used for linking<br> > client.cpp:(.text+0xb1a): warning: Using 'getaddrinfo' in statically linked<br> > applications requires at runtime the shared libraries from the glibc version<br> > used for linking<br> > reg.cpp:(.text+0x3d6): warning: Using 'gethostbyname' in statically linked<br> > applications requires at runtime the shared libraries from the glibc version<br> > used for linking<br> ><br> > On running it:<br> > ./watcher: /lib/libuuid.so.1: no version information available (required by<br> > ./watcher)<br> > ./watcher: /lib/libc.so.6:e version `GLIBC_2.4' not found (required by<br> > ./watcher)<br> > ./watcher: /lib/libc.so.6: version `GLIBC_2.7' not found (required by<br> > ./watcher)<br> > ./watcher: /lib/libc.so.6: version `GLIBC_2.11' not found (required by<br> > ./watcher)<br> ><br> ><br> > On Thu, May 24, 2012 at 3:33 PM, Markos Chandras <<a href="mailto:hwoarang@gentoo.org">hwoarang@gentoo.org</a>><br> > wrote:<br> >><br> >> On Thu, May 24, 2012 at 2:15 PM, Marko Košmerl <<a href="mailto:marko06@gmail.com">marko06@gmail.com</a>> wrote:<br> >> > Hi!<br> >> ><br> >> > I have some program which I am using in a thin client which has Gentoo<br> >> > stage 3 root fs (kernel 2.6.39.4),<br> >> > lets call it system A.<br> >> > I've also compiled that program chroot-ed in this stage 3 fs from my<br> >> > personal computer.<br> >> ><br> >> > I have an other thin clients which have older system (B) on it which is<br> >> > older linux kernel 2.6.16.27.<br> >> > Library version which are needed are of course different and for that<br> >> > reason<br> >> > my program<br> >> > can not be run in this sistem.<br> >> ><br> >> > System A:<br> >> > Linux redondo 2.6.39.4 #18 Mon Mar 19 13:14:32 CET 2012 i586 i586 i386<br> >> > GNU/Linux<br> >> > /lib/<a href="http://libc-2.12.2.so" target="_blank">libc-2.12.2.so</a><br> >> > gcc version 4.0.3<br> >> ><br> >> > System B:<br> >> > Linux carlos 2.6.16.27 #1 Sun Mar 25 11:09:40 CEST 2007 i586 i586 i386<br> >> > GNU/Linux<br> >> > /lib/<a href="http://libc-2.3.6.so" target="_blank">libc-2.3.6.so</a><br> >> > gcc version 4.0.3<br> >> ><br> >> > Shared libraries that my binary uses are (in system A):<br> >> > linux-gate.so.1 => (0xffffe000)<br> >> > libpthread.so.0 => /lib/libpthread.so.0 (0xf76d6000)<br> >> > libuuid.so.1 => /lib/libuuid.so.1 (0xf76d1000)<br> >> > libstdc++.so.6 => /usr/lib/gcc/i486-pc-linux-gnu/4.4.5/libstdc++.so.6<br> >> > (0xf75da000)<br> >> > libm.so.6 => /lib/libm.so.6 (0xf75b2000)<br> >> > libc.so.6 => /lib/libc.so.6 (0xf7468000)<br> >> > /lib/ld-linux.so.2 (0xf76f3000)<br> >> > libgcc_s.so.1 => /usr/lib/gcc/i486-pc-linux-gnu/4.4.5/libgcc_s.so.1<br> >> > (0xf7449000)<br> >> ><br> >> > If i try to compile my program using '-static' directive, I still have a<br> >> > problem with 4 functions:<br> >> > -initgroups,<br> >> > -getpwnam,<br> >> > -getaddrinfo,<br> >> > -gethostbyname.<br> >> ><br> >> > If I got that right, they use functions which are located in NSS shared<br> >> > libraries.<br> >> ><br> >> > I am looking for a way of compiling my program so that I can run it in<br> >> > system B.<br> >> > I have libraries available from system B and that is all that I have.<br> >> ><br> >> > I need help on getting this done.<br> >> > I guess gcc versions are the same and as well libgcc_s.so.1 shared<br> >> > library.<br> >> ><br> >> > My questions are:<br> >> > Can I pull those libraries from system B and use it in compilatin<br> >> > process?<br> >> > Would that work?<br> >> > I would still need to get include source files of that version, right?<br> >> > Is there some archive site where I can find so old version of linux<br> >> > kernel<br> >> > source?<br> >> > One thing that pops in to my mind is also trying to find gentoo stage 3<br> >> > tarball of the kernel version 2.6.16.27<br> >> > and compile the program there...I tried to search that but no luck in<br> >> > that...<br> >> ><br> >> > Any help would be welcomed!<br> >><br> >> You can statically compile your program on system A ( use gcc -static<br> >> -o test test.c for example ). Then you should be able to run it in<br> >> system B without any problem<br> >><br> ><br> <br> </div></div>Why don't you want to compile the program in system B if you already<br> have the libraries around?<br> <br> </blockquote></div><br>