Sign in Join

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

Mailing lists / fpc-pascal / 2008-10

Cross compiling on Windows

7 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

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

Reply by email

Marco van de Voort
to Carsten Bager

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

Reply by email

Carsten Bager
to Marco van de Voort
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

Reply by email

Marco van de Voort
to Carsten Bager

In our previous episode, Carsten Bager said:

Show quoted text 12 lines
> 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.

Reply by email

Vincent Snijders
to Marco van de Voort
Marco van de Voort wrote
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

Reply by email

Jonas Maebe
to Vincent Snijders
Vincent Snijders wrote 8 lines
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

Reply by email

Marco van de Voort
to Vincent Snijders: Yes, but where to download strace for win32? Vincent

In our previous episode, Vincent Snijders said:

Show quoted text 5 lines
> 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.

Reply by email