# crosscompiling from win32 to i386-linux and libc linking

6 messages
Open this post in threaded view
|

## crosscompiling from win32 to i386-linux and libc linking

Open this post in threaded view
|

## Re: crosscompiling from win32 to i386-linux and libc linking

 On Fri, Jul 28, 2006 at 11:54:07AM +0200, Dominique Leducq wrote: > > I have linking problems when cross-compiling from win32 to i386-linux > and linking with libc (dynamically). > I use FPC 2.0.2, the libs are from a Debian Sarge (glibc-2.3.6, I tried > with glibc 2.3.2 with same results), > cross ld is : > ld.exe -V > GNU ld version 2.15 >   Supported emulations: >    elf_i386 >    i386linux I don't have time to debug this fully, but have a look at my notes when I was trying this: http://www.stack.nl/~marcov/crossnotes.txt Note that I set it the dynlinker explicitely in point 11 _______________________________________________ fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Open this post in threaded view
|

## Re: crosscompiling from win32 to i386-linux and libc linking

 Marco van de Voort a écrit : > On Fri, Jul 28, 2006 at 11:54:07AM +0200, Dominique Leducq wrote: >> I have linking problems when cross-compiling from win32 to i386-linux >> and linking with libc (dynamically). >> I use FPC 2.0.2, the libs are from a Debian Sarge (glibc-2.3.6, I tried >> with glibc 2.3.2 with same results), >> cross ld is : >> ld.exe -V >> GNU ld version 2.15 >>   Supported emulations: >>    elf_i386 >>    i386linux > > I don't have time to debug this fully, but have a look at my notes when I > was trying this: > > http://www.stack.nl/~marcov/crossnotes.txt> >  Note that > I set it the dynlinker explicitely in point 11 > > > _______________________________________________ > fpc-pascal maillist  -  [hidden email] > http://lists.freepascal.org/mailman/listinfo/fpc-pascalThank you for your prompt answer. I tried to set the dynamic linker whith the -FL option too, but it didn't help. Anyway, it seems to be a runtime hint, as you give a target   path as an argument, and I don't get the chance to reach this step, as I can't produce any executable. I read your doc, and didn't see anything else that could improve the matters. Dominique. _______________________________________________ fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Open this post in threaded view
|

## Re: crosscompiling from win32 to i386-linux and libc linking

 > > > > _______________________________________________ > > fpc-pascal maillist  -  [hidden email] > > http://lists.freepascal.org/mailman/listinfo/fpc-pascal> > Thank you for your prompt answer. > I tried to set the dynamic linker whith the -FL option too, but it > didn't help. Anyway, it seems to be a runtime hint, as you give a target >   path as an argument, and I don't get the chance to reach this step, as > I can't produce any executable. > > I read your doc, and didn't see anything else that could improve the > matters. Also note step 8 it is very treacherous. The 10th step can nowdays (all versions after medium july) be done by passing  -XLAc=c,dl and -XLAgtk=gmodule,gtk  or so. Same for step 12. Note that in the 10th step I do three things, IIRC - The -FL sets the place where the loader on the target should look for the dnyamic linker. - The -Xr causes it to also search /usr/lib for anything it needs. - The -Fl points to the directory where I stored the copies of the libs. Note that I sometimes renamed the copied libs a bit to match the names it searches. Also note this remark: ---- Making mistakes with renaming is not that bad, there will be chances to fix it. Make sure all crt* and a file "libc.so" are available, otherwise generating link.res will go wrong. (Yes, Peter, that was my fault :-) ---- In case you added parameter by parameter, clean, and try to build again with all relevant parameters. The compiler on Linux makes some decisions based on the existance of some of these files. _______________________________________________ fpc-pascal maillist  -  [hidden email] http://lists.freepascal.org/mailman/listinfo/fpc-pascal