Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ bug ] panic: Undefined symbol "kclvm_service_new" on FreeBSD #147

Open
yonas opened this issue Sep 26, 2024 · 1 comment
Open

[ bug ] panic: Undefined symbol "kclvm_service_new" on FreeBSD #147

yonas opened this issue Sep 26, 2024 · 1 comment

Comments

@yonas
Copy link

yonas commented Sep 26, 2024

$ go build -v ./cmd/kcl
$ ./kcl run
panic: Undefined symbol "kclvm_service_new"

goroutine 1 [running]:
github.com/ebitengine/purego.RegisterLibFunc({0x2fcc60, 0x3a200c8}, 0x0?, {0x74dd9d?, 0x8740061c0?})
        /home/yonas/go/pkg/mod/github.com/ebitengine/[email protected]/func.go:23 +0x5c
kcl-lang.io/lib/go/native.initClient.func1()
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/go/native/client.go:40 +0x4e
sync.(*Once).doSlow(0x251db48?, 0x3948bd0?)
        /usr/local/go123/src/sync/once.go:76 +0xb4
sync.(*Once).Do(...)
        /usr/local/go123/src/sync/once.go:67
kcl-lang.io/lib/go/native.initClient(0x3948b20?)
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/go/native/client.go:38 +0x3a
kcl-lang.io/lib/go/native.NewNativeServiceClientWithPluginAgent(...)
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/go/native/client.go:59
kcl-lang.io/lib/go/native.NewNativeServiceClient()
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/go/native/client.go:55 +0x29
kcl-lang.io/kcl-go/pkg/kcl.Service(...)
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/pkg/kcl/service.go:10
kcl-lang.io/kcl-go/pkg/kcl.runWithHooks({0x8748c9520, 0x0, 0x0}, {0x394d5f0, 0x1, 0x1}, {0x8748c95f0, 0x1, 0x1})
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/pkg/kcl/api.go:436 +0x15f
kcl-lang.io/kcl-go/pkg/kcl.run(...)
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/pkg/kcl/api.go:445
kcl-lang.io/kcl-go/pkg/kcl.RunWithOpts({0x8748c95f0?, 0x874001140?, 0x0?})
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/pkg/kcl/api.go:372 +0x45
kcl-lang.io/kpm/pkg/client.(*KpmClient).Run.func1(0x874001140)
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/pkg/client/run.go:599 +0x3aa
kcl-lang.io/kpm/pkg/client.(*VirtualPkgVisitor).Visit(0x0?, 0x0?, 0x8748f6900)
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/pkg/client/visitor.go:87 +0x3ca
kcl-lang.io/kpm/pkg/client.(*KpmClient).Run(0x8748fa780, {0x8748c9bc0, 0xe, 0x0?})
        /home/yonas/go/pkg/mod/kcl-lang.io/[email protected]/pkg/client/run.go:574 +0x20d
kcl-lang.io/cli/pkg/options.(*RunOptions).Run(0x8740e7cc0)
        /home/yonas/git/cli/pkg/options/run.go:128 +0x6a5
kcl-lang.io/cli/cmd/kcl/commands.NewRunCmd.func1(0x874116400?, {0x3a62ec0?, 0x4?, 0x7339f8?})
        /home/yonas/git/cli/cmd/kcl/commands/run.go:61 +0x49
github.com/spf13/cobra.(*Command).execute(0x874451b08, {0x3a62ec0, 0x0, 0x0})
        /home/yonas/go/pkg/mod/github.com/spf13/[email protected]/command.go:985 +0xaaa
github.com/spf13/cobra.(*Command).ExecuteC(0x874451808)
        /home/yonas/go/pkg/mod/github.com/spf13/[email protected]/command.go:1117 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
        /home/yonas/go/pkg/mod/github.com/spf13/[email protected]/command.go:1041
main.main()
        /home/yonas/git/cli/cmd/kcl/main.go:14 +0x2a
$ ldd ./kcl
./kcl:
        libthr.so.3 => /lib/libthr.so.3 (0x191a4a171000)
        libdl.so.1 => /usr/lib/libdl.so.1 (0x191a4985e000)
        libc.so.7 => /lib/libc.so.7 (0x191a4ae72000)
        [vdso] (0x191a48e4b000)

I built the Rust library without any issues. It's installed at /usr/local/lib/libkclvm_cli_cdylib.so

KCL e3ab00dd
OS: FreeBSD 14

@Peefy
Copy link
Contributor

Peefy commented Sep 26, 2024

Related issue: kcl-lang/kcl#1029

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants