Recent

Author Topic: IDE under Ubuntu Crosscompile to Windows  (Read 17112 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #15 on: October 23, 2016, 11:25:55 am »
What is distupgrade? that should be dist-upgrade....
Specialize a type, not a var.

Rainer78

  • New Member
  • *
  • Posts: 10
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #16 on: October 23, 2016, 12:32:07 pm »
Sorry, my mistake. I mean dist-upgrade. But the error is still the same ;-)

bylaardt

  • Sr. Member
  • ****
  • Posts: 309
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #17 on: October 24, 2016, 06:34:01 pm »
Ubuntu believes fpc3.0.0+dfsg-2 is newest than fpc3.0.0.
my Workarround : Change name to fpc3.0.0+fixed
Code: Bash  [Select][+][-]
  1. $ mkdir tmp
  2. $ sudo dpkg-deb -R ./fpc_3.0.0-151205_amd64.deb ./tmp
  3. $ sudo kate ./tmp/DEBIAN/control      //or another editor, like gedit and change version from 3.0.0 to 3.0.0+fixed
  4. $ sudo dpkg-deb -b tmp ./fpc_3.0.0-fixed.deb
  5. $ sudo cp /etc/fpc.bak /etc/fpc.cfg
  6. $ sudo rm tmp -R
  7. $ sudo mkdir tmp
  8. $ sudo dpkg-deb -R ./lazarus_1.6-0_amd64.deb tmp
  9. $ sudo kate ./tmp/DEBIAN/control      //change version from 1.6 to 1.6+fixed
  10. $ sudo dpkg-deb -b tmp ./lazarus_1.6-0-fixed.deb
  11. $ sudo rm tmp -R
  12. $ sudo dpkg -i ./fpc_3.0.0-fixed.deb ./lazarus_1.6-0-fixed.deb
  13.  

Rainer78

  • New Member
  • *
  • Posts: 10
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #18 on: October 24, 2016, 09:32:10 pm »
Thank you very much for your workaround.

I rebuild the fpc-src package new, too. This all and my modified ln command made everything fine.

This topic can be closed now  :D

Jay

  • New Member
  • *
  • Posts: 31
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #19 on: November 01, 2016, 10:34:20 am »
I am also having a problem trying to compile for Windows under Linux. I'm using a Debian (stable) based distro (32 bit) and installed Lazarus from the Deb (version 1.6/3.0). I have successfully set up the system by running

Quote
make all OS_TARGET=win32 CPU_TARGET=i386

from /usr/share/fpcsrc/3.0.0

At least, I assume it was successful because I didn't get any errors.

Next, I started a new "simple program" from Lazarus :

Code: Pascal  [Select][+][-]
  1. program Project1;
  2. begin
  3.   writeln('Hello, world!');
  4. end.  

I then went to project/project options/compiler options/ and selected

Target OS = win32
Target CPU family = i386
Target Processor = default

After running "compile", I got the following error message:

Quote
Fatal: Can't find unit system used by Project1

Any suggestions?

By the way, this isn't a new installation of Lazarus ; I've been compiling for linux with it for some time with no problems, so the error is specific to the win32 target.

Edit: Don't know if this is relevant, but during the "make all" step there were several messages -

Quote
Warning : Unable to determine the libgcc path.
« Last Edit: November 01, 2016, 11:01:42 am by Jay »

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #20 on: November 01, 2016, 11:35:59 am »
No. the libgcc path is for a different purpose and not related.
That warning is an issue, however.

The intended behavior for debugging is GDBMI as of now. Not linking in libgdb. Correct me if I am wrong.

Specialize a type, not a var.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #21 on: November 01, 2016, 12:04:32 pm »
Any suggestions?
You only make the cross compiler toolchain, not yet install it.

Jay

  • New Member
  • *
  • Posts: 31
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #22 on: November 01, 2016, 01:35:53 pm »
You only make the cross compiler toolchain, not yet install it.

Ok thanks. Is that just a matter of doing

Code: Pascal  [Select][+][-]
  1. sudo make install

from the source folder?

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #23 on: November 01, 2016, 01:55:02 pm »
You only make the cross compiler toolchain, not yet install it.

Ok thanks. Is that just a matter of doing

Code: Pascal  [Select][+][-]
  1. sudo make install

from the source folder?
You'll still need to pass CPU_TARGET and OS_TARGET AFAIK, along with INSTALL_PREFIX for base installation directory (defaults to /usr/local if not passed). Under Linux environment, if your native fpc is installed under /usr, I recommend the same for INSTALL_PREFIX as you can have single unified fpc.cfg for all targets without too many -Fu lines.

Jay

  • New Member
  • *
  • Posts: 31
Re: IDE under Ubuntu Crosscompile to Windows
« Reply #24 on: November 01, 2016, 02:30:53 pm »
Thanks. I messed up again but then re-installed Lazarus and followed the instructions on the wiki to the letter. It's all good now.

I guess when all fails RTFM.  :D
« Last Edit: November 01, 2016, 04:05:14 pm by Jay »

 

TinyPortal © 2005-2018