Install png on yosemite & RRO

195 views
Skip to first unread message

Enzo

unread,
Nov 7, 2014, 4:24:00 PM11/7/14
to rro...@googlegroups.com
I have problems trying to install the png package from source.

I posted the problem on stackoverflow as I'm not convinced is a RRO issue but it seems more a yosemite issue.

I can install the compiled package with 

install.packages("png", repos="http://cran.us.r-project.org",type="mac.binary.mavericks" )

And it succeeds (but I do not have means to test it).

Any help is welcome though!

This is my post:
@@@@@

I am trying to install the package png on a macbookpro 2014 & yosemite.

I am using RRO (but I believe I would have a similar issue with R).

This is what I can see on the RRO console:

* installing *source* package ‘png’ ...
** package ‘png’ successfully unpacked and MD5 sums checked
** libs
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    `libpng-config --cflags` -fPIC  -Wall -mtune=core2 -g -O2  -c read.c -o read.o
/bin/sh: libpng-config: command not found
clang -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I/usr/local/include/freetype2 -I/opt/X11/include    `libpng-config --cflags` -fPIC  -Wall -mtune=core2 -g -O2  -c write.c -o write.o
/bin/sh: libpng-config: command not found
/bin/sh: libpng-config: command not found
clang -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o png.so read.o write.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
/bin/sh: libpng-config: command not found
installing to /Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so, 6): Symbol not found: _png_create_info_struct
  Referenced from: /Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so
  Expected in: flat namespace
 in /Library/Frameworks/R.framework/Versions/3.1/Resources/library/png/libs/png.so
Error: loading failed
Execution halted
ERROR: loading failed

On the other hand I have installed (using homebrew) libpng and I can type libpng-config on the terminal having a response

Usage: /usr/local/bin/libpng-config [OPTION] ...

I am running out of options...

Enzo

unread,
Nov 8, 2014, 5:22:52 PM11/8/14
to rro...@googlegroups.com
Additional info

I reverted to CRAN R and re-installed all my packages.  I noticed that mostly I installed binaries (while RRO tends to compile from source).

After the png binary installation I tried to re-install from source and it worked: mistery.

Simon Crow

unread,
Nov 9, 2014, 5:12:24 PM11/9/14
to rro...@googlegroups.com
creativity-lightbulb, what a feeling.jpg

David Smith

unread,
Nov 13, 2014, 3:28:52 PM11/13/14
to rro...@googlegroups.com
Hi Enzo,

That appears to be the issue -- for some reason, Revolution R Open is always insisting on building from source, but CRAN R is happy to install the binary. I'm not sure why yet, but we're looking into it. Thanks for reporting the issue. (If you like, you can track the followups here: https://github.com/RevolutionAnalytics/RRO/issues/32 )

The errors you saw are likely due to not having Xcode installed, which is required to build on a Mac. I have Xcode installed and don't see those errors.

In the meantime, you can force RRO to install the binary version with: install.packages("png", type="mac.binary.mavericks")

Cheers,
# David

Revolution R Plus

Subscribe to Technical Support & Indemnification for R

Andrie de Vries

unread,
Nov 14, 2014, 5:14:03 AM11/14/14
to rro...@googlegroups.com
We have opened an issue at https://github.com/RevolutionAnalytics/RRO/issues/32

My understanding is that this has already been fixed in the build process, and will be available in RRO in the forthcoming update release.

Andrie
Reply all
Reply to author
Forward
0 new messages