Questions tagged [static-compilation]

21 questions
7
votes
1 answer

Compile a shared object (.so) with static glibc

I am building some code that needs to be a shared object (.so). The problem that the libc on my building machine may be newer than the published machines, so I want to link with it statically to avoid compatibilities issues. (My program uses…
Eric. J. Lara
  • 203
  • 2
  • 8
4
votes
0 answers

How to compile static racket binaries

raco exe makes dynamic executables, and raco distribute doesn't change that: $ ldd ./tst linux-vdso.so.1 (0x00007ffc9ed46000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fbeb4c09000) …
0atman
  • 3,298
  • 4
  • 30
  • 46
4
votes
1 answer

How to set static compilation in Grails?

I'm beginner with Grails and I want to use a static compilation, but I don't want to use GrailsCompileStatic annotation for each class. Can I set it up for all classes in the configuration files? The GrailsCompileStatic annotation can't be used,…
jjaros
  • 518
  • 2
  • 4
  • 18
3
votes
2 answers

Groovy: How to get statically inferred return type from AST

I'm using Groovy to allow users to script and customize certain parts of my Java application. I am using static compilation of all user-provided scripts. My question is: if my code expects to receive e.g. a value of type boolean as the result of the…
Martin Häusler
  • 6,544
  • 8
  • 39
  • 66
3
votes
1 answer

Static vs Dynamic bootstrapping of Angular2 app

In angular2 RC5, we launch the application by bootstrapping the main module of the app and angular provides two options for bootstrapping when targeting the browser. There is the option for dynamic bootstrapping or static. Docs mention that Static,…
koninos
  • 4,969
  • 5
  • 28
  • 47
3
votes
0 answers

Should Groovy @CompileStatic classes still include metaclass code?

I'm starting to incorporate some Groovy classes into my Maven-built Spring application, primarily to reduce boilerplate on a lot of classes that are POJOs and value objects. (For comparison, I've been using Roo to handle the boilerplate, but Roo is…
2
votes
0 answers

Error with function 'get_locale_info' in Python3.6

I am trying the static compilation with Python3.6.2 and cross-compiling for android. And nmake threw following exceptions when running: Python\formatter_unicode.c: In function 'get_locale_info': Python\formatter_unicode.c:711:53: error: 'struct…
wsy
  • 140
  • 1
  • 8
2
votes
0 answers

Groovy code gets faster and slower when using "@CompileStatic"

I have the following snipet of Groovy code class Test { // @groovy.transform.CompileStatic static main(args) { long start = System.currentTimeMillis() def x = "3967" println x ==~ /[0-9]+([1379])$/ println…
Ryan Stull
  • 1,056
  • 14
  • 35
1
vote
0 answers

How to compile julia with multiple modules?

I'm trying to compile and get an executable of a julia module. This module is in file.jl and it uses 2 more modules in 2 different files. I tried to use juliac.jl but it didn't work. I tried the package compiler on this script in julia: using…
Mal.kir
  • 11
  • 2
1
vote
2 answers

Grails 3 static compilation of taglib

I'm trying to apply @GrailsCompileStatic to taglib and geting the following error: Error:(19, 16) Groovyc: [Static type checking] - Cannot find matching method com.tempvs.image.MyTagLib#render(java.util.LinkedHashMap ). Please check if the …
Anton Hlinisty
  • 1,441
  • 1
  • 20
  • 35
1
vote
1 answer

Groovy static compilation (@CompileStatic) turns types of class fields into `Object`

Compiling the following Groovy class @CompileStatic class StaticCompileTest { private def fieldInt = 3 } results in this class, when decompiling the .class file: public class StaticCompileTest implements GroovyObject { private Object…
jack_kerouac
  • 1,482
  • 2
  • 15
  • 30
1
vote
2 answers

C++ Compile code for all variants of finite number of settings

For example, there is hard logic inside function void Func(long param1, long param2, long param3, long param4, long param5). It has a lot of statements inside depends on parameters, different checks, calculations depends on combinations and etc. And…
Arkady
  • 2,084
  • 3
  • 27
  • 48
1
vote
2 answers

g++ goes too far when compiling

I'm trying to implement very simple single inheritance stack tracing in C++ using a recursive template: #include using namespace std; template struct MakeAlias : C{ typedef C Base; }; class StackTrace{ public: static…
slaviber
  • 358
  • 2
  • 10
1
vote
3 answers

Is there a high level language with an interpreter, dynamic compiler and static compiler(e.g. like the c++ compiler) along with a multimedia library?

The interpreter and dynamic compiler would be for testing/prototyping and when im done testing i use the static compiler.
1
vote
0 answers

Groovy static compilation

Can I write 100% static code using groovy? even if I am using standard libs? How do I enable 100% static compilation application wide?
Murali
  • 3,412
  • 5
  • 36
  • 34
1
2