Skip to content

stdout/stderr in dynamic library (NOTE on CRAN Fedora with R-devel / newest clang) #102

@ablaette

Description

@ablaette

The stderr/stdout commands in the dynamic library re-appear on the checks on Fedora/R-devel/clang:
https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-fedora-clang/RcppCWB-00check.html

  • checking compiled code ... NOTE
    File ‘RcppCWB/libs/RcppCWB.so’:
    Found ‘stderr’, possibly from ‘stderr’ (C)
    Object: ‘cwb/cl/libcl.a’
    Found ‘stdout’, possibly from ‘stdout’ (C)
    Object: ‘cwb/cqp/libcqp.a’

Compiled code should not call entry points which might terminate R nor
write to stdout/stderr instead of to the console, nor use Fortran I/O
nor system RNGs nor [v]sprintf.

See ‘Writing portable packages’ in the ‘Writing R Extensions’ manual.

This is very similar to #100, an issue I have solved. Apparantly, a new clang version newly pulls stdout/stderr symbols into the dynamic library.

Installing the devel version of LLVM (yum install llvm-devel) does not bring me a compiler version that reproduces the issue, but I am able to reproduce the note with the GitHub version of LLVM:

git clone --depth=1 https://github.com/llvm/llvm-project.git

This description: https://clang.llvm.org/get_started.html works for compiling the compiler.

In my docker Terminated, but clang is there

To use the compiler for R CMD check I create ~/.R/Makevars as follows:

CC=/root/git/llvm-project/build/bin/clang
CXX=/root/git/llvm-project/build/bin/clang++

R-devel CMD check RcppCWB_0.6.9.tar.gz

The next step is to search the static/dynamic libraries prepared be R CMD check for the stderr/stdout symbols.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions