[Rprotobuf-yada] alternative to pkg-config

Romain Francois romain at r-enthusiasts.com
Wed Apr 7 14:30:17 CEST 2010


Hi,

It looks like I don't have pkg-config on OSX, so I see:

checking for pkg-config... no
./configure: line 3527: pkg-config: command not found
./configure: line 3528: pkg-config: command not found
...
checking google/protobuf/stubs/common.h usability... yes
checking google/protobuf/stubs/common.h presence... yes
checking for google/protobuf/stubs/common.h... yes
checking google/protobuf/compiler/code_generator.h usability... yes
checking google/protobuf/compiler/code_generator.h presence... yes
checking for google/protobuf/compiler/code_generator.h... yes

but then :

g++-4.2 -arch x86_64 -o RProtoBuf.dylib addressbook.pb.o 
ConnectionCopyingInputStream.o ConnectionCopyingOutputStream.o 
ConnectionInputStream.o ConnectionOutputStream.o DescriptorPoolLookup.o 
EnumDescriptor_wrapper.o FieldDescriptor_wrapper.o RSourceTree.o 
RWarningErrorCollector.o RconnectionCopyingInputStream.o 
ServiceDescriptor_wrapper.o SocketCopyingInputStream.o 
ZeroCopyInputStreamWrapper.o ZeroCopyOutputStreamWrapper.o add.o 
add_person_R.o as.o ascharacter.o aslist.o clear.o clear_person_R.o 
clone.o completion.o constructors.o containing_type.o exceptions.o 
extractors.o field_count.o fileDescriptor.o has.o identical.o 
initialized.o length.o list_people_R.o lookup.o merge.o methods.o 
mutators.o name.o read.o rpc_over_http.o rprotobuf.o serialize.o set.o 
size.o streams.o swap.o update.o -dynamiclib 
-Wl,-headerpad_max_install_names  -undefined dynamic_lookup 
-single_module -multiply_defined suppress 
/Library/Frameworks/R.framework/Resources/library/Rcpp/lib/x86_64/libRcpp.a
g++-4.2 -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names 
-undefined dynamic_lookup -single_module -multiply_defined suppress 
-L/usr/local/lib -o RProtoBuf.so ConnectionCopyingInputStream.o 
ConnectionCopyingOutputStream.o ConnectionInputStream.o 
ConnectionOutputStream.o DescriptorPoolLookup.o EnumDescriptor_wrapper.o 
FieldDescriptor_wrapper.o RSourceTree.o RWarningErrorCollector.o 
RconnectionCopyingInputStream.o ServiceDescriptor_wrapper.o 
SocketCopyingInputStream.o ZeroCopyInputStreamWrapper.o 
ZeroCopyOutputStreamWrapper.o add.o add_person_R.o as.o ascharacter.o 
aslist.o clear.o clear_person_R.o clone.o completion.o constructors.o 
containing_type.o exceptions.o extractors.o field_count.o 
fileDescriptor.o has.o identical.o initialized.o length.o 
list_people_R.o lookup.o merge.o methods.o mutators.o name.o read.o 
rpc_over_http.o rprotobuf.o serialize.o set.o size.o streams.o swap.o 
update.o 
/Library/Frameworks/R.framework/Resources/library/Rcpp/lib/x86_64/libRcpp.a 
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework 
-Wl,CoreFoundation
installing to 
/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64

** R
** demo
** 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, ...) :
   impossible de charger la bibliothèque partagée 
'/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so':
 
dlopen(/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so, 
6): Symbol not found: 
__ZN6google8protobuf15FieldDescriptor17kTypeToCppTypeMapE
   Referenced from: 
/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so
   Expected in: flat namespace
  in 
/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so
ERREUR : loading failed
* removing ‘/Library/Frameworks/R.framework/Resources/library/RProtoBuf’


It seems I can install pkg-config from fink, but maybe some other would 
not, can we do it without pkg-config ?

(.... installing pkg-config through fink.)


Now I get a different error:

** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   impossible de charger la bibliothèque partagée 
'/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so':
 
dlopen(/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so, 
6): Symbol not found: __ZN8tutorial18Person_PhoneNumber16_default_number_E
   Referenced from: 
/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so
   Expected in: flat namespace
  in 
/Library/Frameworks/R.framework/Resources/library/RProtoBuf/libs/x86_64/RProtoBuf.so
ERREUR : loading failed
* removing ‘/Library/Frameworks/R.framework/Resources/library/RProtoBuf’

Using protobuf 2.3.0 freshly compiled and "make check" happy.

Romain

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://bit.ly/9aKDM9 : embed images in Rd documents
|- http://tr.im/OIXN : raster images and RImageJ
|- http://tr.im/OcQe : Rcpp 0.7.7



More information about the Rprotobuf-yada mailing list