Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-14 Thread Bo Berglund via fpc-pascal
On Mon, 13 Apr 2020 21:41:31 +0200, Joost van der Sluis wrote: >Op 12-04-2020 om 12:01 schreef Bo Berglund via fpc-pascal: >> This is something I have been wondering about for a while.. >> When I install FPC from sources I have to create a config file by >> using this command: >> >> /home/user/l

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-13 Thread fredvs via fpc-pascal
> (Even in an apology, you call us a tri... well, maybe there is a reason > for that) For me a tribe of gurus is not insult, nor tribe, nor gurus, sorry if you feel it like that. I surprised by so much reaction for a patch that I proposed. I will not annoy you anymore, promise. And if you dont

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-13 Thread Joost van der Sluis
Op 12-04-2020 om 12:01 schreef Bo Berglund via fpc-pascal: This is something I have been wondering about for a while.. When I install FPC from sources I have to create a config file by using this command: /home/user/lib/fpc/$FPCVER/samplecfg "/home/user/lib/fpc/$FPCVER" "/home/user" (replace "us

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-13 Thread Joost van der Sluis
Op 12-04-2020 om 13:30 schreef fredvs via fpc-pascal: OK, I am ready for the combat, I am sure of my arguments. I do have a perfect solution for you. I've made a fpc-otb, as you call it years (over a decade?) ago. And i don't even need Michael's patch for it. (The one with the configuration

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread wkitty42
On 4/12/20 10:09 AM, wkitt...@windstream.net wrote: PPS: Bo, if you reply, please include the above PS when you reply to the list so that the list manager(s) can see this and maybe they can/will whitelist the synacor servers... i've had several postings get blocked in recent days because of thi

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread wkitty42
On 4/12/20 8:26 AM, Bo Berglund via fpc-pascal wrote: I am used to *not* hide files anytime both on Windows (where I always configure the explorer to show hidden files) and on Linux where I always use an ls -la alias ll in order not to hide files. Never understood the reason for hiding stuff...

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread wkitty42
On 4/12/20 7:55 AM, Michael Van Canneyt wrote: All your OOTB problems can be solved without a single line of code change in the compiler. Just create a script that people should use to compile instead of directly using the 'fpc' command, and specify the configĀ  file in the script, and any other

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread fredvs via fpc-pascal
> Take your pick... The one I want is missing! Anyway, thanks Michael, it was hard battles, I win some, but not yet the war. Take care of you. Fre;D -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pa

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Michael Van Canneyt
On Sun, 12 Apr 2020, fredvs via fpc-pascal wrote: I would think this is about the biggest failure of all for a compiler ? Imo, the worst thing is when the compilation is ok but code are bad interpreted. simply because unix does not do this. OK, like I did for all my arguments, can you pr

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread fredvs via fpc-pascal
>I would think this is about the biggest failure of all for a compiler ? Imo, the worst thing is when the compilation is ok but code are bad interpreted. > simply because unix does not do this. OK, like I did for all my arguments, can you prove that? I never hear that is was forbidden to place

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Bo Berglund via fpc-pascal
On Sun, 12 Apr 2020 12:16:20 +0200 (CEST), Michael Van Canneyt wrote: >You can hardly blame us for you not remembering things... :-) > >> Why does fpc look for .fpc.cfg in the user home dir when it is >> otherwise looking for fpc.cfg? > >Because the naming convention on unixes is like that for co

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Michael Van Canneyt
On Sun, 12 Apr 2020, fredvs via fpc-pascal wrote: committed in rev. 44697 Yep, excellent! Note that this still may cause surprises, because paramstr(0) is not 100% reliable. Hum, ok, but I assume to take the risk. Finally, the worst that can happen is fail to compil. I would think this

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread fredvs via fpc-pascal
> committed in rev. 44697 Yep, excellent! > Note that this still may cause surprises, because paramstr(0) is not 100% reliable. Hum, ok, but I assume to take the risk. Finally, the worst that can happen is fail to compil. Nice, FPC is nearly OOTB now. Only miss a very, very little patches: the

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Michael Van Canneyt
On Sun, 12 Apr 2020, Sven Barth via fpc-pascal wrote: Why does fpc look for .fpc.cfg in the user home dir when it is otherwise looking for fpc.cfg? Because the naming convention on unixes is like that for config files in your home directory. This is not fpc specific. This convention predate

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Sven Barth via fpc-pascal
Michael Van Canneyt schrieb am So., 12. Apr. 2020, 12:16: > > > On Sun, 12 Apr 2020, Bo Berglund via fpc-pascal wrote: > > > On Fri, 10 Apr 2020 13:44:17 -0700 (MST), fredvs via fpc-pascal > > wrote: > > > >> 2)Your home directory, it looks for .fpc.cfg. > > > > This is something I have been

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Michael Van Canneyt
On Sun, 12 Apr 2020, Bo Berglund via fpc-pascal wrote: On Fri, 10 Apr 2020 13:44:17 -0700 (MST), fredvs via fpc-pascal wrote: 2)Your home directory, it looks for .fpc.cfg. This is something I have been wondering about for a while.. When I install FPC from sources I have to create a co

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Bo Berglund via fpc-pascal
On Fri, 10 Apr 2020 13:44:17 -0700 (MST), fredvs via fpc-pascal wrote: >2)Your home directory, it looks for .fpc.cfg. This is something I have been wondering about for a while.. When I install FPC from sources I have to create a config file by using this command: /home/user/lib/fpc/$FPCVER/

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, fredvs via fpc-pascal wrote: I did try this without luck: -Fu$PPC_EXEC_PATH/units/$fpctarget -Fu$PPC_EXEC_PATH/units/$fpctarget/* -Fu$PPC_EXEC_PATH/units/$fpctarget/rtl PPC_EXEC_PATH is an environment variable, not a compiler variable. see globals.pas: localexepath:=

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-12 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, fredvs via fpc-pascal wrote: I promise, it is the last for tonight. It would be wonderful if in /compiler/globals.pas, at line 906, you add this line (or something like that): { Replace some macros } Replace(s,'$FPCPATH',AnsiString(IncludeTrailingBackslash(ExtractFi

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Alexander Grotewohl
: fpc-pascal on behalf of fredvs via fpc-pascal Sent: Saturday, April 11, 2020 8:52 PM To: fpc-pascal@lists.freepascal.org Cc: fredvs Subject: Re: [fpc-pascal] Search path order for fpc.cfg I promise, it is the last for tonight. It would be wonderful if in /compiler/globals.pas, at line 906, yo

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
I promise, it is the last for tonight. It would be wonderful if in /compiler/globals.pas, at line 906, you add this line (or something like that): { Replace some macros } Replace(s,'$FPCPATH',AnsiString(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0); So in fpc.cfg you may do: -F

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
I did try this without luck: -Fu$PPC_EXEC_PATH/units/$fpctarget -Fu$PPC_EXEC_PATH/units/$fpctarget/* -Fu$PPC_EXEC_PATH/units/$fpctarget/rtl Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@li

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> You can do > -Fu$PPC_CONFIG_PATH/../units/whatever > We can add some extra macros there if you want, Could you add the macro PPC_COMPILER_PATH ? Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fp

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
Hello Alexander. Thanks for the tips, but all that is too much complicated for a totally newbie. I did not really understand the argument that is a absolutely wrong way to store the fpc.cfg in the same directory as the compiler, like it is allowed for Windows. But I accept the choice. With the

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Alexander Grotewohl
pc-pascal Sent: Saturday, April 11, 2020 11:31:32 AM To: fpc-pascal@lists.freepascal.org Cc: fredvs Subject: Re: [fpc-pascal] Search path order for fpc.cfg > if the .so.n issue was really so urgent for you, Ho, it was urgent for we since the first time I did use it 15 years ago! And each time tha

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> if the .so.n issue was really so urgent for you, Ho, it was urgent for we since the first time I did use it 15 years ago! And each time that I request it, it finished by insult. And when I created uos, problems of linking to libs where solved by loadlibrary() because with ld it was not possibl

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, fredvs via fpc-pascal wrote: You just need to be a little patient Huh, if I may, the so.n bug date from 3 years ago and is not yet assigned. I was referring to the config file issue. if the .so.n issue was really so urgent for you, you could have brought it up much ea

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> You just need to be a little patient Huh, if I may, the so.n bug date from 3 years ago and is not yet assigned. Sorry Michael but I need a fpc-wob (works out the box) now. And when all my needs will be fixed in fpc original, I will come back to the original. Sorry but time goes out, I dont ha

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, fredvs via fpc-pascal wrote: It's perfectly fine to change the name. See e.g. the first answer to https://stackoverflow.com/questions/4475319/how-to-rebrand-copyright-a-forked-project-gnu-gpl# Really, did you think that I ever had the idea to change anything in the copyr

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Jonas Maebe
On 11/04/2020 16:48, fredvs via fpc-pascal wrote: >> It's perfectly fine to change the name. See e.g. the first answer to >> https://stackoverflow.com/questions/4475319/how-to-rebrand-copyright-a-forked-project-gnu-gpl# > Really, did you think that I ever had the idea to change anything in the > co

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> It's perfectly fine to change the name. See e.g. the first answer to > https://stackoverflow.com/questions/4475319/how-to-rebrand-copyright-a-forked-project-gnu-gpl# Really, did you think that I ever had the idea to change anything in the copyright and not claim that it is a fork from fpc? You

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, fredvs via fpc-pascal wrote: It will create one in your home directory if it detects you do not have root access. Could you explain that? Of course if you can show me a trick for configuring a script that will install fpc in the home directory (.fpc.cfg), with for examp

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Jonas Maebe
On 11/04/2020 16:21, fredvs via fpc-pascal wrote: >> then you should probably change the name > Humm, in previous post it was said that I am not allowed to change the name? It's perfectly fine to change the name. See e.g. the first answer to https://stackoverflow.com/questions/4475319/how-to-rebr

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread wkitty42
On 4/11/20 10:16 AM, Jonas Maebe wrote: On 11/04/2020 15:58, wkitt...@windstream.net wrote: Does fpc accept relative path for -Fu in the fpc.cfg config file, something like: -Fu../units/$fpctarget -Fu../units/$fpctarget/* -Fu../units/$fpctarget/rtl doesn't the 2nd one already cover the 3rd on

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> then you should probably change the name Humm, in previous post it was said that I am not allowed to change the name? -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org htt

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Jonas Maebe
On 11/04/2020 15:58, wkitt...@windstream.net wrote: >> Does fpc accept relative path for -Fu in the fpc.cfg config file, >> something >> like: >> >> -Fu../units/$fpctarget >> -Fu../units/$fpctarget/* >> -Fu../units/$fpctarget/rtl > > doesn't the 2nd one already cover the 3rd one? The default fpc.

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Jonas Maebe
On 11/04/2020 16:08, fredvs via fpc-pascal wrote: > Only do a fork, respect the rules of the license and do the change you want > without be dependent of what the parent of the fork think or do. If you really want to create a fork that behaves differently from FPC on some fundamental points, then

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> We have different opinions about what is needed and what is not. Or what > even is the right approach. And it is why I like the concept of open source, different opinions may exist and no one is obliged to impose his own. Only do a fork, respect the rules of the license and do the change you w

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> doesn't the 2nd one already cover the 3rd one? Yes, sorry, it was just a example of the layout. Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepasc

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread wkitty42
On 4/10/20 4:44 PM, fredvs via fpc-pascal wrote: Does fpc accept relative path for -Fu in the fpc.cfg config file, something like: -Fu../units/$fpctarget -Fu../units/$fpctarget/* -Fu../units/$fpctarget/rtl doesn't the 2nd one already cover the 3rd one? -- NOTE: No off-list assistance is gi

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 15:18 schrieb fredvs via fpc-pascal: I hope that you understand that: https://github.com/fredvs/freepascal was done not for create a new war but because some features are really needed. We have different opinions about what is needed and what is not. Or what even is the rig

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
Hello Michael. I will deeply study your proposition. I am also highly interested by this: > You can do > -Fu$PPC_CONFIG_PATH/../units/whatever Maybe it can solve some problem and the last patch about dealing with './' will not be needed. I hope that you understand that: https://github.com/f

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Sven Barth via fpc-pascal
Am 11.04.2020 um 14:46 schrieb fredvs via fpc-pascal: It will create one in your home directory if it detects you do not have root access. Could you explain that? Of course if you can show me a trick for configuring a script that will install fpc in the home directory (.fpc.cfg), with for examp

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> On unix, a simple 'unzip' is simply not the standard way to do things. There are tons of application that do that. GoogleEarth, lot of utilities, ... MSEide, -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillis

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> It will create one in your home directory if it detects you do not have root access. Could you explain that? Of course if you can show me a trick for configuring a script that will install fpc in the home directory (.fpc.cfg), with for example the hard-coded directory /home/user/instantfpc, I w

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, fredvs via fpc-pascal wrote: There's a prompt in the freepascal installer that asks for the prefix. Your users should be capable of that? As explained in previous post, the goal is to not touch the system. If you use the fpc installer, even if you install it in the user'

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, Alexander Grotewohl wrote: Why not just provide instructions for installation in the user's home directory, for example. It's what you'd have to do if you didn't have root access anyways. Then you can pretend that it's "cleaner" than just installing it systemwide. There

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
> There's a prompt in the freepascal installer that asks for the prefix. Your users should be capable of that? As explained in previous post, the goal is to not touch the system. If you use the fpc installer, even if you install it in the user's home directory, the installer will create a fpc.cfg

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Alexander Grotewohl
ascal.org Cc: fredvs Subject: Re: [fpc-pascal] Search path order for fpc.cfg Hello. The target of that "patched" fpc is mainly the Raspbian RPi. I want a fpc out-of-the-box, only a zip file that people may unzip where they want, without need to touch anything to the system. All what

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread fredvs via fpc-pascal
Hello. The target of that "patched" fpc is mainly the Raspbian RPi. I want a fpc out-of-the-box, only a zip file that people may unzip where they want, without need to touch anything to the system. All what I have found in fpc doc always require to touch to system. Also, I want that people can

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Michael Van Canneyt
On Sat, 11 Apr 2020, Jonas Maebe wrote: On 11/04/2020 08:24, Michael Van Canneyt wrote: it is not done on unices to search in the binary directory for config files. That's a windows thing. And the main reason for this is that "the" compiler binary does not necessarily exist. The most obviou

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-11 Thread Jonas Maebe
On 11/04/2020 08:24, Michael Van Canneyt wrote: > it is not done on unices to search in the binary directory for config > files. That's a windows thing. And the main reason for this is that "the" compiler binary does not necessarily exist. The most obvious case is a hard link: in this case, a sing

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread Michael Van Canneyt
On Fri, 10 Apr 2020, fredvs via fpc-pascal wrote: Does fpc accept relative path for -Fu in the fpc.cfg config file, something like: -Fu./units/$fpctarget -Fu./units/$fpctarget/* -Fu./units/$fpctarget/rtl No, it seems that it is not possible. So I propose to do this, dont hurt existing c

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread Michael Van Canneyt
On Fri, 10 Apr 2020, fredvs via fpc-pascal wrote: Hello. According: https://wiki.freepascal.org/Configuration_file Under a Unix or Unix-like operating systems (e.g. FreeBSD, Linux) 1)The current directory. 2)Your home directory, it looks for .fpc.cfg. 3)The directory specified i

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread fredvs via fpc-pascal
> Does fpc accept relative path for -Fu in the fpc.cfg config file, something > like: > -Fu./units/$fpctarget > -Fu./units/$fpctarget/* > -Fu./units/$fpctarget/rtl No, it seems that it is not possible. So I propose to do this, dont hurt existing code, only gives happiness: in cfileutls.pas do

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread fredvs via fpc-pascal
Hello. The last line of function check_configfile(fn:string; var foundfn:string):boolean; should be something like this: ... else if CfgFileExists(IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))+fn) then foundfn:=IncludeTrailingBackslash(ExtractFilePath(ParamStr(0)))+fn else

Re: [fpc-pascal] Search path order for fpc.cfg

2020-04-10 Thread fredvs via fpc-pascal
Hello. In fpc code /compiler/options.pas, for function check_configfile(fn:string; var foundfn:string):boolean; { Order to read configuration file : try reading fpc.cfg in : 1 - current dir 2 - configpath 3 - compiler path } But if you check in code, the option 3 is nev