Re: [fpc-devel] Exception problems in FPC 3.0.0

2015-10-27 Thread Sergio Flores
Yury, I think you're right, I'm using the precompiled binary that indeed
seems to been compiled in soft-fpu mode, so that would explain everything,
as OpenGL is probably triggering hard fpu exceptions that are not being
caught.

I tried your asm function, however adding it makes the app crash at startup.

I added it to initialization of my OpenGLES unit,
Seems that just having the function laying around, even without calling it,
causes the crash.

Checking the android log, it says the following:
E/AndroidRuntime(10684): java.lang.UnsatisfiedLinkError: dlopen failed:
cannot locate symbol "TERRA_OPENGLES_$$_LOADOPENGL" referenced by
"libterra.so"...

LoadOpenGL() is the only pascal function that is contained in this unit (it
just loads the opengles library dynamically and assigns function pointers).
For some reason, adding the assembler function to this unit makes this
function disappear, what causes this very weird behaviour?

Full unit code here:
http://pastebin.com/h2gCcikd

Commenting both the function and the function call makes the game startup
again without crashing (albeit still crashes whevener a float exception
happens)

Probably recompiling FPC with hard float support would be the best
solution, however compiling FPC in Windows is a frustrating game of trial
and errors. I had written a .bat file that I used with 2.6.2, but it no
longer works in 3.0.0. Once I have some free time I guess I will have to
try discovering whats problem. Or if anyone has 3.0.1 compiled with
hard-floats and can provide a download link, i would be thankful.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Exception problems in FPC 3.0.0

2015-10-26 Thread Sergio Flores
Hi guys, congrats for the 3.0 release!

However after upgrading FPC, my Android game now crashes with division by
zero exceptions (it happens always in the same place).

I changed nothing in the code, only the compiler changed from a 2.7.x to
3.0.0 (cross compiler windows to Arm binary version obtained from the link
that was distributed in the mailing list last week).
If I revert to using the old compiler, no exceptions happen.

Note that I have this line in one of my units:

Initialization
SetExceptionMask([exInvalidOp, exDenormalized, exZeroDivide, exOverflow,
exUnderflow, exPrecision]);
End.

I masking all of those stuff because it is a requisite for OpenGL graphics.

Looking at the breaking changes section of the wiki, I dont see anything
related. Anyone has an idea of what changed that could cause this or at
least how I can debug it?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Status of debug line info

2015-06-23 Thread Sergio Flores
 I was trying to get lineinfo to work in the crash reporter since I've seen
some comercial games doing the same (reporting a stack dump with
lines/filename.cpp).
The problem with gathering just addresses is that they change with every
build (and I ship daily builds).
Anyway I could try that, but I still need the base address, and I have
no
clue how to obtain that in FPC.
Is there any easy way to find it?
Probably reading it from /proc/pid/maps in unix platforms could work...
Another question, I thought about a idea for platform independent way to
support line info.
Could the compiler generate a internal table/array that mapped all
functions addresses to strings?
Let's say a additional-Gsomething  flag is added for this, then a
special
internal function would be generated, and called at run-time, before
units
initialization. The function would just build a huge table of adress
associations, like this.

- Ignored:
procedure init_debuginfo();
begin
  register_debug_address(@unitX_funcA, 'unitX', 'funcA');
  register_debug_address(@unitX_funcB, 'unitX', 'funcB');
  register_debug_address(@unitY_funcA, 'unitY', 'funcA');
// all other functions/methods/procedures in the whole program ...
end;


Probably not as simple of that, it might need more info (range of the
functions address, not just starting point).
Then calling BackTraceStrFunc() would look up the address using the
table
built before.

Even though this would just be useful to print routine names and not
lines,
would this work?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Status of debug line info

2015-06-23 Thread Sergio Flores
Thanks Michael and Jonas for the answers.

I was trying to get lineinfo to work in the crash reporter since I've seen
some comercial games doing the same (reporting a stack dump with
lines/filename.cpp).

The problem with gathering just addresses is that they change with every
build (and I ship daily builds).
Anyway I could try that, but I still need the base address, and I have no
clue how to obtain that in FPC.
Is there any easy way to find it?
Probably reading it from /proc/pid/maps in unix platforms could work...


Another question, I thought about a idea for platform independent way to
support line info.

Could the compiler generate a internal table/array that mapped all
functions addresses to strings?

Let's say a additional-Gsomething  flag is added for this, then a special
internal function would be generated, and called at run-time, before units
initialization. The function would just build a huge table of adress
associations, like this.

procedure init_debuginfo();
begin
  register_debug_address(@unitX_funcA, 'unitX', 'funcA');
  register_debug_address(@unitX_funcB, 'unitX', 'funcB');
  register_debug_address(@unitY_funcA, 'unitY', 'funcA');
// all other functions/methods/procedures in the whole program ...
end;


Probably not as simple of that, it might need more info (range of the
functions address, not just starting point).
Then calling BackTraceStrFunc() would look up the address using the table
built before.

Even though this would just be useful to print routine names and not lines,
would this work?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Status of debug line info

2015-06-22 Thread Sergio Flores
Some time ago I already talked a bit about it, but let's discuss this again.

I have developed a very complex game with FPC, that includes a crash log
reporting (by mail).
Recently a update did introduce some weird bug, and I keep receiving
reports by mail.
Sadly, except the ones that come from Windows users, the others have a
stack dump that just has addresses.

Please correct if I'm wrong, but it seems that line info is not working in
those 3 major platforms:

- Android
- iOS
- OSX

From what I gathered last time, both iOS and OSX need fpc support for DWARF
debug info, and thats why they not work (again, I not 100% sure if I'm
correct).

Now, about Android, which actually is more important for me now, I did some
investigation and experiments.

I asked FPC to generate a map file for Android (via -Xm) and noticed that
all addresses there are way different than the addresses in the stack
dumps. This makes sense, because when the .SO file that contains pascal
code is loaded in Android, it gets reallocated, so the addresses in the
.map file are just relative addresses.

Question 1:
Is it possible that this is a simple problem caused by FPC not calculating
the base address correctly and thus not finding the routine/line info?
If yes, anyone can point to the right place so I can try to look at it.

Question 2:
Related to question 1, but more broad. Can anyone give me a fast resume how
line info actually works in FPC. What files in FPC source should I look at
in case I want to add support for example for line info in Android/OSX/iOS?

Question 3:
I also found this C library that converts crashes that happen in native
code to proper Java exceptions with a neat stack dump of the native code. I
though I might try using this for now,  but it requires some compile flags
that I dont know if I can pass to FPC.

  LOCAL_CFLAGS := -funwind-tables -Wl,--no-merge-exidx-entries

Is it possible to pass the flags?
If yes, maybe I could even try to study the source of this and try to add
Android line info support for FPC.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] FPC Android crashes in Tegra CPUs

2014-12-20 Thread Sergio Flores
I've recently discovered that some fpc math functions crash on Tegra CPUs
(ARM7/Android), even when called with valid arguments.

Anyone has a clue what could cause this or possible workarounds?

Eg: Calling lnxp1(x) with x1 results in a SIGILL crash.

I did my own naive implementation of this function in pure pascal without
calling any FPC math function, and it fixed the problem.
However currently I found another crash in the same hardware that points to
fpc_ln_real function, and don't really want to reimplement lots of math
functions.
Probably any function related to logaritms suffers from this,.

Notes - I'm compiling with FPC 2.7.1 (from trunk, but not most recent, I
probably compiled it 2 or 3 months ago). Optimizations are off, due to them
being currently broken in ARM7.

I've got an Android app in Play Store with around 300 thousand downloads,
and from what I've gathered, this crash happens in any Tegra based device,
and only on those.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Building a static library

2014-08-26 Thread Sergio Flores
Let's start this email by saying that I know perfectly that FPC does not
support static libraries, I read all I could find about it.
However most reasons talk about that there would be problems if someone
tried to use two fpc static libs together because of duplicated symbols.

In my case I want to create a iPhone static lib to be used by objective-c
and C++ users. Since in this special case there will be one and only one
lib written in pascal, I though this would make it possible.

I saw that my own iOS projects that were based on templates worked by
compiling a static libFPC.a that would be then called by Objective-C.

So I did create my own static library by gathering all .o files from FPC
into a .a file. I wrote a .h header and added the static lib into a Xcode
Objective-C project.
Ok, it compiles and links correctly. It calls some of the pascal functions
correctly. But.. then it later crashes in one of the pascal functions.

Note that I have a lib_init() function called from C that is used to
initialize the pascal library, and it calls this undocumented fpc function:

procedure internal_initializeunits(); external name 'FPC_INITIALIZEUNITS';

This function from what I understood it calls all units initialization
sections, right?
Still, I'm missing something... the libFPC.a compiled in xcode templates
works fine with Objective-C, but also it does not share any memory back or
forward.

This seems to be some problem with memory allocation, since only calling
any function that creates pascal strings or classes seem to crash the app.
Any clue?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] Exporting functions in an Android library

2014-08-19 Thread Sergio Flores
Hi Sven, thanks for the fast answer.
I did not found that about [public] because I thought it was just an option
of export, and so always search for export documentation.

And I did have an exports function in main file, I told about it in my
previous mail, that was not the problem.

I checked better the compilation output, and I found out why there is a
problem.
There are too many assembler errors in all of my files!

build\TERRA_Localization.s:3184: Error: only lo regs allowed with immediate
-- `mov r8,#0'
build\TERRA_Localization.s:3212: Error: Thumb does not support conditional
execution
build\TERRA_Localization.s:3214: Error: unshifted register required -- `mvn
r3,#-2147483648'

Thus the object files are not generated correctly, they were probably empty
or something?
So I went and rebuilt FPC, to make sure it was only ok, and then I saw it,
those assembler errors also appeared during FPC compilation...

I tried many combinations of switches and finally found the culprit, it was
-CpARMV7
I changed it to -CpARMV5 and changed from -CfVFPV3 to -CfVFPV2.
Now FPC builds without assembly errors and my game too, and the export
symbols are there.
The game runs without crashing, and even threads work now, so good, I'm
making progress!

However...
As far I know armv5 has inferior performance, eg: does not support hard
floating point?
I really needed armv7 to work, so I investigated a bit more. It seems that
trunk fpc supports lots of armv7 variations, and the proper one seems to be
armv7a.
I compiled again FPC and my game with this instruction set, and it runs
great!

So the problem was just that, I dont know why the previous FPC version
worked fine with that instruction set thought, maybe armv7 defaulted to
armv7a or something?

Again, thanks again to everyone that made FPC a reality, you guys are great!
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Exporting functions in an Android library

2014-08-18 Thread Sergio Flores
Hi again!
This mail is the continuation of the Androids threads problem.
As you guys said, the threads problem seems to be caused by using a old
version of the compiler, so I went and compiled fpc from trunk, for Android
target.
Then I tried compiling my game using the cross compiler I just built.

I had to make some changes to the compilation options:
Replaced -Tlinux with -Tandroid
Replaced -CfVFPV2 with -CfVFPV3
Removed -mfloat-abi=hard
Added new unit path (units\rtl-objpas, seems it was necessary for dateutils
now)

And then it compiled fine, generated a .so, like before. All seems ok, so I
compile my java code, and make an apk. When I try running the game now it
crashes at startup.

D/dalvikvm( 5667): Trying to load lib
/data/data/com.terra.minimon3d/lib/libterraARMV7.so 0x424967b8
E/AndroidRuntime( 5667): java.lang.UnsatisfiedLinkError: Cannot load
library: reloc_library[1307]:   111 cannot locate 'PASCALMAIN'...

Strange... So I run nm on the .so file to check exported symbols.
D:\code\minimonhd\trunk\Android\libs\armeabi-v7anm -g libterraARMV7.so
 U FPC_THREADVARTABLES
 U INITFINAL
 U PASCALMAIN
(and others, calloc, malloc, FPC_RESOURCESTRINGTABLES, etc)

Where are my own exported JNI functions, they are gone?
I had like 30 of them, that were correctly exported with an older FPC.

Confused by this, I compile the game again, but this time with the older
FPC version.
I then run nm on the .so and the functions are all there...
0005aa08 T JNI_OnLoad
0005aa34 T JNI_OnUnload
00059b30 T Java_com_pascal_terra_TERRALibrary_ApplicationContextLost
00059b2c T Java_com_pascal_terra_TERRALibrary_ApplicationGetOrientation
Etc...
Something curious, PASCALMAIN is not anywhere in the export symbols now.
And I don't even understand why this is being called when I load the
library in the Java side?

My own exported functions are all declared in the main file.
They are defined like this:

Procedure Java_com_pascal_terra_TERRALibrary_ApplicationShutdown(env,
obj:Pointer);  stdcall; export; [public];
Begin
...
End;

Note that even in the old compiler, if the functions are defined outside
the main file they were not exported, compiler bug or some kind of
limitation?
Also the part export; [public]; seems necessary in Android, otherwise
they were also not exported correctly. I don't really understand what
[public] means, and sadly could not find documentation about it.
Finally, in the end of the main file I have an exports section, listing all
functions I want to export, all worked before so what changed that causes
the symbols to not be exported in the .so?

And why is this PASCALMAIN being exported, since I'm compiling a library
not a program?

Here's the complete compilation options I'm using, just in case I'm missing
something
-TAndroid -a -Parm -CpARMV7 -CfVFPV3 -gl -vewnhi -Xd -Sg -O-
-XParm-linux-androideabi-   -FUbuild -FEandroid\libs\%TARGET_OUTPUT%\
-olibterra%TARGET%.so
(plus fpc\units\rtl, rtl-objpas and 10 other paths belonging to my own
units)

Regards,
Sérgio
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Threads in Android

2014-08-17 Thread Sergio Flores
I'm trying to use threads in Android, but it seems they are not working yet
in FPC?

I tried two approachs, using FPC TThread and using pthreads, none would
work.

Using TThread requires including cthreads unit right?
But including this unit makes the app imediately close at startup,
silently, with nothing in the log except a message saying the process died.

Not including cthreads makes the app thrown an exception when creating a
new thread, as expected. (cannot create semaphore or something like that).

I tried to use pthreads directly instead. However allocating any memory
inside the new thread crashes the app imediately (The stack shows that the
crash was in the cmem unit).
I guess some setup code has to called at the thread startup to allow the
mem manager to work correctly?

I'm using FPC 2.6.1 for Android compilation, maybe this was fixed in later
versions?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] FPC ARM7 problems

2014-08-07 Thread Sergio Flores
I have a somehow big pascal game (more than 200k lines of code) that I'm
developing with FPC.
Right now I found a strange crashing bug that only happened in iOS, running
in the device (in the iOS simulator does not crash).  Desktop platforms
don't have any problems running the same code (Windows, Linux etc).
In Android I'm not sure, because while it does not crash in my devices, in
many players devices the game just crashes in that exact spot.

So I have some questions.

1 - This bug only happens with -O2 on, but with optimizations off the game
does not crash. I always thought that using optimizations was safe. Can
there be a compiler bug in the ARM7 codegen?
Lately I've been shipping the game without optimizations, but of course,
this means less performance.
I thought that the bug could be caused by differences in memory allocations
on those different OSes, but I'm not sure.
Anyone has a clue how to discover the difference between O2 and O- that
could cause such problems?

2 - I cannot get line info to work on iOS, all exceptions reported show
just addresses. I am using -gl so it should work, or it works only in some
targets?
If not possible to get automatic line info, is there any way to transform
those adresses into line numbers with some tool?
I think in Android the same thing happens, line info not generated when
using -gl, but I'm not 100% sure (I can check later).

3 - Finally, since I'm still using FPC 2.6.2 I decided to upgrade to 2.7.1
and try to recompile the game, to see if the crash in the game was gone.
But, with FPC 2.7.2 I simply can't compile the game, it gives errors in the
assembler stage.

Basically I get lots of errors similar to those
armv7/MinimonBattle.s:44518:co-processor offset out of range

I checked the asm of the lines in question, it is mostly just a bunch of
labels, eg:
Lj21874:
.byte0,0,32,64
Lj21879:
.longL_U_$MINIMONDB_$$_MOVEINFO$non_lazy_ptr-La1335-8
Lj21884:
.byte0,0,32,64

Compilation switches are the following:
-Sgix -Cfvfpv2 -gw2 -gl -O2 -CRriot

The error happens with Cfvfpv3 instead, and with optimizations on or off.
I'm using latest XCode, by the way.

Anyone has a clue why this happens? Could it be a compiler or assembler bug?
I'm guessing it, but the problem might be because some of the game files
are too big (10k lines of code or more), and as such too many labels are
generated in just one file. Could this cause problems?
Even if was because of the file size, FPC 2.6.2 generated asm code that
worked fine, so I dont understand.
If anyone wants to take a look at the generated asm, tell me and I'll send
you the file.

Regards,
Sergio
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] FPC ARM7 problems

2014-08-07 Thread Sergio Flores
I see guys, lots of useful info!
I did not know that optimizations where switchable per unit, that is quite
interesting and I can probably use it to better isolate the problem.
I will also try disabling peephole optimisations then, it can probably work
as a temporary fix to let me use all other optimizations.

Any clue how I could work around for that assembler problem in 2.7.1. Could
breaking the source file into smaller units help?

And Jonas, yes, I could apply a binary logic, I'll see. But I think I know
the unit where the problematic code happens as I did lots of debugging
those last days and found a function that did not crash but did corrupt the
memory when optimizations were on. Maybe just disabling optimizations for
this specific unit or the other units that this one uses could be enough.

Basically what seems to happen is the following, you have two method calls
to the same object.
Eg:

Begin
X.A();
X.B();
End;

Calling A does not crash the program, nor does it read or write any invalid
memory. However after method A exits normally and the code goes to call
B(), X strangely is no longer valid, as if A() somehow changed the value of
X, and thus calling X.B() crashes.

I don't have the knowledge of how the internals work, so I don't know how a
function can actually modify the value of self. I guess some stack
corruption is happening somehow?

This is what I've discovered, not sure if it helps, maybe I could provide
the asm code of that specific method with and without optimizations?

PS: I have no clue in the ammount of work necessary to add dwarf/lineinfo
support to those platforms, but in case it is something doable without too
much work, and can benefit both OSX and iOS, I'm willing to donate some
money to have have such support implemented.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] New targets for FPC - Windows Phone 8 and Flash

2014-07-10 Thread Sergio Flores
Thanks Dmitry, I will look into this.
However for the moment, html5 would have some problems for me, because as
far as I know there is still no proper socket support in Javascript
(besides Websockets), and my game is would require this. But, I guess one
could use some kind of server layer to connect both.
I will try to contact this developer, to see what kind of progress he has
done.

And yes, other platforms like next-gen consoles could be a possilibity,
given that they are pushing for more indie developers right now. But this
is why porting to C# is interesting, as it seems that this seems the
language of choice for indie games in consoles (at least in Xbox and
PSVita, I did not check the others yet).
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] New targets for FPC - Windows Phone 8 and Flash

2014-07-08 Thread Sergio Flores
Thanks Sven, really useful info, the kind of stuff that was missing in the
wiki.
I've investigate this throughfully, and decided to go with another aproach,
make a translator from Pascal to other languages (C#  for now, possibly
ActionScript later).
It is like Dmitry said before, this is a better approach. While it would be
more interesting to have FPC directly support those targets, having to mess
with a compiler that I don't know the internals and also having to debug
very low level stuff would be difficult compared to just generate and
validate C# code.

I will not start this from scratch, I already have a half done project that
I started some months ago, hopefully if I finish this I will announce it
somewhere, in case someone also has any use for it.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


Re: [fpc-devel] New targets for FPC - Windows Phone 8 and Flash

2014-07-05 Thread Sergio Flores
Sven, I know about this wiki page, and in theory this would be what I
needed.
But if you read it, you'll see that once you reach the interesting parts,
you only find TODO...
Basically the person who wrote this only wrote a intro to it and sadly
never finished the rest.

One thing that is missing is very important is talking about generation of
code to be passed to the target assembler. I don't know about FPC so I
don't know if this is something separated into various phases, and if there
is some kind of intermediate language involved like in LLVM or something.
The Flash VM arch is not a general cpu, as it contains some higher level
opcodes, like opcodes to supporting class inheritance (essential to inherit
from builtin Flash classes).

Dmitry, indeed converting Pascal to Actionscript is an alternative solution.
I talked about supporting Flash directly with FPC because I've seen that
efforts were made into supporting JVM, which is also a VM similar to Flash
(albeit JVM is probably more complex).

Adobe added some features to the Flash VM in order to support C++
compilation via their Alchemy compiler, mainly stuff to support pointers
and dynamic allocation/deallocation. This stuff is also necessary for
Pascal if we want to support the full language instead of just a subset.
And I'm not sure if all of those features are exposed in Actionscript,
I'lll look into it, right now I'm avaliating the best way to target this
platform using Pascal.

Regarding Windows Phone 8, it is not exactly necessary to test it with a
real phone, as emulators do exist. I investigated more into this, Microsoft
does supply a arm assembler that generates .obj files, so I'll try to see
if arm assembler generated by FPC can be directly passed to this assembler.
I do not know yet if it is possible to make a WP8 app entirely in assembler.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] New targets for FPC - Windows Phone 8 and Flash

2014-07-04 Thread Sergio Flores
What is the current state of Windows Phone 8 for FPC?

Also, would anyone have interest in support Flash as a FPC target?
It is possible to compile C++ to .swf, so having the same capacity for FPC
would be great!
There is a open source project called FlashPascal that does exactly this,
I've contacted the developers but sadly they abandoned it, and that
compiler only supports a small subset of object pascal.

In theory adding Windows Phone should be simple no? It is a ARMv7 target,
we already support this.
In the other hand Flash would be a completly new arch, that could take a
year or more, and I'm guess there is not really that much interest in such
target.

If not, anyone interested in trying to add support for any of those two
platforms?
I'm willing to pay for someone to add either those targets to the compiler,
as I really want to port my existing games for both Windows Phones and for
the web via Flash.

Or if anyone is willing to take me as a FPC apprentice I can try to do it
myself.
I'm am a experienced programmer, just don't know much about FPC internals.
Sadly there is not enough documentation for an outsider to be able to do
such thing without spendings months just studying the compiler source.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Problem building FPC Android crosscompiler in Windows

2014-06-24 Thread Sergio Flores
I've been trying to build a Android compiler for Windows from the latest
SVN sources.
It all goes quite fast, however it hangs when compiling rtl-unicode package.

[ 85%] Compiled package rtl-console
Start compiling package rtl-unicode for target arm-android.
   Compiling rtl-unicode\BuildUnit_rtl_unicode.pp
   Compiling .\rtl-unicode\src\inc\cpbuildu.pp
   Compiling .\rtl-unicode\src\inc\cp932.pas
   Compiling .\rtl-unicode\src\inc\cp936.pas

I left the compilation running almost 30 minutes, nothing happened, no
errors message nothing, just hangs on that file.
I tried this with FPC 2.6.0, 2.6.2 and 2.6.4, all have same problem.

I'm building with this command:
set OPTS=-gl -dSAX_HTML_DEBUG -dUSE_MINGW_GDB
set COMMONOPTS=UPXPROG=echo COPYTREE=echo OPT=%OPTS% GINSTALL=myinst.exe
make clean crossall crossinstall OS_TARGET=android CPU_TARGET=arm
CROSSOPT=-CfVFPV3 %COMMONOPTS% INSTALL_PREFIX=%INSTALLDIR% FPC=%FPCSTART%

I also though it could be a problem of the Android NDK since I was using a
old NDK.
I upgraded to latest NDK, and tried it, both 4.6 and 4.8 ABI, the problem
persists.

Some details about the part where the compilation hangs:
cp936.s is generated
cp936.o is generated
cp936.ppu is not generated

What could cause this?
I can sucessfull run the assembler externally on the .s file and it works
fine. Not sure what other NDK tools are invoked during compilation, any way
to have a verbose compilation mode that shows what is currently being
called?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


[fpc-devel] Windows Phone 8

2014-01-09 Thread Sergio Flores
Hi guys, I am interesting in developing for Windows Phone 8. It seems to
supports native code in C++, so in theory should be possible to have FPC
work with it. I am interesting this, I can offer a bounty of 200$ for it,
anyone interested?
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel