[fpc-pascal] build-id

2011-06-20 Thread Julien Devillers
Hello

 

With fpc for linux, I need to include a build-id  to my executable but I
don't see any option for this.

 

I found that 

http://lists.fedoraproject.org/pipermail/devel/2007-October/112754.html

 

but it's rather old, maybe something have been done on the subject until
today.

 

Any idea ?

 

best regards

Julien

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

[fpc-pascal] dependency problem when installing x86_64 on centos 5.5

2011-04-27 Thread Julien Devillers
Hi 

 

I'm trying to install fpc 2.4.2 using yum on centos 5.5 :

 

 

yum localinstall fpc-2.4.2-1.x86_64.rpm

 

It fires an error :

Missing dependency : libtinfo.so.5()(64bit) is needed by package
fpc-2.4.2-1.x86_64 (/fpc-2.4.2-1.x86_64)

 

My searches make me understand that it was part of ncurses which is  up
to date  :

 

(package ncurses-5.5-24.20060715.x86_64 already installed and latest
version.

 

Any idea ?

 

regards

Julien

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

RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-02-02 Thread Julien Devillers

 Ok, so now it compiles but, I still an an error while linking :
 ld.exe: cannot find -lpthread
This is basic crosslinking stuff. You must transfer all the required
libraries from the target system, to be able to crosscompile it to
there(In this case libpthread.so)
___

Ok, I tried with lipthread alone first:
I copied it from the /lib64 dir on a linux64 machine to a lib directory,
on my windows machine, that I included in the library path
(-Fld:\pp\lib\ x86_64-linux)

Here's the result :
Linking d:\dev\T01\fpc\x86_64-Linux\bin\DUnit\Tester
c:\fpcutils\ld.exe: cannot find /lib64/libpthread.so.0
Tester.dpr(59,1) Error: Error while linking

I added libpthread.so.0 in the same dir than libpthread.so. That did not
work.
Created a directory called /lib64 and I moved libpthread.so.0 in.

Linking went a bit further :

c:\fpcutils\ld.exe: cannot find /usr/lib64/libpthread_nonshared.a

Ok, I can create on my win machine a linux like directory architecture :
/usr/lib64/
but that's not very easy to configure a win64 dev plateform for cross
compiling using this method.
Is there a way to specify where to look for lib files ? or maybe I did
something wrong...

regards
Julien
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Julien Devillers


-Message d'origine-
De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Jonas Maebe
Envoyé : vendredi 28 janvier 2011 14:39
À : FPC-Pascal users discussions
Objet : Re: [fpc-pascal] Internal error 2006012201 while cross compiling


On 28 Jan 2011, at 14:33, Julien Devillers wrote:

 no here's the end of the -va log :

 [0.609] procedure/function Unassigned:UnicodeString;

 [0.609] ENDIF FPCOLEVARIANT found

 [0.625] Internal error 2006012201

The problem with -va is that the time stamps (the numbers between the square 
brackets) replace the line numbers. Try compiling without -va.


Jonas


---


OK, I replaced the -va by -vewunchilbdrqpv (everything except timestamps).
With that, the error message reports the last line of the unit.

I removed a lot of code to find out that issue happens here

function RoundTo(const AValue: Double; const ADigit: TRoundToRange): Double;
var
  c: extended;
begin
  c := power(10,ADigit);
  Result := c * round(AValue/c);
end;


If I removec := power(10,ADigit); , no more error.

Julien


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


RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Julien Devillers


---


OK, I replaced the -va by -vewunchilbdrqpv (everything except
timestamps).
With that, the error message reports the last line of the unit.

I removed a lot of code to find out that issue happens here

function RoundTo(const AValue: Double; const ADigit: TRoundToRange):
Double; var
  c: extended;
begin
  c := power(10,ADigit);
  Result := c * round(AValue/c);
end;


If I removec := power(10,ADigit); , no more error.

Julien

---

I tried  :

function RoundTo(const AValue: Double): Double; 
var
  c: extended;
begin
  c := power(10,1);
  Result := c * round(AValue/c);
end;

same error.

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


RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Julien Devillers
My guess is that it's related to 80bit constants. Win64 doesn't support
80bit extended(according to some of the code, yet other places it
defined pbestrealtype to s80bit). A crosscompiler should defined
FPC_HAS_TYPE_EXTENDED for x86_64-linux, so I don't know whether this is
actually the problem

Try changing c to double, and see whether the problem persists
___


__

I tried with c: double, it's the same error.
This code compiles correctly in 2.1.5.

May be, I did wrong when compiling the compiler ?
Does the 64bit compiler should be compiled with a64 bits compiler ?
Which is the fpc minimum version for compiling the 2.4.2 fpc ?

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


RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Julien Devillers

FPC 2.4.0. Note that simply compiling the compiler is never enough, you
have to perform a full build (make all in the top level fpc directory)

- Yes, That's what I did .
-make OS_TARGET=linux CPU_TARGET=x86_64  clean all 
-make OS_TARGET=linux CPU_TARGET=x86_64  install


However, the internalerror you are getting is inside the external
assembler writer. Since you are compiling for Linux/x86-64, the compiler
should default to using the internal assembler. Are you using a variant
of the -a or -Aas command line options?

Yes I do -Aas.

In fact, I'm working on this project which was forgotten, and there's
no documentation on which params is used and why...
Today I'm upgrading from 2.1.5 to 2.4.2 because some bugs no more exists
with this new version (built on linux for linux)

Appreciate your Help
Julien 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Julien Devillers
However, the internalerror you are getting is inside the external
assembler writer. Since you are compiling for Linux/x86-64, the compiler
should default to using the internal assembler. Are you using a variant
of the -a or -Aas command line options?

Without the -Aas, the unit compiles correctly. I still have other
compilation error but I must investigate more on
them.

Thanks
Julien
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-31 Thread Julien Devillers
However, the internalerror you are getting is inside the external
assembler writer. Since you are compiling for Linux/x86-64, the compiler
should default to using the internal assembler. Are you using a variant
of the -a or -Aas command line options?

Without the -Aas, the unit compiles correctly. I still have other
compilation error but I must investigate more on them.

Ok, so now it compiles but, I still an an error while linking :

ld.exe: cannot find -lpthread

My ld.exe is x86_64-linux-ld.exe renamed in ld.exe

Julien



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


RE: [fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-28 Thread Julien Devillers
no here's the end of the -va log :

 

[0.609] procedure/function Unassigned:UnicodeString;

[0.609] ENDIF FPCOLEVARIANT found

[0.625] Internal error 2006012201

[0.625] Searching file .\src\MyKit.lib\u_MyKit.pas... found

[0.641] Compilation aborted

Error: d:\pp\bin\x86_64-win64\ppcx64.exe returned an error exitcode (normal if 
you did not specify a source file to be compiled)

 

De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Jeppe Johansen
Envoyé : jeudi 27 janvier 2011 16:31
À : FPC-Pascal users discussions
Objet : Re: [fpc-pascal] Internal error 2006012201 while cross compiling

 

Didn't it give a filename and a line number?

Den 27-01-2011 15:34, Julien Devillers skrev: 

Hello

 

I'm building an app from win64 to linux64.

The compilation fires an Internal error 2006012201.

 

Any idea ?

 

Regards

Julien

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

 

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

RE: [fpc-pascal] compiling 2.4.2 under 7-64

2011-01-27 Thread Julien Devillers


-Message d'origine-
De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Marco van de 
Voort
Envoyé : mercredi 26 janvier 2011 10:38
À : FPC-Pascal users discussions
Objet : Re: [fpc-pascal] compiling 2.4.2 under 7-64

In our previous episode, Julien Devillers said:

 Should I consider that this is a bug of gmkdir ? I get this file with 
 getGnuWin32.

Use the binutils that come with FPC, not the ones from mingw. mingw's coreutils 
package has afaik moved in a different direction since it moved from mingw to 
msys.

That also goes for the linker problem:

ftp://ftp.freepascal.org/pub/fpc/contrib/cross/mingw/win64/

is where the win64 binutils are kept.


- Thanks for your answer.
- It works !

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


[fpc-pascal] Internal error 2006012201 while cross compiling

2011-01-27 Thread Julien Devillers
Hello

 

I'm building an app from win64 to linux64.

The compilation fires an Internal error 2006012201.

 

Any idea ?

 

Regards

Julien

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

[fpc-pascal] linking error while cross compiling win64 - Linux64

2011-01-26 Thread Julien Devillers
Hi

 

I have a linking error with the following compile command :

 

è d:\pp\bin\x86_64-win64\fpc lib\snip\snip.dpr -Tlinux -n -va -Mdelphi 
-FuD:\pp\bin\x86_64-win64/../../units/$FPCTARGET/  

 

In the above line, I removed lots of includes. The error is  (founded in the 
below log)

è D:\dev\devtools\MinGW\mingw\bin\ld.exe: unrecognised emulation mode: 
elf_x86_64 

 

[1.367] Searching file D:\dev\devtools\MinGW\mingw\bin\ld.exe... found

[1.371] Using util D:\dev\devtools\MinGW\mingw\bin\ld.exe

D:\dev\devtools\MinGW\mingw\bin\ld.exe: unrecognised emulation mode: elf_x86_64

Supported emulations: i386pe

[1.523] Error while linking

[1.523] There were 1 errors compiling module, stopping

[1.523] Compilation aborted

Error: d:\pp\bin\x86_64-win64\ppcx64.exe returned an error exitcode (normal if 
you did not specify a source file to be compiled)

 

Maybe I don't use the right ld.exe file ?

I'm running fpc 2.4.0

 

regards

Julien

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

[fpc-pascal] compiling 2.4.2 under 7-64

2011-01-26 Thread Julien Devillers
Hi

 

i'm trying to compile fpc 2.4.2 under windows 7 64 bits.

It raises the following error :

 

 

make[5]: entrant dans le répertoire « C:/FPC/2.4.2/fpc-2.4.2/rtl/win32 »

c:/gnuwin32/bin/gmkdir.exe -p C:/FPC/2.4.2/fpc-2.4.2/rtl/units/i386-win32

d:/pp_/bin/i386-win32/ppc386.exe -Ur -Xs -O2 -n -Fi../inc -Fi../i386 -Fi../win 
-FE. -FUC:/FPC/2.4.2/fpc-2.4.2/rtl/units/i386-win32 -di386 -dRELEASE -

s -Sg system.pp -Fi../win

system.pp(1011) Error: Can't create archive file: 
C:\FPC\2.4.2\fpc-2.4.2\rtl\units\i386-win32\libimpsystem.a

 

Instead of making the C:/FPC/2.4.2/fpc-2.4.2/rtl/units/i386-win32, gmkdir 
creates a directory named :   
C:\FPC\2.4.2\fpc-2.4.2\rtl\win32\FPC\2.4.2\fpc-2.4.2\rtl\units\i386-win32

 

Should I consider that this is a bug of gmkdir ? I get this file with 
getGnuWin32.

 

regards

Julien

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

[fpc-pascal] ppc386 or ppcx64

2010-11-04 Thread Julien Devillers
Hello

 

Please can you tell me if :

ppc386 in intend to be used on a i386 platform and ppcx64 on a 64bits
platform regarless the type of app to build

or

both are intend to be used on any plateform. ppc386  to build apps for
i386 systems and ppcx64 to build 64bits apps.

 

Thanks

Julien

 

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

RE: [fpc-pascal] Cross-Compiling win32 - Linux 64, how to get thecross compiler ?

2010-11-04 Thread Julien Devillers


-Message d'origine-
De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Sven Barth
Envoyé : jeudi 4 novembre 2010 09:16
À : fpc-pascal@lists.freepascal.org
Objet : Re: [fpc-pascal] Cross-Compiling win32 - Linux 64, how to get thecross 
compiler ?

Am 03.11.2010 18:24, schrieb Julien Devillers:
 Ok, I Found them.

 thanks
 Julien

Out of curiosity and maybe for others that have the same problem:

Where did you find them?

Regards,
Sven

-

win32crossbinutils2005.zip in 
ftp://ftp.freepascal.org/pub/fpc/contrib/cross/mingw/

Regards
Julien
 

__ Information provenant d'ESET NOD32 Antivirus, version de la base des 
signatures de virus 5589 (20101103) __

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com
 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] ppc386 or ppcx64

2010-11-04 Thread Julien Devillers


-Message d'origine-
De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Sven Barth
Envoyé : jeudi 4 novembre 2010 10:06
À : fpc-pascal@lists.freepascal.org
Objet : Re: [fpc-pascal] ppc386 or ppcx64

Am 04.11.2010 09:33, schrieb Julien Devillers:
 Hello

 Please can you tell me if :

 ppc386 in intend to be used on a i386 platform and ppcx64 on a 64bits
 platform regarless the type of app to build

 or

 both are intend to be used on any plateform. ppc386 to build apps for
 i386 systems and ppcx64 to build 64bits apps.

The second assumption is mostly right. ppc386 is a 32-bit application to 
compile applications for i386. ppcx64 is a 64-bit application to compile 
applications for x86_64 (so you can't use ppcx64 on a i386 system, you'd 
need to use ppcrossx64 there).

Regards,
Sven
___

Hum, the project I'm working on, is built on a win32 machine
for linux32 and linux64.
What's surprise me is : when I look at the compilation script,
it calls ppc386 to build for linux32 and ppcx64 to build for linux 64...

I tried to launch ppcx64 alone on the win32 machine. That shows
the help message but no error.

Julien

 

__ Information provenant d'ESET NOD32 Antivirus, version de la base des 
signatures de virus 5589 (20101103) __

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com
 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Cross-Compiling win32 - Linux 64, how to get the cross compiler ?

2010-11-03 Thread Julien Devillers
Hello

 

I'm working on a project which cross compile from win32 to linux64.
Today it uses FPC-2.1.5.

I need to move to fpc 2.4.0.

I downloaded fpc-2.4.0.i386-win32.exe and after some attemps, I
understood that I did not have everything 

to cross compile (units dir and some exes). I tried with
fpc-2.4.0.x86_64-win64.exe but this did not solve the 

problem.

 

I tried to build everything from scratch with fpc source code, but I did
not find the correct make target.

How should I do ?

 

regards

Julien

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

RE: [fpc-pascal] Cross-Compiling win32 - Linux 64, how to get the cross compiler ?

2010-11-03 Thread Julien Devillers

-Message d'origine-
De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Julien Devillers
Envoyé : mercredi 3 novembre 2010 17:27
À : FPC-Pascal users discussions
Objet : RE: [fpc-pascal] Cross-Compiling win32 - Linux 64,how to get the cross 
compiler ?


-Message d'origine-
De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Jonas Maebe
Envoyé : mercredi 3 novembre 2010 14:01
À : FPC-Pascal users discussions
Objet : Re: [fpc-pascal] Cross-Compiling win32 - Linux 64,how to get the cross 
compiler ?


On 03 Nov 2010, at 13:55, Julien Devillers wrote:

 I tried to build everything from scratch with fpc source code, but I  
 did
 not find the correct make target.

 How should I do ?

make OS_TARGET=linux CPU_TARGET=x86_64 clean all


Jonas



Hello Jonas

Thanks for your answer.
If I do that, I have a error on :
x86_64-linux-as --64 -o 
D:/tmp/partage/fpc-2.4.0.source/fpc-2.4.0/rtl/units/x86_64-linux/prt0.o 
x86_64/prt0.as

The file x86_64-linux-as does not exists on my system.

Julien
 

-

Ok, I Found them. 

thanks
Julien
 

__ Information provenant d'ESET NOD32 Antivirus, version de la base des 
signatures de virus 5588 (20101103) __

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com
 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


RE: [fpc-pascal] TR: Strange Behaviour of TBits

2010-10-18 Thread Julien Devillers


-Message d'origine-
De : fpc-pascal-boun...@lists.freepascal.org 
[mailto:fpc-pascal-boun...@lists.freepascal.org] De la part de Jonas Maebe
Envoyé : vendredi 15 octobre 2010 11:11
À : FPC-Pascal users discussions
Objet : Re: [fpc-pascal] TR: Strange Behaviour of TBits


On 14 Oct 2010, at 17:24, Julien Devillers wrote:

 The above code returns 1, 2, 3, 3, 4 while it should return 1, 2, 3,  
 4, 5.

 I Built a TMyBits class using strictly the TBits.inc file from fpc  
 and... the bug does

 not appear... !

 I'm using lazarus 0.9.28.2 beta and fpc 2.2.4 with linux 64.

 Did I miss something ?

Your example works fine with FPC 2.4.0, try upgrading.


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

I did, it works now.
thanks
Julien
 

__ Information provenant d'ESET NOD32 Antivirus, version de la base des 
signatures de virus 5540 (20101017) __

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com
 
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] TR: Strange Behaviour of TBits

2010-10-14 Thread Julien Devillers
 

Hello

 

I found a strange behaviour of TBits. Example : 

 

procedure TForm1.Button1Click(Sender: TObject);

var

  x:TBits;

begin

  x:=TBits.Create();

  x[0] := true;

  showmessage(inttostr( x.size));

  x[1] := false;

  showmessage(inttostr( x.size));

  x[2] := false;

  showmessage(inttostr( x.size));

  x[3] := true;

  showmessage(inttostr( x.size));

  x[4] := true;

  showmessage(inttostr( x.size));

end;  

 

The above code returns 1, 2, 3, 3, 4 while it should return 1, 2, 3, 4, 5.

I Built a TMyBits class using strictly the TBits.inc file from fpc and... the 
bug does

not appear... !

 

I'm using lazarus 0.9.28.2 beta and fpc 2.2.4 with linux 64.

 

Did I miss something ?

 

regards

Julien



__ Information provenant d'ESET NOD32 Antivirus, version de la base des 
signatures de virus 5531 (20101014) __

Le message a été vérifié par ESET NOD32 Antivirus.

http://www.eset.com

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