Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2015-08

FreeBSD and fpc messages.

15 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

fredvs

Hello.

I did a recent update of all libraries in FreeBSD64 to the trunk versions.

Now, all the message given by fpc,while compiling, are no more readable. The compilation is ok, but all the output message have un-readable characters.
Changing LANG var did not change anything.

What libraries are used by fpc to render the output messages? If I know what libraries is guilty, i can re-install the old package.

By the way, does it exist a list of all the external dependencies (not the fpc one) needed to compile a simple fpc program ?

Thanks.

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FreeBSD-and-fpc-messages-tp5722248.html Sent from the Free Pascal - General mailing list .
Jonas Maebe
to fredvs
fredvs wrote
What libraries are used by fpc to render the output messages?

FPC does not use any library. Which language are you using for the messages?

By the way, does it exist a list of all the external dependencies (not the fpc one) needed to compile a simple fpc program ?

All it needs is binutils (and in case of i386 and x86-64 on ELF platforms such as FreeBSD, only the binutils linker).

Jonas

Fred van Stappen
to Jonas Maebe
> What libraries are used by fpc to render the output messages? FPC does not use any library. Which language are you using for the messages?

I use the default language (En).
What i do not understand is that, in console, gcc gives messages ok and fpc only hexa characters.

Show quoted text 5 lines
> By the way, does it exist a list of all the external dependencies (not the > fpc one) needed to compile a simple fpc program ? All it needs is binutils (and in case of i386 and x86-64 on ELF platforms such as FreeBSD, only the binutils linker).

Huh, so I will try with the old binutils to see if it solve it.

Thanks for helping.

Fred.

fredvs
to Fred van Stappen

Ok, I get it (but it was a hard battle before to find it).

If in console =>
# /usr/local/lib/fpc/2.6.4/ppcx64 myprog.pas

=> messages not readable. ;-(

if creating a symlink to ppcx64 in /usr/local/bin
then in console =>
# ppcx64 myprog.pas

=> messages readable. ;-)

See image in attachment.

<http://free-pascal-general.1045716.n5.nabble.com/file/n5722275/fpcinfos.jpg>

Fre;D

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FreeBSD-and-fpc-messages-tp5722248p5722275.html Sent from the Free Pascal - General mailing list .
Pierre Free Pascal
to fredvs

Did you notice that the date of compilation is also different in both cases...

Are you really sure that the symlink points to the same file?

If this is true, it probably means that it reads a different configuration file in both cases.

Try using -va to activate all debug output,
and look at the difference in the found configuration file and possibly after for some -Fr option (loading custom error message).

Hope this will help,

Pierre Muller

Show quoted text 40 lines
-----Message d'origine----- De : [mailto:fpc-pascal- De la part de fredvs Envoyé : dimanche 16 août 2015 20:17 À : Objet : Re: [fpc-pascal] FreeBSD and fpc messages. Ok, I get it (but it was a hard battle before to find it). If in console => # /usr/local/lib/fpc/2.6.4/ppcx64 myprog.pas => messages not readable. ;-( if creating a symlink to ppcx64 in /usr/local/bin then in console => # ppcx64 myprog.pas => messages readable. ;-) See image in attachment. <http://free-pascal- general.1045716.n5.nabble.com/file/n5722275/fpcinfos.jpg> Fre;D ----- Many thanks ;-) -- View this message in context: http://free-pascal- general.1045716.n5.nabble.com/FreeBSD-and-fpc-messages- tp5722248p5722275.html Sent from the Free Pascal - General mailing list . _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Fred van Stappen
to Pierre Free Pascal

Hello Pierre and thank to help.

Did you notice that the date of compilation is also different in both cases... Are you really sure that the symlink points to the same file?

Bien vu ! (well seen).
Indeed. Before to find the "trick", i have installed many different fpc version, compiled new one, try with fpc 3.1.1 too. But it is not the problem, even with link to same compiler.

Always the same not readable message if using full path of compiler.

I am happy to have find a solution but I cannot explain why it works.

A solution => symlink to ppcx64 in /usr/local/bin and run ppcx64 without path.

Fre;D

Fred van Stappen
to Fred van Stappen

Re-re- hello Pierre,

Aaargh, I have to take a rest...

No, the image is ok, first command use full path to compiler (and message are not ok) and second command use full path of the symlink to compiler.

So, to resume (and sorry for all this doubts):

Using full path to compiler to run it, like =>
# /usr/local/lib/fpc/2.6.4/ppcx64 myprog.pas
=> bad output characters

Using the symlink to the compiler in /usr/local/bin, like => # /usr/local/bin/ppcx64 myprog.pas
or (because /usr/local/bin is in system path):
# ppcx64 myprog.pas
=> good output characters.

Fre;D

Sven Barth
to Fred van Stappen
"Fred van Stappen" wrote 6 lines
Re-re- hello Pierre, Aaargh, I have to take a rest... No, the image is ok, first command use full path to compiler (and message

are not ok) and second command use full path of the symlink to compiler.

Show quoted text 12 lines
So, to resume (and sorry for all this doubts): Using full path to compiler to run it, like => # /usr/local/lib/fpc/2.6.4/ppcx64 myprog.pas => bad output characters Using the symlink to the compiler in /usr/local/bin, like => # /usr/local/bin/ppcx64 myprog.pas or (because /usr/local/bin is in system path): # ppcx64 myprog.pas => good output characters.

Did you try Pierre's suggestion with the -va option and compare the debug output if both runs to check whether any incorrect option might be used?

Regards,
Sven

Graeme Geldenhuys
to Fred van Stappen: Aaargh, I have to take a rest... No, the image is ok, first command use full path to…
Fred van Stappen wrote
Aaargh, I have to take a rest...

Why don't you start again. Remove all copies of FPC, no matter the versions. Remove all copies of the fpc.cfg too. Look in /usr/local/etc and $HOME.

Then download the official FPC release install:

http://sourceforge.net/projects/freepascal/files/FreeBSD/2.6.4/

Untar the file to a temp directory and run the install script. Install to your own home directory location - that way you don't need root privileges. For example:

/home/freds/devel/fpc-2.6.4/

Using version numbers in the install location also means that you can install other versions of FPC concurrently. You can then tweak the ~/.fpc.cfg to use $fpcversion macros instead of hard-coded version numbers. That way all FPC install share the same ~/.fpc.cfg file.

If you need the FPC source code, download that from SF.net too, and unpack that in /home/freds/devel/fpc-2.6.4/src/

I then amend my PATH environment variable to include the stable FPC "bin" directory, so I can use FPC from anywhere in my system, simply by typing 'fpc <myprogram.pas>'. Other FPC versions can be used by specifying the full path to the fpc binary.

I've used this setup for years - first with Linux, then the last 3 years with FreeBSD. This has always worked without fail. I NEVER use any package management version of FPC, and neither to I use FreeBSD ports to install FPC. The official FPC release installer is all you need.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/
fredvs
to Graeme Geldenhuys

Hello everybody.

Many, many thank to help.

I have find the guilty. ;-)

This code, in fpc.cfg was the cause of the strange characters: =>

# path to the messagefile, not necessary anymore but can be used to override # the default language
-Fr/usr/local/lib/fpc/$fpcversion/msg/errore.msg
-Fr/usr/local/lib/fpc/$fpcversion/msg/errorn.msg
-Fr/usr/local/lib/fpc/$fpcversion/msg/errores.msg
-Fr/usr/local/lib/fpc/$fpcversion/msg/errord.msg
-Fr/usr/local/lib/fpc/$fpcversion/msg/errorr.msg

After deleting this lines, messages are ok.

And about the mystery why it was working from link in /usr/local/bin ...

There was a fpc.cfg hidden inside /usr/local/lib/fpc/2,6,4,/

Iin this fpc.cfg, there was the guilty lines (see above).

And in /etc/fpc.cfg there was not those guilty lines.

So if using complete path to compiler, compiler use fpc.cfg that is in the directory of ppcx64.
If using /usr/local/bin/ppcx64 => this one uses /etc/fpc.cfg (who does not have the guilty lines) !.
And that explain why, in that case, the messages are ok.

I am very happy to have find the solution.

Thanks to everybody for helping.

Fred:

-----
Many thanks ;-)

View this message in context: http://free-pascal-general.1045716.n5.nabble.com/FreeBSD-and-fpc-messages-tp5722248p5722297.html Sent from the Free Pascal - General mailing list .
Graeme Geldenhuys
to fredvs
fredvs wrote
I am very happy to have find the solution.

Well done! I'm glad you finally got it sorted out.

Regards,
- Graeme -

Fred van Stappen
to Graeme Geldenhuys
Well done! I'm glad you finally got it sorted out. Regards, - Graeme -

Thanks Graeme.

After trying many fpc releases, install all FreeBSD distros that exist, re-compiling fpc, changing the background image of desktop, the battery of the netbook, my haircut, finally it works ...

Happy because the next try will be to throw the computer against the wall...

Thanks.

Fre;D

Graeme Geldenhuys
to Fred van Stappen
Fred van Stappen wrote
...changing the background image of desktop, the battery of the netbook, my haircut, finally it works ...

LOL - I've had many such days, so know exactly how you feel.

Regards,
- Graeme -