How to ignore the errors coming from external library - bazel

i am using -Wconditional-uninitialized flag and then i am getting some errrors from the library.
external/com_google_protobuf/src/google/protobuf/arena.cc:398:12: error: variable 'arena' may be uninitialized when used here [-Werror,-Wconditional-uninitialized] return arena->AllocateAlignedWithCleanup(n, alloc_policy_.get()); ^~~~~ external/com_google_protobuf/src/google/protobuf/arena.cc:395:21: note: initialize the variable 'arena' to silence this warning SerialArena* arena; ^ = nullptr 1 error generated.
i want to filter out this error since it is coming from the library and i am using Bazel 5.0 and feature : build --features=external_include_paths but still i am seeing the above error from the library.
Could you please help me on this?

Related

How to fix Unresolved external from FILE2.0?

I have some HDF5 C code that I am trying to port to C++Builder. I am getting this error at build time:
[ilink64 Error] Error: Unresolved external 'H5check_version' referenced from D:\DELPHITOOLS\PASHDF\C\WIN64\DEBUG\FILE2.O
H5check_version is included in H5public.h as a macro.
Why does C++Builder not find this?
H5check_version is included in H5public.h as a macro.
If that were true, you would not be getting a linker error, since macros are handled only during the preprocessor stage.
Somewhere in your project, the compiler is seeing a declaration of H5check_version as a function, and your file2 unit is calling it as a function, but the linker can't find the implementation of that function, hence the error.
Your project needs to contain a reference to the appropriate .lib file that either implements the actual function (static linking) or tells the linker which DLL the function is exported from (dynamic linking).
C/C++ is case sensitive, so H5check_version is different from H5Check_version.
AFAIK pascal is not case sensitive at all.
Regards

How to make Google Closure Compiler understand the `caches` variable (CacheStorage)?

If I use caches in my service worker code then Google Closure Compiler (launched with the advanced optimizations mode) will tell me :
/var/www/html/perso/otraSite/web/js/sw_viaTypescript.js:79: ERROR - [JSC_UNDEFINED_VARIABLE] > variable caches is undeclared
})(caches);
^^^^^^
1 error(s), 0 warning(s)
A workaround that I use until now is ... I put window.caches so Google Closure Compiler succeeds to compile but if I let that code, browsers will tell me :
sw.js:18 Uncaught ReferenceError: window is not defined
So I replace window.caches by caches in the code compiled by Google Closure Compiler afterwards but ... having to do this every single time is pretty annoying.
Is there a cleaner way to handle it?

error: CvANN_MLP does not name a type

I am compiling my program in opencv-3.1, but I am getting following error
error: `CvANN_MLP` does not name a type
The program is compiling properly in opencv-2.4.
I am not able to find CvANN_MLP word in any of the opencv-3.1 header files.
Can anybody tell what is the problem ?
According to Upgrade guide it was changed from CvANN_MLP to cv::ml::ANN_MLP in 3.0.

What would cause a compiler to fail randomly?

I am using the clang compiler on windows. I used the installer from the LLVM website. Sometimes it gives me a compiler error.
clang -I./include main.c CoreFoundation.dll
it gives:
In file included from main.c:4:
In file included from ./include\CoreFoundation/CFNumberFormatter.h:110:
./include\CoreFoundation/CFXMLParser.h:159:81: error: unknown type name 'CFXMLNodeRef'
typedef void * (*CFXMLParserCreateXMLStructureCallBack)(CFXMLParserRef parser,
CFXMLNodeRef nodeDesc, void *info);
...
and sometimes this..
In file included from main.c:4:
In file included from ./include\CoreFoundation/CoreFoundation.h:86:
./include\CoreFoundation/CFDateFormatter.h:104:105: error: unknown type name 'CFDateRef'; did you mean 'CFDataRef'?
CFStringRef CFDateFormatterCreateStringWithDate(CFAllocatorRef allocator, CFDateFormatterRef formatter, CFDateRef date) AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER;
...
...and other similar warnings, seemingly randomly choosing where to stop. Sometimes it compiles through without error. When it gives an error, they seem to be be about not finding a symbol from an included file. It doesn't complain about not finding the file. But it doesn't consistently stop at the same point and sometimes compiles successfully.
I can reproduce this "error" under Linux with gcc. I even get the "report this compiler bug pls" message.
When it gives an error, they seem to be be about not finding a symbol from an included file
You can get this:
if you compile with multiple threads (eg. make -j8)
if you abort the compile and then start it again without "cleaning" all obj files
if you compiled your source, changed something and compile without "cleaning"
if your compiler/make/build process changes the order every time... (had this with cmake and opencv 3 source)

Which way to go with these bugs

Compiling Dart app to js these two errors arise:
Nº1:
InvalidStateError: Failed to call 'register' on 'Document' for type 'polymer-element': a type with that name is already registered.
Nº2:
Breaking on exception: TypeError: Object #<qE> has no method 'vL'
The object qE is created by dart2js.
How to find the solution?
There are appropriate tools to find the solution?
Thanks for advance !
I heard N1 occurs when Angular and Polymer is used in the same app. This is a known bug.
related open issues:
- duplicate polymer-element registration should not break the app
- Get error "Uncaught InvalidStateError: Failed to call 'register' on 'Document' for type 'polymer-element'
For the N2 use pub build --mode=debug so you get unmangled names and then use one of the available strategies to fix the problem (use of MirrorsUsed, #observable, #reflectable)

Resources