17,494 questions
1
vote
0
answers
59
views
Recommended RStan compiler flags for gcc
I need to install RStan and I want to make sure that it's as efficient as possible. I'm using gcc. I'm reading this guide from 2022.
Luckily, the Stan developers built an option called STAN_CPP_OPTIMS
...
Advice
0
votes
1
replies
56
views
Does the way a program is written/formatted affect how fast and large it is at compile time?
We all know that there's no wrong way to write code, and infinite possible ways to complete a task. Everyone codes differently.
There are of course many ways to shorthand code, so the same code can be ...
-1
votes
0
answers
108
views
Need help compiling a JavaFx project [duplicate]
Created a JavaFX app using Java 21 and copied this tutorial to build my project
https://www.youtube.com/watch?v=udigo_qSp_k
I then created my project, and everything ran fine in an IDE. When trying to ...
0
votes
1
answer
35
views
Custom LLVM backend: error: unable to interface with target machine
Background
I am writing a custom, globalISel only, backend for a currently unsupported processor. I have progressed to the point where I can run
> clang -target xxx -emit-llvm file.c
> llc -...
1
vote
1
answer
136
views
How to compile 64-bit binaries for latest versions of OpenSSL (3.5.x) on the Windows 10
I am trying to compile latest version of the OpenSSL on Windows 10 machine (version 3.5.4).
Prerequisites are:
I ran x64 Native Tools Command Prompt for Visual Studio 2022 Community Edition
I ...
2
votes
1
answer
118
views
Does `jax` compilation save runtime memory by recognizing array elements that are duplicated by indexing
Consider the example code:
from functools import partial
from jax import jit
import jax.numpy as jnp
@partial(jit, static_argnums=(0,))
def my_function(n):
idx = jnp.tile(jnp.arange(n, dtype=int)...
1
vote
0
answers
88
views
Kotlin Multiplatform: Could not resolve <unknown coordinates> for iOS targets when building Google Maps module
I’m currently working on a Kotlin Multiplatform (KMP) project that includes a module for Google Maps integration (:core:maps:v2).
Everything works fine on Android, but when I try to build for iOS, I ...
0
votes
0
answers
83
views
build kernel-6.6 for riscv met "undefined reference to __efistub_efi_zboot_entry" issue
I was building kernel6.6(source from openkylin2.0 a down stream distibution of debian) on riscv platform, I met an issue while build with command dpkg-buildpackage -us -uc, part of the build log is as ...
6
votes
5
answers
291
views
How bad is a "controlled" signed int overflow and can it even be "controlled"?
Our school tasks us to reproduce the atoi function. Many students (I included) do it some way that causes an overflow in case of INT_MIN, which wraps around neatly so the function still works. We ...
1
vote
0
answers
47
views
How can I remove the GCC version strings from executable binaries
on .elf formats, there is a .comment section that includes compiler & linker names and versions, this is fine since its discardable via editing the linker scripts
However on Windows .exe's, while ...
0
votes
0
answers
53
views
ITMS-91061: Missing privacy manifest - Visual Studio compilation MT0000: Unexpected error - System.UnauthorizedAccessException: Access to the path
Hope someome can assist. I have an iPhone App developed in Xamarin using Visual Studio 2022. Due a redevelop in new tech but have a short term change I need to get out for the current version.
I have ...
2
votes
0
answers
144
views
TypeScript compilation fails with "JSX element implicitly has type 'any'" and "Cannot find module 'react'" errors in React project
My React with TypeScript project was building successfully but now I'm getting TypeScript compilation errors when running npm run build:
JSX errors:
JSX element implicitly has type 'any' because no ...
0
votes
0
answers
43
views
Analyzing PPC code created by old DIAB compiler
I was checking some assembly code created by DIAB compiler for PPC.
The compiler creates strange prologue and epilogue code.
For example the below code saves the return address (LR) in space out of ...
0
votes
0
answers
62
views
kotlinc cant compile file with more 1 path to .jar in -cp or -classpath flag
Problem description: When using the Kotlin compiler (kotlinc) of any version from the command line (not IntelliJ IDEA, but a separate folder with a .bat file), and when specifying multiple libraries (....
1
vote
0
answers
95
views
Using different sources depending of architecture
Why?
The reason why I need to do this is, I am using rustgpu to compile shader crates with their own dependencies. Many of these dependencies need to compile on both the CPU and GPU, this means huge ...
1
vote
1
answer
85
views
`getattr`, `setattr` and `delattr` restricted to byte-compiled code
I was going through classes doc. And I found the following paragraph.
Notice that code passed to exec() or eval() does not consider the classname of the invoking class to be the current class; this ...
2
votes
0
answers
209
views
Building tcllib from source: when to build critcl to get tcllibc correct?
I'm trying to compile Tcl/Tk, tcllib, critcl from source. It appears that they built without error but I'm not sure how tcllibc is to be made. I read this Tcl wiki note but don't quite understand it.
...
1
vote
0
answers
147
views
Implements generic WinRT interfaces use <AllowUnsafeBlocks>True</AllowUnsafeBlocks>. But where exactly do I place that setting?
I have a MAUI project that's giving multiple errors related to my custom classes \Models\Term.cs and \Models\Course.cs. Visual Studio 2022 gives the same recommendation for both:
Type 'System....
2
votes
1
answer
121
views
Relationship Between app level gradle `compileSdk` and flutter plugin gradle `compileSdk`
What happens if my Flutter app is compiled with compileSdkVersion = 36, while a plugin used within it is using compileSdkVersion = 35? How these two relates?
I built the app and encountered no ...
0
votes
1
answer
141
views
JAR file can not access to a given directory
I made a Java application that loads image files from a directory called "images".
If I compile and build in this way it works:
javac Swing.java
java Swing
Conversely, if I compile and ...
1
vote
1
answer
157
views
Does java compiler (javac) require JVM to compile the java code? [duplicate]
So I got to know that javac compiler is written in Java. And JVM converts the bytecode (compiled Java code) to machine code for execution.
Two questions:
If javac is written in Java, does compiling ...
0
votes
0
answers
88
views
Nuitka onefile can't find directory for dynamic extension loading
I'm working on a Pycord bot project, and I'm using Nuitka to compile it. My goal is to compile the main script as a single file (--onefile) for distribution, but still be able to dynamically load ...
1
vote
1
answer
132
views
How makefile handle the ungiven file paths?
In my training course, makefile example is written.
The full makefile code is below can be used to get exe file successfully.
TARGET: exe
exe: main.o mylibmath.a
gcc main.o -o exe -L . mylibmath....
0
votes
1
answer
60
views
PCTCompile and strict compile options
Im trying to make PCTCompile fail compilation with the following settings:
requireFullNames="true"
requireFieldQualifiers="true"
requireReturnValues="true"
However, ...
1
vote
0
answers
124
views
IntelliJ not compiling and interfering with mvn clean install after update
I updated my IntelliJ from 2024.3.5 to 2025.1.1.1 and after doing so I encountered 2 problems:
It is not auto compiling, before I could just save and the changes would be visible, syntax errors would ...
3
votes
1
answer
382
views
is it possible for Angular cli to use the new typescript compiler which is written in GO
I'm working on a big Angular project. The compilation time is quite long.
I've heard that Microsoft released a new typescript compiler, which is written in GO and is 10x faster than the previous ...
0
votes
0
answers
60
views
Auto-sync of config file in linux kernel compilation produces wrong configuration
I need to load the symbols into gdb so that I can debug the boot loader. I am on an ARM architecture compiling for x86. I have tried this and the symbols do not load. This is the process I follow.
...
1
vote
1
answer
82
views
Is compiler in debug mode forced to reload all registers at every line? [duplicate]
I have been studying how debuggers work and studying assembly output of compilers in debug mode. One thing I noticed is that they seem to reload registers at every single line, even if no code could ...
0
votes
0
answers
106
views
How is a multithreaded code (ex using OpenMP) converted to assembly?
For example, When I multithread a "for loop" using OpenMP, making the iterations as different threads, How does it get translated to Assembly?
Also can a multithreaded code run on hardware ...
0
votes
1
answer
30
views
Is there a way to compile js and scss files without node_modules folder
I accidentally deleted the node_modules folder. I can't reinstall it since the files containing the npm libraries called package.json has been deleted as well. Is there some other way of manually ...
5
votes
2
answers
184
views
How to assert at compile time that a consteval function cannot be evaluated?
I am writing a function that for the purpose of this question is similar to std::format, in that std::format("{}") fails at compile-time, while std::format("{}", 1) compiles.
I ...
0
votes
0
answers
53
views
shift-reduce conflict in grammar with yacc/bison
I am writing a c-like language, but for grammar shown below:
module: module declORFunc
| declORFunc
;
declORFunc: decl
| func
decl: CONST_opt btype varDef_list SEMICOLON ;
CONST_opt: /* ...
0
votes
0
answers
62
views
Compile ML model into binary
I would like to compile a Python project with an ML model into a single executable binary. This means I want the model and the weights to be in the binary with the rest of the code. The size of the ...
0
votes
0
answers
49
views
macOS: possible to compile standalone (static-linked) pdf2svg?
Under macOS, s it possible to compile/package pdf2svg so that it doesn't require separate libaries (Cairo, Poppler, etc.)? I distribute a freeware ApppleScript applet that uses Ghostscript to convert ...
-2
votes
1
answer
91
views
How to make minimal CRT (C Runtime) in the elf x86_64 file
I want make CRT (C, C++, Rust use CRT). For what? For my own compiler, i means which minimal suite of functions need for preparing main(argc, argv, envp, auxp, program_name, stack).
How did I know ...
1
vote
1
answer
52
views
How to exclude a function from Gprof activity during running
Suppose i have function foo
void foo()
{
//do something
}
Now this fn foo is now called by other function defined in other files. if gprof is enabled it would do profiling activity and subroutines ...
0
votes
0
answers
55
views
How to let swiftc know the function will be declared in another file when compiling object files?
I'm converting my Xcode based project to a terminal based one.
My project is written in Swift and I want to use make to compile.
So I have to firstly compile them to o files, and then link them ...
1
vote
1
answer
81
views
How to convert an Xcode project that uses automatic build to a command-line project using make?
I've been working on my game engine, which is for mac on Xcode.
However, I'm a little bit tired of the complex configuration in Xcode. Terminal based projects do not have this problem. I can simply ...
1
vote
1
answer
239
views
Construct the SLR parsing table for the following Grammar
S → 0S0
S → 1S1
S → 10
found 2 possible paths on canonical item i3 for 0 input.
in my solution:
I0 was
S'-> .S
S → .0S0
S → .1S1
S → .10
I1 was(S input from I0)
S'-> S.(accept)
I2 ...
0
votes
0
answers
160
views
cross compiling cpp code for windows using mingw32 generates error with libstdc++-6.dll
I'm developing in C++ on Windows 11 using WSL with an Ubuntu 24.04.2 LTS distribution. For my course projects, I use the SDL2 library. Due to insufficient performance with graphical interfaces under ...
6
votes
1
answer
203
views
Why is a recursive constexpr function so much faster with reference parameters than with values?
I have the following constexpr Fibonacci function:
constexpr auto fibo(unsigned int number) -> unsigned long long {
if (number < 2) return number;
return fibo(number - 1) + fibo(number - ...
0
votes
0
answers
24
views
Link a precompiled binary in linux to make it static [duplicate]
If I have a ELF binary that has dynamic dependencies, are there any tools to perform ahead-of-time linking to create a static binary with no dependencies?
e.g.
$ ldd $(which tcpdump)
/lib/ld-...
2
votes
0
answers
45
views
Why doesn't MPSolve compile here?
Relevance:
First first, regarding relevance to this forum. I've never posted on stack exchange before, so I'm new to how all of this works. I actually tried to post this question on Stack Overflow ...
1
vote
0
answers
236
views
compiling whisper.cpp on linux aarch64 machine
i was trying to complie whisper.cpp on a aarch64 machine, after runinng "cmake -B build",i got the following info, how to fix these errors?
Looking for pthread.h
Looking for pthread.h - ...
1
vote
0
answers
73
views
Does faster compile time mean less optimization?
I never stopped to think that a faster compilation speed could affect optimization level, I thought the two were separate things. However in Rust I learned that it has a setting called:
codegen-units
...
6
votes
1
answer
244
views
Why are you allowed to assign a field to itself?
I've been coding in Java since 2005 and never thought that the code like that would actually be compilable:
public class FooClass {
public static final String FOO = FooClass.FOO;
}
Intellij ...
0
votes
0
answers
246
views
Android Kotlin compile time and build time are too high, and incremental Kotlin compilation works only sometimes, not always
I am working on an app that has about 10 activities and 6-7 of them have about 15k to 20k lines of code.
When I make a very small change in 1 or 2 activities in 1 or 2 statements and start the build ...
1
vote
1
answer
49
views
Using foreach in Makefile to compile subdirectories separately
I have the following Makefile sample:
BUILD = build
PATH_POT3 = src/pot/pot3/
MPIFC = mpiifort
FFLAGS = -O3
MOL_LIST = $(shell find $(PATH_POT3) -mindepth 1 -maxdepth 1 -type d)
$(foreach MOL,$(...
0
votes
0
answers
39
views
How to generate an import library for an EXE during compilation so that it can be used as a DLL?
Similar questions have been asked over the years and the answers have always been quite literally the opposite of each other (see: here, here, here, and here). However, I have not come across answers ...
1
vote
1
answer
190
views
Issue building gcc cross compiler for aarch64
I am trying to build an aarch64 cross compiler for my Ubuntu 20.04 system. I am running into an issue after configuring and trying to build the toolchain. The source I am using is https://ftp.gnu.org/...