How to interpret and fix brew doctor errors? - homebrew

I am having problems updating to a particular Ruby version. The failed install is prompting me to run brew doctor, to which I get the following output.
Is this something that I need to correct? And if so how?
Pauls-MacBook-Pro:~ pauldriver$ brew doctor
Warning: Passing arbitrary symbols to `option` is deprecated: :static
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :static
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :static
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :"build-examples"
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :"build-examples"
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :"build-examples"
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :"build-tests"
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :"build-tests"
Symbols are reserved for future use, please pass a string instead
Warning: Passing arbitrary symbols to `option` is deprecated: :"build-tests"
Symbols are reserved for future use, please pass a string instead
Your system is ready to brew.

They are warnings and the final line is the conclusion: Your system is ready to brew.
I wouldn't worry too much.
It looks like your Ruby version is newer than the one used to develop the version of Homebrew you have. Updating Homebrew (brew update) could fix the issues and remove the warnings.

Related

Latex build fail on invalid reference

I would like Latex build to fail when I have an invalid reference (I'm using nameref). Right now I only get a warning:
Found missing reference warnings.
LaTeX Warning: Reference `foo' on page 120 undefined on in
How can I configure Latex to give me an error instead?

How to suppress deprecation warning for a single function in C?

I would like to suppress deprecation warnings for a single function in C. I.e., I want that the use of a function:
void deprecated_func(void)
stop to produce a deprecation warning, while I would like that all other deprecated functions still continue to produce deprecation warning (i.e., I still want a warning if using void another_deprecated_func(void)).
I can find some solutions for ignoring deprecation warnings on all functions (see for example Suppressing a deprecated warning for a single line ), but not for a single function. Any idea if this is doable and how in c-lang? (I am using GCC, so a GCC-solution would be enough, but if you have something general it would be great :) ).

W1000 Symbol 'StrLComp' is deprecated: 'Moved to the AnsiStrings unit'

I am working on the project where I found the warnings as
W1000 Symbol 'StrLComp' is deprecated: 'Moved to the AnsiStrings unit'
There are so many warnings in my code for many of the string functions defined in the System.SysUtils.
I am not able to use the AnsiStrings functions because it makes multiple occurrences.
Can anyone please tell me How I can remove these type of warnings?
I am working on Delphi 10 Seattle.
These warnings are dealt with quite readily by using the System.AnsiStrings unit, just as the warning instructs you. Use that unit, listing it after System.SysUtils in your uses clause, and the warning will no longer be produced.
If you include both System.SysUtils and System.AnsiStrings then you will encounter an ambiguous overload error when calling this function with an Ansi string as input. That will need to be resolved by qualifying the function name:
System.AnsiStrings.StrLComp(...)
or
AnsiStrings.StrLComp(...)
Depending on whether or not you use namespace aliases.
Before you go down this path, you might want to take a step back and consider if you really want to continue calling this ANSI function. Can you not use the Unicode version instead? If you can do so, this entire issue disappears.

Xcode: ignored symbols warnings while linking for finalizer

I have problems integrating finalizer to xcode project I get the warnings like this
Warning: Ignored symbols were detected in this build. In some cases ignored symbols could cause incorrect finalization. This may be caused by different static libraries containing the same symbol.
warning: no debug symbols in executable (-arch armv7)
Along with a long list like this
Ignored symbol '_int_update' defined at address 0xfb2cc -- it was already defined at 0xd2c94
Ignored symbol '_init' defined at address 0xfcbd8 -- it was already defined at 0xfcba4
Ignored symbol '_update' defined at address 0xfcbe4 -- it was already defined at 0xfcbb0
Ignored symbol '_final' defined at address 0xfcbf0 -- it was already defined at 0xfcbbc
Any help or suggestions would be appreciated.
If there are 2 or more symbols defined among all the relocatable object files having the same name, the linker will choose one of them and the other symbols are ignored.
If these symbols have different types, it may lead an incomprehensible bug at run-time.
There is an example in chapter 7 of Computer Systems_A Programmer-'s Perspective:

How to patch a method in Classes.pas

I need to patch a method in Classes.pas
(TReader.ReadString - I want to force it to use a specified codepage, not the system default).
If I copy Classes.pas into my project,I will end up having to rebuild the entire VCL. Is there any (easy) way to patch a method at runtime?
Modifying the implementation side of Classes.pas will not require recompiling everything. Delphi figures out if a unit needs to be recompiled by an algorithm that looks roughly like this:
If DCU found:
Is DCU format out of date (old version of compiler)? If so, need source to recompile or compile-time error.
Is the source on the path? If so, if it's newer than the DCU, recompile
For each used unit:
Repeat analysis when loading
For each used symbol ("import": type, variable, routine, initialized constant etc.) from that unit:
Is symbol version of import different to symbol found in used unit? If so, recompile needed.
If DCU is not found, source will need to be found and compiled, otherwise compile-time error
The important concept is that of symbol version. When saving a DCU, Delphi calculates a hash based on the interface declaration of the symbol and associates it with the symbol. Other units that use the symbol also store the symbol version. In this way, link-time conflicts caused by stale symbols are avoided, unlike most C linkers.
The upshot of this is that you should be able to add Classes.pas to your project and modify its implementation section almost to your heart's content, and still be able to statically link with the rest of the RTL and VCL and third-party libraries, even those provided in object format only.
Things to be careful of:
Inlined routines; the body of inlined routines are part of the symbol version
Generics; the implementation side of generic types and methods are part of the respective symbol versions
I found VCLFixPack:
https://www.idefixpack.de/blog/bugfix-units/vclfixpack-10/
I used the techniques from this to replace the method I wanted to patch at runtime.

Resources