[R-pkg-devel] Note: information on .o files is not available / Found '_exit', possibly from '_exit' (C)
Benjamin Christoffersen
boennecd @end|ng |rom gm@||@com
Fri Jul 17 14:58:50 CEST 2020
Quick guess. After changing
> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -O3 -Wextra -Wall -Wno-unknown-pragmas -Wno-return-type -Wno-ignored-attributes -Wno-cast-function-type -Wno-error=cast-function-type")
to
> SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -O3 -Wextra -Wall")
I managed to `R CMD INSTALL` the package with gcc-8 on Ubuntu. Then
doing `cd ~/R/x86_64-pc-linux-gnu-library/3.6/gpboost/libs/` and
- nm *.so -C | grep exit
- nm *.so -C | grep abort
- nm *.so -C | grep printf
yields nothing. However, doing `nm *.so -C | grep assert` yields
U __assert_fail@@GLIBC_2.2.5
and doing `grep "assert" -nr .` shows that `assert` is being called.
Thus, is everything build with `-NDEBUG`? See
https://cran.r-project.org/doc/manuals/r-devel/R-exts.html#DOCF76
Den fre. 17. jul. 2020 kl. 14.52 skrev Spencer Graves
<spencer.graves using effectivedefense.org>:
>
> Can you run the checks only on the subdirectory containing the
> compiled code? If yes, then you can run it only on half of that
> directory and identify it with a binary search.
>
>
> Some years ago, I found a particularly difficult bug that way.
> If I recall correctly, I made a copy of the package, deleted half of the
> *.Rd files, etc., until I identified which *.Rd file. Then I deleted
> ~half of the contents of that *.Rd file until I isolated the problem.
> It was neither easy nor fun, but it was what I did to find and then fix
> the problem.
>
>
> Hope this helps,
> Spencer
>
>
> On 2020-07-17 07:34, Marcin Jurek wrote:
> > So maybe you tried that already but I noticed that sometimes when I do the
> > check on the package directory rather than on the tarball I get similar
> > errors. I don't know if that's the problem but it should be a quick thing
> > to try.
> >
> > On Fri, Jul 17, 2020 at 5:05 AM Fabio Sigrist <fabiosigrist using gmail.com>
> > wrote:
> >
> >> Dear all,
> >>
> >> I am trying to get an R package with C++ code on CRAN and I have one NOTE
> >> remaining, for which I can't find a solution:
> >>
> >> Note: information on .o files for x64 is not available
> >> File
> >> 'd:/RCompile/CRANincoming/R-devel/lib/gpboost/libs/x64/lib_gpboost.dll':
> >> Found '_exit', possibly from '_exit' (C)
> >> Found 'abort', possibly from 'abort' (C), 'runtime' (Fortran)
> >> Found 'exit', possibly from 'exit' (C), 'stop' (Fortran)
> >> Found 'printf', possibly from 'printf' (C)
> >>
> >> As much as I search through my code, I can't find the place / headers where
> >> these calls / symbols originate. Also, I have no idea how to add
> >> information on .o files (apart from the shared library, there are no .o
> >> files). The .tar.gz file for the package can be found on
> >> https://github.com/fabsig/GPBoost/blob/master/gpboost_0.2.0.tar.gz. Note
> >> that the shared library is compiled using install.libs.R (this is a
> >> deliberate choice) and the flag "GPB_R_BUILD" is set when compiling for the
> >> R package (I have tried to put "#ifndef GPB_R_BUILD" around all headers
> >> that could cause the problems with exit / abort calls, but apparently I
> >> have not been able to find all).
> >>
> >> Any help is greatly appreciated.
> >>
> >> Best regards,
> >> Fabio Sigrist
> >>
> >> [[alternative HTML version deleted]]
> >>
> >> ______________________________________________
> >> R-package-devel using r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-package-devel
> >>
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
More information about the R-package-devel
mailing list