Cross compiling on Windows

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Cross compiling on Windows

Carsten Bager
When moving from the 205 compiler to the 222 compiler I have got a strange problem with
the cross compiler for Windows

-----------
(Free Pascal Compiler version 2.2.2 [2008/08/26] for arm)
-----------

When I compile a project on a Samba drive it works ok.
But when I copy everything (compiler, linker etc.) to a local drive and compile, I get this error

---------------
easypromain.pp(366,49) Warning: Object cprt21.o not found, Linking may fail !
C:\FPC\ARMBIN\ld.exe: cannot find cprt21.o
easypromain.pp(366,49) Error: Error while linking
easypromain.pp(366,49) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
-----------------

The cprt21.o is not present on the samba drive, so my conclusion is that the compiler acts
different on a Samba drive than it do on a local drive.

It is the compiler that asks for the "cprt21.o" file

--------
INPUT(
cprt21.o
easypromain.o
-----------

I have tried to compile the project on the local drive with the compiler placed on the samba
drive. That generates the same error.

I compile with the following command
 
\Fpc\ArmBin\ppcrossarm9.exe -Tlinux -gl -XX -dARM9LINUX -dUlibc -dDEBUG -
dRUNTIMECHECK easypromain.pp

I need a hint what to do.

Carsten

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling on Windows

Marco van de Voort
In our previous episode, Carsten Bager said:
> When moving from the 205 compiler to the 222 compiler I have got a strange problem with
> the cross compiler for Windows

I suspect this is a bug, or something fixed with newer functionality. Iirc
Florian worked on this (autodetection of glibc type).
 
I doubt it really is a samba problem, more some problem that certain
heuristics that cause the libctype detection are somehow different (do you
happen to use -Xd on the samba drive?)

Anyway, a simple workaround would be to copy cprt0.o in the rtl dir (of ARM) to
cprt21.o

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling on Windows

Carsten Bager
> I doubt it really is a samba problem, more some problem that certain
> heuristics that cause the libctype detection are somehow different (do you
> happen to use -Xd on the samba drive?)

Yes and on the local drive. Every thing is the same (I copy everything to the
local drive).

>
> Anyway, a simple workaround would be to copy cprt0.o in the rtl dir (of ARM) to
> cprt21.o

That did the trick.
Thanks
Carsten


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling on Windows

Marco van de Voort
In our previous episode, Carsten Bager said:

> > I doubt it really is a samba problem, more some problem that certain
> > heuristics that cause the libctype detection are somehow different (do you
> > happen to use -Xd on the samba drive?)
>
> Yes and on the local drive. Every thing is the same (I copy everything to the
> local drive).
>
> >
> > Anyway, a simple workaround would be to copy cprt0.o in the rtl dir (of ARM) to
> > cprt21.o
>
> That did the trick.

Please file a bug anyway, with as much details as possible. It would be
really great if you could get the "strace" output of the compiler run in
both cases.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling on Windows

Vincent Snijders-2
Marco van de Voort schreef:
> Please file a bug anyway, with as much details as possible. It would be
> really great if you could get the "strace" output of the compiler run in
> both cases.

Yes, but where to download strace for win32?

Vincent
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling on Windows

Jonas Maebe-2

On 14 Oct 2008, at 15:56, Vincent Snijders wrote:

> Marco van de Voort schreef:
>> Please file a bug anyway, with as much details as possible. It  
>> would be
>> really great if you could get the "strace" output of the compiler  
>> run in
>> both cases.
>
> Yes, but where to download strace for win32?

More or less the same: download and run wine (http://winehq.org) with  
the environment variable "WINEDEBUG=+relay" set. I don't know whether  
the compiler works with wine, but I'd guess it does.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Cross compiling on Windows

Marco van de Voort
In reply to this post by Vincent Snijders-2
In our previous episode, Vincent Snijders said:
> > Please file a bug anyway, with as much details as possible. It would be
> > really great if you could get the "strace" output of the compiler run in
> > both cases.
>
> Yes, but where to download strace for win32?

Correct. Then settle for -va output for now, unless Jonas' suggestion works.

It's possible that 2.3.1 has some param for this, to override startup code,
but I can't look at that atm (at work).

This is one of the reasons why stuff in the linker backend should always be
overridable.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal