Re: [fpc-devel] fpcmkcfg invocation for two versions (linux)

2014-10-31 Thread Gennadiy Poryev

Big thanks.

In case anyone stumbles over the same issue, here's the minimal working 
solution:

fpc -vut gives:

Configfile search: /root/.fpc.cfg
Configfile search: /usr/lib64/fpc/etc/fpc.cfg
Configfile search: /etc/fpc.cfg
Fatal: No source file name in command line
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode

Seems logical to use /usr/lib64/fpc/etc/fpc.cfg

A little investigation into what lazarus build complains about leads to 
it being unable to find process.ppu , which in my case is found here


/usr/lib64/fpc/2.6.4/units/x86_64-linux/fcl-process/process.ppu
/usr/lib64/fpc/2.7.1/units/x86_64-linux/fcl-process/process.ppu

So I wrote /usr/lib64/fpc/etc/fpc.cfg thus:

#
-Fu/usr/lib64/fpc/$fpcversion/units/$fpctarget/*
#

And now Lazarus builds with no problem.

G.

On 23-10-2014 18:29, Marc Weustink wrote:

Gennadiy Poryev wrote:

thank you,

but my question was more about where to put fpc.cfg so that both
versions can use it properly, or, if that is not possible, where to
stuff different fpc.cfg's for the same purpose?
and what would be the basepath in either case?


execute ppx64 -vut

the last lines of the output list the patch searched for fpc.cfg
In my case
[0.004] Configfile search: /home/marc/.fpc.cfg
[0.004] Configfile search: /home/marc/etc/fpc.cfg
[0.004] Configfile search: /etc/fpc.cfg

I also vaguely recall that the dir of the compiler is searched too, 
but isn't listed here (it might be a windows only thing or something 
from the past)


Marc


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





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


Re: [fpc-devel] Proof of Concept ARC implementation

2014-10-31 Thread Sven Barth
Am 31.10.2014 06:05 schrieb Hans-Peter Diettrich drdiettri...@aol.com:

 Sven Barth schrieb:

 On 30.10.2014 04:14, Hans-Peter Diettrich wrote:


 I wonder how difficult it would be to implement the existing Interface
 refcounting model for TObject, so that this runtime variation could be
 tested and benchmarked as well, in addition to the current compiletime
 approach. According to the problems of the compiletime approach,
 revealed in this thread, it looks not viable to me at all.


 The code would mostly be the same as the one I already implemented. Add
virtual to the ARCDecRef, ARCIncRef and ARCRefCount methods of TObject,
adjust the RTL helper functions to not expect a refcount field at a
specific offset, remove the restrictions that reference counting is only
done for classes marked as refcounted and you're done...


 Looks quite easy :-)

 Could you introduce this feature into your branch, by conditional
compilation?

When I find the time I'll try.



 Mark just pointed me to another problem, possibly unhandled yet.
Interface refcounting must be updated, as soon as the underlying object
becomes refcounted as well. Do you already have an idea how to handle
refcounting for classes with interfaces?

Simply implement the AddRef and Release methods using ARCIncRef and
ARCDecRef and return ARCRefCount.

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


Re: [fpc-devel] Proof of Concept ARC implementation

2014-10-31 Thread Sven Barth
Am 30.10.2014 11:34 schrieb hinsta...@yandex.ru hinsta...@yandex.ru:

 okay sorry for spamming the mailing list

 So basically the other problem I reported before (generic + refcounted
does not work) turns out to be something different:
 Declaring variable of refcounted type in a different unit makes the
compiler stop with error 2014092205

 Assume in unit Aunit I have
   type TSomething = class refcounted end;

 Then I declare a procedure:

 procedure Run;
 var
   server: TServer;
 begin
   server := TServer.Create;
 end;

 When procedure Run is declared in Aunit, it compiles. However, if I
declare procedure Run in some other unit, say Bunit, then the compiler
stops on line with assignment :=

That simplifies things. Thanks for the update :)

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


Re: [fpc-devel] Proof of Concept ARC implementation

2014-10-31 Thread Sven Barth
Am 30.10.2014 11:01 schrieb hinsta...@yandex.ru hinsta...@yandex.ru:

 I managed to acquire some additional information on Lazarus 1.3 + FPC ARC
edition problem

 First of all, I tested if Lazarus 1.3 trunk compiled with FPC trunk works
correctly. It does.

 However, Lazarus 1.3 trunk with FPC ARC crashes.

 Lazarus trunk by FreePascal trunk - OK
 Lazarus trunk by FreePascal ARC edition - CRASH at startup

 here is the point where it crashes:

 D:\FPC_ARC\Llazarus.exe
 using config file D:\FPC_ARC\L\lazarus.cfg
 [FORMS.PP] ExceptionOccurred
   Sender=Exception
   Exception=GetVMTVirtualMethodOffset Parent Virtual Method not found
   Stack trace:
   $00710C16  GETVMTVIRTUALMETHODOFFSET,  line 458 of
D:/FPC_ARC/L/designer/jitforms.pp
   $00710D21  GETTCOMPONENTVALIDATERENAMEVMTOFFSET,  line 497 of
D:/FPC_ARC/L/designer/jitforms.pp
   $00714F18  JITFORMS_$$_init,  line 2094 of
D:/FPC_ARC/L/designer/jitforms.pp
   $00410F54
 TApplication.HandleException GetVMTVirtualMethodOffset Parent Virtual
Method not found
   Stack trace:
   $00710C16  GETVMTVIRTUALMETHODOFFSET,  line 458 of
D:/FPC_ARC/L/designer/jitforms.pp
   $00710D21  GETTCOMPONENTVALIDATERENAMEVMTOFFSET,  line 497 of
D:/FPC_ARC/L/designer/jitforms.pp
   $00714F18  JITFORMS_$$_init,  line 2094 of
D:/FPC_ARC/L/designer/jitforms.pp
   $00410F54
 Exception at 00710C16: Exception:
 GetVMTVirtualMethodOffset Parent Virtual Method not found.

 Even if line numbers are slightly different, you can easily find the
place where exception is raised: in jitforms.pp: in procedure
GetVMTVirtualMethodOffset: raise
Exception.Create('GetVMTVirtualMethodOffset Parent Virtual Method not
found');

 I leave the decision if this worth investigating or not to you as I am
myself not sure. Not that I could possibly force someone to look into it
even if I insisted.

The VMT has changed in my branch. Take a look at the declaration of TVmt in
rtl/inc/objpash.inc and maybe adjust the code to use the offset of the
first virtual method instead of hardcoding it...

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


Re: [fpc-devel] Small virtual machine to cross compile FPC

2014-10-31 Thread Paul Breneman

On 10/27/2014 06:09 PM, Paul Breneman wrote:

I've spent a bit of time during the past 7 years trying to figure out
how to simplify things by avoiding cross-compiling.  This page has many
of the details:
   http://turbocontrol.com/monitor.htm

I think there is a way to simplify cross-compiling.  Levinux is a small
(~20 MB) QEMU download for x86 PCs (Windows, OS X, Linux) that provides
a small Tiny Core Linux VM.  I'd like to see something similar but with
all the files and tools needed to pull the latest source code and
cross-compile FPC (also with Debian instead of Tiny Core?).
   http://mikelev.in/ux/

It seems to me that such a small VM should allow a nice standard method
that will make it easy to test and see things work.

I look forward to your thoughts and comments!


I'm not suggesting a single VM for multiple uses.

How hard would it be to make a small VM (~100 MB with Debian?)  that 
will run on a x86 PC and download FPC and Lazarus source (trunk) and 
configure Lazarus for Android development?


I think having a small VM (that doesn't depend on anything on the user's 
PC) that can easily demonstrate things would be very nice.


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


Re: [fpc-devel] Small virtual machine to cross compile FPC

2014-10-31 Thread Michael Van Canneyt



On Fri, 31 Oct 2014, Paul Breneman wrote:


On 10/27/2014 06:09 PM, Paul Breneman wrote:

I've spent a bit of time during the past 7 years trying to figure out
how to simplify things by avoiding cross-compiling.  This page has many
of the details:
   http://turbocontrol.com/monitor.htm

I think there is a way to simplify cross-compiling.  Levinux is a small
(~20 MB) QEMU download for x86 PCs (Windows, OS X, Linux) that provides
a small Tiny Core Linux VM.  I'd like to see something similar but with
all the files and tools needed to pull the latest source code and
cross-compile FPC (also with Debian instead of Tiny Core?).
   http://mikelev.in/ux/

It seems to me that such a small VM should allow a nice standard method
that will make it easy to test and see things work.

I look forward to your thoughts and comments!


I'm not suggesting a single VM for multiple uses.

How hard would it be to make a small VM (~100 MB with Debian?)  that will run 
on a x86 PC and download FPC and Lazarus source (trunk) and configure Lazarus 
for Android development?


I think 100Mb is a bit small.
You'll need cross-binutils, X, cross-dev libs and whatnot.

650Mb would be feasable, I guess.

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


Re: [fpc-devel] Small virtual machine to cross compile FPC

2014-10-31 Thread Paul Breneman

On 10/31/2014 12:02 PM, Michael Van Canneyt wrote:



On Fri, 31 Oct 2014, Paul Breneman wrote:


On 10/27/2014 06:09 PM, Paul Breneman wrote:

I've spent a bit of time during the past 7 years trying to figure out
how to simplify things by avoiding cross-compiling.  This page has many
of the details:
   http://turbocontrol.com/monitor.htm

I think there is a way to simplify cross-compiling.  Levinux is a small
(~20 MB) QEMU download for x86 PCs (Windows, OS X, Linux) that provides
a small Tiny Core Linux VM.  I'd like to see something similar but with
all the files and tools needed to pull the latest source code and
cross-compile FPC (also with Debian instead of Tiny Core?).
   http://mikelev.in/ux/

It seems to me that such a small VM should allow a nice standard method
that will make it easy to test and see things work.

I look forward to your thoughts and comments!


I'm not suggesting a single VM for multiple uses.

How hard would it be to make a small VM (~100 MB with Debian?)  that
will run on a x86 PC and download FPC and Lazarus source (trunk) and
configure Lazarus for Android development?


I think 100Mb is a bit small.
You'll need cross-binutils, X, cross-dev libs and whatnot.

650Mb would be feasable, I guess.


Thanks for that info, but couldn't most of that be download into the VM 
*after* it is running?  Seems to me I'd like the *smallest* VM and then 
have a way to load things into that standard PC.  But maybe I'm thinking 
wrongly?  If so please help me get it right.


I've looked at (or tried) laz4android and fpcup.  Seems that such an 
approach would work much better on a standard PC?

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