You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GCC-Bridge plugin, a native shared library, is produced by the compilePlugin task of the GCC-Bridge compiler module.
Renjin's gradle-plugin, in turn provides a MakeTask which uses this plugin to 'make' a package's native sources.
Currently, however, the MakeTask consumes the plugin via a project property "gccBridgePlugin" which must be hardcoded by the developer, either in their gradle.properties file, or via a command-line argument -PgccBridgePlugin=/path/to/plugin.so.
This property provides the absolute path to the output of the compilePlugin task, but does not establish any explicit dependency between the two. This means:
Changes to plugin.c do not automatically invalidate the results of package make tasks.
The make task can fail if the compilePlugin task was not previously run.
Ideally, the bridge.so library would be treated as an explicit output of the compilePlugin task, and consumed by the make task an explicit input.
This mechanism should also work if renjin-gradle-plugin is used independently and the renjin project is not part of the composite build. In this case the shared library would need to be downloaded from a repository, or compiled on demand from source. Note that our experience is that bridge.so is not super portable: minor differences in the compilation environment and the runtime environment can lead to segfaults.
What's most important is that the make task should not depend on the gcc-bridge-compiler java library in any way. To do so would require re-running the C/C++/Fortran compilation step every time any change is made to gcc-bridge-runtime or gcc-bridge-compiler, which would frustrate iterative development/testing.
I'm not sure of how best to do this, but the following links may provide ideas:
akbertram
changed the title
GCC plugin should be made an explicit Gradle artifact
GCC plugin compilation should be made an explicit dependency of make task
Aug 16, 2020
akbertram
changed the title
GCC plugin compilation should be made an explicit dependency of make task
GCC plugin compilation should be an explicit dependency of make task
Aug 16, 2020
The GCC-Bridge plugin, a native shared library, is produced by the compilePlugin task of the GCC-Bridge compiler module.
Renjin's gradle-plugin, in turn provides a MakeTask which uses this plugin to 'make' a package's native sources.
Currently, however, the
MakeTask
consumes the plugin via a project property "gccBridgePlugin" which must be hardcoded by the developer, either in theirgradle.properties
file, or via a command-line argument-PgccBridgePlugin=/path/to/plugin.so
.This property provides the absolute path to the output of the
compilePlugin
task, but does not establish any explicit dependency between the two. This means:plugin.c
do not automatically invalidate the results of packagemake
tasks.make
task can fail if thecompilePlugin
task was not previously run.Ideally, the
bridge.so
library would be treated as an explicit output of thecompilePlugin
task, and consumed by themake
task an explicit input.This mechanism should also work if
renjin-gradle-plugin
is used independently and therenjin
project is not part of the composite build. In this case the shared library would need to be downloaded from a repository, or compiled on demand from source. Note that our experience is thatbridge.so
is not super portable: minor differences in the compilation environment and the runtime environment can lead to segfaults.What's most important is that the
make
task should not depend on the gcc-bridge-compiler java library in any way. To do so would require re-running the C/C++/Fortran compilation step every time any change is made to gcc-bridge-runtime or gcc-bridge-compiler, which would frustrate iterative development/testing.I'm not sure of how best to do this, but the following links may provide ideas:
The text was updated successfully, but these errors were encountered: