Morton, John a écrit :
I am now able to log in as an unprivileged user ("etms") and run gpc (from "/home/etms/dev" which holds the "hello world" source code). The gpc -v output shows that the compile now gets to the linker stage - which complains that it cannot find crtl.o (and probably crti.o and crtn.o). Since none of these files are prefixed with a path it seems that the linker assumes they are in the current directory or are in the following default path (as one line - you can safely ignore the two "etms" folders):
/usr/local/bin/:/usr/bin:/usr/X11R6/bin:/home/etms/bin: /opt/0V/bin:/opt/0V/bin/0pC:/etms/com:.
This is the path for executables. crtl.o is not an executable, but an "object" i.e. a binary file produced by the compilation of a source like crtl.c, and which be used by the linker with other objects to produce an executable. The linker searches these files in standard locations, whence the absence of pathes. You can see these standard locations by typing gpc --print-search-dirs hello.pas (there are many ...)
I thought I saw the missing files somewhere but (assuming I've used "find" correctly) they aren't on my system at all. I did the search after deleting gpc-2.1 (from gnu-pascal.de) and then untarring (as root) "gcc-core-3.4.6.tar.tar" (from Brandeis) into it's default location (/usr/local/gcc-3.4.6). Shouldn't the 3.4.6 extraction have placed the 3 files in or under that directory?
gcc-core.... is a source file, it contains absolutely no binary.
If you have a gcc compiler installed in your system (a binary, not a source, otherwise you could not make anything), you should have a directory structure like
/usr/lib/gcc/<system>/<version>
where <system> is e.g. x86_64-redhat-linux for a 64 bits compiler i686-pc-linux 32
and <version> is e.g. 3.4.6 or 4.4.4
In this directory you have several files crtbegin.o crtend.o ... and libraries like libgcc.a
A successfull compilation and install of gpc produces the same structure below /usr/local/lib
Apparently you should spend some time in looking to the directory structure of your computer and trying to understand what is a source, an object, a static library, a dynamic library, an executable, a compiler, an assembler, a linker and the like.
Maurice