<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 19/10/12 23:27, Marco van de Voort
wrote:<br>
</div>
<blockquote cite="mid:20121019202704.1F2043F48E@toad.stack.nl"
type="cite">
<pre wrap="">In our previous episode, patspiper said:
</pre>
<blockquote type="cite">
<pre wrap="">I am able to compile FPC 2.6.1 (rev 22778) under Ubuntu 11.04 32 bits.
However cross compiling to win32 fails with the error: /usr/bin/ld:
cannot find -lgcc
I was able to cross compile successfully about 2 weeks ago.
The relevant part of the log:
make -C fastcgi smart
make[3]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fastcgi'
/home/me/Programs/fpc/fpsrc/exported/2.6.1/compiler/ppc fpmake.pp -n
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-linux
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hash
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/paszlib
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fcl-process
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fpmkunit/units_bs/i386-linux
-Xd -Xt -gl
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-linux/cthreads.o:
In function `LOADPTHREADS':
/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/linux/pthread.inc:261:
warning: Using 'dlopen' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/usr/bin/ld: cannot find -lgcc
fpmake.pp(34,1) Error: Error while linking
fpmake.pp(34,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[3]: *** [fpmake] Error 1
make[3]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fastcgi'
make[2]: *** [fastcgi_smart] Error 2
make[2]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages'
make[1]: *** [packages_smart] Error 2
make[1]: Leaving directory `/home/me/Programs/fpc/fpsrc/exported/2.6.1'
make: *** [build-stamp.i386-win32] Error 2
What could have gone wrong?
</pre>
</blockquote>
<pre wrap="">
There were changes merged. I wonder however how a crosscompile to win32 can
reach "fastcgi" still being target linux.
Could you post your build cmdline please?</pre>
</blockquote>
The build command line (part of a script) is:<br>
${MAKE} clean all LIBDIR=${BASELIBDIR}/${MCPU}-${MOS}
CROSSBINDIR=${CROSSTOOLSROOT}bin OS_TARGET=${OS} CPU_TARGET=${CPU}
BINUTILSPREFIX=${MCPU}-${MOS}- OPT="-Xd -Xt ${EXTRAOPT}"<br>
<br>
<br>
Upon closer inspection of the log (relevant portions in bold):<br>
- Some make code is seeping into the command line<br>
- fastcgi is being compiled using ppc and not ppcross386.<br>
<br>
I can attach the whole log if needed.<br>
<br>
<snip><br>
make -C fcl-web distclean<br>
make[2]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fcl-web'<br>
{ ./fpmake distclean --localunitdir=../.. --globalunitdir=..
--os=win32 --cpu=i386 -o -Twin32 -o -XPi686-cygwin- -o -Xr -o
-Fl/home/me/Programs/fpc/crossbinutils/lib//i686-cygwin -o -Ur -o
-Xs -o -O2 -o -n -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hash -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/paszlib -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fcl-process
-o -Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fpmkunit
-o -FD/home/me/Programs/fpc/crossbinutils/bin -o -FE. -o
-FUunits/i386-win32 -o -Xd -o -Xt -o -gl -o -di386 -o -dRELEASE
--compiler=/home/me/Programs/fpc/2.6.1/lib/fpc/2.6.1/ppc386; <b>if
[ $? != "0" ]; then { echo Something wrong with fpmake exectable.
Remove the executable and call make recursively to recover</b><b>.;
/bin/rm -f ./fpmake; make fpc_cleanall; }; fi; }</b><br>
Clean of package fcl-web completed<br>
/bin/rm -f ./fpmake<br>
make[2]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fcl-web'<br>
make -C fastcgi distclean<br>
make[2]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fastcgi'<br>
{ ./fpmake distclean --localunitdir=../.. --globalunitdir=..
--os=win32 --cpu=i386 -o -Twin32 -o -XPi686-cygwin- -o -Xr -o
-Fl/home/me/Programs/fpc/crossbinutils/lib//i686-cygwin -o -Ur -o
-Xs -o -O2 -o -n -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hash -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/paszlib -o
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fcl-process
-o -Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fpmkunit
-o -FD/home/me/Programs/fpc/crossbinutils/bin -o -FE. -o
-FUunits/i386-win32 -o -Xd -o -Xt -o -gl -o -di386 -o -dRELEASE
--compiler=/home/me/Programs/fpc/2.6.1/lib/fpc/2.6.1/ppc386; <b>if
[ $? != "0" ]; then { echo Something wrong with fpmake exectable.
Remove the executable and call make recursively to recover.;
/bin/rm -f ./fpmake; make fpc_cleanall; }; fi; }</b><br>
Clean of package fastcgi completed<br>
<snip><br>
<br>
<snip><br>
make -C hermes smart<br>
make[3]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hermes'<br>
make all LINKSMART=1 CREATESMART=1<br>
make[4]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hermes'<br>
/bin/mkdir -p units/i386-win32<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/compiler/ppcross386
-Twin32 -XPi686-cygwin- -Xr
-Fl/home/me/Programs/fpc/crossbinutils/lib//i686-cygwin -XX -CX -Ur
-Xs -O2 -n -dI386_ASSEMBLER
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-win32
-Fisrc -FD/home/me/Programs/fpc/crossbinutils/bin -FE.
-FUunits/i386-win32 -Xd -Xt -gl -di386 -dRELEASE src/hermes.pp<br>
make[4]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hermes'<br>
make[3]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hermes'<br>
make -C httpd22 smart<br>
make[3]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/httpd22'<br>
make all LINKSMART=1 CREATESMART=1<br>
make[4]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/httpd22'<br>
/bin/mkdir -p units/i386-win32<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/compiler/ppcross386
-Twin32 -XPi686-cygwin- -Xr
-Fl/home/me/Programs/fpc/crossbinutils/lib//i686-cygwin -XX -CX -Ur
-Xs -O2 -n
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-win32
-Fisrc -Fisrc/apr -Fisrc/apriconv -Fisrc/aprutil
-FD/home/me/Programs/fpc/crossbinutils/bin -FE. -FUunits/i386-win32
-Flinclude -Fl/etc/ld.so.conf.d/*.conf -Xd -Xt -gl -di386 -dRELEASE
src/apr/apr.pas<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/compiler/ppcross386
-Twin32 -XPi686-cygwin- -Xr
-Fl/home/me/Programs/fpc/crossbinutils/lib//i686-cygwin -XX -CX -Ur
-Xs -O2 -n
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-win32
-Fisrc -Fisrc/apr -Fisrc/apriconv -Fisrc/aprutil
-FD/home/me/Programs/fpc/crossbinutils/bin -FE. -FUunits/i386-win32
-Flinclude -Fl/etc/ld.so.conf.d/*.conf -Xd -Xt -gl -di386 -dRELEASE
src/apriconv/apriconv.pas<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/compiler/<b>ppcross386</b>
-Twin32 -XPi686-cygwin- -Xr
-Fl/home/me/Programs/fpc/crossbinutils/lib//i686-cygwin -XX -CX -Ur
-Xs -O2 -n
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-win32
-Fisrc -Fisrc/apr -Fisrc/apriconv -Fisrc/aprutil
-FD/home/me/Programs/fpc/crossbinutils/bin -FE. -FUunits/i386-win32
-Flinclude -Fl/etc/ld.so.conf.d/*.conf -Xd -Xt -gl -di386 -dRELEASE
src/aprutil/aprutil.pas<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/compiler/ppcross386
-Twin32 -XPi686-cygwin- -Xr
-Fl/home/me/Programs/fpc/crossbinutils/lib//i686-cygwin -XX -CX -Ur
-Xs -O2 -n
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-win32
-Fisrc -Fisrc/apr -Fisrc/apriconv -Fisrc/aprutil
-FD/home/me/Programs/fpc/crossbinutils/bin -FE. -FUunits/i386-win32
-Flinclude -Fl/etc/ld.so.conf.d/*.conf -Xd -Xt -gl -di386 -dRELEASE
src/httpd.pas<br>
make[4]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/httpd22'<br>
make[3]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/httpd22'<br>
make -C fastcgi smart<br>
make[3]: Entering directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fastcgi'<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/compiler/<b>ppc</b>
fpmake.pp -n
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-linux
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/hash
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/paszlib
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fcl-process
-Fu/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fpmkunit/units_bs/<b>i386-linux</b>
-Xd -Xt -gl<br>
/usr/bin/ld: warning: link.res contains output sections; did you
forget -T?<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/units/i386-linux/cthreads.o:
In function `LOADPTHREADS':<br>
/home/me/Programs/fpc/fpsrc/exported/2.6.1/rtl/linux/pthread.inc:261:
warning: Using 'dlopen' in statically linked applications requires
at runtime the shared libraries from the glibc version used for
linking<br>
/usr/bin/ld: cannot find -lgcc<br>
fpmake.pp(34,1) Error: Error while linking<br>
fpmake.pp(34,1) Fatal: There were 1 errors compiling module,
stopping<br>
Fatal: Compilation aborted<br>
make[3]: *** [fpmake] Error 1<br>
make[3]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages/fastcgi'<br>
make[2]: *** [fastcgi_smart] Error 2<br>
make[2]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1/packages'<br>
make[1]: *** [packages_smart] Error 2<br>
make[1]: Leaving directory
`/home/me/Programs/fpc/fpsrc/exported/2.6.1'<br>
make: *** [build-stamp.i386-win32] Error 2<br>
<br>
Stephano<br>
</body>
</html>