[Rprotobuf-yada] alternative to pkg-config

Dirk Eddelbuettel edd at debian.org
Wed Apr 7 18:12:46 CEST 2010


(trimming a bit)

On 7 April 2010 at 18:01, Romain Francois wrote:
| > Which doesn't buy us lunch on non-standard OSs.  I can always if/else branch
| > in configure if pkg-config is not found. We do that for RPostgreSQL basically
| > just looping over 'possible' locations for the header file identifying the
| > library.  So that is an easy change.
| 
| Cool. Not urgent, but that'd be good.

I'll do that then. In due course, ie not this week or next if possible.
 
| > I'd be curious what they say. Maybe they just don't care -- there is
| > essentially no Windows support for ProtoBuf either.
| 
| I need to google around first to check if this has come up. They do ship 
| the file pkgconfig/protobuf.pc that looks like this:
| 
| prefix=/usr/local
| exec_prefix=${prefix}
| libdir=${exec_prefix}/lib
| includedir=${prefix}/include
| 
| Name: Protocol Buffers
| Description: Google's Data Interchange Format
| Version: 2.3.0
| Libs: -L${libdir} -lprotobuf -lz  -D_THREAD_SAFE
| Cflags: -I${includedir} -D_THREAD_SAFE
| # Commented out because it crashes pkg-config *sigh*:
| #   http://bugs.freedesktop.org/show_bug.cgi?id=13265
| # Conflicts: protobuf-lite
| 
| so the information is there

Yes. And useless on OSs that do not have a default pkg-config
client. Googling leads to it, it _can_ be install on Windoze and OS X but as
by default it isn't ... it all becomes irrelevant. Back to configure.
 
| > Right. If it breaks things we can of course remove it, or make it just an
| > example/ directory.
| 
| I'll proceed and remove them then, we can always revert in the future. I 

Before you kill it, could you please first check if it is a simple matter of
making the Makefile smarter as you diagnose below?

| think it might be confusing to have this in example since this shows 
| something that is quite unrelated to what the package now does. If you 
| insist on having them still in the project, then maybe in some "legacy" 
| directory, or maybe I can push them outside of pkg.
| 
| > But did this ever work?
| 
| Don't know. But see this ;
| 
| $ tree  /Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/
| /Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/
| `-- x86_64
|      `-- RProtoBuf.so
| 
| 1 directory, 1 file
| 
| There is a .so but no .dylib and I think this is what this target is doing:
| 
| pkglib:			addressbook.pb.o $(OBJECTS)
| 			$(SHLIB_CXXLD) -o $(pkg)$(DYLIB_EXT) $^ $(SHLIB_CXXLDFLAGS) $(PKG_LIBS)
| 
| Maybe it should be -o $(SHLIB)

Worth a test. Could you do that?

| > Had you built RProtoBuf on OS X before or is this a
| > first?
| 
| That's a first. cran does not have a binary either because I suppose 
| some negociation is needed to ship binaries for protobuf, similar to 
| e.g. gsl in http://r.research.att.com/libs/

Yes, I think volunteer effort is always appreciated. So if you could build
one (or a recipe for one) for Simon we'd be a step closer to binaries on more
than one platform.

Dirk

-- 
  Registration is open for the 2nd International conference R / Finance 2010
  See http://www.RinFinance.com for details, and see you in Chicago in April!


More information about the Rprotobuf-yada mailing list