Recent

Author Topic: Updated to 1.2.4 win32 cross compiler still using 2.6.2  (Read 6862 times)

snorkel

  • Hero Member
  • *****
  • Posts: 817
Updated to 1.2.4 win32 cross compiler still using 2.6.2
« on: June 19, 2014, 10:17:41 pm »
I recently updated to 1.2.4 and also rebuilt the win32 cross compiler but when I build a win32 app it still showing it's built by 2.6.2 in the version info.  I can't find anywhere where it's point to the old 2.6.2 directory and when build it for linux the version info shows 2.6.4

Any ideas?
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #1 on: June 19, 2014, 11:18:15 pm »
well, I removed the 2.6.2 FPC directories and now I can't cross build anything.

I get this now:

fcllaz.pas(0,0) Fatal: Can not find unit system used by fcllaz of package FCL.

I am going by the guide here:

http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux#Newer_FPCs_-_2.1.1_and_newer

it says for newer versions all I have to do is:

 make all OS_TARGET=win32 CPU_TARGET=i386

and

$ su -c "make crossinstall OS_TARGET=win32 CPU_TARGET=i386"

and then I added this to the fpc.cfg in /etc

-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/*

This how I got it working for 2.6.2 and the 2.6.4 cross compiler built and installed ok with no errors.

So what am I missing?

I think a new wiki just for the newer versions of Lazarus and FPC is needed for win32  cross compiling the current one is kind of confusing with the new and old way mixed together.






***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #2 on: June 19, 2014, 11:52:02 pm »
Are all your path settings in lazarus options ok? That's all I can really think of..

I think a new wiki just for the newer versions of Lazarus and FPC is needed for win32  cross compiling the current one is kind of confusing with the new and old way mixed together.
Very good idea. Please feel free to move the old stuff to a separate page...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #3 on: June 20, 2014, 05:06:14 am »
Are all your path settings in lazarus options ok? That's all I can really think of..

I think a new wiki just for the newer versions of Lazarus and FPC is needed for win32  cross compiling the current one is kind of confusing with the new and old way mixed together.
Very good idea. Please feel free to move the old stuff to a separate page...

Be happy to do that once I get it working again.
Non cross compiling works fine, so the paths must be right and the version info shows it's 2.6.4.
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #4 on: June 20, 2014, 05:12:44 pm »
Well, I built the win64 cross compiler and that works fine from the IDE.
I am rebuilding the win32 one again.

Not sure what is going on with the win32 cross compiler, but somewhere it's still pointing to the non existant 2.6.2 FPC.

Note: prior to the update to Laz 1.2.4 I did not have the win64 cross compiler installed.

« Last Edit: June 20, 2014, 05:41:34 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #5 on: June 20, 2014, 05:55:53 pm »
Hmmm... does your fpc.cfg contain paths pointing to the old FPC install?
Also, IIRC a systemwide /etc/fpc.cfg can mess with settings in an fpc.cfg in your user directory. It's documented in the FPC manual section about fpc.cfg but that's definitely not my favourite late night reading...
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #6 on: June 20, 2014, 07:24:42 pm »
This is getting frustrating...

I uninstalled everything and used the find command to make sure no fpc files where left.  I also made sure no other fpc.cfg files where left anywhere.

Then I rebuilt the cross compilers win32 and win64 and the system.ppu for both are here:

/usr/local/lib/fpc/2.6.4/units/x86_64-win64/rtl/system.ppu
/usr/local/lib/fpc/2.6.4/units/i386-win32/rtl/system.ppu

When I build for win64 it works fine no problem.
When I build for win32 it can't find the system.ppu

now get this if I create this path:
/usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/ and put the system.ppu in it it can then find it but craps out because it can't find any of the other required files.

Does anyone have any idea what may be holding on to the 2.6.2 path?
I also check the env vars and no reference to 2.6.2.

What the heck is going on?
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #7 on: June 20, 2014, 07:26:21 pm »
I did find / -name fpc.cfg

and the only one that came back was in /etc
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #8 on: June 20, 2014, 10:18:18 pm »
well, by doing a dirty hack I have it cross compiling win32, I had to do this:


cp /usr/local/lib/fpc/2.6.4 /usr/local/lib/fpc/2.6.2 -R

by copying the entire structure and contents from the 2.6.4 to a 2.6.2 dir
in /usr/local/lib/fpc

it now magically works. 

I have no freaking idea where it's storing the ref to 2.6.2 since I completely uninstalled all the .debs and then used find to locate any left over FPC files.  I even deleted the .lazarus folder in my home dir.

I also used the find function to locate and delete all references to fpc.cfg.

***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9864
  • Debugger - SynEdit - and more
    • wiki
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #9 on: June 20, 2014, 10:41:41 pm »
well, you should first trace which ppc*** is used.

That is you see the IDE call fpc -... and fpc uses some ppc for that.

There must be some way to specify a flag that it will tell you the ppcxxx used. Then, you can run this, and check which version it has.

You can also use  -va
This will display ALL  files accessed, including which fpc.cfg

It will be a huge amount of output, so redirect to a file.
In Lazarus, you must do "Copy all shown and hidden msgs"

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #10 on: June 20, 2014, 10:58:51 pm »
ok will try that.
My hack does not fully work as it's picking up the FPC version from somewhere as 2.6.2 so stuff like this is failing:

                {$IF FPC_FULLVERSION>20602}
                PDev.Device := PChar(TmpDevModeA^.dmDeviceName);
                {$ELSE}
                PDev.Device := PChar(PByte(TmpDevModeA^.dmDeviceName));
                {$ENDIF} 
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #11 on: June 20, 2014, 11:03:22 pm »
With showing everthing I see stuff like this in the messages:

PPU Loading /usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/system.ppu
PPU Loading /usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/objpas.ppu
PPU Loading /usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/classes.ppu

I just can't figure this out, I uninstalled everything I could find yet it still thinking the cross compiler is 2.6.2

I am thinking the FPC version lazarus is using is messed up somewhere.

with my hack 2.6.2 dir removed the IDE reports this:

project1.lpr(0,0) Fatal: Can not find system used by project1, ppu=/usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/system.ppu

« Last Edit: June 20, 2014, 11:07:22 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #12 on: June 20, 2014, 11:16:37 pm »
I think I may have found the why:

in .lazarus (a newly generated one from a fresh install)

the FPCdefines.xml file has this:

<Item3 TargetOS="win32" TargetCPU="i386" HasPPUs="False">
      <Compiler File="/usr/bin/fpc" Date="1397983219"/>
      <RealCompiler File="/usr/bin/ppcross386" Date="1393024767" OS="win32" CPU="i386" InPath="/usr/bin/ppcross386" FullVersion="2.6.2"/>

If I change the FullVersion to 2.6.4 the IDE changes it back to 2.6.2

Also in that same xml file:

<FPCSources Count="2">
    <Item1 Directory="/usr/share/fpcsrc/2.6.2"/>
    <Item2 Directory="/usr/share/fpcsrc/2.6.4"

Is this a IDE bug?
« Last Edit: June 20, 2014, 11:18:51 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

snorkel

  • Hero Member
  • *****
  • Posts: 817
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #13 on: June 20, 2014, 11:33:10 pm »
 figured it out...

By looking in that fpcdefines.xml
I saw that it was looking for ppcross386 in /usr/bin

So I cd to that dir and run ppcross386 -v and it's the 2.6.2 version and the IDE was pulling the path from that.
I deleted it and did:

ln -s /usr/local/lib/fpc/2.6.4/ppcross386 /usr/bin/ppcross386

now it works, but this raises the question why didn't the make crossinstall replace this with the correct version?

When you run: make crossinstall OS_TARGET=win32 CPU_TARGET=i386
Should that not copy or link the ppcross386 to /usr/bin?

Before I deleted it I checked if it was a Symbolic link or a full file and it was a full copy, so I guess the make crossinstall must not replace it or something if it already exists.
« Last Edit: June 20, 2014, 11:44:36 pm by snorkel »
***Snorkel***
If I forget, I always use the latest stable 32bit version of Lazarus and FPC. At the time of this signature that is Laz 3.0RC2 and FPC 3.2.2
OS: Windows 10 64 bit

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Updated to 1.2.4 win32 cross compiler still using 2.6.2
« Reply #14 on: June 21, 2014, 08:40:42 am »
When you run: make crossinstall OS_TARGET=win32 CPU_TARGET=i386
Should that not copy or link the ppcross386 to /usr/bin?
If you run it as a regular user it won't have access/write permission to /usr/bin. If you run it under sudo it may work that way (as you may understand I use fpcup to set up my cross compiling, being its author...).
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018