Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-08

204 Compiler

8 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Carsten Bager

I have downloaded the 204 source code and compiled a cross compiler to Arm to run on a Windows PC

When compiling some code that has worked with the 202 compiler I get this error:
----
Assembling led
Assembling with smartlinking led
L:\FPC\ARMBIN\AR.EXE: creating libpled.a
Forkert kommando eller filnavn (This means wrong command or filename)
Linking led
libpled.a: could not read symbols: Archive has no index; run ranlib to add one
led.pas(13,11) Error: Error while linking
-----

Between calling ar.exe and the linker it looks like the compiler calls a program that is not present

I build the same compiler on a Linux PC and that is working.

This is the command I use on the Windows PC
"make clean all FPCTARGET= OS_TARGET=linux
CPU_TARGET=arm BINUTILSPREFIX=arm-linux-"

This is the command I use on the Linux PC
make clean all cycle OS_TARGET=linux CPU_TARGET=arm PP=/pp/bin/fpc BINUTILSPREFIX=arm-linux-

Dos anybody have a hint

Carsten

Reply by email

Carsten Bager
to Carsten Bager
Show quoted text 11 lines
I have downloaded the 204 source code and compiled a cross compiler to Arm to run on a Windows PC When compiling some code that has worked with the 202 compiler I get this error: ---- Assembling led Assembling with smartlinking led L:\FPC\ARMBIN\AR.EXE: creating libpled.a Forkert kommando eller filnavn (This means wrong command or filename)

I have found out that the file that the compiler are looking fore is "ar" for some reason the compiler dos not know where to find "ar" the second time it looks fore it.
If I place a ar.exe en the same folder where I am compiling the error "Forkert kommando eller filnavn (This means wrong command or filename)"
Disappears, but the linker error remains.

If I remove the {$SMARTLINK ON} directive in the pas file, the linker stops complaining.

Show quoted text 28 lines
Linking led libpled.a: could not read symbols: Archive has no index; run ranlib to add one led.pas(13,11) Error: Error while linking ----- Between calling ar.exe and the linker it looks like the compiler calls a program that is not present I build the same compiler on a Linux PC and that is working. This is the command I use on the Windows PC "make clean all FPCTARGET= OS_TARGET=linux CPU_TARGET=arm BINUTILSPREFIX=arm-linux-" This is the command I use on the Linux PC make clean all cycle OS_TARGET=linux CPU_TARGET=arm PP=/pp/bin/fpc BINUTILSPREFIX=arm-linux- Dos anybody have a hint Carsten _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Carsten Bager
to Carsten Bager
Show quoted text 7 lines
> When compiling some code that has worked with the 202 compiler I > get this error: > ---- > Assembling led > Assembling with smartlinking led > L:\FPC\ARMBIN\AR.EXE: creating libpled.a > wrong command or filename

This is also a problem with the Windows -> Windows compiler. It shows under Windows 98, but not under XP.

Are the FPC compiler stopping to support Windows 98/ME ?

Regards

Carsten

------------------------------
The problem lies in the command that "fpc" sends to "ar"

The 202 compiler sends
L:\FPC\ARMBIN\ar.exe rs libputest.a utest.sl\utest*.o

The 204 compiler sends
L:\FPC\ARMBIN\ar.exe qS libputest.a utest.sl\utest0s10.o utest.sl\utest0s9.o utest.sl\utest0s8.o utest.sl\utest0s7.o utest.sl\utest0s6.o utest.sl\utest0s5.o utest.sl\utest0s4.o utest.sl\utest0s3.o utest.sl\utest0s2.o utest.sl\utest0s1.o

--------------------------------
program ptest;
uses utest;
begin
  Test;
end.
----------------------------------
unit utest;
{$SMARTLINK ON}
interface
Procedure Test;
implementation
Procedure Test;
Begin
  WriteLn('Test');
End;

end.
-------------------------------
c:\pp\204\Bin\i386-win32\fpc -XX -al ptest.pas

Carsten Bager Bøvlingbjerg El-automatik Brørupvænget 10 7650 Bøvlingbjerg Tlf. +4597885222 Fax +4597885434 http://www.beas.dk

Reply by email

Florian Klaempfl
to Carsten Bager
Carsten Bager wrote 12 lines
>> When compiling some code that has worked with the 202 compiler I >> get this error: >> ---- >> Assembling led >> Assembling with smartlinking led >> L:\FPC\ARMBIN\AR.EXE: creating libpled.a >> wrong command or filename This is also a problem with the Windows -> Windows compiler. It shows under Windows 98, but not under XP. Are the FPC compiler stopping to support Windows 98/ME ?

Well, supported is everything which is tested ;) I guess none of the current developers use Win9x anymore so we depend on external bug reports/patches.

Show quoted text 45 lines
Regards Carsten ------------------------------ The problem lies in the command that "fpc" sends to "ar" The 202 compiler sends L:\FPC\ARMBIN\ar.exe rs libputest.a utest.sl\utest*.o The 204 compiler sends L:\FPC\ARMBIN\ar.exe qS libputest.a utest.sl\utest0s10.o utest.sl\utest0s9.o utest.sl\utest0s8.o utest.sl\utest0s7.o utest.sl\utest0s6.o utest.sl\utest0s5.o utest.sl\utest0s4.o utest.sl\utest0s3.o utest.sl\utest0s2.o utest.sl\utest0s1.o -------------------------------- program ptest; uses utest; begin Test; end. ---------------------------------- unit utest; {$SMARTLINK ON} interface Procedure Test; implementation Procedure Test; Begin WriteLn('Test'); End; end. ------------------------------- c:\pp\204\Bin\i386-win32\fpc -XX -al ptest.pas

Reply by email

Marc Santhoff
to Carsten Bager: This is also a problem with the Windows -> Windows compiler. It shows under Windows 98,…
Carsten Bager wrote 9 lines
> get this error: > > ---- > > Assembling led > > Assembling with smartlinking led > > L:\FPC\ARMBIN\AR.EXE: creating libpled.a > > wrong command or filename This is also a problem with the Windows -> Windows compiler. It shows under Windows 98, but not under XP.

I've compiled your test program and unit with the given command on win2k and win98se and ran the resulting executables on both platforms without problems.

Fpc 2.0.2 was used in the precompiled version packaged with a set of binutils.

HTH,
Marc

Reply by email

Marc Santhoff
to Jonas Maebe
Jonas Maebe wrote 6 lines
On 14 Sep 2006, at 19:20, Marc Santhoff wrote: > Fpc 2.0.2 was used in the precompiled version packaged with a set of > binutils. As the subject indicates, this is about FPC 2.0.4

Pfft ... not my day today. =:()

Marc

Grabel's Law: 2 is not equal to 3 -- not even for large values of 2.

Reply by email

Marc Santhoff
to Jonas Maebe: As the subject indicates, this is about FPC 2.0.4 Jonas
Jonas Maebe wrote 6 lines
On 14 Sep 2006, at 19:20, Marc Santhoff wrote: > Fpc 2.0.2 was used in the precompiled version packaged with a set of > binutils. As the subject indicates, this is about FPC 2.0.4

If there is no crosscompiler involved, for me it does work:

D:\Eigene Dateien>ver

Windows 98 [Version 4.10.2222]

D:\Eigene Dateien>fpc ptest
Free Pascal Compiler version 2.0.4 [2006/08/21] for i386 Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Win32 for i386
Compiling ptest.pas
Compiling utest.pas
Linking ptest.exe
24 Lines compiled, 0.9 sec

D:\Eigene Dateien>ptest
Test

---

D:\Eigene Dateien>ver

Microsoft Windows 2000 [Version 5.00.2195]

D:\Eigene Dateien>del *.ppu

D:\Eigene Dateien>fpc ptest
Free Pascal Compiler version 2.0.4 [2006/08/21] for i386 Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Win32 for i386
Compiling ptest.pas
Compiling utest.pas
Linking ptest.exe
24 Lines compiled, 0.1 sec

D:\Eigene Dateien>ptest
Test

Note that I have the <fpc-2.0.4>/bin directory in the path.

HTH,
Marc

Reply by email