libpng ndk-build internal compiler error in debug mode - debugging

I use ndk-build to compile libpng source code in debug mode, then it shows “internal compiler error” in pngrtran.c. But when I compile in release mode, it can success. Is this a bug in libpng? How I can resolve this?

It's not a bug in libpng; anything a program describes as an "internal error" is a bug in the program (libpng does this, but then it shows "libpng: internal error"!) So it's a bug in the compiler.
You should report it to the ndk guys or you could go directly to the compiler vendor (probably GNU) because they would likely to be more responsive.
You can't resolve the problem - it needs a compiler fix (maybe only to output a message that doesn't claim it's an internal error, but at least that.) You can avoid the problem by simply not compiling libpng in debug mode. Since I assume this is for Android so you can (I believe) mix-and-match debug and now debug code (this does NOT work on Windows with at least one compiler!)
You can also try working out which compiler option reveals the problem; compare the options being passed to the compiler in both release and debug, then bisect the differences to see if you can narrow the issue down to one setting.
John Bowler jbowler 2 acm.org

The android team should know about the bug. As Its a resurface of an old one:
http://code.google.com/p/android/issues/detail?id=20862

Related

Why are symbols poisoned?

I have been trying to go through this tutorial and I always get stuck in the second build of GCC when making the cross-toolchain. It errors out saying that I am attempting to call a poisoned calloc. I have gone through several patches and what they all seem to do is just #include the offending system header (in this case pthread.h) earlier in the source code. Since there are no patches for my particular problem, I have gone ahead and emulated their solutions in my case. While this works (compilation now fails because I don't have some ISL files) it feels like a hack, and I suspect that the root problem is further back in the build.
Thus, I wanted to ask:
Why are symbols poisoned? Why would the GCC maintainers want some symbols not to be used?
What are the general causes for this problem? Is it really just a bug or is this a problem that arises in more general situations?
I am more interested in the generalities of this issue, but if it helps, I am using the latest release of Alpine Linux (with gcc 12.2.1) trying to compile gcc 11.2
.0 for the same target architecture as the host (x86-64).

Xcode 10 debugger not showing all local variables

I'm building in debug mode, not release, yet it loses track of variables. See below where the value of nx seems lost, the way you might expect if you were trying to debug an optimized build. Is this a bug in Xcode or am I doing something wrong?
Compilers do sometimes drop debug information for "unused identifiers". Debug information can quickly get huge, so even at -O0 compilers have to do some work to ensure that they don't emit more info than needed. Defining "needed" is trickier said than done, but surely it should keep all local var's and let's.
So it seems to me this one is worth filing a bug on the swift compiler. It's particularly odd that swiftc emits debug information for ny but not nx. Do you use ny more later on in the function?
If you do file a bug please include a buildable .swift file or project that shows the bug.

Dev C++ not compiling. Error Message in compile log

When I try to compile any type of program, this message appears in the compile log:
No binary directory provided in compiler set "MinGW GCC 4.7.2 32-bit Release". Aborted compilation.
This is the only message that comes up and it comes up instantly without any effort of compiling. I checked to see if it may have been an error when downloading, but that is not the case as I followed through the set-up properly. Also, there was no choice to download for a 32 or 64bit computer so if that is the problem how do I get one that supports my computer?
I downloaded the Dev C++ portable version from this link:
http://sourceforge.net/projects/orwelldevcpp/?source=typ_redirect
I really do not know what the issue is here so I would appreciate any help and hopefully to anyone else encountering this problem. I haven't found anyone with this same error though.
I encountered this problem before.
Here's how I solved it.
Go to:
Tools ->Compiler Options ->Directories ->Binaries
Then choose "MinGW64\bin" as your directory
Usually, it is located where you installed this software.

Breakpoints not working in xcode 4

I just started using Xcode to program a C++ openCV project.
The project is set up with an external makefile, /usr/bin/gnumake as build tool, and the program compiles and runs fine.
However, breakpoints gets skipped no matter what i do.
I have tried making a new project, selecting between gdb and LLDB, restarting Xcode++
There are numerous threads about this issue, but most talk about "Load Symbols Lazily", but as far as I know, this is not an issue in Xcode 4.5.2.
It is probably my limited Xcode knowledge that causes the error.
Help is greatly appreciated.
I could resolve my similar problem by disabling "Link-Time Optimization" for the Debug build settings.
Make sure that any kind of code optimization is disabled in your debug build settings (code stripping, optimization, etc). Then check that you really run the debug build and not the release version.
It would be great if XCode could automatically warn you when you have build settings that possible break the debugger...

How do I disable Xcode static analysis (Clang) messages?

I'd like my Xcode project to go through a Build And Analyze step without generating any errors, warnings, or static analysis messages. A problem with this is that my project includes libraries that generate (possibly innocuous) warnings and static analysis messages.
I can't find a way to disable specific Clang warnings so that "my" code builds with zero issues. Is this possible?
I wasn't able to find any way to do this, and filed a bug against Clang. The team seems to want to add this functionality, but it's not there yet.
The bug is: http://llvm.org/bugs/show_bug.cgi?id=7296
Also, one can use a __clang_analyzer__ macro to ifdef out any code that one doesn't want Clang to process.
The Build and Analyze step is clang - thats the "analyze" part. It wouldn't make sense to analyze your code and not have clang tell you about issues it find. That's like going to a car wash and telling them not to touch the car.
From talking to the guy that wrote clang at WWDC, it is extremely unlikely that anything it identifies as an issue is actually not. If you think you have some examples of code that works fine but clang complains, please file a bugreport with example code so Apple can fix that.
You can disable some compiler warnings through the use of flags, but not all of them are an option.

Resources