Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-17 Thread Simon Urbanek
This thread went way off the rails and was cross-posted so the solution is on 
R-SIG-Mac.

It was simply wrong Fortran with wrong R - installing latest R and Fortran 
(from CRAN or https://mac.r-project.org/tools/) is the easiest way to solve the 
problem.

Note that R binaries and tools go together so if in doubt, just go to CRAN and 
follow the instructions.

Cheers,
Simon



> On 18/05/2023, at 3:41 AM, Ivan Krylov  wrote:
> 
> В Wed, 17 May 2023 11:05:46 -0400
> Jarrett Phillips  пишет:
> 
>> `which gfortran`  returns
>> 
>> /usr/local/bin/gfortran
> 
> I think you ran the other gfortran. Is there a gfortran installation in
> /opt/gfortran?
> 
>> libraries:
>> =/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../../aarch64-apple-darwin22/lib/aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../../aarch64-apple-darwin22/lib/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../
> 
>> "/Library/Frameworks/R.framework/Resources/etc/Makeconf"
> 
> If you open this file, the flags
> -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
> -L/opt/R/arm64/gfortran/lib must be present in there somewhere. (Or
> maybe it's in ~/.R/Makevars, but you would've remembered creating it
> yourself.)
> 
> What if you replace the paths with the ones returned by gfortran,
> namely, -L/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0
> -L/usr/local/gfortran/lib? (Even better, with the paths returned by
> /opt/gfortran/bin/gfortran -print-search-dirs, assuming this command
> works.) While you're at it, fix other Fortran-related paths like the
> path to the compiler. I still suspect you may end up having problems
> because your R was built with a different version of gfortran, but I
> don't know a better way of moving forward.
> 
> I'm going on general POSIX-like knowledge since I lack a Mac to test
> things on. Maybe R-SIG-Mac will have better advice for you.
> 
> -- 
> Best regards,
> Ivan
> 
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> 

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-17 Thread Ivan Krylov
В Wed, 17 May 2023 11:05:46 -0400
Jarrett Phillips  пишет:

> `which gfortran`  returns
>
> /usr/local/bin/gfortran

I think you ran the other gfortran. Is there a gfortran installation in
/opt/gfortran?

> libraries:
> =/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../../aarch64-apple-darwin22/lib/aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../../aarch64-apple-darwin22/lib/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../aarch64-apple-darwin22/12.2.0/:/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0/../../../

> "/Library/Frameworks/R.framework/Resources/etc/Makeconf"

If you open this file, the flags
-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
-L/opt/R/arm64/gfortran/lib must be present in there somewhere. (Or
maybe it's in ~/.R/Makevars, but you would've remembered creating it
yourself.)

What if you replace the paths with the ones returned by gfortran,
namely, -L/usr/local/gfortran/lib/gcc/aarch64-apple-darwin22/12.2.0
-L/usr/local/gfortran/lib? (Even better, with the paths returned by
/opt/gfortran/bin/gfortran -print-search-dirs, assuming this command
works.) While you're at it, fix other Fortran-related paths like the
path to the compiler. I still suspect you may end up having problems
because your R was built with a different version of gfortran, but I
don't know a better way of moving forward.

I'm going on general POSIX-like knowledge since I lack a Mac to test
things on. Maybe R-SIG-Mac will have better advice for you.

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-17 Thread Jarrett Phillips
Hi Ivan,

Yes, I can build a Fortran program successfully.

cat >hello.f90 < wrote:

> Can you build a Fortran program? I.e., does the following work?
>
> cat >hello.f90 < program hello
>  print *, 'Hello world'
> end program
> EOF
> gfortran -o hello hello.f90 && ./hello
>
> Does `which gfortran` confirm that it's the executable you expect it to
> be?
>
> What does `gfortran -print-search-dirs` say about the locations for its
> files? (Where does -lgfortran actually live?)
>
> What does your file.path(R.home('etc'), 'Makeconf') say about the
> library paths?
>
> (Using `R CMD build` to build the package doesn't help either, right? If
> yes, a faster way of reproducing the problem would be to run the
> following command:
>
> PKG_CPPFLAGS=-I/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include
> \
>  R CMD SHLIB *cpp
>
> ...in the src directory of your package, instead of waiting for R CMD
> build to try to install the resulting source package and fail.)
>
> --
> Best regards,
> Ivan
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-17 Thread Ivan Krylov
Can you build a Fortran program? I.e., does the following work?

cat >hello.f90 

Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jarrett Phillips
Actually, no, only locally… but so far all proposed solutions have failed.

On Tue, May 16, 2023 at 7:11 PM Dirk Eddelbuettel  wrote:

>
> Hi Jarrett
>
> On 16 May 2023 at 19:06, Jarrett Phillips wrote:
> | I wonder if my problem is related to the question you posed about the
> CRAN
> | macOS builders being down. If it is, then according to @Simon Urbanek,
> this
> | should be resolved in a few hours.
> |
> | Can you confirm?
>
> Oh, maybe -- were you trying at Simon's macbuilder? I thought you were
> doing
> this locally on your machine.  If it was Simon's and if that box had
> hickups
> then yes that could indeed be related.
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Dirk Eddelbuettel


Hi Jarrett

On 16 May 2023 at 19:06, Jarrett Phillips wrote:
| I wonder if my problem is related to the question you posed about the CRAN
| macOS builders being down. If it is, then according to @Simon Urbanek, this
| should be resolved in a few hours.
| 
| Can you confirm? 

Oh, maybe -- were you trying at Simon's macbuilder? I thought you were doing
this locally on your machine.  If it was Simon's and if that box had hickups
then yes that could indeed be related.

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jarrett Phillips
Hi Dirk,

I wonder if my problem is related to the question you posed about the CRAN
macOS builders being down. If it is, then according to @Simon Urbanek, this
should be resolved in a few hours.

Can you confirm?

Thanks.

Cheers,

Jarrett

On Tue, May 16, 2023 at 1:11 PM Dirk Eddelbuettel  wrote:

>
> On 16 May 2023 at 18:32, Serguei Sokol wrote:
> | Try to add in /src/Makevars:
> |
> | PKG_LIBS=$(FLIBS)
>
> Good catch. For every RcppArmadillo package we recommend (and inject if you
> use the RcppArmadillo.package.skeleton() helper) (and omit the earlier
> comment lines)
>
>   PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
>   PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
>
> Source file (with addded comments) is at
>
> https://github.com/RcppCore/RcppArmadillo/blob/master/inst/skeleton/Makevars
> or in your friendly neighborhood RcppArmadillo installation as
> system.file("skeleton", "Makevars", package="RcppArmadillo")
>
> Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Duncan Murdoch

I'm using R 4.3.0, newer than you, so that might affect things.

Duncan

On 16/05/2023 2:48 p.m., Jarrett Phillips wrote:
Strange... the GitHub repo is up to date and that's what I'm trying to 
bundle up for a CRAN update. So, I'm thinking it's some kind of a system 
issue (I recently purchased a new MacBook Pro)..


I'll investigate.

Thanks!

On Tue, May 16, 2023 at 2:09 PM Duncan Murdoch > wrote:


I don't know what the issue would be.  I just tried

    remotes::install_github("jphill01/HACSim.R")

and it worked fine, but I think that's not the same version that you
are
working with.

Duncan Murdoch

On 16/05/2023 2:01 p.m., Jarrett Phillips wrote:
 >
 >
 > On Tue, May 16, 2023 at 2:00 PM Jarrett Phillips
 > mailto:phillipsjarre...@gmail.com>
>> wrote:
 >
 >     Yes, in addition to doing what @DirkEddelbuettel suggests. I keep
 >     getting the same error...
 >
 >     On Tue, May 16, 2023 at 1:47 PM Duncan Murdoch
 >     mailto:murdoch.dun...@gmail.com>
>>
wrote:
 >
 >         On 16/05/2023 1:14 p.m., Jarrett Phillips wrote:
 >          > Installing from the URL you provide, as well as doing
R CMD
 >         build HACSim
 >          > as suggested by @JeffNewmiller fails.
 >          >
 >          > When trying the latter solution, I get the same error
as the one
 >          > provided in my original post.
 >          >
 >          > Any thoughts?
 >
 >         Did you try Serguei's suggestion?
 >
 >         On 16/05/2023 12:32 p.m., Serguei Sokol wrote:
 >           > Try to add in /src/Makevars:
 >           >
 >           > PKG_LIBS=$(FLIBS)
 >



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jarrett Phillips
Strange... the GitHub repo is up to date and that's what I'm trying to
bundle up for a CRAN update. So, I'm thinking it's some kind of a system
issue (I recently purchased a new MacBook Pro)..

I'll investigate.

Thanks!

On Tue, May 16, 2023 at 2:09 PM Duncan Murdoch 
wrote:

> I don't know what the issue would be.  I just tried
>
>remotes::install_github("jphill01/HACSim.R")
>
> and it worked fine, but I think that's not the same version that you are
> working with.
>
> Duncan Murdoch
>
> On 16/05/2023 2:01 p.m., Jarrett Phillips wrote:
> >
> >
> > On Tue, May 16, 2023 at 2:00 PM Jarrett Phillips
> > mailto:phillipsjarre...@gmail.com>> wrote:
> >
> > Yes, in addition to doing what @DirkEddelbuettel suggests. I keep
> > getting the same error...
> >
> > On Tue, May 16, 2023 at 1:47 PM Duncan Murdoch
> > mailto:murdoch.dun...@gmail.com>> wrote:
> >
> > On 16/05/2023 1:14 p.m., Jarrett Phillips wrote:
> >  > Installing from the URL you provide, as well as doing R CMD
> > build HACSim
> >  > as suggested by @JeffNewmiller fails.
> >  >
> >  > When trying the latter solution, I get the same error as the
> one
> >  > provided in my original post.
> >  >
> >  > Any thoughts?
> >
> > Did you try Serguei's suggestion?
> >
> > On 16/05/2023 12:32 p.m., Serguei Sokol wrote:
> >   > Try to add in /src/Makevars:
> >   >
> >   > PKG_LIBS=$(FLIBS)
> >
>
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Duncan Murdoch

I don't know what the issue would be.  I just tried

  remotes::install_github("jphill01/HACSim.R")

and it worked fine, but I think that's not the same version that you are 
working with.


Duncan Murdoch

On 16/05/2023 2:01 p.m., Jarrett Phillips wrote:



On Tue, May 16, 2023 at 2:00 PM Jarrett Phillips 
mailto:phillipsjarre...@gmail.com>> wrote:


Yes, in addition to doing what @DirkEddelbuettel suggests. I keep
getting the same error...

On Tue, May 16, 2023 at 1:47 PM Duncan Murdoch
mailto:murdoch.dun...@gmail.com>> wrote:

On 16/05/2023 1:14 p.m., Jarrett Phillips wrote:
 > Installing from the URL you provide, as well as doing R CMD
build HACSim
 > as suggested by @JeffNewmiller fails.
 >
 > When trying the latter solution, I get the same error as the one
 > provided in my original post.
 >
 > Any thoughts?

Did you try Serguei's suggestion?

On 16/05/2023 12:32 p.m., Serguei Sokol wrote:
  > Try to add in /src/Makevars:
  >
  > PKG_LIBS=$(FLIBS)



__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jarrett Phillips
On Tue, May 16, 2023 at 2:00 PM Jarrett Phillips 
wrote:

> Yes, in addition to doing what @DirkEddelbuettel suggests. I keep getting
> the same error...
>
> On Tue, May 16, 2023 at 1:47 PM Duncan Murdoch 
> wrote:
>
>> On 16/05/2023 1:14 p.m., Jarrett Phillips wrote:
>> > Installing from the URL you provide, as well as doing R CMD
>> build HACSim
>> > as suggested by @JeffNewmiller fails.
>> >
>> > When trying the latter solution, I get the same error as the one
>> > provided in my original post.
>> >
>> > Any thoughts?
>>
>> Did you try Serguei's suggestion?
>>
>> On 16/05/2023 12:32 p.m., Serguei Sokol wrote:
>>  > Try to add in /src/Makevars:
>>  >
>>  > PKG_LIBS=$(FLIBS)
>>
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Duncan Murdoch

On 16/05/2023 1:14 p.m., Jarrett Phillips wrote:
Installing from the URL you provide, as well as doing R CMD build HACSim 
as suggested by @JeffNewmiller fails.


When trying the latter solution, I get the same error as the one 
provided in my original post.


Any thoughts?


Did you try Serguei's suggestion?

On 16/05/2023 12:32 p.m., Serguei Sokol wrote:
> Try to add in /src/Makevars:
>
> PKG_LIBS=$(FLIBS)

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Gábor Csárdi
Seems like you are on R 4.2.x, so you could try this one:
https://github.com/R-macos/gcc-darwin-arm64/releases

Gabor

On Tue, May 16, 2023 at 7:16 PM Jarrett Phillips
 wrote:
>
> Installing from the URL you provide, as well as doing R CMD build HACSim as
> suggested by @JeffNewmiller fails.
>
> When trying the latter solution, I get the same error as the one provided
> in my original post.
>
> Any thoughts?
>
>
>
>
>
> On Tue, May 16, 2023 at 12:52 PM Jarrett Phillips <
> phillipsjarre...@gmail.com> wrote:
>
> > Hi Duncan,
> >
> > I actually installed gfortran from
> >
> > https://github.com/fxcoudert/gfortran-for-macOS/releases
> >
> > but I can instead install from the URL you provide.
> >
> > Hopefully this fixes the problem.
> >
> > I will respond here if there are still issues.
> >
> > Thanks.
> >
> > Cheers,
> >
> > Jarrett
> >
> >
> > On Tue, May 16, 2023 at 12:39 PM Duncan Murdoch 
> > wrote:
> >
> >> On 16/05/2023 12:07 p.m., Jarrett Phillips wrote:
> >> > Hi All,
> >> >
> >> > I'm trying to generate a `tar.gz` file on a Mac for R package
> >> submission to
> >> > CRAN but am having issues.
> >> >
> >> > I'm using `devtools`, specifically `build()` and `install()`.
> >> >
> >> > My package relies on compiled code via `Rcpp/RcppArmadillo`.
> >> >
> >> >  build("HACSim_OO")
> >> >  ── R CMD build
> >> > ─
> >> >  ✔  checking for file ‘/Users/jarrettphillips/Desktop/HAC
> >> > simulation/HACSim_OO/DESCRIPTION’ ...
> >> >  ─  preparing ‘HACSim’:
> >> >  ✔  checking DESCRIPTION meta-information ...
> >> >  ─  cleaning src
> >> >  ─  installing the package to process help pages
> >> >   ---
> >> >  ─  installing *source* package ‘HACSim’ ...
> >> > ** using staged installation
> >> > ** libs
> >> > clang++ -arch arm64 -std=gnu++11 -
> >> > I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> >> >
> >>  
> >> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
> >> >
> >> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
> >> > -I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2
> >> -Wall
> >> > -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
> >> > clang++ -arch arm64 -std=gnu++11
> >> > -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> >> >
> >>  
> >> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
> >> >
> >> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
> >> > -I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2
> >> -Wall
> >> > -pedantic -fdiagnostics-color=always -c accumulate.cpp -o accumulate.o
> >> > clang++ -arch arm64 -std=gnu++11 -dynamiclib
> >> > -Wl,-headerpad_max_install_names -undefined dynamic_lookup
> >> -single_module
> >> > -multiply_defined suppress
> >> -L/Library/Frameworks/R.framework/Resources/lib
> >> > -L/opt/R/arm64/lib -o HACSim.so RcppExports.o accumulate.o
> >> > -L/Library/Frameworks/R.framework/Resources/lib -lRlapack
> >> > -L/Library/Frameworks/R.framework/Resources/lib -lRblas
> >> > -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
> >> > -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath
> >> > -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
> >> > -Wl,CoreFoundation
> >> > ld: warning: directory not found for option
> >> > '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
> >> > ld: warning: directory not found for option
> >> > '-L/opt/R/arm64/gfortran/lib'
> >> > ld: library not found for -lgfortran
> >> > clang: error: linker command failed with exit code 1 (use -v to
> >> see
> >> > invocation)
> >> > make: *** [HACSim.so] Error 1
> >> > ERROR: compilation failed for package ‘HACSim’
> >> >  ─  removing
> >> >
> >> ‘/private/var/folders/r4/xm5blbcd2tn06tjv00lm1c78gn/T/RtmpN4uaYR/Rinstdf4219594de/HACSim’
> >> >   ---
> >> >  ERROR: package installation failed
> >> >  Error in `(function (command = NULL, args = character(),
> >> > error_on_status = TRUE, …`:
> >> >  ! System command 'R' failed
> >> >   ---
> >> >   Exit status: 1
> >> >   stdout & stderr: 
> >> >   ---
> >> >  Type .Last.error to see the more details.
> >> >
> >> > `clang` is installed (since I am able to run the code within my package)
> >> > and I've verified by typing `gcc` in the Mac Terminal. I've also
> >> installed
> >> > `Homebrew` and `gfortran`, verifying via typing in the Terminal.
> >> >
> >> > Any idea on what's going on how to fix the issue(s)?
> >>
> >> You don't say how you installed gfortran, but it sounds as though you
> >> installed Homebrew's build of it.  You should 

Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jarrett Phillips
Installing from the URL you provide, as well as doing R CMD build HACSim as
suggested by @JeffNewmiller fails.

When trying the latter solution, I get the same error as the one provided
in my original post.

Any thoughts?





On Tue, May 16, 2023 at 12:52 PM Jarrett Phillips <
phillipsjarre...@gmail.com> wrote:

> Hi Duncan,
>
> I actually installed gfortran from
>
> https://github.com/fxcoudert/gfortran-for-macOS/releases
>
> but I can instead install from the URL you provide.
>
> Hopefully this fixes the problem.
>
> I will respond here if there are still issues.
>
> Thanks.
>
> Cheers,
>
> Jarrett
>
>
> On Tue, May 16, 2023 at 12:39 PM Duncan Murdoch 
> wrote:
>
>> On 16/05/2023 12:07 p.m., Jarrett Phillips wrote:
>> > Hi All,
>> >
>> > I'm trying to generate a `tar.gz` file on a Mac for R package
>> submission to
>> > CRAN but am having issues.
>> >
>> > I'm using `devtools`, specifically `build()` and `install()`.
>> >
>> > My package relies on compiled code via `Rcpp/RcppArmadillo`.
>> >
>> >  build("HACSim_OO")
>> >  ── R CMD build
>> > ─
>> >  ✔  checking for file ‘/Users/jarrettphillips/Desktop/HAC
>> > simulation/HACSim_OO/DESCRIPTION’ ...
>> >  ─  preparing ‘HACSim’:
>> >  ✔  checking DESCRIPTION meta-information ...
>> >  ─  cleaning src
>> >  ─  installing the package to process help pages
>> >   ---
>> >  ─  installing *source* package ‘HACSim’ ...
>> > ** using staged installation
>> > ** libs
>> > clang++ -arch arm64 -std=gnu++11 -
>> > I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
>> >
>>  
>> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
>> >
>> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
>> > -I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2
>> -Wall
>> > -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
>> > clang++ -arch arm64 -std=gnu++11
>> > -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
>> >
>>  
>> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
>> >
>> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
>> > -I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2
>> -Wall
>> > -pedantic -fdiagnostics-color=always -c accumulate.cpp -o accumulate.o
>> > clang++ -arch arm64 -std=gnu++11 -dynamiclib
>> > -Wl,-headerpad_max_install_names -undefined dynamic_lookup
>> -single_module
>> > -multiply_defined suppress
>> -L/Library/Frameworks/R.framework/Resources/lib
>> > -L/opt/R/arm64/lib -o HACSim.so RcppExports.o accumulate.o
>> > -L/Library/Frameworks/R.framework/Resources/lib -lRlapack
>> > -L/Library/Frameworks/R.framework/Resources/lib -lRblas
>> > -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
>> > -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath
>> > -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
>> > -Wl,CoreFoundation
>> > ld: warning: directory not found for option
>> > '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
>> > ld: warning: directory not found for option
>> > '-L/opt/R/arm64/gfortran/lib'
>> > ld: library not found for -lgfortran
>> > clang: error: linker command failed with exit code 1 (use -v to
>> see
>> > invocation)
>> > make: *** [HACSim.so] Error 1
>> > ERROR: compilation failed for package ‘HACSim’
>> >  ─  removing
>> >
>> ‘/private/var/folders/r4/xm5blbcd2tn06tjv00lm1c78gn/T/RtmpN4uaYR/Rinstdf4219594de/HACSim’
>> >   ---
>> >  ERROR: package installation failed
>> >  Error in `(function (command = NULL, args = character(),
>> > error_on_status = TRUE, …`:
>> >  ! System command 'R' failed
>> >   ---
>> >   Exit status: 1
>> >   stdout & stderr: 
>> >   ---
>> >  Type .Last.error to see the more details.
>> >
>> > `clang` is installed (since I am able to run the code within my package)
>> > and I've verified by typing `gcc` in the Mac Terminal. I've also
>> installed
>> > `Homebrew` and `gfortran`, verifying via typing in the Terminal.
>> >
>> > Any idea on what's going on how to fix the issue(s)?
>>
>> You don't say how you installed gfortran, but it sounds as though you
>> installed Homebrew's build of it.  You should install the tools as
>> available from https://mac.r-project.org/tools/.
>>
>> Duncan Murdoch
>>
>>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Dirk Eddelbuettel


On 16 May 2023 at 18:32, Serguei Sokol wrote:
| Try to add in /src/Makevars:
| 
| PKG_LIBS=$(FLIBS)

Good catch. For every RcppArmadillo package we recommend (and inject if you
use the RcppArmadillo.package.skeleton() helper) (and omit the earlier
comment lines)

  PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
  PKG_LIBS = $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

Source file (with addded comments) is at
https://github.com/RcppCore/RcppArmadillo/blob/master/inst/skeleton/Makevars
or in your friendly neighborhood RcppArmadillo installation as
system.file("skeleton", "Makevars", package="RcppArmadillo")

Dirk

-- 
dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jarrett Phillips
Hi Duncan,

I actually installed gfortran from

https://github.com/fxcoudert/gfortran-for-macOS/releases

but I can instead install from the URL you provide.

Hopefully this fixes the problem.

I will respond here if there are still issues.

Thanks.

Cheers,

Jarrett


On Tue, May 16, 2023 at 12:39 PM Duncan Murdoch 
wrote:

> On 16/05/2023 12:07 p.m., Jarrett Phillips wrote:
> > Hi All,
> >
> > I'm trying to generate a `tar.gz` file on a Mac for R package submission
> to
> > CRAN but am having issues.
> >
> > I'm using `devtools`, specifically `build()` and `install()`.
> >
> > My package relies on compiled code via `Rcpp/RcppArmadillo`.
> >
> >  build("HACSim_OO")
> >  ── R CMD build
> > ─
> >  ✔  checking for file ‘/Users/jarrettphillips/Desktop/HAC
> > simulation/HACSim_OO/DESCRIPTION’ ...
> >  ─  preparing ‘HACSim’:
> >  ✔  checking DESCRIPTION meta-information ...
> >  ─  cleaning src
> >  ─  installing the package to process help pages
> >   ---
> >  ─  installing *source* package ‘HACSim’ ...
> > ** using staged installation
> > ** libs
> > clang++ -arch arm64 -std=gnu++11 -
> > I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> >
>  
> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
> >
> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
> > -I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
> > -pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
> > clang++ -arch arm64 -std=gnu++11
> > -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> >
>  
> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
> >
> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
> > -I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
> > -pedantic -fdiagnostics-color=always -c accumulate.cpp -o accumulate.o
> > clang++ -arch arm64 -std=gnu++11 -dynamiclib
> > -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
> > -multiply_defined suppress
> -L/Library/Frameworks/R.framework/Resources/lib
> > -L/opt/R/arm64/lib -o HACSim.so RcppExports.o accumulate.o
> > -L/Library/Frameworks/R.framework/Resources/lib -lRlapack
> > -L/Library/Frameworks/R.framework/Resources/lib -lRblas
> > -L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
> > -L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath
> > -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
> > -Wl,CoreFoundation
> > ld: warning: directory not found for option
> > '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
> > ld: warning: directory not found for option
> > '-L/opt/R/arm64/gfortran/lib'
> > ld: library not found for -lgfortran
> > clang: error: linker command failed with exit code 1 (use -v to
> see
> > invocation)
> > make: *** [HACSim.so] Error 1
> > ERROR: compilation failed for package ‘HACSim’
> >  ─  removing
> >
> ‘/private/var/folders/r4/xm5blbcd2tn06tjv00lm1c78gn/T/RtmpN4uaYR/Rinstdf4219594de/HACSim’
> >   ---
> >  ERROR: package installation failed
> >  Error in `(function (command = NULL, args = character(),
> > error_on_status = TRUE, …`:
> >  ! System command 'R' failed
> >   ---
> >   Exit status: 1
> >   stdout & stderr: 
> >   ---
> >  Type .Last.error to see the more details.
> >
> > `clang` is installed (since I am able to run the code within my package)
> > and I've verified by typing `gcc` in the Mac Terminal. I've also
> installed
> > `Homebrew` and `gfortran`, verifying via typing in the Terminal.
> >
> > Any idea on what's going on how to fix the issue(s)?
>
> You don't say how you installed gfortran, but it sounds as though you
> installed Homebrew's build of it.  You should install the tools as
> available from https://mac.r-project.org/tools/.
>
> Duncan Murdoch
>
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Duncan Murdoch

On 16/05/2023 12:07 p.m., Jarrett Phillips wrote:

Hi All,

I'm trying to generate a `tar.gz` file on a Mac for R package submission to
CRAN but am having issues.

I'm using `devtools`, specifically `build()` and `install()`.

My package relies on compiled code via `Rcpp/RcppArmadillo`.

 build("HACSim_OO")
 ── R CMD build
─
 ✔  checking for file ‘/Users/jarrettphillips/Desktop/HAC
simulation/HACSim_OO/DESCRIPTION’ ...
 ─  preparing ‘HACSim’:
 ✔  checking DESCRIPTION meta-information ...
 ─  cleaning src
 ─  installing the package to process help pages
  ---
 ─  installing *source* package ‘HACSim’ ...
** using staged installation
** libs
clang++ -arch arm64 -std=gnu++11 -
I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
  
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
-pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++11
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
  
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
-pedantic -fdiagnostics-color=always -c accumulate.cpp -o accumulate.o
clang++ -arch arm64 -std=gnu++11 -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
-multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib
-L/opt/R/arm64/lib -o HACSim.so RcppExports.o accumulate.o
-L/Library/Frameworks/R.framework/Resources/lib -lRlapack
-L/Library/Frameworks/R.framework/Resources/lib -lRblas
-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
-L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
ld: warning: directory not found for option
'-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
ld: warning: directory not found for option
'-L/opt/R/arm64/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [HACSim.so] Error 1
ERROR: compilation failed for package ‘HACSim’
 ─  removing
‘/private/var/folders/r4/xm5blbcd2tn06tjv00lm1c78gn/T/RtmpN4uaYR/Rinstdf4219594de/HACSim’
  ---
 ERROR: package installation failed
 Error in `(function (command = NULL, args = character(),
error_on_status = TRUE, …`:
 ! System command 'R' failed
  ---
  Exit status: 1
  stdout & stderr: 
  ---
 Type .Last.error to see the more details.

`clang` is installed (since I am able to run the code within my package)
and I've verified by typing `gcc` in the Mac Terminal. I've also installed
`Homebrew` and `gfortran`, verifying via typing in the Terminal.

Any idea on what's going on how to fix the issue(s)?


You don't say how you installed gfortran, but it sounds as though you 
installed Homebrew's build of it.  You should install the tools as 
available from https://mac.r-project.org/tools/.


Duncan Murdoch

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Serguei Sokol

Le 16/05/2023 à 18:07, Jarrett Phillips a écrit :

Hi All,

I'm trying to generate a `tar.gz` file on a Mac for R package submission to
CRAN but am having issues.

I'm using `devtools`, specifically `build()` and `install()`.

My package relies on compiled code via `Rcpp/RcppArmadillo`.

 build("HACSim_OO")
 ── R CMD build
─
 ✔  checking for file ‘/Users/jarrettphillips/Desktop/HAC
simulation/HACSim_OO/DESCRIPTION’ ...
 ─  preparing ‘HACSim’:
 ✔  checking DESCRIPTION meta-information ...
 ─  cleaning src
 ─  installing the package to process help pages
  ---
 ─  installing *source* package ‘HACSim’ ...
** using staged installation
** libs
clang++ -arch arm64 -std=gnu++11 -
I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
  
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
-pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
clang++ -arch arm64 -std=gnu++11
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
  
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
-pedantic -fdiagnostics-color=always -c accumulate.cpp -o accumulate.o
clang++ -arch arm64 -std=gnu++11 -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
-multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib
-L/opt/R/arm64/lib -o HACSim.so RcppExports.o accumulate.o
-L/Library/Frameworks/R.framework/Resources/lib -lRlapack
-L/Library/Frameworks/R.framework/Resources/lib -lRblas
-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
-L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
ld: warning: directory not found for option
'-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
ld: warning: directory not found for option
'-L/opt/R/arm64/gfortran/lib'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [HACSim.so] Error 1
ERROR: compilation failed for package ‘HACSim’
 ─  removing
‘/private/var/folders/r4/xm5blbcd2tn06tjv00lm1c78gn/T/RtmpN4uaYR/Rinstdf4219594de/HACSim’
  ---
 ERROR: package installation failed
 Error in `(function (command = NULL, args = character(),
error_on_status = TRUE, …`:
 ! System command 'R' failed
  ---
  Exit status: 1
  stdout & stderr: 
  ---
 Type .Last.error to see the more details.

`clang` is installed (since I am able to run the code within my package)
and I've verified by typing `gcc` in the Mac Terminal. I've also installed
`Homebrew` and `gfortran`, verifying via typing in the Terminal.

Any idea on what's going on how to fix the issue(s)?

Try to add in /src/Makevars:

PKG_LIBS=$(FLIBS)

Best,
Serguei.

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Ivan Krylov
В Tue, 16 May 2023 12:07:05 -0400
Jarrett Phillips  пишет:

>ld: warning: directory not found for option
> '-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
>ld: warning: directory not found for option
> '-L/opt/R/arm64/gfortran/lib'
>ld: library not found for -lgfortran

> I've also installed `Homebrew` and `gfortran`, verifying via typing
> in the Terminal.

Was it the Homebrew build of gfortran, or the one from
? Does this happen if you run R CMD
build  in the Terminal instead of devtools::build()?

It might be that you need this specific R.home('etc')build, or you
might have to adjust some paths in file.path(R.home('etc'),
'Makeconf'). A different build of gfortran may be not compatible with
the one used to compile R.

If you don't get a useful answer here, consider asking at
r-sig-...@r-project.org, because this seems to be a Mac-specific
problem.

-- 
Best regards,
Ivan

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jeff Newmiller
Your mistake is confusing a tool designed for _iterative development_ for a 
tool designed for _delivery_.

Use R CMD build the way WRE says you should.

On May 16, 2023 9:07:05 AM PDT, Jarrett Phillips  
wrote:
>Hi All,
>
>I'm trying to generate a `tar.gz` file on a Mac for R package submission to
>CRAN but am having issues.
>
>I'm using `devtools`, specifically `build()` and `install()`.
>
>My package relies on compiled code via `Rcpp/RcppArmadillo`.
>
>build("HACSim_OO")
>── R CMD build
>─
>✔  checking for file ‘/Users/jarrettphillips/Desktop/HAC
>simulation/HACSim_OO/DESCRIPTION’ ...
>─  preparing ‘HACSim’:
>✔  checking DESCRIPTION meta-information ...
>─  cleaning src
>─  installing the package to process help pages
> ---
>─  installing *source* package ‘HACSim’ ...
>   ** using staged installation
>   ** libs
>   clang++ -arch arm64 -std=gnu++11 -
>I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
>-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
>-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
>-pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
>   clang++ -arch arm64 -std=gnu++11
>-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
> -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
>-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
>-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
>-pedantic -fdiagnostics-color=always -c accumulate.cpp -o accumulate.o
>   clang++ -arch arm64 -std=gnu++11 -dynamiclib
>-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
>-multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib
>-L/opt/R/arm64/lib -o HACSim.so RcppExports.o accumulate.o
>-L/Library/Frameworks/R.framework/Resources/lib -lRlapack
>-L/Library/Frameworks/R.framework/Resources/lib -lRblas
>-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
>-L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath
>-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
>-Wl,CoreFoundation
>   ld: warning: directory not found for option
>'-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
>   ld: warning: directory not found for option
>'-L/opt/R/arm64/gfortran/lib'
>   ld: library not found for -lgfortran
>   clang: error: linker command failed with exit code 1 (use -v to see
>invocation)
>   make: *** [HACSim.so] Error 1
>   ERROR: compilation failed for package ‘HACSim’
>─  removing
>‘/private/var/folders/r4/xm5blbcd2tn06tjv00lm1c78gn/T/RtmpN4uaYR/Rinstdf4219594de/HACSim’
> ---
>ERROR: package installation failed
>Error in `(function (command = NULL, args = character(),
>error_on_status = TRUE, …`:
>! System command 'R' failed
> ---
> Exit status: 1
> stdout & stderr: 
> ---
>Type .Last.error to see the more details.
>
>`clang` is installed (since I am able to run the code within my package)
>and I've verified by typing `gcc` in the Mac Terminal. I've also installed
>`Homebrew` and `gfortran`, verifying via typing in the Terminal.
>
>Any idea on what's going on how to fix the issue(s)?
>
>Thanks!
>
>Cheers,
>
>Jarrett
>
>   [[alternative HTML version deleted]]
>
>__
>R-package-devel@r-project.org mailing list
>https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Sent from my phone. Please excuse my brevity.

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Problems with devtools::build() in R

2023-05-16 Thread Jarrett Phillips
Hi All,

I'm trying to generate a `tar.gz` file on a Mac for R package submission to
CRAN but am having issues.

I'm using `devtools`, specifically `build()` and `install()`.

My package relies on compiled code via `Rcpp/RcppArmadillo`.

build("HACSim_OO")
── R CMD build
─
✔  checking for file ‘/Users/jarrettphillips/Desktop/HAC
simulation/HACSim_OO/DESCRIPTION’ ...
─  preparing ‘HACSim’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  installing the package to process help pages
 ---
─  installing *source* package ‘HACSim’ ...
   ** using staged installation
   ** libs
   clang++ -arch arm64 -std=gnu++11 -
I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
 
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
-pedantic -fdiagnostics-color=always -c RcppExports.cpp -o RcppExports.o
   clang++ -arch arm64 -std=gnu++11
-I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG
 
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include'
-I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/RcppArmadillo/include'
-I/opt/R/arm64/include-fPIC  -falign-functions=64 -Wall -g -O2  -Wall
-pedantic -fdiagnostics-color=always -c accumulate.cpp -o accumulate.o
   clang++ -arch arm64 -std=gnu++11 -dynamiclib
-Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module
-multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib
-L/opt/R/arm64/lib -o HACSim.so RcppExports.o accumulate.o
-L/Library/Frameworks/R.framework/Resources/lib -lRlapack
-L/Library/Frameworks/R.framework/Resources/lib -lRblas
-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1
-L/opt/R/arm64/gfortran/lib -lgfortran -lemutls_w -lquadmath
-F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework
-Wl,CoreFoundation
   ld: warning: directory not found for option
'-L/opt/R/arm64/gfortran/lib/gcc/aarch64-apple-darwin20.6.0/12.0.1'
   ld: warning: directory not found for option
'-L/opt/R/arm64/gfortran/lib'
   ld: library not found for -lgfortran
   clang: error: linker command failed with exit code 1 (use -v to see
invocation)
   make: *** [HACSim.so] Error 1
   ERROR: compilation failed for package ‘HACSim’
─  removing
‘/private/var/folders/r4/xm5blbcd2tn06tjv00lm1c78gn/T/RtmpN4uaYR/Rinstdf4219594de/HACSim’
 ---
ERROR: package installation failed
Error in `(function (command = NULL, args = character(),
error_on_status = TRUE, …`:
! System command 'R' failed
 ---
 Exit status: 1
 stdout & stderr: 
 ---
Type .Last.error to see the more details.

`clang` is installed (since I am able to run the code within my package)
and I've verified by typing `gcc` in the Mac Terminal. I've also installed
`Homebrew` and `gfortran`, verifying via typing in the Terminal.

Any idea on what's going on how to fix the issue(s)?

Thanks!

Cheers,

Jarrett

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel