Hi,
How I can compile only only the LCL to 64-bit?
I do not want to compile the IDE (lazarus binary). Just the LCL could be compiled to create directories \x86_64-win64 on Windows.
Marcos Douglas

Mailing lists / lazarus / 2011-08
28 messages · 10 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hi,
How I can compile only only the LCL to 64-bit?
I do not want to compile the IDE (lazarus binary). Just the LCL could be compiled to create directories \x86_64-win64 on Windows.
Marcos Douglas
Set your project architecture to x86-64 and compile your project. If it uses the LCL, then the LCL will automatically be recompiled.
Felipe Monteiro de Carvalho wroteSet your project architecture to x86-64 and compile your project. If it uses the LCL, then the LCL will automatically be recompiled.
Well, this is not so easy.
My Lazarus was compiled to 32-bit. The packages, 32-bit. The PATHs, 32-bit. I tought make all LCL 64-bit and write a BAT script to compile the program. To change all paths in Lazaurs is very boring and I might forget something.
I did not want to use cross-compilation to does not add complexity, but I don't know...
I only want to have:
1. FPC and Lazarus works in 32-bit default;
2. Possibility to compile to 64-bit using an OS 64-bit, with script or
something more simple;
3. Only one source to update;
4. A script to compile FPC to 32-bit and 64-bit (that I did and works);
5. A script to compile LCL to 64-bit after I that updated the sources.Marcos Douglas
2011/8/24 Marcos Douglas :
Why not?
My Lazarus was compiled to 32-bit. The packages, 32-bit. The PATHs, 32-bit. I tought make all LCL 64-bit and write a BAT script to compile the program. To change all paths in Lazaurs is very boring and I might forget something.
I did not want to use cross-compilation to does not add complexity,
What you want, one source, one installation, two targets is complex.
but I don't know...
You are not cross compiling if your ppcx64 is not a cross compiler but a native 64 bits application.
What happens if you leave out step 5,
* if you create a console application without using the LCL?
* if you create a GUI application with the LCL?
Vincent
So, what is the best way to use Win 32 and 64-bit, in my case?
> but I don't know... You are not cross compiling if your ppcx64 is not a cross compiler but a native 64 bits application.
I compiled my FPC in 64-bit native. Is this not correct?
I can compile a console app without using the LCL and;
The default GUI app, in my env, is win32.I think didn't understand what did you mean, sorry.
Marcos Douglas
Marcos Douglas wroteSo, what is the best way to use Win 32 and 64-bit, in my case?
I would suggest: don't go the most complicated route ever ;-) It's really dead simple to get cross compilation with Windows as target to run. In your case I would suggest the lowest common denominator: the 32bit compiler. So build from/for 32bit and add the 64bit cross compiler there:
I assume the official FPC 2.4.4 release for 32bit to be installed under C:\FPC\2.4.4.
set PATH=C:\FPC\2.4.4\bin\i386-win32;%PATH%
cd C:\FPC\2.5.1
svn co http://svn.freepascal.org/svn/fpc/trunk src cd src
make install INSTALL_PREFIX=C:\FPC\2.5.1
make crossinstall INSTALL_PREFIX=C:\FPC\2.5.1 OS_TARGET=win64 CPU_TARGET=x86_64 make clean
Done. Now you set the compiler (in Lazarus) to C:\FPC\2.5.1\bin\i386-win32\fpc.exe and switch the target architecture/OS in the project options depending on your needs - the 32bit fpc.exe will then either invoke the 32bit ppcx86.exe to compile for 32bit, or the 32bit ppccrossx86_86.exe to compile for 64bit.
One small addition to your solution:
copy C:\FPC\2.4.4\bin\i386-win32\fpc.cfg C:\FPC\2.5.1\bin\i386-win32\ <Edit the copied fpc.cfg and replace all "2.4.4" with "2.5.1">
Regards,
Sven
I would suggest: don't go the most complicated route ever ;-) It's really dead simple to…
Well, I thought that cross-compile would add complexity, but I will try.
But and Lazarus?
It still continue 32-bit, right? What about the LCL, I do not have compile Lazarus for create the ppu for 64-bit and to create the x86_64-win64 directories?
Marcos Douglas
One small addition to your solution: copy C:\FPC\2.4.4\bin\i386-win32\fpc.cfg…
I use $fpcversion but thanks anyway. ;-)
Marcos Douglas
Right... I always forget that this is available... Then ignore the second part, but the first one is necessary :D
Regards,
Sven
OK.
I'm wait the Andreas Schneider's answer about my questions, meanwhile I'm downloading clean FPC sources to test again.
Marcos Douglas
Well, I thought that cross-compile would add complexity, but I will try. But and Lazarus?…
The very first answer (by Felipe) answered that already ;-)
Felipe Monteiro de Carvalho wroteSet your project architecture to x86-64 and compile your project. If it uses the LCL, then the LCL will automatically be recompiled.
On Thu, Aug 25, 2011 at 10:16 AM, Sven Barth OK. I'm wait the Andreas Schneider's answer…
"downloading clean"? I hope you mean TortoiseSVN's "Revert..." command...
-Fl?vio
Although slightly off-topic, but SVN's revert is not really clean. It reverts files it knows, but it doesn't remove unknown files. I'm not aware of an SVN equivalent of Mercurial's purge (for example). So yes, a clean checkout CAN make sense sometimes.
svn revert .
svn export <target_dir>
Then use the <target_dir> as a "clean" directory. But yes, SVN still sucks big time compared to Mercurial or Git.
Regards,
- Graeme -
Although slightly off-topic, but SVN's revert is not really clean. It reverts files it…
TortoiseSVN's cleanup dialog has an option to delete unversioned files and directories.
The very first answer (by Felipe) answered that already ;-) Andreas Schneider
Very true. I forgot that Felipe said because I did not want do use cross-compile but if works... well, we will see.
On 24.08.2011 08:59, Felipe Monteiro de Carvalho wrote: > Set your project architecture to x86-64 and compile your project. If > it uses the LCL, then the LCL will automatically be recompiled.
Sorry Felipe.
Marcos Douglas
Although slightly off-topic, but SVN's revert is not really clean. It reverts files it…
2011/8/25 Fl?vio Etrusco :
No, and Andreas explained below.
Andreas Schneider wroteAlthough slightly off-topic, but SVN's revert is not really clean. It reverts files it knows, but it doesn't remove unknown files. I'm not aware of an SVN equivalent of Mercurial's purge (for example). So yes, a clean checkout CAN make sense sometimes.
Exactly.
Marcos Douglas
svn revert . svn export <target_dir> Then use the <target_dir> as a "clean" directory.…
Still not the same. Export would also remove .svn metadata, which is not what I (would) want. What I want is to remove all files that aren't tracked by SVN - i.e. get the working copy to be EXACTLY what a fresh checkout would be; no more, no less.
Then use the<target_dir> as a "clean" directory. But yes, SVN still sucks big time compared to Mercurial or Git.
Oh yes. /signed ;-)
If you don't use TortoiseSVN I guess it's shouldn't be to hard to feed sed with svn st output to remove untracked files. Why should svn do this if a sed one liner can do this ;)?
So they got finally proper cherry pick tracking and blocking ;)?
Indeed. Just remember to use svn st --no-ignore and catch both "I" and "?". Or use --xml and parse that. I'm sure I've got a script somewhere that does this.
Henry
Well, ignored is not untracked for me ;), but for a really clean working copy, you're right.
Indeed. Just remember to use svn st --no-ignore and catch both "I" and "?". Or use…
I usually file bugs if 'make distclean' leaves files behind ;-) Otherwise: http://carlo-notes.blogspot.com/2011/01/throw-out-trash-clean-up-subversion.html
-Fl?vio
One small addition to your solution: copy C:\FPC\2.4.4\bin\i386-win32\fpc.cfg…
why not just have one fpc.cfg and use $fpcversion instead of 2.4.4 or 2.5.1 and such??
"downloading clean"? I hope you mean TortoiseSVN's "Revert..." command... -Fl?vio
Fl?vio Etrusco wrote> (...) meanwhile > I'm downloading clean FPC sources to test again. "downloading clean"? I hope you mean TortoiseSVN's "Revert..." command...
i've had to do this a few times and i always do it by removing or renaming the directory and then starting fully clean from the SVN... i wouldn't have a clue what to revert to...
I would suggest: don't go the most complicated route ever ;-) It's really dead simple to…
My command:
make clean all crossinstall UPXPROG=echo COPYTREE=echo OPT="-gl" INSTALL_PREFIX=%myFPC% PP=%myBINUTILS%\ppc386.exe
ERROR:
make[5]: Entering directory `W:/md/dev/freepascal/compiler/2.5.1/compiler/utils'
make[5]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1/compiler/utils' echo ppcrossx64.exe
ppcrossx64.exe
W:/md/dev/freepascal/binutils/2.5.1/x86_64-win64/ginstall.exe -m 755 -d W:\md\de v\freepascal\compiler\2.5.1/bin/i386-win32
W:/md/dev/freepascal/binutils/2.5.1/x86_64-win64/cp.exe -fp ppcrossx64.exe W:\md \dev\freepascal\compiler\2.5.1/bin/i386-win32/ppcrossx64.exe make[4]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1/compiler' make[3]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1' make rtl_install FPC=W:/md/dev/freepascal/compiler/2.5.1/compiler/ppcrossx64.exe ZIPDESTDIR=W:/md/dev/freepascal/compiler/2.5.1 FPCMAKE=fpcmake make[3]: Entering directory `W:/md/dev/freepascal/compiler/2.5.1' make -C rtl install
make[4]: Entering directory `W:/md/dev/freepascal/compiler/2.5.1/rtl' make -C win64 all
make[5]: Entering directory `W:/md/dev/freepascal/compiler/2.5.1/rtl/win64' make[5]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1/rtl/win64' fpcmake -p -Tx86_64-win64 Makefile.fpc
process_begin: CreateProcess((null), fpcmake -p -Tx86_64-win64 Makefile.fpc, ... ) failed.
make (e=2): O sistema n?o pode encontrar o arquivo especificado. make[4]: *** [fpc_install] Error 2
make[4]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1/rtl' make[3]: *** [rtl_install] Error 2
make[3]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1' make[2]: *** [installbase] Error 2
make[2]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1' make[1]: *** [install] Error 2
make[1]: Leaving directory `W:/md/dev/freepascal/compiler/2.5.1' make: *** [crossinstall] Error 2
W:\md\dev\freepascal\compiler\2.5.1>
Marcos Douglas
Sorry, I did mean:
My command:
make clean all crossinstall UPXPROG=echo COPYTREE=echo OPT="-gl" OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=%myFPC% PP=%myBINUTILS%\ppc386.exe
Marcos Douglas
I think fpc.cfg is missing something or lack some utility.
To compile FPC at the first time I use this BINUTILS: http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_6/install/binw32
I can compile FPC to 64-bit (on Win 7 64-bit) using this BINUTILS: http://svn.freepascal.org/svn/fpcbuild/branches/fixes_2_6/install/binw64
To cross-compiling I need something else?
My fpc.cfg is in attachment.
Marcos Douglas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fpc.cfg
Type: application/octet-stream
Size: 7191 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110825/0ed0b273/attachment.obj>