/usr/bin/ld: $WORK/b001/_pkg2_.a(_x004.o): undefined reference to symbol 'pthread_key_delete@@GLIBC_2.2.5'

Dear friends…

I am using Slackware 15.0, GoLang 1.16.5 (go version go1.16.5 gccgo (GCC) 11.2.0 linux/amd64) and fyne (API for GUI from fyne.io).

I tested very-simple code as follows…

package main

import (

func main() {
fmt.Println(“XStopMotion dengan Fyne-GUI!”)
myapp := app.New()
jendela := myapp.NewWindow(“XStopMotion with Fyne-GUI by Ilham-Firdaus.”)

This simple-code has been saved to “xstopmotion_fyne.go”

I have done…
ceo[GUI-dengan-Fyne]$ go mod init xstopmotion_fyne
ceo[GUI-dengan-Fyne]$ go mod tidy
ceo[GUI-dengan-Fyne]$ go run xstopmotion_fyne.go


/usr/bin/ld: $WORK/b001/pkg2.a(_x004.o): undefined reference to symbol ‘pthread_key_delete@@GLIBC_2.2.5
/usr/bin/ld: /lib64/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: Fehler: ld gab 1 als Ende-Status zurück

But my code does not work properly. It stucks on this error message: “/usr/bin/ld: $WORK/b001/pkg2.a(_x004.o): undefined reference to symbol ‘pthread_key_delete@@GLIBC_2.2.5’”

Could anybody so nice telling me what should I do to run my simple-code?

I have tried this too

ceo[GUI-dengan-Fyne]$ go run -gccgoflags “-L=/lib64 -l pthread” xstopmotion_fyne.go
flag provided but not defined: -l
usage: go run [build flags] [-exec xprog] package [arguments…]
Run ‘go help run’ for details.

I have solved this problem by doing this

ceo[GUI-dengan-Fyne]$ go run -gccgoflags ‘-L=/lib64 -l pthread’ xstopmotion_fyne.go
XStopMotion dengan Fyne-GUI!
^Csignal: interrupt

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.