libpng warning: Application built with libpng-1.2.26 but running with 1.5.2 - macos

I have a problem on my mac when trying in R to produce png images.
I am getting this warnings:
libpng warning: Application built with libpng-1.2.26 but running with 1.5.2
I am running the R 2.14 version using the R-studio GUI.
I am not excatly sure about the libpng problem. When I am doing locate libpng-config I'm getting several hits, some with libong-config12, some with libpng-config14, some without nay numbers:
ayeroslaviz:~ ayeroslaviz$ locate libpng-config
/Applications/XAMPP/xamppfiles/bin/libpng-config
/Library/Frameworks/GTK+.framework/Versions/2.18.X11/Resources/bin/libpng-config
/opt/local/bin/libpng-config
/usr/X11/bin/libpng-config
/usr/local/bin/libpng-config
When doing which libpng-config I'm getting: /usr/local/bin/libpng-config
Is there a way to uninstall older versions of libpng or update the paths to the right version. Unfortunately I am not even sure, what thesource of this warning, so I hope I gave here all the needed information.
I would be grateful for anyone who gives me a hint about how to solve this problem.
thanks
A.

Fortunately, you're using a Mac, so there's a simpler (but not documented) method.
quartz.save('my_filename.png', type='png')
Note that the image you want to save must be the currently active quartz window.

If your code still works, then don't worry about it. The fact this this is a warning rather than an error message means that there might be a problem, not that there definitely is a problem. IF you don't want to see the warning, wrap your R code in a call to suppressMessages.
suppressMessages(code_to_call_libpng)

This problem could occur because RStudio (or some other library you are using in your project) is using in-built libpng libraries (v1.2) and when the application run, the version installed in the system is v1.5: http://www.libpng.org/pub/png/pngfaq.html#mismatch. If this is the point, you could try to upgrade RStudio libpng libraries or downgrade system libpng ones.

Related

Tile server for mapbox

I've tried to get this running with versions 2.14.4 and 2.15.2 without success I can run on version 2.13. I'm trying to figure out the issue, step one is as below;
In both versions this is what I see after installing the vectortile extension and restarting but this differs from the screengrab shown in the documentation. So my question is whether the documentation image is out of date or my install has not worked (2.14.4 with Vectortile extension 2.14.4).
I resolved the bug which means I can confirm that the above screenshot does mean that the vectortiles extension has installed properly

Compiling YouCompleteMe on Windows gives "CM libraries found in old YouCompleteMe/python location" error

I've followed these directions exactly.
I was able to compile mingw32-make ycm_support_libs and it produced the necessary ycm_core.pyd, ycm_client_support.pyd, and libclang.dll files. However, I get this message when starting vim:
YCM libraries found in old YouCompleteMe/python location; please RECOMPILE YCM.
I have verified that all the tools I've used are 64bit version. Anything I find on the web about this just says to run ./install.sh --clang-completer, which should be doing exactly what mingw32-make ycm_support_libs does.
I was so close too! Any help?
The file that is produced from the compile doesn't need to be moved. This was an old instruction that is now obsolete. I've managed to get C/C++ auto-complete working on Windows 7.
https://github.com/Valloric/YouCompleteMe/issues/1172
From the above link: Oh I see... sorry :P Anyway I don't know when was the last time someone modified the wiki page on installing YCM on Windows. The wiki page is community maintained. The error is caused by the fact that before YCM was splitted in two repo (this one for the vim client, and one for the general backend, ycmd) the compiled libraries were putted in YouCompleteMe/python now instead are putted in YouCompleteMe/third_party/ycmd. Anyway we can continue to discuss this but I have to close this issue since is not a YCM bug and Windows is not supported officially.

Build & Install OpenSceneGraph-3.1.3 give me a No WindowSystemInterface error?

I am trying to install the latest SVN Update OpenSceneGraph-3.1.4 on Mac OS X Mountain Lion.
Do I need to install a specific WindowSystemInterface ?
$ osgviewer cow.osg
View::setUpViewAcrossAllScreens() : Error, no WindowSystemInterface available, cannot create windows.
Viewer::realize() - failed to set up any windows.
I build and re-build many times, using CMake with or without Gui, compiling Unix files or from within Xcode, but still same problem.
Thank you!
If you'd like a more recent Mac OSG binary which includes a
user-runnable installer, OSG Frameworks supporting both 32 and 64-bit
archs, etc. you can use the one published by ARToolworks:
http://www.artoolworks.com/dist/openscenegraph/3.1.x/
It doesn't include the COLLADA (.dae) plugin but most other plugins
are present.
Regards, Phil.
It sounds like somehow the GraphicsWindow*.cpp file didn't compile and link and execute, as this is what provides the WindowSystemInterface. This is an unusual condition, as normally this is built automatically, linked in and executed as the library starts up and the user is never the wiser.
I'm not sure what to advise you, only to re-check you build process as something has gone very wrong.

RQuantlib and Mac OS X 10.8.2

I'm a total newbie in Mac OS X, R and C++. Sound like a good mix, doesn't it?
I have the need to use RQuantLib, because I want to use some pricing functions part of the QuantLib package inside R, all on a Mac OS X-powered environment.
I've correctly installed QuantLib. I've already asked to the official QuantLib mailing list, and together we seem to have reached the conclusion that the problems I'm encountering are not related to my QuantLib installation, which seems ok and correctly configured.
So, I turned to R to try and solve the problem. Whenever I try to run ZeroCouponBond from within R, copying and pasting the first example provided with the official documentation, I get the following error:
"Error in DiscountCurve.default(discountCurve.param, list(flat = 0.05)) :
cannot find function errorOccured"
Now, I would rule any syntax.related problem out, since I'm copying the very same example present in the official help.
I don't know what I did wrong, but I know I need to find a solution at all costs. I've installed Rcpp, and the configuration seems really ok. Just one question I was not able to find an answert to: in my understanding, RQuantLib basically acts as a link between QuantLib and R. If that's correct, how can I tell RQuantLib where to look to find libQuantLib.a, that is, the compiled library resulting from the "make && sudo make install" commands performed while installing QuantLib itself?
Right, so, I've finally managed to get it to work.
First of all, I would like to say that things would have been much easier if a thorough, step-by-step installation procedure had been provided. I acknowledge I'm a total newbie, but I think other people approaching to R for the first time might encounter difficulties similar to those I had to overcome.
Anyway, this is what I did:
I've downloaded the .tar.gz source packages for both Rcpp and RQuantLib from cran.r-project.org
I've compiled them installing them from within the R environment. This is where I was making a mistake. Indeed, I was trying to compile them by invoking the configure installation script from the terminal; however, as Dirk said, the config script looks for QuantLib's quantlib-config script, and I didn't know the correct syntax to tell the configure script the correct path to QuantLib. Executing the procedure from R (by just installing the package) sorts out any problem, as all the dependencies are correctly located and loaded
So, that's pretty much it: just install the .tar.gz source package as you would do with the binary version, and everything should work ok.
Of course, I'm still curious to understand:
If it is possible to compile Rcpp and RQuantLib from the terminal; and
Why the binary version for Mac OS X will not work on my system, ie: why do I have to compile starting from the source code?
Thank you so much to anyone willing to answer my (probably naive and silly) questions. I'm eager to understand a bit more!
Thanks!
The RQuantLib package uses a tool called configure which determines the patch at package build-time. It looks for the script quantlib-config from which it learns about the location of libQuantLib.a.
First, install boost (brew install boost) and, secondly, Quantlib (currently at 1.7.1) by following instructions at http://quantlib.org/install/macosx.shtml:
cd QuantLib-1.x.y
./configure --enable-static --with-boost-include=/opt/local/include/ \
--with-boost-lib=/opt/local/lib/ --prefix=/opt/local/
make && sudo make install
It takes some time (~1 hour) for make.
Then in R or Rstudio, install packages Rcpp and RQuantlib. The later requires type="source" since only source package is available.
At this point, you should be able to use RQuantlib. The American Option value (SPY as of 4/1/2016, maturity 7/15/2016) can be calculated in R as
AmericanOption("put", strike=206, volatility=0.1525, underlying = 206.92, 0.021, 0.003, 73/252, engine="CrankNicolson")

how to Install glibc 2.3.2 on Gentoo?

I'm wrote an application and I need to execute it on Gentoo,
but when I try run it, I get the following message:
/lib/libc.so.6: version `GLIBC_2.3.4' not found (required by /usr/local/myapp/lib/myapplib.so.1)
the current GLIBC version in this gentoo is 2.3.2.
I can't update this glibc, because I don't have permission, so I need to 'downgrade'
my glibc to the same version (2.3.2) ... how can I do it?
tks,
The "/lib/libc.so.6: version `GLIBC_2.3.4' not found" problem comes from trying to run a binary compiled against a newer glibc on a system with an old version of glibc. Downgrading glibc is strongly discouraged for this reason.
Since you say you wrote the application, it seems to me that the simplest solution is to recompile the application on the system where you plan to run it.
I'm actually wrestling with the same issue, so maybe I have some information that can help.
In short, your binary was compiled to look for libc.so.6. GLIBC_2.3.4 is in libc.so.5. As far as I know, if you downgrade your glibc on your dev machine some of your other programs may not work properly (because they were compiled to look for the current version). Somehow CentOS/RHEL have a compat-glibc package that can live along side of a current glibc without causing this error. If your dev box uses CentOS/RHEL, install that package/recompile and you should be good to go. You may need to use an older compiler for it to look for the older library. If you're not developing on CentOS/RHEL, continue on.
My plan of attack today is to compile glibc from source. This means using a compiler that was released around the same time as the older version of glibc. You may run into some stumbling blocks (such as needing an older version of buildutils, etc.), but my hope is once the libc.so.5 is compiled and installed into /usr/local/lib my application will find that before it finds libc.so.6 in /lib.
So there it is. It's not for the faint of heart, and it's definitely not a quick solution. Today I plan on testing this out, so I can't really say it's the right solution. Please, hivemind.. if I'm flat-out wrong correct me and save this poor soul from this winding torturous road :-)
EDIT: link to glibc sources

Resources