-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Alvaro Zuniga wrote:
| Hi Everyone: I have a question regarding compiling a software in | Linux. | | I normally use something called gphpedit to write PHP programs. I | have just installed Slackware 8 on my laptop but it does not have | GNOME2. Thanks God! ( this is the best distro for a 266 64MB I know | ) | | Anyway, gphpedit requires Scintilla2 and something else I do not | recall. I would like to compile this application on my computer | that does have GNOME2 statically and then run it on the other | computer that does not have GNOME2. Is this possible? mabe but, Where glibc is concerned, there is no such thing as a 100% static binary. If you statically compile a binary with glibc, it may still depend on other system files. Below is an explanation by Dick Howell, "I suppose the idea is that everything will be in the downloaded file, so nothing depends on the local libraries on the target system. Unfortunately with Linux, and I think anything else using GLIBC, this still isn't quite true. There's this "libnss" (name service switch, some people seem to call it network security system) which provides functions for accessing various databases for authentication, network information, and other things. It's supposed to make application programs independent of the separately configured actual network environment of the machine. A nice idea, but changes to GLIBC can lead to problems loading it. And you can't statically link "libnss", since it is configured for each machine individually. The problem comes, I think, mainly from statically linking other GLIBC libraries, notably "libpthread", "libm", and "libc", from which come incompatible calls to "libnss" functions." | | I tried doing that but did not work. I get an error on the old | system telling me it cannot find the library. | | I run Gentoo and I have already tried the USE="static" but no | results. I figured maybe env-update did not work and restarted the | system, nothing. What are your CFLAGS set to in make.conf ? Gentoo is typicaly optimized for the arch it is installed on so compiling staticly will not be portable unless the CFLAGS setting for gcc is set apropriatly for the target or you crosscompile with the apropriate toolchain. I suspect your CFLAGS setting in make.conf uses 'march=' instead of 'mcpu' which will cause the binary to fail on a diffrent sub-arch ie: compile on a pentuim4 move it to a pentuim2. You probably don't want to set the CFLAGS setting to the march option for the target as this could generate invalid instructions by the compiler and or fail on your current platform, use mcpu instead. ~ -mcpu=<cpu-type> means optimize code for the particular type of CPU without ~ breaking compatibility with other CPUs. ~ -march=<cpu-type> means to take full advantage of the ABI and instructions ~ for the particular CPU; this will break compatibility with older CPUs (for ~ example, -march=athlon-xp code will not run on a regular Athlon, and ~ -march=i686 code will not run on a Pentium Classic. ~ CPU types supported in gcc-3.2 and higher: athlon-xp, athlon-mp, ~ athlon-tbird, athlon, k6, k6-2, k6-3, i386, i486, i586 (Pentium), i686 ~ (PentiumPro), pentium, pentium-mmx, pentiumpro, pentium2 (Celeron), pentium3. Note that Gentoo Linux 1.4 and higher include at least gcc-3.2. ~ ATHLON-4 will generate invalid SSE instructions; use 'athlon' instead. ~ PENTIUM4 will generate invalid instructions; use 'pentium3' instead. ~ CPU types supported in gcc-2.95*: k6, i386, i486, i586 (Pentium), i686 ~ (Pentium Pro), pentium, pentiumpro Gentoo Linux 1.2 and below use gcc-2.95* | | Any help would be greatly appreciated. Upgrading the system is not | an option because 8.1 differs quite a bit from 8.0. I would rather | change editors. ( even something like the ever hated VI, I still | feels sorry for those who use that editor, they will never think | normally ) vi users don't need pity from inferior editor users' :-P :wq -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFAZLDb6JFKsKsJemQRAo7iAJ9RVhDUQMFOCuskxlSce2RcN0EiaQCfWAx8 Ga7eA2ubwfMAG5nF7WrtFD8= =NJOC -----END PGP SIGNATURE-----
