Re: [fpc-pascal] Error format question
> On Apr 12, 2020, at 11:16 AM, Ryan Joseph wrote: > > I just did svn up and got r44689, rebuilt the compiler but I still get the > same error format. Was it supposed to be changed? ok, I think we're confused here. Just actually tested gcc and got this format: /Users/ryanjoseph/Developer/Projects/C++/Tests/test:10:6: error: expected expression This means that FPC 3.0.4 is giving the wrong format and I guess we're stuck with that like it is. That means trunk is and was fine like it is. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Error format question
> On Apr 11, 2020, at 9:50 PM, Ryan Joseph wrote: > > Thanks, I could swear this was a bug that was already fixed but I'll rebuild > the compiler tomorrow and see if it went away. I just did svn up and got r44689, rebuilt the compiler but I still get the same error format. Was it supposed to be changed? Ryans-MacBook-Pro-2:fpc ryanjoseph$ /usr/local/lib/fpc/3.3.1/ppcx64 -vbr /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas Free Pascal Compiler version 3.3.1 [2020/04/12] for x86_64 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Darwin for x86_64 Compiling /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:6:1: error: Identifier not found "f" /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:7:4: error: There were 1 errors compiling module, stopping error: Compilation aborted Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
This is an evil travesty and I'm not happy about it: -Fu$_$/../../lib/fpc/$fpcversion/units/$fpctarget -Fu$_$/../../lib/fpc/$fpcversion/units/$fpctarget/* -Fu$_$/../../lib/fpc/$fpcversion/units/$fpctarget/rtl -- Alexander Grotewohl https://dcclost.com From: 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, 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: -Fu$FPCPATH/units/$fpctarget -Fu$FPCPATH/units/$fpctarget/* -Fu$FPCPATH/units/$fpctarget/rtl And it works like charm. @Jonas, I apologize, really, you kindly answered but I feel alone against a tribe of gurus who want to eat me. OK, I go to sleep (if I can). Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
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, 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: -Fu$FPCPATH/units/$fpctarget -Fu$FPCPATH/units/$fpctarget/* -Fu$FPCPATH/units/$fpctarget/rtl And it works like charm. @Jonas, I apologize, really, you kindly answered but I feel alone against a tribe of gurus who want to eat me. OK, I go to sleep (if I can). Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 patch, I agree, it is maybe to simple, unzip it, compile it, no script needed, no break of compatibility (even I would prefer change the search order), the fpc.cfg is in the directory of fpc and all the -Fu's are like -Fu./units/ to point to child directories. Do you know the OOTB concept? https://en.wikipedia.org/wiki/Out_of_the_box_(feature) Fre;D -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
Are you always going to be running the compiler from a front-end (IDE, whatever else)? Just use code on the other end to find the binary directory and call something like "fpc @/home/whereis/fpc/fpc.cfg ..." You could also use a bash script to wrap the compiler and do something like: https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself#59916 To find out where the script is (and therefore where your binaries/config are) to use with @ again. I duno. If you really do this I'd suggest doing it once and writing a correct config to .fpc.cfg in their home directory... in that case they can at least upgrade fpc independently from the whole project. But that touches the system.. -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of fredvs via fpc-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 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 possible. Sorry but now it is the time to change and fast. Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
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 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 possible. Sorry but now it is the time to change and fast. Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 earlier here, so I'm inclined not to buy the 'it is urgent' story. We're just trying to help, but we can't work miracles... Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 have time to be patient any more. Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 copyright and not claim that it is a fork from fpc? You know what, please choose the name, I will use it. Better yet, use fpc as it is. It can do all you need already out of the box. You just need to be a little patient and let us explain properly how to help you. It would save you a lot of trouble, I think :) Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 > copyright and not claim that it is a fork from fpc? No, and I never claimed that. You asked whether you could change the name, and I said "yes, see e.g. here for someone else who also says that you can do so, and that it's even a good idea to do so". Please stop acting as if you are attacked when someone simply answers your questions. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Error format question
> On Apr 11, 2020, at 8:12 PM, Florian Klämpfl wrote: > > I fixed this for trunk. You can very easily test and see what gcc outputs to > verify what's correct. Thanks, I could swear this was a bug that was already fixed but I'll rebuild the compiler tomorrow and see if it went away. Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 know what, please choose the name, I will use it. Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 example the hard-coded directory /home/user/instantfpc, I will use it. But the condition will be that the user has nothing write, only run a script. The default install.sh used by FPC calls samplecfg to create the config file for the compiler. samplecfg is located in compiler/utils. Line 40 and following contain: # Detect if we have write permission in sysdir. if [ -w "$sysdir" ] ; then echo Write permission in $sysdir. fpccfgfile="$sysdir"/fpc.cfg fppkgfile="$sysdir"/fppkg.cfg defaultfile="$sysdir"/fppkg/default compilerconfigdir="-d CompilerConfigDir=$sysdir/fppkg" fppkgconfdir=$sysdir/fppkg/conf.d else echo No write premission in $sysdir. fpccfgfile="$HOME"/.fpc.cfg fppkgfile="$HOME"/.config/fppkg.cfg defaultfile="$HOME"/.fppkg/config/default fppkgconfdir="$HOME"/.fppkg/config/conf.d fi So as you can see, when the user does not have write permissions in /etc or /local/etc, it will write a config file in the user home directory, exactly where the compiler will pick it up. So you see, we've covered the situation you are trying to solve. It has been so for ages, all you need to do is use what is there correctly. There is no need to change anything. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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-rebrand-copyright-a-forked-project-gnu-gpl# Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 one? The default fpc.cfg contains this as well. It's to ensure that in case of unit name conflicts, the RTL will always get priority. Ideally there are no such conflicts, but there have been several in the past (and there are still some between the univint and fv packages today). thank you for the explanation! i never understood why it was listed like that and didn't ever really find an explanation but i didn't look very hard, either... -- NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list where it belongs!* ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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.cfg contains this as well. It's to ensure that in case of unit name conflicts, the RTL will always get priority. Ideally there are no such conflicts, but there have been several in the past (and there are still some between the univint and fv packages today). Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 you should probably change the name at least a little bit so there won't be confusion when people ask for help (I'm using FPC - Yes, but which fork of FPC?) Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 want without be dependent of what the parent of the fork think or do. And even more, if it is done with goodwill, parent and fork can stimulate their self. Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 given without prior approval. *Please keep mailing list traffic on the list where it belongs!* ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 right approach. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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/fredvs/freepascal was done not for create a new war but because some features are really needed. And if some similar patches are applied to official fpc, I the repository can be deleted. Fre;D -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Error format question
Am 11.04.20 um 08:11 schrieb Ryan Joseph via fpc-pascal: Sorry to ask this yet again but I keep forgetting or remembering wrong. I thought this was a one time error that was fixed but I'm still getting different error formats with the trunk (as of today) vs 3.0.4. Can anyone please confirm which it the correct format I should rely on? Ryans-MacBook-Pro-2:~ ryanjoseph$ fpc -vbr /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64 Copyright (c) 1993-2017 by Florian Klaempfl and others Target OS: Darwin for x86_64 Compiling /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:6: error: 1: Identifier not found "f" /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:7: error: 4: There were 1 errors compiling module, stopping error: Compilation aborted Ryans-MacBook-Pro-2:~ ryanjoseph$ /usr/local/lib/fpc/3.3.1/ppcx64 -vbr /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas Free Pascal Compiler version 3.3.1 [2020/04/11] for x86_64 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Darwin for x86_64 Compiling /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:6:1: error: Identifier not found "f" /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:7:4: error: There were 1 errors compiling module, stopping error: Compilation aborted I fixed this for trunk. You can very easily test and see what gcc outputs to verify what's correct. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 example the hard-coded directory /home/user/instantfpc, I will use it. But the condition will be that the user has nothing write, only run a script. By default the compiler also looks in ~/.fpc.cfg on *nix systems (and then tries /etc/fpc.cfg). So if you have your installation script automatically create the correct configuration file using fpcmkcfg (distributed with FPC, see $fpcdir/utils/fpcmkcfg) setting up the correct paths then your user will be good to go (after all this is what FPC's installation script does as well). Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Error format question
Am 11.04.2020 um 08:11 schrieb Ryan Joseph via fpc-pascal: Sorry to ask this yet again but I keep forgetting or remembering wrong. I thought this was a one time error that was fixed but I'm still getting different error formats with the trunk (as of today) vs 3.0.4. Can anyone please confirm which it the correct format I should rely on? Ryans-MacBook-Pro-2:~ ryanjoseph$ fpc -vbr /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas Free Pascal Compiler version 3.0.4 [2018/09/30] for x86_64 Copyright (c) 1993-2017 by Florian Klaempfl and others Target OS: Darwin for x86_64 Compiling /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:6: error: 1: Identifier not found "f" /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:7: error: 4: There were 1 errors compiling module, stopping error: Compilation aborted Ryans-MacBook-Pro-2:~ ryanjoseph$ /usr/local/lib/fpc/3.3.1/ppcx64 -vbr /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas Free Pascal Compiler version 3.3.1 [2020/04/11] for x86_64 Copyright (c) 1993-2020 by Florian Klaempfl and others Target OS: Darwin for x86_64 Compiling /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:6:1: error: Identifier not found "f" /Users/ryanjoseph/Developer/Projects/FPC/Various/stratch_pad.pas:7:4: error: There were 1 errors compiling module, stopping error: Compilation aborted Found the cause: https://svn.freepascal.org/cgi-bin/viewvc.cgi?view=revision&revision=43769 As this is the error output when rhide/GCC compatible error output is given (-vr), it probably did not work correctly with tools that rely on the order before that change. Regards, Sven ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 will use it. But the condition will be that the user has nothing write, only run a script. Fre;D -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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's home directory, the installer will create a fpc.cfg in /etc and that needs root access. This is simply not correct. It will create one in your home directory if it detects you do not have root access. Of course users can do that but the goal of that patch is to have a compiler totally out-of-the-box, that even dont need to configure or set anything. Sorry but not all users are gurus. No-one expects them to be. But if someone is unable to run install.sh, and type in the name of a directory, then he has no business in programming. You're not making a chat application, after all. You can expect some rudimentary understanding of your users. And sorry also if it dont follow the rules of the good old boy way. This is not the 'good old boy' way. Why use such derogatory words ? It's adapting to the system you work on, instead of clinging to wrong concepts for that system. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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's a prompt in the freepascal installer that asks for the prefix. Your users should be capable of that? Exactly. On unix, a simple 'unzip' is simply not the standard way to do things. As I said, all programs that work like that ask you to execute some script (in your .bashrc or .cshrc) to set some environment variable. You can simply do the same, or as Alexander points out, use the provided installer script from fpc. You reason from a windows perspective. This is seldom a good idea on Unices. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
> 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 in /etc and that needs root access. Of course users can do that but the goal of that patch is to have a compiler totally out-of-the-box, that even dont need to configure or set anything. Sorry but not all users are gurus. And sorry also if it dont follow the rules of the good old boy way. Fred -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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's a prompt in the freepascal installer that asks for the prefix. Your users should be capable of that? -- Alexander Grotewohl https://dcclost.com From: fpc-pascal on behalf of fredvs via fpc-pascal Sent: Saturday, April 11, 2020 8:07:17 AM To: fpc-pascal@lists.freepascal.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 I have found in fpc doc always require to touch to system. Also, I want that people can compile out-of-the-box, without the need to install dev package because that army of Rpi is not connected. I thanks you for the warnings about using fpc.cfg in the same directory than the compiler. But for my need there is no problem with that, even if you create a symlink and run fpc from that symlink. I do propose my patch here to inform what I am changing in https://github.com/fredvs/freepascal Fre;D -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
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 I have found in fpc doc always require to touch to system. Also, I want that people can compile out-of-the-box, without the need to install dev package because that army of Rpi is not connected. I thanks you for the warnings about using fpc.cfg in the same directory than the compiler. But for my need there is no problem with that, even if you create a symlink and run fpc from that symlink. I do propose my patch here to inform what I am changing in https://github.com/fredvs/freepascal Fre;D -- Sent from: http://free-pascal-general.1045716.n5.nabble.com/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 obvious case is a hard link: in this case, a single file exists in multiple locations on the file system. A program file can also be moved while it was executing. Even if you ignore the above cases and only care about the directory in which the binary was found when it was started, then there is still the issue that not all Unix systems provide you with that information. E.g. on Darwin/macOS, if you just type "ppcx64", then the "full path" to the binary that the program gets is "ppcx64" and you have no idea where it's located. You can use some heuristics like looking in the path, but this is fragile and might possibly even be used for attacks (it is probably possible to specify a different PATH environment variable to the child process than the one used to originally find it). This is also the reason why most Unix programs have there installation directory compiled into the binary, and why you often have to specify it already when building the program (rather than only when installing it). FPC does not do that due to its DOS and OS/2 heritage, but it's not something we should extend. In short: the installer should write a 'correct' config file, without tricks like relative paths. Many unix programs that can be installed 'anywhere' require you to set environment variables in order to find where you installed it. Michael. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Search path order for fpc.cfg
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 single file exists in multiple locations on the file system. A program file can also be moved while it was executing. Even if you ignore the above cases and only care about the directory in which the binary was found when it was started, then there is still the issue that not all Unix systems provide you with that information. E.g. on Darwin/macOS, if you just type "ppcx64", then the "full path" to the binary that the program gets is "ppcx64" and you have no idea where it's located. You can use some heuristics like looking in the path, but this is fragile and might possibly even be used for attacks (it is probably possible to specify a different PATH environment variable to the child process than the one used to originally find it). This is also the reason why most Unix programs have there installation directory compiled into the binary, and why you often have to specify it already when building the program (rather than only when installing it). FPC does not do that due to its DOS and OS/2 heritage, but it's not something we should extend. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal