Recent

Author Topic: FPUPdeluxe and source code ... ?  (Read 1784 times)

paule32

  • Hero Member
  • *****
  • Posts: 647
  • One in all. But, not all in one.
FPUPdeluxe and source code ... ?
« on: July 23, 2025, 08:40:57 am »
Hello,
I using FPCUPdeluxe to compile the source codes of FPC.
The source are in the C:\FPC\3.2.2\fpcsrc folder - where FPCUPdeluxe seems to get it.
But this source codes always will be overwrite.
So, changes on the source codes are lost on compile time.
So, my question is, how to use FPCUPdeluxe to NOT overwrite the source codes ?
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1353
  • Professional amateur ;-P
Re: FPUPdeluxe and source code ... ?
« Reply #1 on: July 23, 2025, 11:30:34 am »
Hey paule32,

I don't mention if you're using trunk or stable, but I think I can deduce that you're using trunk.

In this case, that's the actual intended way of things to happen. When updating from trunk, or using trunk, you have to have the latest version  of the code that is upstream.

Now, another thing that is worrying me is that you're changing stuff on the source branch and you wanna stop getting updates on it. That's not really a good path to take.

I don't really have a good solution for you to change the core code and not keep it updated.
Sure, there are some very messy ways to go around that by having a copy of the file you wanna change on the folder where your source lives, then cross your fingers that the compiler picks that first and doesn't complain too much about duplicate units...

Nonetheless... It's not a good practice.

BTW, what are you messing with? Maybe it's good enough to ask the core team to accept your changes... Who knows, right?

Cheers,
Gus

af0815

  • Hero Member
  • *****
  • Posts: 1409
Re: FPUPdeluxe and source code ... ?
« Reply #2 on: July 23, 2025, 12:13:28 pm »
Go in LazUpDeluxe in the Setup+ Dialog. There you can change the setting for "GetFPC/Laz repositories".

You can also make a patch of your changes and say to fpcupdeluxe to use this patches. And look in your fpcsrc directory if there is a diff-file. Look inside, normal fpcupdeluxe is monitoring this and re-applying. 
regards
Andreas

paule32

  • Hero Member
  • *****
  • Posts: 647
  • One in all. But, not all in one.
Re: FPUPdeluxe and source code ... ?
« Reply #3 on: July 23, 2025, 01:51:56 pm »
@Gus:

I can make a repro on gitthub.com with the source codes that I changed.
But then they are not upstream and I can not make a Push Request on this.
I don't have enough knowledge to mix my code with the main stream if Repros that was have the same name or same code source name but need a DIFF.
Like I often said: I am not a pro. I am a hobbiest.
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

paule32

  • Hero Member
  • *****
  • Posts: 647
  • One in all. But, not all in one.
Re: FPUPdeluxe and source code ... ?
« Reply #4 on: July 23, 2025, 04:12:08 pm »
- I get Error's - please take a look to the attached Screen Shot.
- I uncheck the Repro check mark
- I copied fpcsrc to C:\FPC\3.2.2\fpcsrc
- I add a bootstrap FP Compiler - fpc.exe
- I used latest FPCUPdeluxe Version from the GitHub.com Site
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

af0815

  • Hero Member
  • *****
  • Posts: 1409
Re: FPUPdeluxe and source code ... ?
« Reply #5 on: July 23, 2025, 06:21:55 pm »
It looks like a problem with GIT and the Tags.

Quote
- I copied fpcsrc to C:\FPC\3.2.2\fpcsrc
- I add a bootstrap FP Compiler - fpc.exe
why this ? You are bypassing fpcupdeluxe way? So you get errors. If you want to work in such a way, do it by hand and leave fpcupdeluxe.
regards
Andreas

Warfley

  • Hero Member
  • *****
  • Posts: 2066
Re: FPUPdeluxe and source code ... ?
« Reply #6 on: July 23, 2025, 07:03:08 pm »
If you want to develop on the FPC or RTL you shold learn how to build it yourself. It's not difficult.

Heres the quick start guide (for windows, as you seem to use that OS):
  • Create a new directory where you want to install the fpc, e.g. I use Documents\Projects\fpcdev
  • Create a fork of the FPC repository and fetch it into a subdirectory (here sources)
Code: Bash  [Select][+][-]
  1. $>git clone git@gitlab.com:user/forkrepo.git sources
  • go into the sources directory and build fpc
Code: Bash  [Select][+][-]
  1. $> make all -j12 CPU_TARGET=x86_64
A few notes: -j12 means it uses 12 CPU cores to compile, just enter a number smaller than the number of cores your cpu has here. CPU_TARGET=x86_64 is necessary on Windows because the compiler will otherwise build the 32 bit version. On Linux you can just omit that
  • install into the target directory (note to use the same CPU_TARGET as before)
Code: Bash  [Select][+][-]
  1. $> make install INSTALL_PREFIX=C:\...\fpcdev CPU_TARGET=x86_64
  • create a fpc.cfg in the bin\arch directory of your build:
Code: Bash  [Select][+][-]
  1. $> cd ..\bin\x86_64-win64\
  2. $> fpcmkcfg.exe -d basepath=C:\...\fpcdev -o fpc.cfg

And voila you got yourself an fpc installation. You can do changes, create branches commit changes push them to your fork, etc.

Now to update:
  • If not already add new upstream remote
Code: Bash  [Select][+][-]
  1. $> git remote add upstream https://gitlab.com/freepascal.org/fpc/sources.git
  • Fetch upstream changes:
Code: Bash  [Select][+][-]
  1. $> git fetch --all
  • Rebase to update
Code: Bash  [Select][+][-]
  1. $> git rebase upstream/main
  • Rebuild fpc and update installation
Code: Bash  [Select][+][-]
  1. $> make all -j12 CPU_TARGET=x86_64
  2. $> make install INSTALL_PREFIX=C:\...\fpcdev CPU_TARGET=x86_64

Done

n7800

  • Hero Member
  • *****
  • Posts: 710
  • Lazarus IDE contributor
    • GitLab profile
Re: FPUPdeluxe and source code ... ?
« Reply #7 on: July 23, 2025, 07:35:38 pm »
I don't have enough knowledge to mix my code with the main stream if Repros that was have the same name or same code source name but need a DIFF.
Like I often said: I am not a pro. I am a hobbiest.

Everyone was a newbie once...

Do you see your changes via "git diff" or did you commit? In the first case, you can create a patch file "git diff > file.patch", and simply attach it as a file to the created issue on the FPC bug tracker.

The developers will review/apply it themselves. The main thing is to describe the reason/use of your changes well and be prepared for discussion ))

I can make a repro on gitthub.com with the source codes that I changed.

This may be a typo, but I want to warn you that the FPC repository is on GitLab (don't confuse it with GitHub - it has a read-only mirror).

paule32

  • Hero Member
  • *****
  • Posts: 647
  • One in all. But, not all in one.
Re: FPUPdeluxe and source code ... ?
« Reply #8 on: July 24, 2025, 05:45:46 am »
Thanks for the Reply.
it was very smart and fast to create a new Compiler by a bootstrap Compiler under the Windows Console.

But I can not see my modifications.
Maybe it has to do with the fact, that: grep 303 *.pas give me more than one or two results / places / files.
I also modified code places where this internalerror (end string) occur with a:  writeln('<errorcode>');
I have to study the Code a little bit ...
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

 

TinyPortal © 2005-2018