[Lazarus] Cross compile for Linux x64 on Windows 7 x64?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
I have a command line utility created in Lazarus 2.0.0/fpc 3.0.4 on
Windows 7 x64. I use the Lazarus/fpc downloaded via this page:
https://www.lazarus-ide.org/index.php?page=downloads

Now I want to compile this project for Linux on the same x64 Intel CPU
so I can run it under Ubuntu 16.4 LTS Server x64.
Since that is a headless machine (it is a server) I need to build the
utility by cross-compile on my Windows x64 Lazarus installation.

Is there a *simple* instruction on how to do this? I have looked at
the doc page:
http://wiki.lazarus.freepascal.org/Cross_compiling
but it is too complex for me to understand. I tried to just go to the
sections I deemed relevant to my simple (and probably very common)
case but they all cross-reference into a maze...

I need a "For Dummies" how-to which presupposes I have installed
Lazarus/Fpc for Windows x64 and then tells me what to download extra
(and from where) and also how to set up the project environment to
make the Linux target.
Is something like that available?


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
On Tue, Apr 2, 2019 at 9:14 AM Bo Berglund via lazarus
<[hidden email]> wrote:

>
> I have a command line utility created in Lazarus 2.0.0/fpc 3.0.4 on
> Windows 7 x64. I use the Lazarus/fpc downloaded via this page:
> https://www.lazarus-ide.org/index.php?page=downloads
>
> Now I want to compile this project for Linux on the same x64 Intel CPU
> so I can run it under Ubuntu 16.4 LTS Server x64.
> Since that is a headless machine (it is a server) I need to build the
> utility by cross-compile on my Windows x64 Lazarus installation.
>
> Is there a *simple* instruction on how to do this? I have looked at
> the doc page:
> http://wiki.lazarus.freepascal.org/Cross_compiling
> but it is too complex for me to understand. I tried to just go to the
> sections I deemed relevant to my simple (and probably very common)
> case but they all cross-reference into a maze...
>
> I need a "For Dummies" how-to which presupposes I have installed
> Lazarus/Fpc for Windows x64 and then tells me what to download extra
> (and from where) and also how to set up the project environment to
> make the Linux target.
> Is something like that available?

The fastest and easy way to setup the cross-compilation - and install
Lazarus itself - is using fpcupdeluxe
-> https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases

Just get the binary for your platform, run and following the
instructions. That's all.

best regards,
Marcos Douglas
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
On Tue, 2 Apr 2019 09:26:20 -0300, "Marcos Douglas B. Santos via
lazarus" <[hidden email]> wrote:

>The fastest and easy way to setup the cross-compilation - and install
>Lazarus itself - is using fpcupdeluxe
>-> https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
>
>Just get the binary for your platform, run and following the
>instructions. That's all.

I don't want to scrap my existing installation of Lazarus 2.0.0/fpc
3.0.4 created by the official download on the www.lazarus-ide.org
page..

It is configured and I have used it for several projects already....

It seems to me like my question would be solved by downloading the
cross-compiler from the additional files page on the lazarus-ide site
but I don't know how to go from there...

https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.0.0/

The file I mean is:
lazarus-2.0.0-fpc-3.0.4-cross-i386-win32-win64.exe

But I don't know if it just contains the fpc cross compiler or if it
aso contains some Lazarus version, thus I am hesitant to get it and
risk starting over again.

But then there is also the question regarding HOW to use the cross
compiler....


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
On 4/2/2019 7:23 AM, Bo Berglund via lazarus wrote:

> On Tue, 2 Apr 2019 09:26:20 -0300, "Marcos Douglas B. Santos via
> lazarus" <[hidden email]> wrote:
>
>> The fastest and easy way to setup the cross-compilation - and install
>> Lazarus itself - is using fpcupdeluxe
>> -> https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
>>
>> Just get the binary for your platform, run and following the
>> instructions. That's all.
> I don't want to scrap my existing installation of Lazarus 2.0.0/fpc
> 3.0.4 created by the official download on the www.lazarus-ide.org
> page..
>
> It is configured and I have used it for several projects already....
>
> It seems to me like my question would be solved by downloading the
> cross-compiler from the additional files page on the lazarus-ide site
> but I don't know how to go from there...
>
> https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%202.0.0/
>
> The file I mean is:
> lazarus-2.0.0-fpc-3.0.4-cross-i386-win32-win64.exe

This is the cross-compiler to compile Win32 programs from a Win64 setup.
It is not a cross-compiler to any Linux(-x64) target...

Ralf



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
On Tue, 2 Apr 2019 09:35:46 -0700, Ralf Quint via lazarus
<[hidden email]> wrote:

>> The file I mean is:
>> lazarus-2.0.0-fpc-3.0.4-cross-i386-win32-win64.exe
>
>This is the cross-compiler to compile Win32 programs from a Win64 setup.
>It is not a cross-compiler to any Linux(-x64) target...

OK, then I will have to uninstall that installation (I did it to check
what would happen)...

But then how do I get hold of a Linux cross-compiler? Can I just check
out some "binutils" for Linux from SVN?

Or do I have to create a virtual Linux machine and install SVN +
Lazarus/fpc on that and then pull the project sources over via svn and
compile natively?

I found a description over her:
http://wiki.lazarus.freepascal.org/Cross_compiling#From_Windows_to_Linux
But it says:
"This is less trivial, there is some info in the buildfaq

See also fpcup for descriptions on which binutils work and what
libraries/files to copy.

As the Build FAQ explains, you will need libs (.so files) from the
target system, e.g. from /lib and /user/lib (but could be more
locations). On some systems, some .so files are actually scripts;
check with

grep -i "ld script" *

Remove those .so and copy over (or symlink) the .so.x files that you
should have to .so in order for the linker to find them."

I do not really get what *actually* to do from this....


Seems ike I am heading in the wrong direction, but I absolutely was
under the impression that one could develop anywhere (Linux or
Windows) and then compile for any target in this one development
setup...
Probably faster to go the Linux virtual machine path and build
natively from sources via svn..


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
I am VERY interested in how this question is answered and resolved. It seems to be a weak point in how the Lazarus/FPC effort has developed.

This type of question has prevented me from diving into the Lazarus/FPC ecosystem because there seem to be regular requests for help in resolving this type of issue.

Doug C.


---- On Tue, 02 Apr 2019 08:14:39 -0400 Bo Berglund via lazarus <[hidden email]> wrote ----

I have a command line utility created in Lazarus 2.0.0/fpc 3.0.4 on
Windows 7 x64. I use the Lazarus/fpc downloaded via this page:

Now I want to compile this project for Linux on the same x64 Intel CPU
so I can run it under Ubuntu 16.4 LTS Server x64.
Since that is a headless machine (it is a server) I need to build the
utility by cross-compile on my Windows x64 Lazarus installation.

Is there a *simple* instruction on how to do this? I have looked at
the doc page:
but it is too complex for me to understand. I tried to just go to the
sections I deemed relevant to my simple (and probably very common)
case but they all cross-reference into a maze...

I need a "For Dummies" how-to which presupposes I have installed
Lazarus/Fpc for Windows x64 and then tells me what to download extra
(and from where) and also how to set up the project environment to
make the Linux target.
Is something like that available?


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
As maintainer of fpcupdeluxe, I feel the need of stepping into this discussion.
(which I do not often do, because of the freedom of choice)

Yes, setting up cross-compiling is a non-trivial task.
This is why fpcup(deluxe) has been created by its original author (BigChimp).

He wanted to give the users of FPC and Lazarus:
* an easy way of installing different versions of FPC and Lazarus.
* isolate these installs
* enable easy cross-compilation

So, just
* use fpcupdeluxe
* have a look at the forum about fpcupdeluxe
* see how cross-compiling is setup and done

And, do not use fpcupdeluxe if you do not want to. As I said, the freedom is yours.


------ Origineel bericht ------
Van: "DougC via lazarus" <[hidden email]>
Aan: "lazarus" <[hidden email]>
CC: "DougC" <[hidden email]>
Verzonden: 2-4-2019 22:00:18
Onderwerp: Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

I am VERY interested in how this question is answered and resolved. It seems to be a weak point in how the Lazarus/FPC effort has developed.

This type of question has prevented me from diving into the Lazarus/FPC ecosystem because there seem to be regular requests for help in resolving this type of issue.

Doug C.


---- On Tue, 02 Apr 2019 08:14:39 -0400 Bo Berglund via lazarus <[hidden email]> wrote ----

I have a command line utility created in Lazarus 2.0.0/fpc 3.0.4 on
Windows 7 x64. I use the Lazarus/fpc downloaded via this page:

Now I want to compile this project for Linux on the same x64 Intel CPU
so I can run it under Ubuntu 16.4 LTS Server x64.
Since that is a headless machine (it is a server) I need to build the
utility by cross-compile on my Windows x64 Lazarus installation.

Is there a *simple* instruction on how to do this? I have looked at
the doc page:
but it is too complex for me to understand. I tried to just go to the
sections I deemed relevant to my simple (and probably very common)
case but they all cross-reference into a maze...

I need a "For Dummies" how-to which presupposes I have installed
Lazarus/Fpc for Windows x64 and then tells me what to download extra
(and from where) and also how to set up the project environment to
make the Linux target.
Is something like that available?


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list



--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Tue, Apr 2, 2019 at 11:23 AM Bo Berglund via lazarus
<[hidden email]> wrote:

>
> On Tue, 2 Apr 2019 09:26:20 -0300, "Marcos Douglas B. Santos via
> lazarus" <[hidden email]> wrote:
>
> >The fastest and easy way to setup the cross-compilation - and install
> >Lazarus itself - is using fpcupdeluxe
> >-> https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases
> >
> >Just get the binary for your platform, run and following the
> >instructions. That's all.
>
> I don't want to scrap my existing installation of Lazarus 2.0.0/fpc
> 3.0.4 created by the official download on the www.lazarus-ide.org
> page..
>
> It is configured and I have used it for several projects already....

I would say that you just basically need to:
- install a new one
- rewrite your setup files (.xml) at the fpcup default directory
- build Lazarus again to install components that you might have in
your current IDE

That is pretty almost everything.

However, feel free to setup it manually.

regards,
Marcos Douglas
--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
On Tue, 02 Apr 2019 16:00:18 -0400, DougC via lazarus
<[hidden email]> wrote:

>I am VERY interested in how this question is answered and resolved. It
>seems to be a weak point in how the Lazarus/FPC effort has developed.
>
>This type of question has prevented me from diving into the Lazarus/FPC
>ecosystem because there seem to be regular requests for help in resolving this
>type of issue.
>

I decided that it would be easier to just use a LinuxMint19x64 virtual
machine that I had already installed fpc 3.0.4/lazarus 1.8.5 into.

I checked out the lazarus 2.0.0 sources and issued the make bigide
inside of the checkout and then created the application launch desktop
file.

Then checked out the project files via svn into the LinuxMint vm and
opened the project inside Lazarus 2.0.0 and it built right away.
Simplest solution since I already had the virtual linux machine
available....

Now I will go for what I really wanted to do, i.e create a command
line version of the utility, which I can use on a headless Ubuntu
16.04 server.


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
In reply to this post by Free Pascal - Lazarus mailing list
For me, the simplest solution is installing Ubuntu in a dual boot or,
even better, in a virtual machine (e.g. free VMWare Player) with access
to the Windows' Lazarus project folder. Independent install and
configuration of Lazarus and debugging for each platform.

[]'s,

Carlos Eduardo S. Matuzaki
Curitiba / Parana' / Brazil

Em 02/04/2019 17:14, [hidden email] escreveu:

> Date: Tue, 02 Apr 2019 08:14:39 -0400
> From: Bo Berglund
> To: [hidden email]
> Subject: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?
> Message-ID: <[hidden email]>
> Content-Type: text/plain; charset=us-ascii
>
> I have a command line utility created in Lazarus 2.0.0/fpc 3.0.4 on
> Windows 7 x64. I use the Lazarus/fpc downloaded via this page:
> https://www.lazarus-ide.org/index.php?page=downloads
>
> Now I want to compile this project for Linux on the same x64 Intel CPU
> so I can run it under Ubuntu 16.4 LTS Server x64.
> Since that is a headless machine (it is a server) I need to build the
> utility by cross-compile on my Windows x64 Lazarus installation.
>
> Is there a *simple* instruction on how to do this? I have looked at
> the doc page:
> http://wiki.lazarus.freepascal.org/Cross_compiling
> but it is too complex for me to understand. I tried to just go to the
> sections I deemed relevant to my simple (and probably very common)
> case but they all cross-reference into a maze...
>
> I need a "For Dummies" how-to which presupposes I have installed
> Lazarus/Fpc for Windows x64 and then tells me what to download extra
> (and from where) and also how to set up the project environment to
> make the Linux target.
> Is something like that available?
>
>

---
Este email foi escaneado pelo Avast antivírus.
https://www.avast.com/antivirus

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross compile for Linux x64 on Windows 7 x64?

Free Pascal - Lazarus mailing list
On Wed, 3 Apr 2019 12:14:47 -0300, "Carlos Eduardo S. M. via lazarus"
<[hidden email]> wrote:

>For me, the simplest solution is installing Ubuntu in a dual boot or,
>even better, in a virtual machine (e.g. free VMWare Player) with access
>to the Windows' Lazarus project folder. Independent install and
>configuration of Lazarus and debugging for each platform.
>

I agree on the first part about the virtual machine. I have already
done so.
But no shared folder, I checked out the project using SVN to the linux
machine and opened the project there. Worked fine.
So I work in Linux on the same project via Subversion.


--
Bo Berglund
Developer in Sweden

--
_______________________________________________
lazarus mailing list
[hidden email]
https://lists.lazarus-ide.org/listinfo/lazarus