-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed as not planned
Closed as not planned
Copy link
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.os-linuxstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.
Description
Zig Version
0.13.0
Steps to Reproduce and Observed Behavior
In the newly created Zig package (created with zig init
):
- Referencing the
add
function inroot.zig
frommain.zig
either byextern fn
or@import
. - Change the library to be dynamically linked and link the library in the build script.
A compilation error will be thrown when trying to build:
ld.lld: undefined reference due to --no-allow-shlib-undefined: __tls_get_addr
It seem to be specific to Linux. I tried cross compiling to Windows and it worked fine.
Related issue in earlier version: #4748
Additionally, append .single_threaded = true
to the build option of the library could make it build, but it will give a seg fault when running.
Expected Behavior
It should build and run without errors.
vt-alt
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.os-linuxstandard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.