I wrote this post yesterday but for some reason it did not leave the outbox, so 
apologies to everyone since a mailer glitch apparently failed to prevent the 
waste of time of quite a few people. To follow up on the post - the autoconf 
macros to look for are AC_PATH_X and AC_PATH_XTRA.

Cheers,
Simon

On Nov 29, 2012, at 3:42 PM, Simon Urbanek <[email protected]> wrote:

> On Nov 28, 2012, at 7:38 PM, Jakson Alves de Aquino wrote:
> 
>> Hi,
>> 
>> I submitted a package to CRAN:
>> http://cran.r-project.org/web/packages/vimcom/index.html
>> 
>> It builds on Linux without warnings, but there is the following error
>> on Mac OS X:
>> 
>>   ld: library not found for -lX11
>>   collect2: ld returned 1 exit status
>>   make: *** [vimcom.so] Error 1
>>   ERROR: compilation failed for package 'vimcom'
>> 
>> The complete log is here:
>> http://www.r-project.org/nosvn/R.check/r-release-macosx-ix86/vimcom-00install.html
>> 
>> I know that I have to edit the src/Makevars file, but I don't know
>> what I should put there and I don't have access to any machine running
>> Mac OS X to make tests. Any help will be appreciated.
>> 
> 
> The issue is not Mac specific at all. A couple points: you cannot assume X11 
> because R can be built with or without X11 - in fact most recent OS X comes 
> without X11 so requiring it may limit the availability of your package. If 
> you really require X11 you'll have to declare that in your DESCRIPTION file. 
> Furthermore, R doesn't expose X11 flags to packages so you'll have to write a 
> configure test to determine proper X1 flags for your package. Just adding 
> -lX11 to Makevars doesn't work. See the autoconf documentation - there are 
> typically tests for X11 that can be re-used (R uses them, too). This may also 
> require special flags depending on the configuration (autoconf provides 
> --x-libraries and --x-includes for that). I don't know what you really need - 
> ideally, you should make any X11 code conditional on the availability of X11 
> --  I don't know whether that is a basic requirement for your package or not, 
> so how to proceed from here may depend on that.
> 
> Cheers,
> Simon
> 
> 
>> Thanks,
>> 
>> -- 
>> Jakson Alves de Aquino
>> Federal University of CearĂ¡
>> Social Sciences Department
>> www.lepem.ufc.br/aquino.php
>> 
>> _______________________________________________
>> R-SIG-Mac mailing list
>> [email protected]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> _______________________________________________
> R-SIG-Mac mailing list
> [email protected]
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
> 
> 

_______________________________________________
R-SIG-Mac mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-mac

Reply via email to