Skip to content

ScalaNative - unable to build when using uni::2026.1.13 (works with uni::2026.1.12 and earlier) #622

Description

@dasm0012

Hi,

It seems scala-cli is unable to build/run the HelloWorld example when using dep org.wvlet.uni::uni::2026.1.13 (2026.1.12 throws ld warning during linking but works, using uni version 2026.1.11 works with no issue)


Error message:
[info] Compiling to native code (5484 ms)
[info] Linking with [pthread, dl, m]
[error] /usr/bin/ld: warning: /home/luser/uniBook/.scala-build/uniBook_4a14478405/native/native/dependencies/nativelib_native0.5_3-0.5.12-5/scala-native/gc/shared/SafepointPollTrampoline-x86_64.S.o: missing .note.GNU-stack section implies executable stack
[error] /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
[error] /usr/bin/ld: /home/luser/uniBook/.scala-build/uniBook_4a14478405/native/native/dependencies/uni_native0.5_3-2026.1.13-1/scala-native/uni_curl_shim.c.o: in function uni_curl_easy_setopt_ptr': [error] uni_curl_shim.c:(.text+0x21): undefined reference to curl_easy_setopt'
[error] /usr/bin/ld: /home/luser/uniBook/.scala-build/uniBook_4a14478405/native/native/dependencies/uni_native0.5_3-2026.1.13-1/scala-native/uni_curl_shim.c.o: in function uni_curl_easy_setopt_long': [error] uni_curl_shim.c:(.text+0x51): undefined reference to curl_easy_setopt'
[error] /usr/bin/ld: /home/luser/uniBook/.scala-build/uniBook_4a14478405/native/native/dependencies/uni_native0.5_3-2026.1.13-1/scala-native/uni_curl_shim.c.o: in function uni_curl_easy_getinfo_long': [error] uni_curl_shim.c:(.text+0x81): undefined reference to curl_easy_getinfo'
[error] clang: error: linker command failed with exit code 1 (use -v to see invocation)
[info] Total (20714 ms)
Exception in thread "main" scala.scalanative.build.BuildException: Failed to link /home/luser/uniBook/.scala-build/uniBook_4a14478405/native/native/hello
at scala.scalanative.build.LLVM$.link(LLVM.scala:165)
....

Command line: scala-cli run . --native

//> using scala 3.8.4
// //> using platform native

//> using dep org.wvlet.uni::uni::2026.1.13

import wvlet.uni.log.LogSupport

class MyService extends LogSupport:
def greet(name: String): String =
info(s"Greeting $name")
s"Hello, $name!"

@main def hello =
val service = MyService()
println(service.greet("World"))

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