zelenin/go-tdlib

[FreeBSD Build Issue] d: error: undefined symbol: td_create_client_id

schrodyn opened this issue · 0 comments

Hi,

I'm trying to build the demo code and failing on FreeBSD 13.2.

InstalledDir: /usr/bin
 (in-process)
 "/usr/bin/cc" -cc1 -triple x86_64-unknown-freebsd13.2 -emit-obj -mrelax-all --mrelax-relocations -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name _cgo_main.c -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=all -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -mllvm -treat-scalable-fixed-error-as-warning -debugger-tuning=gdb -v -fcoverage-compilation-dir=/tmp/go-build2607815859/b002 -resource-dir /usr/lib/clang/14.0.5 -I ../../../../go/pkg/mod/github.com/zelenin/go-tdlib@v0.7.0/client -I $WORK/b002/ -I /usr/local/include -fdebug-compilation-dir=/tmp/go-build2607815859/b002 -fdebug-prefix-map=/tmp/go-build2607815859/b002=/tmp/go-build -ferror-limit 19 -pthread -fgnuc-version=4.2.1 -fno-caret-diagnostics -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o $WORK/b002/_cgo_main.o -x c _cgo_main.c
clang -cc1 version 14.0.5 based upon LLVM 14.0.5 default target x86_64-unknown-freebsd13.2
#include "..." search starts here:
#include <...> search starts here:
 ../../../../go/pkg/mod/github.com/zelenin/go-tdlib@v0.7.0/client
 $WORK/b002
 /usr/local/include
 /usr/lib/clang/14.0.5/include
 /usr/include
End of search list.
# command-line-arguments
/usr/local/go120/pkg/tool/freebsd_amd64/link: running cc failed: exit status 1
FreeBSD clang version 14.0.5 (https://github.com/llvm/llvm-project.git llvmorg-14.0.5-0-gc12386ae247c)
Target: x86_64-unknown-freebsd13.2
Thread model: posix
InstalledDir: /usr/bin
 "/usr/bin/ld" --eh-frame-hdr -export-dynamic -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o $WORK/b001/exe/a.out /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/local/lib -L/usr/local/lib -L/usr/lib --compress-debug-sections=zlib /tmp/go-link-878265303/go.o /tmp/go-link-878265303/000000.o /tmp/go-link-878265303/000001.o /tmp/go-link-878265303/000002.o /tmp/go-link-878265303/000003.o /tmp/go-link-878265303/000004.o /tmp/go-link-878265303/000005.o /tmp/go-link-878265303/000006.o /tmp/go-link-878265303/000007.o /tmp/go-link-878265303/000008.o /tmp/go-link-878265303/000009.o /tmp/go-link-878265303/000010.o /tmp/go-link-878265303/000011.o /tmp/go-link-878265303/000012.o -lpthread -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o
ld: error: undefined symbol: td_create_client_id
>>> referenced by tdlib.cgo2.c
>>>               /tmp/go-link-878265303/000001.o:(_cgo_a61cfdeef33b_Cfunc_td_create_client_id)

ld: error: undefined symbol: td_execute
>>> referenced by tdlib.cgo2.c
>>>               /tmp/go-link-878265303/000001.o:(_cgo_a61cfdeef33b_Cfunc_td_execute)

ld: error: undefined symbol: td_receive
>>> referenced by tdlib.cgo2.c
>>>               /tmp/go-link-878265303/000001.o:(_cgo_a61cfdeef33b_Cfunc_td_receive)

ld: error: undefined symbol: td_send
>>> referenced by tdlib.cgo2.c
>>>               /tmp/go-link-878265303/000001.o:(_cgo_a61cfdeef33b_Cfunc_td_send)
cc: error: linker command failed with exit code 1 (use -v to see invocation)

tdlib from https://github.com/tdlib/td tag v1.8.0 is successfully installed into /usr/local

Here is a gist of the build commands and full output https://gist.github.com/schrodyn/94be5356e90e5ca4106b74eb37521b0b

Hoping someone can help me build this. Thanks in advance.