[fpc-devel] Creating ppc386 from ppcx64

2010-01-06 Thread Leonardo M . Ramé
Hi, I'm trying to create a cross compiler from Linux-x86_64 to Linux-i386, to 
do this, I have installed the compiled version 2.4.0 from Ubuntu repositories, 
which is ppcx64, then got the compiler trunk version from svn.

To create the cross compiler, I'm following this guide: 
http://wiki.lazarus.freepascal.org/Cross_compiling#To_Linux

When I do "sudo make all CPU_TARGET=i386" I receive this message:

/usr/bin/fpc -Pi386 -XPi386-linux- -Xr -Fui386 -Fusystems -Fu../rtl -Fii386 -FEs
Error: ppc386 can't be executed, error message: Failed to execute "ppc386", err7
make: *** [ppc386] Error 1

Which is correct, since I don't have ppc386 installed. How can I create it?, is 
it correct to just create a symlink from ppcx64?

Thanks in advance,
Leonardo M. Ramé
http://leonardorame.blogspot.com



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] Creating ppc386 from ppcx64

2010-01-06 Thread Leonardo M . Ramé
Thanks Jonas, I went a step further.

Now, when I just do "fpc", to  I got this:

Error: ppc386 can't be executed, error message: Failed to execute "ppc386", 
error code: 127

What can be causing this?

...but I found the new ppc386 in /usr/local/lib/fpc/2.5.1/ppc386, so I tried to 
compile a sample program, and got this:

...
...
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
/usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib//libdl.so when searching for -ldl
/usr/bin/ld: skipping incompatible /usr/lib//libdl.a when searching for -ldl
/usr/bin/ld: cannot find -ldl
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

Any hint?

Leonardo M. Ramé
http://leonardorame.blogspot.com


--- On Wed, 1/6/10, Jonas Maebe  wrote:

> From: Jonas Maebe 
> Subject: Re: [SPAM] [fpc-devel] Creating ppc386 from ppcx64
> To: "FPC developers' list" 
> Date: Wednesday, January 6, 2010, 5:31 PM
> 
> On 06 Jan 2010, at 20:15, Leonardo M. Ramé wrote:
> 
> > To create the cross compiler, I'm following this
> guide: http://wiki.lazarus.freepascal.org/Cross_compiling#To_Linux
> > 
> > When I do "sudo make all CPU_TARGET=i386" I receive
> this message:
> > 
> > /usr/bin/fpc -Pi386 -XPi386-linux- -Xr -Fui386
> -Fusystems -Fu../rtl -Fii386 -FEs
> > Error: ppc386 can't be executed, error message: Failed
> to execute "ppc386", err7
> > make: *** [ppc386] Error 1
> 
> I guess you are executing that command inside the
> fpc/compiler directory. You have to execute it in the top
> level fpc directory. And you don't need the "sudo" for the
> "make all", only for the "make install"
> 
> 
> Jonas___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [SPAM] [fpc-devel] Creating ppc386 from ppcx64

2010-01-06 Thread Jonas Maebe

On 06 Jan 2010, at 20:15, Leonardo M. Ramé wrote:

> To create the cross compiler, I'm following this guide: 
> http://wiki.lazarus.freepascal.org/Cross_compiling#To_Linux
> 
> When I do "sudo make all CPU_TARGET=i386" I receive this message:
> 
> /usr/bin/fpc -Pi386 -XPi386-linux- -Xr -Fui386 -Fusystems -Fu../rtl -Fii386 
> -FEs
> Error: ppc386 can't be executed, error message: Failed to execute "ppc386", 
> err7
> make: *** [ppc386] Error 1

I guess you are executing that command inside the fpc/compiler directory. You 
have to execute it in the top level fpc directory. And you don't need the 
"sudo" for the "make all", only for the "make install"


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [SPAM] Re: [fpc-devel] Creating ppc386 from ppcx64

2010-01-06 Thread Jonas Maebe

On 06 Jan 2010, at 21:15, Leonardo M. Ramé wrote:

> Thanks Jonas, I went a step further.
> 
> Now, when I just do "fpc", to  I got this:
> 
> Error: ppc386 can't be executed, error message: Failed to execute "ppc386", 
> error code: 127
> 
> What can be causing this?

Create a symlink from /usr/local/bin/ppc386 to /usr/local/lib/fpc/2.5.1/ppc386. 
"fpc" searches for a compiler in the same directory as where its own binary is 
located. "make install" does not create/overwrite such symlinks, because that 
changes your default compiler.

> /usr/bin/ld: cannot find -ldl
> Error: Error while linking
> Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> 
> Any hint?

Install 32 bit compatibility libraries on your Linux distribution. If they are 
unavailable: tough luck, I guess (unless you setup an complete i386 
cross-compilation environment on your system, but that's not FPC specific in 
any way and I can't help with that).


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [SPAM] Re: [fpc-devel] Creating ppc386 from ppcx64

2010-01-06 Thread Leonardo M . Ramé
Thanks again Jonas, that worked ok!.

Leonardo M. Ramé
http://leonardorame.blogspot.com


--- On Wed, 1/6/10, Jonas Maebe  wrote:

> From: Jonas Maebe 
> Subject: Re: [SPAM] Re: [fpc-devel] Creating ppc386 from ppcx64
> To: "FPC developers' list" 
> Date: Wednesday, January 6, 2010, 6:26 PM
> 
> On 06 Jan 2010, at 21:15, Leonardo M. Ramé wrote:
> 
> > Thanks Jonas, I went a step further.
> > 
> > Now, when I just do "fpc", to  I got this:
> > 
> > Error: ppc386 can't be executed, error message: Failed
> to execute "ppc386", error code: 127
> > 
> > What can be causing this?
> 
> Create a symlink from /usr/local/bin/ppc386 to
> /usr/local/lib/fpc/2.5.1/ppc386. "fpc" searches for a
> compiler in the same directory as where its own binary is
> located. "make install" does not create/overwrite such
> symlinks, because that changes your default compiler.
> 
> > /usr/bin/ld: cannot find -ldl
> > Error: Error while linking
> > Fatal: There were 1 errors compiling module, stopping
> > Fatal: Compilation aborted
> > 
> > Any hint?
> 
> Install 32 bit compatibility libraries on your Linux
> distribution. If they are unavailable: tough luck, I guess
> (unless you setup an complete i386 cross-compilation
> environment on your system, but that's not FPC specific in
> any way and I can't help with that).
> 
> 
> Jonas___
> fpc-devel maillist  -  fpc-devel@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
> 



___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel