[Lazarus] Cross Compile setup unsuccessful

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

[Lazarus] Cross Compile setup unsuccessful

JuuS
Hello,

I work with Lazarus 1.4.0 on Kubuntu 14.04 with an x86_64 system.

I wanted today to make my Lazarus cross compile to win32, win64 and
linux 32 bit.

I followed the directions at these two pages:

http://wiki.lazarus.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386

http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux

For windows the make all and make crossinstall appeared to have finished
properly with no errors. But when I attempt to make a cross install of
win32, for example, in Lazarus it says /usr/bin/fpc does not support the
target i386-win32


As for the make all for Linux i386 it fails with:

ld: warning: ./link.res contains output sections; did you forget -T?
ld: cannot find -lpthread
ld: cannot find -ldl
ld: cannot find -lc
fppkg.pp(396,1) Error: Error while linking
fppkg.pp(396,1) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
make[3]: *** [fppkg] Error 1
make[3]: Leaving directory `/usr/share/fpcsrc/2.6.4/utils/fppkg'
make[2]: *** [fppkg_all] Error 2
make[2]: Leaving directory `/usr/share/fpcsrc/2.6.4/utils'
make[1]: *** [utils_all] Error 2
make[1]: Leaving directory `/usr/share/fpcsrc/2.6.4'
make: *** [build-stamp.i386-linux] Error 2

So I am missing some other steps??

Thanks,

Julius

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

Re: [Lazarus] Cross Compile setup unsuccessful

Gabor Boros
2015.06.17. 14:46 keltezéssel, JuuS írta:

> Hello,
>
> I work with Lazarus 1.4.0 on Kubuntu 14.04 with an x86_64 system.
>
> I wanted today to make my Lazarus cross compile to win32, win64 and
> linux 32 bit.
>
> I followed the directions at these two pages:
>
> http://wiki.lazarus.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386
>
> http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux
>
> For windows the make all and make crossinstall appeared to have finished
> properly with no errors. But when I attempt to make a cross install of
> win32, for example, in Lazarus it says /usr/bin/fpc does not support the
> target i386-win32

Hi,

For Win32 add a symlink to /usr/bin for ppcross386. (I use cross
compiler for Win32 only.)

Gabor

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

Re: [Lazarus] Cross Compile setup unsuccessful

JuuS


On 06/17/2015 03:10 PM, Gabor Boros wrote:

> 2015.06.17. 14:46 keltezéssel, JuuS írta:
>> Hello,
>>
>> I work with Lazarus 1.4.0 on Kubuntu 14.04 with an x86_64 system.
>>
>> I wanted today to make my Lazarus cross compile to win32, win64 and
>> linux 32 bit.
>>
>> I followed the directions at these two pages:
>>
>> http://wiki.lazarus.freepascal.org/Cross_compiling#From_Linux_x64_to_Linux_i386
>>
>>
>> http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Linux
>>
>> For windows the make all and make crossinstall appeared to have finished
>> properly with no errors. But when I attempt to make a cross install of
>> win32, for example, in Lazarus it says /usr/bin/fpc does not support the
>> target i386-win32
>
> Hi,
>
> For Win32 add a symlink to /usr/bin for ppcross386. (I use cross
> compiler for Win32 only.)

Thanks Gabor, I will look into it.

>

> Gabor
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

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

Re: [Lazarus] Cross Compile setup unsuccessful

leledumbo
Administrator
In reply to this post by JuuS
> As for the make all for Linux i386 it fails with:

You need 32-bit libraries, too. Usually packaged with "multilib" in its name. After that, you need to add -Fl pointing to those 32-bit libraries as the default library search path must be for your 64-bit system. You might even need -Xd if the linker still fails to find them, it basically makes default search path empty so only directories listed by -Fl is searched.
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] Cross Compile setup unsuccessful

Ondrej Kelle

Hi,

In case anybody finds it interesting, I've recently blogged:
FPC and Lazarus development environment

Notes on how to set up a FreePascal/Lazarus development environment on a Linux system, with cross-compiling for OSX and Windows
http://tondrej.blogspot.com/2015/05/fpc-and-lazarus-development-environment.html

On 17 Jun 2015 18:03, "leledumbo" <[hidden email]> wrote:
> As for the make all for Linux i386 it fails with:

You need 32-bit libraries, too. Usually packaged with "multilib" in its
name. After that, you need to add -Fl pointing to those 32-bit libraries as
the default library search path must be for your 64-bit system. You might
even need -Xd if the linker still fails to find them, it basically makes
default search path empty so only directories listed by -Fl is searched.



--
View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Cross-Compile-setup-unsuccessful-tp4042679p4042684.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

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

Re: [Lazarus] Cross Compile setup unsuccessful

JuuS
Thanks leledumbo and Ondrej, I am away now and will look these over in
the next days.

On 17/06/2015 18:35, Ondrej Kelle wrote:

> Hi,
>
> In case anybody finds it interesting, I've recently blogged:
> FPC and Lazarus development environment
>
> Notes on how to set up a FreePascal/Lazarus development environment on a
> Linux system, with cross-compiling for OSX and Windows
> http://tondrej.blogspot.com/2015/05/fpc-and-lazarus-development-environment.html
>
> On 17 Jun 2015 18:03, "leledumbo" <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     > As for the make all for Linux i386 it fails with:
>
>     You need 32-bit libraries, too. Usually packaged with "multilib" in its
>     name. After that, you need to add -Fl pointing to those 32-bit
>     libraries as
>     the default library search path must be for your 64-bit system. You
>     might
>     even need -Xd if the linker still fails to find them, it basically makes
>     default search path empty so only directories listed by -Fl is searched.
>
>
>
>     --
>     View this message in context:
>     http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Cross-Compile-setup-unsuccessful-tp4042679p4042684.html
>     Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.
>
>     --
>     _______________________________________________
>     Lazarus mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> [hidden email]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>

--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus