Sign in Join

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

Mailing lists / lazarus / 2008-06

Mac OS X : Cross compiling from i386 -> PowerPC

21 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

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

Dominique Louis

Hi gurus,
I'm trying to compile a Carbon application for PowerPC from an i386 Mac OS X box. The i386 code compiles fine, but when I try and target PowerPC I get an "Can't find unit Printer4Lazarus used by MyApp" error.

Any ideas?

Dominique.

Reply by email

Felipe Monteiro de Carvalho
to Dominique Louis
Dominique Louis wrote 6 lines
Hi gurus, I'm trying to compile a Carbon application for PowerPC from an i386 Mac OS X box. The i386 code compiles fine, but when I try and target PowerPC I get an "Can't find unit Printer4Lazarus used by MyApp" error. Any ideas?

Open the Printer4Lazarus package. Go to Compiler Options. Set target processor and build.

The same for LCL

Felipe Monteiro de Carvalho

Reply by email

Dominique Louis
to Felipe Monteiro de Carvalho

Hi Felipe,
I could not find the specific packages so I did a make all using the ppcppc compiler and when I do that I get the following compilation error Fatal: Can't find unit MacOSAll used by CarbonInt

Am I not supposed to be able to do a
make all LCL_PLATFORM=carbon
and target the ppcppc compiler?

Dominique.

Felipe Monteiro de Carvalho wrote 13 lines
On Sat, Jun 21, 2008 at 9:51 PM, Dominique Louis wrote: > Hi gurus, > I'm trying to compile a Carbon application for PowerPC from an i386 > Mac OS X box. The i386 code compiles fine, but when I try and target > PowerPC I get an "Can't find unit Printer4Lazarus used by MyApp" error. > > Any ideas? Open the Printer4Lazarus package. Go to Compiler Options. Set target processor and build. The same for LCL

Reply by email

Felipe Monteiro de Carvalho
to Dominique Louis
Dominique Louis wrote
I could not find the specific packages

lazarus/components/printers

Show quoted text 7 lines
so I did a make all using the ppcppc compiler and when I do that I get the following compilation error Fatal: Can't find unit MacOSAll used by CarbonInt Am I not supposed to be able to do a make all LCL_PLATFORM=carbon and target the ppcppc compiler?

make all won't compile the printers package AFAIK. And it will compile the Lazarus IDE. Doesn't look like a good idea.

make bigide will build both the IDE and printers.

anyway, if you really want to build in the command line I would try setting TARGET_CPU=powerpc

Felipe Monteiro de Carvalho

Reply by email

Vincent Snijders
to Dominique Louis: I could not find the specific packages so I did a make all using the ppcppc compiler and…
Dominique Louis wrote 9 lines
Hi Felipe, I could not find the specific packages so I did a make all using the ppcppc compiler and when I do that I get the following compilation error Fatal: Can't find unit MacOSAll used by CarbonInt Am I not supposed to be able to do a make all LCL_PLATFORM=carbon and target the ppcppc compiler?

You are supposed to use the latest release version of the fpc compiler or the SVN head of a development version.

Vincent

Reply by email

Dominique Louis
to Vincent Snijders
Vincent Snijders wrote
You are supposed to use the latest release version of the fpc compiler or the SVN head of a development version.

Hi Vincent,
All the code is from the SVN or does "SVN head of a development version" mean something else?

Dominique.

Reply by email

Felipe Monteiro de Carvalho
to Dominique Louis
Dominique Louis wrote
All the code is from the SVN or does "SVN head of a development version" mean something else?

The problem is that in Free Pascal 2.2.1 the FPCMacOSAll unit was renamed to MacOSAll.

2.2.1 is a development version, and thus changing over time. You got this error because you are using an old FPC 2.2.1

Felipe Monteiro de Carvalho

Reply by email

Dominique Louis
to Felipe Monteiro de Carvalho: On Sun, Jun 22, 2008 at 3:07 PM, Dominique Louis lazarus/components/printers make all…
Felipe Monteiro de Carvalho wrote 21 lines
On Sun, Jun 22, 2008 at 3:07 PM, Dominique Louis wrote: > I could not find the specific packages lazarus/components/printers > so I did a make all using the > ppcppc compiler and when I do that I get the following compilation error > Fatal: Can't find unit MacOSAll used by CarbonInt > > Am I not supposed to be able to do a > make all LCL_PLATFORM=carbon > and target the ppcppc compiler? make all won't compile the printers package AFAIK. And it will compile the Lazarus IDE. Doesn't look like a good idea. make bigide will build both the IDE and printers. anyway, if you really want to build in the command line I would try setting TARGET_CPU=powerpc

The IDE allows me to compile the Printers4Laz package for PowerPC, but does not do anything if I try to compile the LCL from within the ide.

From the command line using
sudo make bidgide LCL_PLATFORM=carbon CPU_TARGET=powerpc FPC=/usr/local/bin/ppcppc OPT="-k-framework -kcarbon -k-framework -kOpenGL"

produces the..
Fatal : Can't find unit MacOSAll used by CarbonInt error I mentioned before.

Dominique.

Reply by email

Vincent Snijders
to Dominique Louis: All the code is from the SVN or does "SVN head of a development version" mean something…
Dominique Louis wrote 7 lines
Vincent Snijders wrote: > You are supposed to use the latest release version of the fpc compiler > or the SVN head of a development version. Hi Vincent, All the code is from the SVN or does "SVN head of a development version" mean something else?

svn head means the current revision.

So if you are using a svn version of fpc, and you run into a lazarus problem, first update your fpc svn version and try that.

Vincent

Reply by email

Dominique Louis
to Felipe Monteiro de Carvalho: On Sun, Jun 22, 2008 at 4:34 PM, Dominique Louis The problem is that in Free Pascal 2.2.1…

Hi Felipe,
I downloaded the latest SVN and attemped to build a new PowerPC compiler using the 2.2.2r1 compiler. These are the commands I typed... sudo /usr/local/bin/fpcmake -w -Tall
sudo make clean CPU_TARGET=powerpc FPC=/usr/local/bin/fpc sudo make all CPU_TARGET=powerpc FPC=/usr/local/bin/fpc

After the 3rd command I get the following error... Fatal: Can't find unit fpintres used by pp

It doesn't matter if I target "powerpc" or "i386" I get the same error for both. Am I doing something wrong?

Thanks,

Dominique.

Felipe Monteiro de Carvalho wrote 10 lines
On Sun, Jun 22, 2008 at 4:34 PM, Dominique Louis wrote: > All the code is from the SVN or does "SVN head of a development > version" mean something else? The problem is that in Free Pascal 2.2.1 the FPCMacOSAll unit was renamed to MacOSAll. 2.2.1 is a development version, and thus changing over time. You got this error because you are using an old FPC 2.2.1

Reply by email

Adriaan van Os
to Dominique Louis
Dominique Louis wrote 12 lines
Hi Felipe, I downloaded the latest SVN and attemped to build a new PowerPC compiler using the 2.2.2r1 compiler. These are the commands I typed... sudo /usr/local/bin/fpcmake -w -Tall sudo make clean CPU_TARGET=powerpc FPC=/usr/local/bin/fpc sudo make all CPU_TARGET=powerpc FPC=/usr/local/bin/fpc After the 3rd command I get the following error... Fatal: Can't find unit fpintres used by pp It doesn't matter if I target "powerpc" or "i386" I get the same error for both. Am I doing something wrong?

You may find <http://www.microbizz.nl/fpc-scripts.zip> useful. I use them to build fpc and Lazarus from svn.

Regards,

Adriaan van Os

Reply by email

Dominique Louis
to Adriaan van Os

Hi Adriaan, I have used your scripts before, but it looks like this version has been updated. I'll give them a try and see what happens.

Adriaan van Os wrote 20 lines
Dominique Louis wrote: > Hi Felipe, > I downloaded the latest SVN and attemped to build a new PowerPC > compiler using the 2.2.2r1 compiler. These are the commands I typed... > sudo /usr/local/bin/fpcmake -w -Tall > sudo make clean CPU_TARGET=powerpc FPC=/usr/local/bin/fpc > sudo make all CPU_TARGET=powerpc FPC=/usr/local/bin/fpc > > After the 3rd command I get the following error... > Fatal: Can't find unit fpintres used by pp > > It doesn't matter if I target "powerpc" or "i386" I get the same error > for both. Am I doing something wrong? You may find <http://www.microbizz.nl/fpc-scripts.zip> useful. I use them to build fpc and Lazarus from svn. Regards, Adriaan van Os

Reply by email

Dominique Louis
to Felipe Monteiro de Carvalho: On Sun, Jun 22, 2008 at 3:07 PM, Dominique Louis lazarus/components/printers make all…
Felipe Monteiro de Carvalho wrote 7 lines
make all won't compile the printers package AFAIK. And it will compile the Lazarus IDE. Doesn't look like a good idea. make bigide will build both the IDE and printers. anyway, if you really want to build in the command line I would try setting TARGET_CPU=powerpc

Hi Felipe,
Afer using Adriaan van Os' excellent scripts I now have a ppc386 and a ppcppc that were both built today v2.3.1. The lcl compiles under both i386 and powerpc, but I'm still having problems with printer4lazarus package.
Using bigide and TARGET_CPU=powerpc compiles, but does not seem to correctly compile the printer4lazarus package.

If I compile my project via the IDE, the first time it complains that it can't fine Printer4Lazarus. I ignore the errors and it eventually compiles and appears to be building Printer4Lazarus in the back background. If I now try to build my project as a "powerpc" target, printerdlgs.pp is immediately displayed and I get the error message... Fatal: Can't find unit LResources used by PrintersDlgs.

From looking at the compiler options command line parameters screen it seems to be looking for it in
-Fu../../../../../.lazarus/lib/Printer4Lazarus/powerpc-darwin/

It this correct?

This seems to be my last hurdle in creating a Universal binary for this project.

Dominique

Reply by email

Felipe Monteiro de Carvalho
to Dominique Louis
Dominique Louis wrote
From looking at the compiler options command line parameters screen it seems to be looking for it in -Fu../../../../../.lazarus/lib/Printer4Lazarus/powerpc-darwin/

No. It should probably be something like:
lazarus/components/Printer4Lazarus/lib/powerpc-darwin

Try compiling the package yourself in the IDE, and set the architecture in the compiler options.

And then check where are the .PPU files going to.

Felipe Monteiro de Carvalho

Reply by email

Dominique Louis
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 13 lines
On Wed, Jun 25, 2008 at 7:50 PM, Dominique Louis wrote: > From looking at the compiler options command line parameters screen it > seems to be looking for it in > -Fu../../../../../.lazarus/lib/Printer4Lazarus/powerpc-darwin/ No. It should probably be something like: lazarus/components/Printer4Lazarus/lib/powerpc-darwin Try compiling the package yourself in the IDE, and set the architecture in the compiler options. And then check where are the .PPU files going to.

Compiling the package itself, from within the IDE, while targetting powerpc, throws up the same error as before.
While targetting i386 seems to compile fine.

Dominique.

Reply by email

Felipe Monteiro de Carvalho
to Dominique Louis
Dominique Louis wrote
Compiling the package itself, from within the IDE, while targetting powerpc, throws up the same error as before. While targetting i386 seems to compile fine.

Which error? LResources?

If yes, try building only LCL for powerpc with the Configure Build Lazarus dialog.

Also, did you change your compiler in the Environment Options dialog?

Felipe Monteiro de Carvalho

Reply by email

Mattias Gaertner
to Felipe Monteiro de Carvalho: On Wed, Jun 25, 2008 at 7:50 PM, Dominique Louis No. It should probably be something like:
Show quoted text 5 lines
On Wed, Jun 25, 2008 at 7:50 PM, Dominique Louis wrote: > From looking at the compiler options command line parameters > screen it seems to be looking for it in > -Fu../../../../../.lazarus/lib/Printer4Lazarus/powerpc-darwin/

Note:
This is the fallback path of the IDE.
The normal output path of the package is given below by Felipe. If this directory is not writable, the IDE compiles the package to the above.

Show quoted text 7 lines
No. It should probably be something like: lazarus/components/Printer4Lazarus/lib/powerpc-darwin Try compiling the package yourself in the IDE, and set the architecture in the compiler options. And then check where are the .PPU files going to.

Mattias

Reply by email

Dominique Louis
to Felipe Monteiro de Carvalho: On Wed, Jun 25, 2008 at 8:29 PM, Dominique Louis Which error? LResources? If yes, try…
Felipe Monteiro de Carvalho wrote 7 lines
On Wed, Jun 25, 2008 at 8:29 PM, Dominique Louis wrote: > Compiling the package itself, from within the IDE, while targetting > powerpc, throws up the same error as before. > While targetting i386 seems to compile fine. Which error? LResources?

Yes the LResources error.

If yes, try building only LCL for powerpc with the Configure Build Lazarus dialog. Also, did you change your compiler in the Environment Options dialog?

Ah I did not realise I had to change it here as well as I thought that if I change the target it would pick up ppcppc automagically.

No I get a different error when compiling with the Environment Options changes you mentioned.

"Fatal: Can't find unit LazarusPackageIntf used by Printer4Lazarus"

How does one get the Spotlight tool to search all directories. For all of it's usability, I could not get spotlight to do this.

Is there no option to just compile everything for a particular target? I tried "make all" and "make bigide", maybe we need a "make everything"?

Dominique.

Reply by email

Dominique Louis
to Dominique Louis
Dominique Louis wrote 28 lines
Felipe Monteiro de Carvalho wrote: > On Wed, Jun 25, 2008 at 8:29 PM, Dominique Louis > wrote: >> Compiling the package itself, from within the IDE, while targetting >> powerpc, throws up the same error as before. >> While targetting i386 seems to compile fine. > Which error? LResources? Yes the LResources error. > If yes, try building only LCL for powerpc with the Configure Build > Lazarus dialog. > > Also, did you change your compiler in the Environment Options dialog? Ah I did not realise I had to change it here as well as I thought that if I change the target it would pick up ppcppc automagically. No I get a different error when compiling with the Environment Options changes you mentioned. "Fatal: Can't find unit LazarusPackageIntf used by Printer4Lazarus" How does one get the Spotlight tool to search all directories. For all of it's usability, I could not get spotlight to do this. Is there no option to just compile everything for a particular target? I tried "make all" and "make bigide", maybe we need a "make everything"?

I forgot to mention that that error occurs in CarbonPrinting.pas.

Dominique.

Reply by email

Adriaan van Os
to Dominique Louis
Dominique Louis wrote
> How does one get the Spotlight tool to search all directories. For all > of it's usability, I could not get spotlight to do this.

The user interface to do this is quite bad. First enter something in a Search box. Then click on the Plus button in the results window. Then select "System files" in the Kind popup menu. And "Include" in the other popup menu. Of course, Apple refuses to let you set this as default, so that the next time the operation is less cumbersome (Mac OS X is only for dummies).

Regards,

Adriaan van Os

Reply by email

Dominique Louis
to Dominique Louis: I'm trying to compile a Carbon application for PowerPC from an i386 Mac OS X box. The…
Dominique Louis wrote 6 lines
Hi gurus, I'm trying to compile a Carbon application for PowerPC from an i386 Mac OS X box. The i386 code compiles fine, but when I try and target PowerPC I get an "Can't find unit Printer4Lazarus used by MyApp" error. Any ideas?

I don't know what you guys did, but downloading the latest SVN, 15600, allows me to cross-compile from on both i386 and PowerPC. But as mentioned in another post, there is now a range check error appearing in the IDE and when changing projects and reading Glyph.data.

Reply by email