Re: [Lazarus] Cross-compiling -> MIPS

2012-10-30 Thread Mark Morgan Lloyd

SkyDiablo wrote:

YES, i think i got it!

okay, i was not sure over the hole time if my toolchain is the right 
choise... but now, i know it, yes it is! i use this toolchain to 
compiling a helloWorld c++ application and got the same error with fpc. 
some time later, i get a response from my test-system:


FPU emulator disabled, make sure your toolchain was compiled with 
software floating point support (soft-float)


so i added the switch "-msoft-float" to compile my c++ application. all 
works fine! i have compile a linux/MIPS binary under my windows 
developer system. and now, i think, i have to say FPC that is use to 
this switch too, but i dont know how?


Take a look at  fpc -h  output, the -Ce option might be what you need if 
implemented.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-30 Thread SkyDiablo

YES, i think i got it!

okay, i was not sure over the hole time if my toolchain is the right 
choise... but now, i know it, yes it is! i use this toolchain to 
compiling a helloWorld c++ application and got the same error with fpc. 
some time later, i get a response from my test-system:


FPU emulator disabled, make sure your toolchain was compiled with 
software floating point support (soft-float)


so i added the switch "-msoft-float" to compile my c++ application. all 
works fine! i have compile a linux/MIPS binary under my windows 
developer system. and now, i think, i have to say FPC that is use to 
this switch too, but i dont know how?


any idea?

greez & thx,
  sky...

Am 29.10.2012 20:13, schrieb Mark Morgan Lloyd:

Mark Morgan Lloyd wrote:

SkyDiablo wrote:

Am 29.10.2012 15:53, schrieb Lukasz Sokol:

You produced an /executable/ ?
Then why not just do

./helloWorld4MIPS

in the dir where the binary is copied to ?
(yes, dot-slash is needed unless you have this directory added to 
PATH)


AFAIK, doing

sh $file

will attempt to run it as shell script, WHICH IT ISN'T ?


yes, i have tested this befor but now i realize what going on.

# chmod +x helloWorld4MIPS
# ./helloWorld4MIPS

after this, NOTHING happens! no output and no shell-promt! now i 
have look at "top" ->


process "helloWorld4MIPS" -> 100% CPU load!

this is the helloWorld Code:

program helloWorld4MIPS;
begin
  WriteLn('helloWorld');
end.


A possibility there is that the FPC runtimes are incompatible with 
OpenWRT (assuming that that's what you're running on). I was running 
on Debian hosted by Qemu (on an x86 Debian system) which appeared OK.


I've just compiled and run a test "Hello, World!" and a do-nothing 
program on mipsel, they both behaved as expected. I suggest I mail 
them to you, the stripped binaries are about 33K in a tar.gz.





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-30 Thread Mark Morgan Lloyd

Red herring alert :-)

SkyDiablo wrote:

[Built what he believed was a binary for mipsel, and on running it on 
the target got]



# cat /proc/version
Linux version 2.6.32.27 (gcc version 4.3.3 (GCC) )


# sh helloWorld4MIPS
helloWorld4MIPS: line 1: syntax error: unexpected "("


I've just had something very similar on a different platform, and think 
that message might be Bash getting seriously confused. I built a minimal 
test program on Solaris SPARC V8 and moved it onto a V7 system. I get:


$ file product
product:ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ 
Required, dynamically linked, stripped

$ ./product
./product: syntax error at line 1: `(' unexpected

I'll continue that in fpc-devel where there's alreasy a thread on -i, 
-Cp etc.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread Mark Morgan Lloyd

Mark Morgan Lloyd wrote:

SkyDiablo wrote:

Am 29.10.2012 15:53, schrieb Lukasz Sokol:

You produced an /executable/ ?
Then why not just do

./helloWorld4MIPS

in the dir where the binary is copied to ?
(yes, dot-slash is needed unless you have this directory added to PATH)

AFAIK, doing

sh $file

will attempt to run it as shell script, WHICH IT ISN'T ?


yes, i have tested this befor but now i realize what going on.

# chmod +x helloWorld4MIPS
# ./helloWorld4MIPS

after this, NOTHING happens! no output and no shell-promt! now i have 
look at "top" ->


process "helloWorld4MIPS" -> 100% CPU load!

this is the helloWorld Code:

program helloWorld4MIPS;
begin
  WriteLn('helloWorld');
end.


A possibility there is that the FPC runtimes are incompatible with 
OpenWRT (assuming that that's what you're running on). I was running on 
Debian hosted by Qemu (on an x86 Debian system) which appeared OK.


I've just compiled and run a test "Hello, World!" and a do-nothing 
program on mipsel, they both behaved as expected. I suggest I mail them 
to you, the stripped binaries are about 33K in a tar.gz.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread Mark Morgan Lloyd

SkyDiablo wrote:

Am 29.10.2012 15:53, schrieb Lukasz Sokol:

You produced an /executable/ ?
Then why not just do

./helloWorld4MIPS

in the dir where the binary is copied to ?
(yes, dot-slash is needed unless you have this directory added to PATH)

AFAIK, doing

sh $file

will attempt to run it as shell script, WHICH IT ISN'T ?


yes, i have tested this befor but now i realize what going on.

# chmod +x helloWorld4MIPS
# ./helloWorld4MIPS

after this, NOTHING happens! no output and no shell-promt! now i have 
look at "top" ->


process "helloWorld4MIPS" -> 100% CPU load!

this is the helloWorld Code:

program helloWorld4MIPS;
begin
  WriteLn('helloWorld');
end.


A possibility there is that the FPC runtimes are incompatible with 
OpenWRT (assuming that that's what you're running on). I was running on 
Debian hosted by Qemu (on an x86 Debian system) which appeared OK.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread SkyDiablo

Am 29.10.2012 15:53, schrieb Lukasz Sokol:

You produced an /executable/ ?
Then why not just do

./helloWorld4MIPS

in the dir where the binary is copied to ?
(yes, dot-slash is needed unless you have this directory added to PATH)

AFAIK, doing

sh $file

will attempt to run it as shell script, WHICH IT ISN'T ?


yes, i have tested this befor but now i realize what going on.

# chmod +x helloWorld4MIPS
# ./helloWorld4MIPS

after this, NOTHING happens! no output and no shell-promt! now i have 
look at "top" ->


process "helloWorld4MIPS" -> 100% CPU load!

this is the helloWorld Code:

program helloWorld4MIPS;
begin
  WriteLn('helloWorld');
end.


if compiled for windows, all works fine...

maybe i should try with a debian/ubuntu as origin and not windows... if 
someone have a idea for me, please post!


greez & thx,
  sky...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread Mark Morgan Lloyd

SkyDiablo wrote:
Having the cross compiler and RTL, you should then be able to either 
build a native compiler etc. or to compile trivial programs (some 
fancy stuff won't work yet because you haven't built the full FCL). 
The native compiler can be copied onto your mipsel system, and is 
currently good enough to recompile itself.


ok, i want to create a little peace of software with multi-thread and 
maybe use some indy (TidTCP) stuff? it this possible with this MIPS 
crosscompiler port?


I think threads etc. is premature at the moment. Get a "Hello, World!" 
running as a confidence builder, and then see what else works. If you 
have time and expertise see if there's anything you can help with in 
fixing the compiler so that more of the tests run properly (the 
fpc-devel ML is the place to discuss this).


Apologies if this is brusque- I'd got a longer response ready to send 
and then we had a power failure and weren't able to get a generator 
running before the UPSes shut everything down. Add that to rather a lot 
of other problems...


The point is that the MIPS (specifically, mipsel) compiler has only been 
approximately intact for a few weeks, and there are still a lot of test 
cases failing. Since I've already seen that something wasn't working 
properly during Lazarus's startup and since I think that the IDE uses 
background code scanning directories etc. I think there's a whole lot of 
underpinnings that need to be got right first. It would be particularly 
unfair to get e.g. Indy involved until we're sure the compiler is 
error-free.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread Lukasz Sokol
On 29/10/2012 12:44, SkyDiablo wrote:
> okay, again from scratch. I downloaded and installed the bintuils for windows:
[snip]
> 
> # sh helloWorld4MIPS
> helloWorld4MIPS: line 1: syntax error: unexpected "("
> 
> what can or should I do now that I can programs under lazarus for my router 
> which is recorded with openWRT?
> 
You produced an /executable/ ? 
Then why not just do

./helloWorld4MIPS

in the dir where the binary is copied to ?
(yes, dot-slash is needed unless you have this directory added to PATH)

AFAIK, doing 

sh $file 

will attempt to run it as shell script, WHICH IT ISN'T ?

> greez & thx,
>   sky...
> 

el es


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread SkyDiablo


Having the cross compiler and RTL, you should then be able to either 
build a native compiler etc. or to compile trivial programs (some 
fancy stuff won't work yet because you haven't built the full FCL). 
The native compiler can be copied onto your mipsel system, and is 
currently good enough to recompile itself.


ok, i want to create a little peace of software with multi-thread and 
maybe use some indy (TidTCP) stuff? it this possible with this MIPS 
crosscompiler port?


greez & thx,
  sky...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread Mark Morgan Lloyd

SkyDiablo wrote:
okay, again from scratch. I downloaded and installed the bintuils for 
windows:


No. You've already said that you've got a Debian (presumably x86) system 
available. Use that, and follow the instructions I put in the wiki page: 
I wrote those line-by-line as I was doing the job (there might be a 
minor glitch in there somewhere because I changed a directory layout 
part way through, but apart from the the commands are still the same).


You start off with a /specific/ version of binutils, slightly older 
won't work and somebody's already said in the ML that newer ones are 
problematic (you /have/ read that thread I pointed you at, haven't 
you?). You build yourself a cross-compiler, you then use that to build 
yourself an RTL. I did that about a week ago, it works.


Having the cross compiler and RTL, you should then be able to either 
build a native compiler etc. or to compile trivial programs (some fancy 
stuff won't work yet because you haven't built the full FCL). The native 
compiler can be copied onto your mipsel system, and is currently good 
enough to recompile itself.


As LBSC used to write, "follow the words and music and you won't go 
wrong". However if you continue to guess and not to follow the advice 
people are giving you you won't get anywhere: the compiler has only been 
working for a few weeks and everything is still comparatively fragile.


Apologies if I sound slightly less patient than Henry, Michael et al, 
but the basic compiler *DOES* work (I certainly don't have the 
experience to apply non-standard fixes on the fly, and if I did I'd have 
mentioned it). However as I described in a different thread a few days 
ago there are still problems running Lazarus natively on MIPS, so don't 
try that unless you've got time to start investigating the outstanding 
code generation issues.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread SkyDiablo
okay, again from scratch. I downloaded and installed the bintuils for 
windows:


Sourcery CodeBench Lite 2012.03-63 for MIPS GNU / Linux -> 
https://sourcery.mentor.com/GNUToolchain/release2190


Then I looked at the "FPC 2.7.x Sources" downloaded (daily snapshot) -> 
http://www.freepascal.org/develop.var


Now I write a batch file which I want to create a corresponding 
linux-mips FPC compiler.


==
set 
PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;D:\Sourcery_CodeBench_Lite_for_MIPS_GNU_Linux_Toolchain\lib\gcc;D:\Sourcery_CodeBench_Lite_for_MIPS_GNU_Linux_Toolchain\bin

set PREFIX=mips-linux-gnu-
set INSTALLDIR="D:\fpc\install"
set FPCMAKE="D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\utils\fpcm\fpcmake.exe"
set CPU_TARGET=mips
set OS_TARGET=linux

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
make distclean

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\utils\fpcm
make all

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc

make all OS_TARGET=%OS_TARGET% CPU_TARGET=%CPU_TARGET% 
BINUTILSPREFIX=%PREFIX%
make crossinstall OS_TARGET=%OS_TARGET% CPU_TARGET=%CPU_TARGET% 
BINUTILSPREFIX=%PREFIX% INSTALL_PREFIX=%INSTALLDIR% FPCMAKE=%FPCMAKE%

make all install INSTALL_PREFIX=%INSTALLDIR%

pause
==

deposited these new FPC compiler and Lazarus in a simple "hello world" 
application compiled with it. the compile runs without any problems but 
only the binary cant be run on my router. I have the binary viewed more 
closely, and the first character in the file are "ELF". "ELF" stands for 
"Executable and Linkable Format" and describing an a file. is it 
possible that my router is recorded with openWRTthat is not 'ELF' 
supported? how could I implement it that I create files without this 
"ELF" format? here are the "binutils" to blame?


# cat /proc/cpuinfo
system type : Atheros AR9132 rev 2
machine : TP-LINK TL-WR1043ND
processor   : 0
cpu model   : MIPS 24Kc V7.4
BogoMIPS: 266.24
wait instruction: yes
microsecond timers  : yes
tlb_entries : 16
extra interrupt vector  : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 
0x0ffc, 0x0ffb, 0x0ff8]

ASEs implemented: mips16
shadow register sets: 1
core: 0
VCED exceptions : not available
VCEI exceptions : not available


# cat /proc/version
Linux version 2.6.32.27 (gcc version 4.3.3 (GCC) )


# sh helloWorld4MIPS
helloWorld4MIPS: line 1: syntax error: unexpected "("

what can or should I do now that I can programs under lazarus for my 
router which is recorded with openWRT?


greez & thx,
  sky...


Am 29.10.2012 13:03, schrieb Mark Morgan Lloyd:

SkyDiablo wrote:

i cant see the solution, i think it is the wrong "binutils"pack, right?


What do you mean?


Am 28.10.2012 21:40, schrieb Mark Morgan Lloyd:

SkyDiablo wrote:
it is a simple openWRT linux system. okay, i think i need other 
"binunits/toolchain" for compiling? can anyone help me to compile 
the right toolchain for windows?


the task is: create a crosscompile compiler for FPC from windows to 
linux MIPS systems... in the past i have learn to compile the 
compiler, but i have use some pre-compiles toolchains, i think this 
was the failur. i need some toolchain for non-ELF systms!


I suggest going back to the wiki page (applicable to Debian) I cited 
earlier in the thread, and my pointer to the ML thread where 
somebody said how he'd done it under Windows.





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread Mark Morgan Lloyd

SkyDiablo wrote:

i cant see the solution, i think it is the wrong "binutils"pack, right?


What do you mean?


Am 28.10.2012 21:40, schrieb Mark Morgan Lloyd:

SkyDiablo wrote:
it is a simple openWRT linux system. okay, i think i need other 
"binunits/toolchain" for compiling? can anyone help me to compile the 
right toolchain for windows?


the task is: create a crosscompile compiler for FPC from windows to 
linux MIPS systems... in the past i have learn to compile the 
compiler, but i have use some pre-compiles toolchains, i think this 
was the failur. i need some toolchain for non-ELF systms!


I suggest going back to the wiki page (applicable to Debian) I cited 
earlier in the thread, and my pointer to the ML thread where somebody 
said how he'd done it under Windows.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-29 Thread SkyDiablo

i cant see the solution, i think it is the wrong "binutils"pack, right?

Am 28.10.2012 21:40, schrieb Mark Morgan Lloyd:

SkyDiablo wrote:
it is a simple openWRT linux system. okay, i think i need other 
"binunits/toolchain" for compiling? can anyone help me to compile the 
right toolchain for windows?


the task is: create a crosscompile compiler for FPC from windows to 
linux MIPS systems... in the past i have learn to compile the 
compiler, but i have use some pre-compiles toolchains, i think this 
was the failur. i need some toolchain for non-ELF systms!


I suggest going back to the wiki page (applicable to Debian) I cited 
earlier in the thread, and my pointer to the ML thread where somebody 
said how he'd done it under Windows.





--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-28 Thread Mark Morgan Lloyd

SkyDiablo wrote:
it is a simple openWRT linux system. okay, i think i need other 
"binunits/toolchain" for compiling? can anyone help me to compile the 
right toolchain for windows?


the task is: create a crosscompile compiler for FPC from windows to 
linux MIPS systems... in the past i have learn to compile the compiler, 
but i have use some pre-compiles toolchains, i think this was the 
failur. i need some toolchain for non-ELF systms!


I suggest going back to the wiki page (applicable to Debian) I cited 
earlier in the thread, and my pointer to the ML thread where somebody 
said how he'd done it under Windows.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-28 Thread SkyDiablo
it is a simple openWRT linux system. okay, i think i need other 
"binunits/toolchain" for compiling? can anyone help me to compile the 
right toolchain for windows?


the task is: create a crosscompile compiler for FPC from windows to 
linux MIPS systems... in the past i have learn to compile the compiler, 
but i have use some pre-compiles toolchains, i think this was the 
failur. i need some toolchain for non-ELF systms!


some help?

greez & thx,
sky...

Am 28.10.2012 00:22, schrieb waldo kitty:

On 10/27/2012 15:37, SkyDiablo wrote:
ok, now i can compile some binaries, but they dont run on my target 
system, i

get this error:


i cannot help very much with your goals but...


helloWorld4MIPS: line 1: syntax error: unexpected "("

so i'm not sure about the right "toolchain"? i get a binary thats 
starts with

"ELF", what does it mean this "ELF" ?


i googled "elf binary" (sans quotes) and got this URL...

http://en.wikipedia.org/wiki/Executable_and_Linkable_Format


by the way, i have switch to "mipsel".


if it isn't *nix, ELF binaries won't run on it...


maybe, should i change to a debian system for cross-compile?

greez & thx,
sky...

Am 26.10.2012 23:24, schrieb Sven Barth:


Am 26.10.2012 18:59 schrieb "SkyDiablo" mailto:skydia...@gmx.net>>:
>
> ok, i play around with this stuff, but now i get this error at 
compiling:

>
> project1.lpr(0,0) Fatal: Can not find unit system used by Project1.
>
> i cant fix it :(

There are three things you can try:
1. Ensure that your project settings ate correctly set to mips-linux 
and that
the correct compiler is used. You can check this by doing a compile 
in Lazarus
and when it reports the error you right click on the message window 
and select
"copy all messages including hidden" (or so) and paste them 
somewhere you can
read them (e.g. after the final "end." of your project) and check 
whether the
compiler version is correct, the compiler date (your compilation 
date) and

that the target is set correctly

2. Maybe your search path is wrong. Take a look at your 2.7.1 
fpc.cfg and
search for a -Fu option with "rtl" at the end and verify that this 
is the

correct path and that a "system.ppu" and "system.o" is located there.

3. Add the option "-vut" to the "other settings" memo in the 
compiler options,
copy the output as in 1. and check whether the compiler indeed 
searches in the

correct directory for "system.ppu"




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-27 Thread waldo kitty

On 10/27/2012 15:37, SkyDiablo wrote:

ok, now i can compile some binaries, but they dont run on my target system, i
get this error:


i cannot help very much with your goals but...


helloWorld4MIPS: line 1: syntax error: unexpected "("

so i'm not sure about the right "toolchain"? i get a binary thats starts with
"ELF", what does it mean this "ELF" ?


i googled "elf binary" (sans quotes) and got this URL...

http://en.wikipedia.org/wiki/Executable_and_Linkable_Format


by the way, i have switch to "mipsel".


if it isn't *nix, ELF binaries won't run on it...


maybe, should i change to a debian system for cross-compile?

greez & thx,
sky...

Am 26.10.2012 23:24, schrieb Sven Barth:


Am 26.10.2012 18:59 schrieb "SkyDiablo" mailto:skydia...@gmx.net>>:
>
> ok, i play around with this stuff, but now i get this error at compiling:
>
> project1.lpr(0,0) Fatal: Can not find unit system used by Project1.
>
> i cant fix it :(

There are three things you can try:
1. Ensure that your project settings ate correctly set to mips-linux and that
the correct compiler is used. You can check this by doing a compile in Lazarus
and when it reports the error you right click on the message window and select
"copy all messages including hidden" (or so) and paste them somewhere you can
read them (e.g. after the final "end." of your project) and check whether the
compiler version is correct, the compiler date (your compilation date) and
that the target is set correctly

2. Maybe your search path is wrong. Take a look at your 2.7.1 fpc.cfg and
search for a -Fu option with "rtl" at the end and verify that this is the
correct path and that a "system.ppu" and "system.o" is located there.

3. Add the option "-vut" to the "other settings" memo in the compiler options,
copy the output as in 1. and check whether the compiler indeed searches in the
correct directory for "system.ppu"




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-27 Thread SkyDiablo
ok, now i can compile some binaries, but they dont run on my target 
system, i get this error:


helloWorld4MIPS: line 1: syntax error: unexpected "("

so i'm not sure about the right "toolchain"? i get a binary thats starts 
with "?ELF", what does it mean this "ELF" ? by the way, i have switch to 
"mipsel".


maybe, should i change to a debian system for cross-compile?

greez & thx,
  sky...

Am 26.10.2012 23:24, schrieb Sven Barth:


Am 26.10.2012 18:59 schrieb "SkyDiablo" >:

>
> ok, i play around with this stuff, but now i get this error at 
compiling:

>
> project1.lpr(0,0) Fatal: Can not find unit system used by Project1.
>
> i cant fix it :(

There are three things you can try:
1. Ensure that your project settings ate correctly set to mips-linux 
and that the correct compiler is used. You can check this by doing a 
compile in Lazarus and when it reports the error you right click on 
the message window and select "copy all messages including hidden" (or 
so) and paste them somewhere you can read them (e.g. after the final 
"end." of your project) and check whether the compiler version is 
correct, the compiler date (your compilation date) and that the target 
is set correctly


2. Maybe your search path is wrong. Take a look at your 2.7.1 fpc.cfg 
and search for a -Fu option with "rtl" at the end and verify that this 
is the correct path and that a "system.ppu" and "system.o" is located 
there.


3. Add the option "-vut" to the "other settings" memo in the compiler 
options, copy the output as in 1. and check whether the compiler 
indeed searches in the correct directory for "system.ppu"


Regards,
Sven



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-26 Thread Sven Barth
Am 26.10.2012 18:59 schrieb "SkyDiablo" :
>
> ok, i play around with this stuff, but now i get this error at compiling:
>
> project1.lpr(0,0) Fatal: Can not find unit system used by Project1.
>
> i cant fix it :(

There are three things you can try:
1. Ensure that your project settings ate correctly set to mips-linux and
that the correct compiler is used. You can check this by doing a compile in
Lazarus and when it reports the error you right click on the message window
and select "copy all messages including hidden" (or so) and paste them
somewhere you can read them (e.g. after the final "end." of your project)
and check whether the compiler version is correct, the compiler date (your
compilation date) and that the target is set correctly

2. Maybe your search path is wrong. Take a look at your 2.7.1 fpc.cfg and
search for a -Fu option with "rtl" at the end and verify that this is the
correct path and that a "system.ppu" and "system.o" is located there.

3. Add the option "-vut" to the "other settings" memo in the compiler
options, copy the output as in 1. and check whether the compiler indeed
searches in the correct directory for "system.ppu"

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-26 Thread SkyDiablo

ok, i play around with this stuff, but now i get this error at compiling:

project1.lpr(0,0) Fatal: Can not find unit system used by Project1.

i cant fix it :(

Am 25.10.2012 20:15, schrieb Sven Barth:

On 25.10.2012 20:05, SkyDiablo wrote:



This is related to the fact that 2.6.0's fpcmake does not support
mips-linux yet. Possible solution:

First do (once, independantly) the following:

(assuming the current dir is your 2.7.1 source directory)
cd utils\fpcm
make all

And then add "FPCMAKE=%YOURSOURCEDIR%\utils\fpcm\fpcmake.exe" to the
"crossinstall" line. This should hopefully help...

Regards,
Sven



okay, thats works fine! thx! and now, it is possible to say "lazarus" is
to use this new crosscompiler?


You can change the compiler that Lazarus uses in "Tools" => "Options" 
=> "Environment" => "Files" => "Compiler path".


Here you have two possiblities:
1. Do additionally a "make all install INSTALL_PREFIX=%INSTALLDIR%" 
and point Lazarus to the "fpc.exe" binary in the 
%INSTALLDIR%\bin\i386-win32 directory (this way you can also compile 
for Windows in your case)

2. Simply point Lazarus to the "ppcrossmips.exe"

In both cases you also need to change your target OS to "Linux" and 
your target CPU to "MIPS" in "Project" => "Project Options" => 
"Compiler Options" => "Code Generation" and then compile as usual 
(Ctrl + F9), but you might want to avoid using "Run" (F9) as then 
you'll get a "debugger has crashed" error dialog, because of the 
different executable format ;)


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-25 Thread Sven Barth

On 25.10.2012 20:05, SkyDiablo wrote:



This is related to the fact that 2.6.0's fpcmake does not support
mips-linux yet. Possible solution:

First do (once, independantly) the following:

(assuming the current dir is your 2.7.1 source directory)
cd utils\fpcm
make all

And then add "FPCMAKE=%YOURSOURCEDIR%\utils\fpcm\fpcmake.exe" to the
"crossinstall" line. This should hopefully help...

Regards,
Sven



okay, thats works fine! thx! and now, it is possible to say "lazarus" is
to use this new crosscompiler?


You can change the compiler that Lazarus uses in "Tools" => "Options" => 
"Environment" => "Files" => "Compiler path".


Here you have two possiblities:
1. Do additionally a "make all install INSTALL_PREFIX=%INSTALLDIR%" and 
point Lazarus to the "fpc.exe" binary in the %INSTALLDIR%\bin\i386-win32 
directory (this way you can also compile for Windows in your case)

2. Simply point Lazarus to the "ppcrossmips.exe"

In both cases you also need to change your target OS to "Linux" and your 
target CPU to "MIPS" in "Project" => "Project Options" => "Compiler 
Options" => "Code Generation" and then compile as usual (Ctrl + F9), but 
you might want to avoid using "Run" (F9) as then you'll get a "debugger 
has crashed" error dialog, because of the different executable format ;)


Regards,
Sven


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-25 Thread SkyDiablo


This is related to the fact that 2.6.0's fpcmake does not support 
mips-linux yet. Possible solution:


First do (once, independantly) the following:

(assuming the current dir is your 2.7.1 source directory)
cd utils\fpcm
make all

And then add "FPCMAKE=%YOURSOURCEDIR%\utils\fpcm\fpcmake.exe" to the 
"crossinstall" line. This should hopefully help...


Regards,
Sven



okay, thats works fine! thx! and now, it is possible to say "lazarus" is 
to use this new crosscompiler?


greez & thx,
  sky...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-25 Thread Sven Barth

Am 25.10.2012 12:06, schrieb SkyDiablo:
so, next one. there was an fail PREFIX at all so i change it to 
"mips-linux-gnu-", this scrips works at first:


===
set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files 
(x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc;C:\Program Files 
(x86)\CodeSourcery\Sourcery G++ Lite\bin

set PREFIX=mips-linux-gnu-
set INSTALLDIR="D:\fpc\install"

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc

make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX%
make crossinstall OS_TARGET=linux CPU_TARGET=mips 
BINUTILSPREFIX=%PREFIX% INSTALL_PREFIX=%INSTALLDIR%

===

but now, i get the following error:


[snip]
C:/lazarus/fpc/2.6.0/bin/i386-win32/fpcmake.exe -p -Tmips-linux 
Makefile.fpc

Processing Makefile.fpc
Error: No targets set



This is related to the fact that 2.6.0's fpcmake does not support 
mips-linux yet. Possible solution:


First do (once, independantly) the following:

(assuming the current dir is your 2.7.1 source directory)
cd utils\fpcm
make all

And then add "FPCMAKE=%YOURSOURCEDIR%\utils\fpcm\fpcmake.exe" to the 
"crossinstall" line. This should hopefully help...


Regards,
Sven


Am 25.10.2012 08:39, schrieb Sven Barth:


Am 24.10.2012 22:08 schrieb "SkyDiablo" >:

>
> wow ! thats amazing!
>
> okay, i create the follow batch-file:
>
> ===
> set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files 
(x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc

> set PREFIX=mips-linux-
> set BINUTILSDIR="C:\Program Files (x86)\CodeSourcery\Sourcery G++ 
Lite\bin"

> set INSTALLDIR="D:\fpc\install"
>
> cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
>
> make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX% 
CROSSBINDIR=%BINUTILSDIR%
> make crossinstall OS_TARGET=linux CPU_TARGET=mips 
BINUTILSPREFIX=%PREFIX% CROSSBINDIR=%BINUTILSDIR% 
INSTALL_PREFIX=%INSTALLDIR%

>
> pause
> ===
>
> so, it runs and runs and runs... but then:
>

The error says that it can't find the "mips-linux-as" executable 
which is because there are spaces in the path to it. This is 
something make handles rather badly...


But you have already a part of the solution: you added the path to 
PATH. With that you can now simply remove the 
"CROSSBINDIR=%BINUTILSDIR%" from both commands and it should work.


Regards,
Sven



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-25 Thread SkyDiablo
so, next one. there was an fail PREFIX at all so i change it to 
"mips-linux-gnu-", this scrips works at first:


===
set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files 
(x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc;C:\Program Files 
(x86)\CodeSourcery\Sourcery G++ Lite\bin

set PREFIX=mips-linux-gnu-
set INSTALLDIR="D:\fpc\install"

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc

make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX%
make crossinstall OS_TARGET=linux CPU_TARGET=mips 
BINUTILSPREFIX=%PREFIX% INSTALL_PREFIX=%INSTALLDIR%

===

but now, i get the following error:

===
C:/lazarus/fpc/2.6.0/bin/i386-win32/ginstall.exe -m 755 -d 
D:\fpc\install/bin/i386-win32
C:/lazarus/fpc/2.6.0/bin/i386-win32/cp.exe -fp ppcrossmips.exe 
D:\fpc\install/bin/i386-win32/ppcrossmips.exe

make[4]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/compiler'
make[3]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make rtl_install 
FPC=D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/compiler/ppcrossmips.exe 
ZIPDESTDIR=D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc 
FPCMAKE=C:/lazarus/fpc/2.6.0/bin/i386-win32/fpcmake.exe

make[3]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make -C rtl install
make[4]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl'
make -C linux all
make[5]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
make[5]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
C:/lazarus/fpc/2.6.0/bin/i386-win32/fpcmake.exe -p -Tmips-linux Makefile.fpc
Processing Makefile.fpc
Error: No targets set
make[4]: *** [fpc_install] Error 1
make[4]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl'
make[3]: *** [rtl_install] Error 2
make[3]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make[2]: *** [installbase] Error 2
make[2]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make[1]: *** [installall] Error 2
make[1]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make: *** [crossinstall] Error 2
===

any idea ?

greez & thx,
  sky...

Am 25.10.2012 08:39, schrieb Sven Barth:


Am 24.10.2012 22:08 schrieb "SkyDiablo" >:

>
> wow ! thats amazing!
>
> okay, i create the follow batch-file:
>
> ===
> set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files 
(x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc

> set PREFIX=mips-linux-
> set BINUTILSDIR="C:\Program Files (x86)\CodeSourcery\Sourcery G++ 
Lite\bin"

> set INSTALLDIR="D:\fpc\install"
>
> cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
>
> make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX% 
CROSSBINDIR=%BINUTILSDIR%
> make crossinstall OS_TARGET=linux CPU_TARGET=mips 
BINUTILSPREFIX=%PREFIX% CROSSBINDIR=%BINUTILSDIR% 
INSTALL_PREFIX=%INSTALLDIR%

>
> pause
> ===
>
> so, it runs and runs and runs... but then:
>

The error says that it can't find the "mips-linux-as" executable which 
is because there are spaces in the path to it. This is something make 
handles rather badly...


But you have already a part of the solution: you added the path to 
PATH. With that you can now simply remove the 
"CROSSBINDIR=%BINUTILSDIR%" from both commands and it should work.


Regards,
Sven



--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-24 Thread Sven Barth
Am 24.10.2012 22:08 schrieb "SkyDiablo" :
>
> wow ! thats amazing!
>
> okay, i create the follow batch-file:
>
> ===
> set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files
(x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc
> set PREFIX=mips-linux-
> set BINUTILSDIR="C:\Program Files (x86)\CodeSourcery\Sourcery G++
Lite\bin"
> set INSTALLDIR="D:\fpc\install"
>
> cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc
>
> make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX%
CROSSBINDIR=%BINUTILSDIR%
> make crossinstall OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX%
CROSSBINDIR=%BINUTILSDIR% INSTALL_PREFIX=%INSTALLDIR%
>
> pause
> ===
>
> so, it runs and runs and runs... but then:
>

The error says that it can't find the "mips-linux-as" executable which is
because there are spaces in the path to it. This is something make handles
rather badly...

But you have already a part of the solution: you added the path to PATH.
With that you can now simply remove the "CROSSBINDIR=%BINUTILSDIR%" from
both commands and it should work.

Regards,
Sven
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-24 Thread SkyDiablo

wow ! thats amazing!

okay, i create the follow batch-file:

===
set PATH=C:\lazarus\fpc\2.6.0\bin\i386-win32;C:\Program Files 
(x86)\CodeSourcery\Sourcery G++ Lite\lib\gcc

set PREFIX=mips-linux-
set BINUTILSDIR="C:\Program Files (x86)\CodeSourcery\Sourcery G++ Lite\bin"
set INSTALLDIR="D:\fpc\install"

cd D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc

make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX% 
CROSSBINDIR=%BINUTILSDIR%
make crossinstall OS_TARGET=linux CPU_TARGET=mips 
BINUTILSPREFIX=%PREFIX% CROSSBINDIR=%BINUTILSDIR% 
INSTALL_PREFIX=%INSTALLDIR%


pause
===

so, it runs and runs and runs... but then:

===
C:/lazarus/fpc/2.6.0/bin/i386-win32/rm.exe -rf units_bs
make[4]: Leaving directory 
`D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/packages/fpmkunit

'
make[3]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/packages'
make[2]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make rtl_smart 
FPC=D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/compiler/ppcrossmips.exe R

ELEASE=1
make[2]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make -C rtl smart
make[3]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl'
make -C linux smart
make[4]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
make all LINKSMART=1 CREATESMART=1
make[5]: Entering directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
C:\Program Files (x86)\CodeSourcery\Sourcery G++ 
Lite\bin/mips-linux-as.exe -EB
-o D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/units/mips-linux/prt0.o 
mips/prt0.as
process_begin: CreateProcess((null), C:\Program Files 
(x86)\CodeSourcery\Sourcer
y G++ Lite\bin/mips-linux-as.exe -EB -o 
D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/u

nits/mips-linux/prt0.o mips/prt0.as, ...) failed.
make (e=2): Das System kann die angegebene Datei nicht finden.
make[5]: *** [prt0.o] Error 2
make[5]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
make[4]: *** [fpc_smart] Error 2
make[4]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl/linux'
make[3]: *** [linux_smart] Error 2
make[3]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc/rtl'
make[2]: *** [rtl_smart] Error 2
make[2]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make[1]: *** [build-stamp.mips-linux] Error 2
make[1]: Leaving directory `D:/fpc/trunc/2.7.x/fpcbuild/fpcsrc'
make: *** [crossinstall] Error 2
===

ERROR ALARM  *fu...*

so i checked the path:

D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\rtl\units\mips-linux

the path exists, but it is emty !!! so i dont know what should i do now 
? a another path exists too:


D:\fpc\trunc\2.7.x\fpcbuild\fpcsrc\rtl\units\i386-win32

there are many files inside... Sven Barth, can you held me again ?

greez & big thx,
   sky...


Am 23.10.2012 23:09, schrieb Sven Barth:

On 23.10.2012 15:49, SkyDiablo wrote:

okay, what i have to try:

1. use lazarus 1.1 with FPC 2.7.1 (i386-win32-win32/win64) SVN-Revision
39124
2. download current fpc-build trunk 2.7.x -> D:\pas\trunc\fpcbuild\
3. compile with lazarus:
D:\pas\trunc\fpcbuild\fpcsrc\compiler\ppmipsel.lpi ->
D:\pas\trunc\fpcbuild\fpcsrc\compiler\mipsel\pp.exe


The first step is wrong. Compiling trunk is only supported by the last 
release of FPC which currently is 2.6.0.


Also the last step is wrong. That is only for compiler developers.

The correct way is the following:

Open a command line and navigate to D:\pas\trunc\fpcbuild\fpcsrc.
Execute the following command (placeholders that you need to replace 
correctly are marked as %...% and commented on below):


make all OS_TARGET=linux CPU_TARGET=mips BINUTILSPREFIX=%PREFIX% 
CROSSBINDIR=%BINUTILSDIR%
make crossinstall OS_TARGET=linux CPU_TARGET=mips 
BINUTILSPREFIX=%PREFIX% CROSSBINDIR=%BINUTILSDIR% 
INSTALL_PREFIX=%INSTALLDIR%


PREFIX is the prefix of the GNU binutils you have either downloaded or 
build yourself. For MIPS it should be something like "mips-elf-" or 
"mips-linux-".
BINUTILSDIR is the directory where the binutils binaries are located. 
Most especially "as" and "ld" (both with the %PREFIX% given above).
INSTALLDIR is the directory where you want to install that FPC to. It 
should be a different directory from the "fpcsrc" directory. E.g.: 
D:\pas\trunc\fpcbuild\fpcsrc-install


Note: If your FPC 2.6.0 installation is not in "PATH" you need to add 
"FPC=path\to\your\fpc.exe" to your the commands containing "all".


Eventually you'll might also want to do a "make all install 
INSTALL_PREFIX=%INSTALLDIR%" before all that to install a win32 
compiler and (to ease usage) the "fpc" binary.


You then need to add a fpc.cfg to %INSTALLDIR%\bin\i386-win32 (or to 
be more precise: the directory where the ppcrossmips binary is 
located). You can e.g. copy the one from your 2.6.0 installation and 
adjust the paths in it.


Then it should work to call eithe

Re: [Lazarus] Cross-compiling -> MIPS

2012-10-22 Thread Vincent Snijders
2012/10/22 Henry Vermaak :
> Yes.  I remember a rule that lazarus trunk is supposed to compile with
> both the latest fpc release and fpc trunk.  Don't know if that's still
> the case, though.

And with fixes head, because that is likely to be used by the next FPC release.

Vincent

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-22 Thread Henry Vermaak
On 22/10/12 10:02, Mark Morgan Lloyd wrote:
> Henry Vermaak wrote:
>> I built lazarus with fpc 2.7.1 for armhf this weekend.  Why do you say
>> 2.6.0 is needed?
> 
> Because of the feeling with which most developers insist that 2.6.0 is
> the one true way :-)

Yes, I tend to use 2.6.0, too, but armhf port doesn't exist in 2.6.0
(afaik) :)

> OK, I'll try it for MIPS in a couple of days. I presume you were using
> Lazarus trunk.

Yes.  I remember a rule that lazarus trunk is supposed to compile with
both the latest fpc release and fpc trunk.  Don't know if that's still
the case, though.

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-22 Thread Mark Morgan Lloyd

Henry Vermaak wrote:


First, this is the Lazarus conf and while FPC now works (subject to some
potential code generation issues) targeting little-endian MIPS it's
probably some while before Lazarus will. The issue here is that building
Lazarus requires the current stable version of FPC (2.6.0), while MIPS
is only available for trunk (2.7.1 from svn).


I built lazarus with fpc 2.7.1 for armhf this weekend.  Why do you say
2.6.0 is needed?


Because of the feeling with which most developers insist that 2.6.0 is 
the one true way :-)


OK, I'll try it for MIPS in a couple of days. I presume you were using 
Lazarus trunk.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-22 Thread Mark Morgan Lloyd

Michael Schnell wrote:

Hi,
I suggest first seeking for help to do a command line "Hello World" for 
your MIPS system in the fpc developer's mailing ( 
fpc-de...@lists.freepascal.org ) list and when this works, try to do a 
Lazarus application, as same involves  compiling the LCL for MIPS which 
I suppose is a decent challenge.


I've not attempted compiling Lazarus for MIPS yet because of the FPC 
version issue and because at present I'm only running MIPS as a Qemu 
guest and performance is poor (in fact, I suspect is worse than when I 
first installed it). It runs well on SPARC which is one of the more 
demanding platforms in terms of alignment requirements etc.


Much of the performance issue could be sidestepped by doing a 
cross-build, but that's something that I've always managed to avoid. 
Note that for non-x86 targets there are a couple of IDE issues relating 
to the target processor type, opcode formats and so on (just leave these 
set to the default).


http://mantis.freepascal.org/view.php?id=20310
http://mantis.freepascal.org/view.php?id=20311

--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-22 Thread Henry Vermaak
On 22/10/12 09:20, Mark Morgan Lloyd wrote:
> SkyDiablo wrote:
>> hiho!
>>
>> i search a solution to build my "hello world" source from my windows
>> x64 system to a openWRT (linux) with a MIPS CPU system ->
>> cross-compiling?
>>
>> i do not find a working solution :( now i'm trying to build with a
>> debian system, but is dosnt work for now :(
> 
> First, this is the Lazarus conf and while FPC now works (subject to some
> potential code generation issues) targeting little-endian MIPS it's
> probably some while before Lazarus will. The issue here is that building
> Lazarus requires the current stable version of FPC (2.6.0), while MIPS
> is only available for trunk (2.7.1 from svn).

I built lazarus with fpc 2.7.1 for armhf this weekend.  Why do you say
2.6.0 is needed?

Henry

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-22 Thread Michael Schnell

Hi,
I suggest first seeking for help to do a command line "Hello World" for 
your MIPS system in the fpc developer's mailing ( 
fpc-de...@lists.freepascal.org ) list and when this works, try to do a 
Lazarus application, as same involves  compiling the LCL for MIPS which 
I suppose is a decent challenge.


-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Cross-compiling -> MIPS

2012-10-22 Thread Mark Morgan Lloyd

SkyDiablo wrote:

hiho!

i search a solution to build my "hello world" source from my windows x64 
system to a openWRT (linux) with a MIPS CPU system -> cross-compiling?


i do not find a working solution :( now i'm trying to build with a 
debian system, but is dosnt work for now :(


First, this is the Lazarus conf and while FPC now works (subject to some 
potential code generation issues) targeting little-endian MIPS it's 
probably some while before Lazarus will. The issue here is that building 
Lazarus requires the current stable version of FPC (2.6.0), while MIPS 
is only available for trunk (2.7.1 from svn).


I suggest that this is better-discussed in the fpc-pascal mailing list, 
but you'll find notes on building MIPS binutils etc. at 
http://wiki.lazarus.freepascal.org/Native_MIPS_Systems (these are 
applicable to Linux). I suggest that you could usefully review the 
thread at 
http://lists.freepascal.org/lists/fpc-devel/2012-October/030071.html 
which might be a better place to discuss things if you have problems 
building the compiler.


Note that I'm a long way down the list as far as skill is concerned, and 
make no claim to understand what I'm doing.


--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Cross-compiling -> MIPS

2012-10-21 Thread SkyDiablo

hiho!

i search a solution to build my "hello world" source from my windows x64 
system to a openWRT (linux) with a MIPS CPU system -> cross-compiling?


i do not find a working solution :( now i'm trying to build with a 
debian system, but is dosnt work for now :(


greez & thx,
  sky...

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus