Sign in Join

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

Mailing lists / fpc-devel / 2013-05

Problem with fpcmake when doing crossbuild

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Michael Ring

I was having troubles today installing ppcrossarm from trunk, I have a workarround for the problem but I question myself how to really fix the problem:

SUBARCH=armv7m
make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-"
BINUTILSPREFIX=arm-none-eabi-

works fine. But then installation goes wrong because fpcmake was not build, but it is needed for installation (Question is why it is necessary to invoke fpcmake at all;-)).

I can fix this by adding:

make -C utils/fpcm bootstrap 'FPC=/Users/ring/devel/fpc/compiler/ppc' OS_TARGET=darwin CPU_TARGET=i386

to my buildscript, but my guess is that this should better be added to the buildbase rule, there's an entry for that in the build rule

*ifdef CROSSCOMPILE
$(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)
endif*

I have added this rule to my makefile, seems to work. I have no idea if I break anything by adding this to the makefile

fpcmake is now created in directory utils/fpcm/fpcmake

Now installation nearly works, last problem is that FPCMAKE path gets defined wrong as:

make -C embedded all
/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p -Tarm-embedded Makefile.fpc
make[2]: /Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: No such file or directory

I can fix this by defining FPCMAKENEW to the real position of fpcmake after the build:

sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-"
BINUTILSPREFIX=arm-none-eabi-
FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmake

At this point I ask myself if this error exists because I did something wrong building fpcmake.

Any ideas?

TnX,

Michael

Reply by email

Michael Ring
to Michael Ring

In case my guesswork was right this would be the fix to Makefile.fpc:

Index: Makefile.fpc
=================================================================== --- Makefile.fpc (revision 24625)
+++ Makefile.fpc (working copy)
@@ -169,8 +169,12 @@

# Always use newly created fpcmake
ifndef FPCMAKENEW
+ifdef CROSSINSTALL
+FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(SRCEXEEXT) +else
FPCMAKENEW=$(BASEDIR)/utils/fpcm/bin/$(SOURCESUFFIX)/fpcmake$(SRCEXEEXT) endif
+endif

# Build/install options
CLEANOPTS=FPC=$(PPNEW)
@@ -316,6 +320,11 @@
base.$(BUILDSTAMP):
# create new compiler
$(MAKE) compiler_cycle RELEASE=1
+ifdef CROSSCOMPILE
+# Buld a new native fpcmake when cross-compiling. +# Fresh native compiler and RTL are ready at this stage.
+ $(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS) +endif
# clean
$(MAKE) rtl_clean $(CLEANOPTS)
# build everything

Michael Ring wrote 68 lines
I was having troubles today installing ppcrossarm from trunk, I have a workarround for the problem but I question myself how to really fix the problem: SUBARCH=armv7m make clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-" BINUTILSPREFIX=arm-none-eabi- works fine. But then installation goes wrong because fpcmake was not build, but it is needed for installation (Question is why it is necessary to invoke fpcmake at all;-)). I can fix this by adding: make -C utils/fpcm bootstrap 'FPC=/Users/ring/devel/fpc/compiler/ppc' OS_TARGET=darwin CPU_TARGET=i386 to my buildscript, but my guess is that this should better be added to the buildbase rule, there's an entry for that in the build rule *ifdef CROSSCOMPILE $(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS) endif* I have added this rule to my makefile, seems to work. I have no idea if I break anything by adding this to the makefile fpcmake is now created in directory utils/fpcm/fpcmake Now installation nearly works, last problem is that FPCMAKE path gets defined wrong as: make -C embedded all /Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p -Tarm-embedded Makefile.fpc make[2]: /Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: No such file or directory I can fix this by defining FPCMAKENEW to the real position of fpcmake after the build: sudo make installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-" BINUTILSPREFIX=arm-none-eabi- FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmake At this point I ask myself if this error exists because I did something wrong building fpcmake. Any ideas? TnX, Michael _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Yury Sidorov
to Michael Ring

Fixed in r24626. Your guesswork is right :)

Yury.

Earlier message 21 lines
----- Original Message ----- From: Michael Ring To: Sent: Tuesday, May 28, 2013 1:24 PM Subject: Re: [fpc-devel] Problem with fpcmake when doing crossbuild In case my guesswork was right this would be the fix to Makefile.fpc: Index: Makefile.fpc =================================================================== --- Makefile.fpc (revision 24625) +++ Makefile.fpc (working copy) @@ -169,8 +169,12 @@ # Always use newly created fpcmake ifndef FPCMAKENEW +ifdef CROSSINSTALL +FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(SRCEXEEXT) +else FPCMAKENEW=$(BASEDIR)/utils/fpcm/bin/$(SOURCESUFFIX)/fpcmake$(SRCEXEEXT) endif+endif # Build/install options CLEANOPTS=FPC=$(PPNEW)@@ -316,6 +320,11 @@ base.$(BUILDSTAMP): # create new compiler $(MAKE) compiler_cycle RELEASE=1+ifdef CROSSCOMPILE+# Buld a new native fpcmake when cross-compiling.+# Fresh native compiler and RTL are ready at this stage.+ $(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)+endif # clean $(MAKE) rtl_clean $(CLEANOPTS) # build everythingAm 28.05.13 10:59, schrieb Michael Ring:I was having troubles today installing ppcrossarm from trunk, I have aworkarround for the problem but I question myself how to really fixthe problem:SUBARCH=armv7mmake clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=armSUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-"BINUTILSPREFIX=arm-none-eabi-works fine. But then installation goes wrong because fpcmake was notbuild, but it is needed for installation (Question is why it isnecessary to invoke fpcmake at all;-)).I can fix this by adding:make -C utils/fpcm bootstrap 'FPC=/Users/ring/devel/fpc/compiler/ppc'OS_TARGET=darwin CPU_TARGET=i386to my buildscript, but my guess is that this should better be added tothe buildbase rule, there's an entry for that in the build ruleifdef CROSSCOMPILE $(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)endifI have added this rule to my makefile, seems to work. I have no ideaif I break anything by adding this to the makefilefpcmake is now created in directory utils/fpcm/fpcmakeNow installation nearly works, last problem is that FPCMAKE path getsdefined wrong as:make -C embedded all/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p -Tarm-embedded Makefile.fpcmake[2]: /Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: Nosuch file or directoryI can fix this by defining FPCMAKENEW to the real position of fpcmakeafter the build:sudo make installbase CROSSINSTALL=1 OS_TARGET=embeddedCPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-"BINUTILSPREFIX=arm-none-eabi-FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmakeAt this point I ask myself if this error exists because I didsomething wrong building fpcmake.Any ideas?TnX,Michael_______________________________________________fpc-devel maillist - maillist -

Reply by email

Michael Ring
to Yury Sidorov

Thank you!

Michael

Yury Sidorov wrote 67 lines
Fixed in r24626. Your guesswork is right :) Yury. ----- Original Message ----- From: Michael Ring To: Sent: Tuesday, May 28, 2013 1:24 PM Subject: Re: [fpc-devel] Problem with fpcmake when doing crossbuild In case my guesswork was right this would be the fix to Makefile.fpc: Index: Makefile.fpc =================================================================== --- Makefile.fpc (revision 24625) +++ Makefile.fpc (working copy) @@ -169,8 +169,12 @@ # Always use newly created fpcmake ifndef FPCMAKENEW +ifdef CROSSINSTALL +FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(SRCEXEEXT) +else FPCMAKENEW=$(BASEDIR)/utils/fpcm/bin/$(SOURCESUFFIX)/fpcmake$(SRCEXEEXT) endif+endif # Build/install options CLEANOPTS=FPC=$(PPNEW)@@ -316,6 +320,11 @@ base.$(BUILDSTAMP): # create new compiler $(MAKE) compiler_cycle RELEASE=1+ifdef CROSSCOMPILE+# Buld a new native fpcmake when cross-compiling.+# Fresh native compiler and RTL are ready at this stage.+ $(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)+endif # clean $(MAKE) rtl_clean $(CLEANOPTS) # build everythingAm 28.05.13 10:59, schrieb Michael Ring:I was having troubles today installing ppcrossarm from trunk, I have aworkarround for the problem but I question myself how to really fixthe problem:SUBARCH=armv7mmake clean buildbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=armSUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-"BINUTILSPREFIX=arm-none-eabi-works fine. But then installation goes wrong because fpcmake was notbuild, but it is needed for installation (Question is why it isnecessary to invoke fpcmake at all;-)).I can fix this by adding:make -C utils/fpcm bootstrap 'FPC=/Users/ring/devel/fpc/compiler/ppc'OS_TARGET=darwin CPU_TARGET=i386to my buildscript, but my guess is that this should better be added tothe buildbase rule, there's an entry for that in the build ruleifdef CROSSCOMPILE $(MAKE) -C utils/fpcm bootstrap $(BUILDOPTS)endifI have added this rule to my makefile, seems to work. I have no ideaif I break anything by adding this to the makefilefpcmake is now created in directory utils/fpcm/fpcmakeNow installation nearly works, last problem is that FPCMAKE path getsdefined wrong as:make -C embedded all/Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake -p -Tarm-embedded Makefile.fpcmake[2]: /Users/ring/devel/fpc/utils/fpcm/bin/i386-darwin/fpcmake: Nosuch file or directoryI can fix this by defining FPCMAKENEW to the real position of fpcmakeafter the build:sudo make installbase CROSSINSTALL=1 OS_TARGET=embeddedCPU_TARGET=arm SUBARCH=$SUBARCH CROSSOPT="-godwarfsets -gw2 -O-"BINUTILSPREFIX=arm-none-eabi-FPCMAKENEW=/Users/ring/devel/fpc/utils/fpcm/fpcmakeAt this point I ask myself if this error exists because I didsomething wrong building fpcmake.Any ideas?TnX,Michael_______________________________________________fpc-devel maillist - maillist - _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email