From m@rkk||k @end|ng |rom gm@||@com  Tue Jun  4 23:21:42 2019
From: m@rkk||k @end|ng |rom gm@||@com (Mark Klik)
Date: Tue, 4 Jun 2019 23:21:42 +0200
Subject: [Rd] [External] undefined symbol errors when compiling package
 using ALTREP API
In-Reply-To: <alpine.DEB.2.21.1906041150200.2805@luke-Latitude-7480>
References: <CACdkz5-3-Z+YqoMoEwC6LPYFxw_NDRHOQG7x3ymai=PU7OjOoA@mail.gmail.com>
 <alpine.DEB.2.21.1906041150200.2805@luke-Latitude-7480>
Message-ID: <CACdkz5-e09yPjvrP7Xo59DGeJTY_LU2NrMzxLunsYrVfAhSvbA@mail.gmail.com>

thanks for clearing that up, so these methods are actually not meant to be
exported on Windows and OSX?
Some of the ALTREP methods that now use 'attribute_hidden' would be very
useful to packages that aim to be ALTREP aware, should the currently
(exported) API be considered final?

thanks  for your time & best,
Mark

On Tue, Jun 4, 2019 at 6:52 PM Tierney, Luke <luke-tierney at uiowa.edu> wrote:

> On Tue, 4 Jun 2019, Mark Klik wrote:
>
> > Hello,
> >
> > I'm developing a package (lazyvec) that makes full use of the ALTREP
> > framework (R >= 3.6.0).
> > One application of the package is to wrap existing ALTREP vectors in a
> new
> > ALTREP vector and pass all calls from R to the contained object. The
> > purpose of this is to provide a diagnostic framework for working with
> > ALTREP vectors and show information about internal calls.
> >
> > The package builds on Windows and OSX but fails to build on Linux as can
> be
> > seen from the link to the Travis build:
> > https://travis-ci.org/fstpackage/lazyvec/jobs/539442806
> >
> > The reason of build failure is that many ALTREP methods generate
> 'undefined
> > symbol' errors upon building the package (on Linux). I've checked the R
> > source code and the undefined symbols seems to be related to the
> > 'attribute_hidden' before the function definition. For example, the
> method
> > 'ALTVEC_EXTRACT_SUBSET' is defined as:
> >
> > SEXP attribute_hidden ALTVEC_EXTRACT_SUBSET(SEXP x, SEXP indx, SEXP call)
> >
> > My question is why these differences between Windows / OSX and Linux
> exist
> > and if they are intentional?
>
> It is intentional that this not be part of the public API. This is
> true of almost all functions with an ALTREP prefix. You need a
> different approach that avoids using these directly.
>
> Best,
>
> luke
>
> > Do I need special build parameters to make sure my package builds
> correctly
> > on Linux?
> >
> > thanks for all the hard work!
> >
> > best,
> > Mark
> >
> > PS: some additional info:
> >
> > package github repository: https://github.com/fstpackage/lazyvec
> > AppVeyor package build logs:
> > https://ci.appveyor.com/project/fstpackage/lazyvec
> > Travis package build logs:
> https://travis-ci.org/fstpackage/lazyvec/builds
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-devel at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-devel
> >
>
> --
> Luke Tierney
> Ralph E. Wareham Professor of Mathematical Sciences
> University of Iowa                  Phone:             319-335-3386
> Department of Statistics and        Fax:               319-335-3017
>     Actuarial Science
> 241 Schaeffer Hall                  email:   luke-tierney at uiowa.edu
> Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu
>

	[[alternative HTML version deleted]]



[Rd] [External] undefined symbol errors when compiling package using ALTREP API
Mark Klik