Hello, A quick question - what can be wrong: after installing the newest GPC I still get the same error:
/usr/lib/crt1.o: In function `_start': /usr/lib/crt1.o(.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status
while compiling simple:
unit blah; interface implementation end.
Is there something wrong with the installation ? (previously I had gcc 2.95.3 installed in /usr/lib, I compiled and installed GPC (by make install) into /usr/local/). Thanks for any hints.
Best Regards, Adam Naumowicz
-------------------------------------- WWW: http://math.uwb.edu.pl/~adamn/ --------------------------------------
Hello, A quick question - what can be wrong: after installing the newest GPC I still get the same error:
/usr/lib/crt1.o: In function `_start': /usr/lib/crt1.o(.text+0x18): undefined reference to `main' collect2: ld returned 1 exit status
while compiling simple:
unit blah; interface implementation end.
To compile a separate unit (i.e. no main program), you have to use the `-c' option, e.g.
gpc -c blah.pas
Emil Jerabek
Is there something wrong with the installation ? (previously I had gcc 2.95.3 installed in /usr/lib, I compiled and installed GPC (by make install) into /usr/local/). Thanks for any hints.
Best Regards, Adam Naumowicz
WWW: http://math.uwb.edu.pl/~adamn/
On Sat, 13 Apr 2002, Emil Jerabek wrote:
To compile a separate unit (i.e. no main program), you have to use the `-c' option, e.g.
gpc -c blah.pas
Sorry for that silly question - I was so tired yesterday that only after I sent it I realized what's wrong ;-( But still, I have a problem compiling gpc-20020410 (on top of gcc-core-2.95.2) on my Sparc/Solaris machine. While trying to apply a suitable patch there is an error:
*** *** ../../gcc-2.95.2/gcc/configure detected GCC version 2.95.2. *** GPC 2.1 requires a patch to GCC to build with version 2.95.2. *** This patch will now be applied. *** Press ENTER to continue, Ctrl-C to abort. ***
Malformed patch at line 95: patch: Line must begin with '+ ', ' ', or '! '. Configure in /export/home/adamn/install/gpc/build/gcc failed, exiting.
Previously I had no problems with this patch - maybe now it is not fully compatible with native solaris patch anymore ??
Regards, Adam Naumowicz
-------------------------------------- WWW: http://math.uwb.edu.pl/~adamn/ --------------------------------------
Adam Naumowicz wrote:
But still, I have a problem compiling gpc-20020410 (on top of gcc-core-2.95.2) on my Sparc/Solaris machine. While trying to apply a suitable patch there is an error:
*** ../../gcc-2.95.2/gcc/configure detected GCC version 2.95.2. *** GPC 2.1 requires a patch to GCC to build with version 2.95.2. *** This patch will now be applied. *** Press ENTER to continue, Ctrl-C to abort.
Malformed patch at line 95: patch: Line must begin with '+ ', ' ', or '! '. Configure in /export/home/adamn/install/gpc/build/gcc failed, exiting.
Previously I had no problems with this patch - maybe now it is not fully compatible with native solaris patch anymore ??
This sounds plausible. I've no experience with Solaris, so this is just a wild guess: line 95 of the patch does not indeed start with '+ ', ' ', or '! ' -- it is empty. Probably Solaris patch doesn't like empty lines in unidiffs, so you may try this as a workaround:
cd gpc-20020410/p/diffs mv gcc-2.95.diff orig.gcc-2.95.diff sed -e 's/^$/ /' orig.gcc-2.95.diff > gcc-2.95.diff
Emil Jerabek
Regards, Adam Naumowicz
WWW: http://math.uwb.edu.pl/~adamn/
On Tue, 16 Apr 2002, Emil Jerabek wrote:
Adam Naumowicz wrote:
But still, I have a problem compiling gpc-20020410 (on top of gcc-core-2.95.2) on my Sparc/Solaris machine. While trying to apply a suitable patch there is an error:
*** ../../gcc-2.95.2/gcc/configure detected GCC version 2.95.2. *** GPC 2.1 requires a patch to GCC to build with version 2.95.2. *** This patch will now be applied. *** Press ENTER to continue, Ctrl-C to abort.
Malformed patch at line 95: patch: Line must begin with '+ ', ' ', or '! '. Configure in /export/home/adamn/install/gpc/build/gcc failed, exiting.
Previously I had no problems with this patch - maybe now it is not fully compatible with native solaris patch anymore ??
This sounds plausible. I've no experience with Solaris, so this is just a wild guess: line 95 of the patch does not indeed start with '+ ', ' ', or '! ' -- it is empty. Probably Solaris patch doesn't like empty lines in unidiffs, so you may try this as a workaround:
Hallo,
see my mail just sent some minutes before. On Solaris this problem disappeared after installing the newes version of gnu patch, version 2.5.
Hope that helps, Ernst-Ludwig
cd gpc-20020410/p/diffs mv gcc-2.95.diff orig.gcc-2.95.diff sed -e 's/^$/ /' orig.gcc-2.95.diff > gcc-2.95.diff
Emil Jerabek
Regards, Adam Naumowicz
WWW: http://math.uwb.edu.pl/~adamn/
Emil Jerabek wrote:
Adam Naumowicz wrote:
But still, I have a problem compiling gpc-20020410 (on top of gcc-core-2.95.2) on my Sparc/Solaris machine. While trying to apply a suitable patch there is an error:
*** ../../gcc-2.95.2/gcc/configure detected GCC version 2.95.2. *** GPC 2.1 requires a patch to GCC to build with version 2.95.2. *** This patch will now be applied. *** Press ENTER to continue, Ctrl-C to abort.
Malformed patch at line 95: patch: Line must begin with '+ ', ' ', or '! '. Configure in /export/home/adamn/install/gpc/build/gcc failed, exiting.
Previously I had no problems with this patch - maybe now it is not fully compatible with native solaris patch anymore ??
This sounds plausible. I've no experience with Solaris, so this is just a wild guess: line 95 of the patch does not indeed start with '+ ', ' ', or '! ' -- it is empty. Probably Solaris patch doesn't like empty lines in unidiffs, so you may try this as a workaround:
cd gpc-20020410/p/diffs mv gcc-2.95.diff orig.gcc-2.95.diff sed -e 's/^$/ /' orig.gcc-2.95.diff > gcc-2.95.diff
Apparently, I had removed these spaces by accident. I'll put them back, of course. I've made sure that this was the only places where it happened. (And I'm a little surprised that other implementations of patch don't seem to mind.) Thanks for the report, Adam.
Frank