Recent

Author Topic: Compiling from Windows to FreeBSD  (Read 6349 times)

mangakissa

  • Hero Member
  • *****
  • Posts: 1131
Compiling from Windows to FreeBSD
« on: July 17, 2014, 03:51:11 pm »
I have several FreeBSD / Linux servers running, but all in console mode.
I have a Windows pc running Lazarus 2.4.1.
In my new project I want to create a daemon, which reads several XML files to put them in a MySQL database.

Is 'fpcup' the only way to compile my application to FreeBSD or are there other ways?
I thought Lazarus has a built-in compiler for Linux, so only select the right compiler. But this option I can't find.
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Compiling from Windows to FreeBSD
« Reply #1 on: July 17, 2014, 03:58:33 pm »
CodeTyphon has built-in cross compilers.
A standard Lazarus install only puts in place the compiler required for the platform it runs on.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Compiling from Windows to FreeBSD
« Reply #2 on: July 17, 2014, 04:33:05 pm »
You can cross compile yourself if you want to.
http://wiki.lazarus.freepascal.org/Cross_compiling
It's basically what fpcup does anyway.

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

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Compiling from Windows to FreeBSD
« Reply #3 on: July 17, 2014, 04:36:36 pm »
You can cross compile yourself if you want to.

That would be impossible he doesn't have the original source anymore it has been absorbed in the first compilation.  :P
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Compiling from Windows to FreeBSD
« Reply #4 on: July 17, 2014, 04:43:08 pm »
You can cross compile yourself if you want to.

That would be impossible he doesn't have the original source anymore it has been absorbed in the first compilation.  :P
Huh? I don't understand.
Where does he say doesn't have the original source anymore? What would fpcup be of use without the original source anyway?

Just for clarity: I meant he can cross compile FPC then use Lazarus on his Windows machine to compile say a FreeBSD executable. Yes, he'd need to copy over the needed libs etc as detailed in the wiki.
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

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Compiling from Windows to FreeBSD
« Reply #5 on: July 17, 2014, 04:52:15 pm »
You can cross compile yourself if you want to.
That would be impossible he doesn't have the original source anymore it has been absorbed in the first compilation.  :P
Huh? I don't understand.
Where does he say doesn't have the original source anymore? What would fpcup be of use without the original source anyway?
The proper grammar for that is

You can cross compile it yourself.

with out that "it" you asked him to cross compile himself  not the compiler.

Just for clarity: I meant he can cross compile FPC then use Lazarus on his Windows machine to compile say a FreeBSD executable. Yes, he'd need to copy over the needed libs etc as detailed in the wiki.

Yeah I know I just don't fill like being responsible today sorry.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Compiling from Windows to FreeBSD
« Reply #6 on: July 17, 2014, 04:56:30 pm »
The proper grammar for that is

You can cross compile it yourself.

with out that "it" you asked him to cross compile himself  not the compiler.
Amusing.

You can cross compile yourself can also mean that you, yourself, can cross compile <whatever> Unless you want to see a comma between compile and yourself, in that case, fine...  have it your way...

Edit: well as for the source being lost... what happened to sheep Dolly :)... though TBH that wasn't a cross compile but more of a copy ;)
« Last Edit: July 17, 2014, 05:08:40 pm by BigChimp »
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

mangakissa

  • Hero Member
  • *****
  • Posts: 1131
Re: Compiling from Windows to FreeBSD
« Reply #7 on: July 22, 2014, 10:25:00 am »
What I meant. If I install lazarus-1.2.4-fpc-2.6.4-cross-arm-wince-win32 I get an option to select wince or win32 compiler. So why not with linux. does it something to do with libraries?
Lazarus 2.06 (64b) / FPC 3.0.4 / Windows 10
stucked on Delphi 10.3.1

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Compiling from Windows to FreeBSD
« Reply #8 on: July 22, 2014, 10:49:34 am »
Yes, you'll have to copy .so files (the equivalent of dll files) in any case, so it's not much use making a cross compile installer like the arm-wince one.
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

Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Compiling from Windows to FreeBSD
« Reply #9 on: July 22, 2014, 11:38:37 pm »
What I meant. If I install lazarus-1.2.4-fpc-2.6.4-cross-arm-wince-win32 I get an option to select wince or win32 compiler. So why not with linux. does it something to do with libraries?
Yes, contrary to PE (Windows' executable format), ELF specification requires that all used libraries are available at compile time. Shipping all libraries from arbitrary *nix distribution is not an option, as versioning problem might arise. Thus, a universal installer cannot be created.

 

TinyPortal © 2005-2018