I am trying to build a shared object (.so) on AIX, using the IBM xlclang++ compiler (v16.1). The .so uses C++11 concurrency, and I have defined some global variables as thread_local. The linker gives Undefined symbol errors for those variables (and for another symbol: .__pt_atexit_np).
There are also some thread_local static variables inside a function. (See DoSomething below.) The linker does not complain about those, but the above-mentioned symbol .__pt_atexit_np might have something to with this.
This code compiles, links, and runs fine on Windows (as a DLL), both when using MS Visual C++ 2019 and clang++ (v9.0.0).
To enable multithreaded code on AIX (I hoped), I added the compiler/linker options -qthreaded and -qtls=global-dynamic.
// --- In GlobData.h: ---
extern thread_local bool GLOB_bTracingEnabled;
// --- In GlobData.cpp: --- (Error: Undefined symbol)
thread_local bool GLOB_bTracingEnabled;
// --- In Calculations.cpp: --- (Error?)
int DoSomething() {
thread_local static int _staticVar;
// ...
}
#--- In makefile: ---
INCL1=.
CCC=/opt/IBM/xlC/16.1.0/bin/xlclang++
CCFLAGS1=-q64 -qrtti -qthreaded -qtls=global-dynamic -qmkshrobj -bE:MyDLL.exp -DNDEBUG -I$(INCL1)
CCFLAGS=$(CCFLAGS1) -c
LD=/opt/IBM/xlC/16.1.0/bin/xlclang++
LDFLAGS=$(CCFLAGS1)
LIB_FILE=mydll.so
SOURCEDIR1=.
OBJ_FILES=StdAfx.o GlobData.o Calculations.o
VPATH=$(SOURCEDIR1)
.SUFFIXES: .cpp .o
#Make all:
all :: $(LIB_FILE)
#Compile rule:
.cpp.o:
$(CCC) $(CCFLAGS) -o$# $<
#Link rule:
$(LIB_FILE) : $(OBJ_FILES)
$(LD) $(LDFLAGS) -o $# $(OBJ_FILES)
strip -t -X64 $#
Link errors:
ld: 0711-317 ERROR: Undefined symbol: .ZTH20GLOB_bTracingEnabled
ld: 0711-317 ERROR: Undefined symbol: .__pt_atexit_np
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
Compiling/linking with option -bnoquiet (as suggested above) gave the following info (tidied up a bit). (Hoping it's useful for someone...)
/opt/IBM/xlC/16.1.0/bin/xlclang++ -O3 -q64 -qchars=signed -qrtti -qthreaded -qtls=global-dynamic -bnoquiet -qmkshrobj -qmaxmem=-1 -bE:mydll.exp -DNDEBUG -DAIX -DBPC_DLL_EXPORTS -I../Common -I../../../aks/source -I. -o ./mydll.so StdAfx.o GlobData.o Calculations.o [...]
(ld): setopt 64
(ld): halt 4
(ld): setfflag 4
(ld): cdtors 1 all 0 s
(ld): savename ./bpc-urm.so
(ld): filelist 92 2
(ld): setopt noprogram
(ld): noentry
NOENTRY: There is no entry point.
(ld): i /lib/crti_64.o
(ld): i StdAfx.o
(ld): i GlobData.o
(ld): i Calculations.o
[...]
(ld): lib /opt/IBM/xlc/16.1.0/lib/libxlopt.a
(ld): lib /opt/IBM/xlc/16.1.0/lib/libxlipa.a
(ld): lib /opt/IBM/xlc/16.1.0/lib/libxl.a
(ld): lib /usr/lib/libc++.a
(ld): lib /opt/IBM/xlC/16.1.0/lib/libCcore.a
(ld): lib /usr/lib/libpthreads.a
(ld): lib /usr/lib/libm.a
(ld): lib /usr/lib/libatomic.a
(ld): lib /usr/lib/libc.a
LIBRARY: Symbols imported from import file /usr/lib/libc++.a[shr.imp]: 0
LIBRARY: Symbols imported from import file /usr/lib/libc++.a[shr_64.imp]: 1834
LIBRARY: Symbols imported from import file /usr/lib/libc++.a[cxxabi.imp]: 0
LIBRARY: Symbols imported from import file /usr/lib/libc++.a[cxxabi_64.imp]: 354
LIBRARY: Symbols imported from import file /opt/IBM/xlC/16.1.0/lib/libCcore.a[shrcore_32.imp]: 0
LIBRARY: Symbols imported from import file /opt/IBM/xlC/16.1.0/lib/libCcore.a[ansicore_32.imp]: 0
LIBRARY: Symbols imported from import file /opt/IBM/xlC/16.1.0/lib/libCcore.a[shrcore_64.imp]: 131
LIBRARY: Symbols imported from import file /opt/IBM/xlC/16.1.0/lib/libCcore.a[ansicore_64.imp]: 81
LIBRARY: Shared object libpthreads.a[shr_xpg5_64.o]: 346 symbols imported.
LIBRARY: Shared object libatomic.a[libatomic.so.1]: 40 symbols imported.
LIBRARY: Shared object libc.a[shr_64.o]: 3110 symbols imported.
LIBRARY: Shared object libc.a[posix_aio_64.o]: 20 symbols imported.
LIBRARY: Shared object libc.a[aio_64.o]: 18 symbols imported.
LIBRARY: Shared object libc.a[pse_64.o]: 8 symbols imported.
LIBRARY: Shared object libc.a[dl_64.o]: 4 symbols imported.
LIBRARY: Shared object libc.a[pty_64.o]: 1 symbols imported.
LIBRARY: Shared object libc.a[cthread_64.o]: 25 symbols imported.
LIBRARY: Shared object libc.a[uchar_64.o]: 4 symbols imported.
FILELIST: Number of previously inserted files processed: 92
(ld): exports mydll.exp
EXPORTS: Symbols exported: 59
(ld): resolve
RESOLVE: 6667 of 30031 symbols were kept.
(ld): addgl /usr/lib/glink64.o
ADDGL: Glink code added for 116 symbols.
(ld): er full
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
Symbol Inpndx TY CL Source-File(Object-File) OR Import-File{Shared-object}
RLD: Address Section Rld-type Referencing Symbol
----------------------------------------------------------------------------------------------
._ZTH20GLOB_bTracingEnabled [240] ER PR File0.cpp(File0.o)
00000cbc .text R_RBR [54] <.GLOB_EnableTracing#AF26_2>
._ZTH20GLOB_bTracingEnabled [386] ER PR File1.cpp(File1.o)
0000004c .text R_RBR [8] <._ZTW20GLOB_bTracingEnabled>
00001564 .text R_RBR [24] .Namespace2::Function1(...)
0000162c .text R_RBR [24] .Namespace2::Function1(...)
00001690 .text R_RBR [24] .Namespace2::Function1(...)
._ZTH20GLOB_bTracingEnabled [563] ER PR File2.cpp(File2.o)
000013dc .text R_RBR [26] .Class1::Function2(...) const
00001400 .text R_RBR [26] .Class1::Function2(...) const
._ZTH20GLOB_bTracingEnabled [782] ER PR File3.cpp(File3.o)
00001710 .text R_RBR [22] .Class2::Function3(...) const
00001788 .text R_RBR [22] .Class2::Function3(...) const
00001800 .text R_RBR [22] .Class2::Function3(...) const
00001878 .text R_RBR [22] .Class2::Function3(...) const
00001910 .text R_RBR [22] .Class2::Function3(...) const
00001928 .text R_RBR [22] .Class2::Function3(...) const
00001940 .text R_RBR [22] .Class2::Function3(...) const
0000202c .text R_RBR [27] <._ZTW20GLOB_bTracingEnabled>
0000286c .text R_RBR [38] .Class2::Function4(...) const
00003064 .text R_RBR [43] .Class2::Function5(...) const
._ZTH20GLOB_bTracingEnabled [283] ER PR File4.cpp(File4.o)
00000260 .text R_RBR [11] .Class3::Function6(...) const
00000370 .text R_RBR [11] .Class3::Function6(...) const
00000604 .text R_RBR [15] <.IPRA.$Function7(...)>
0000069c .text R_RBR [15] <.IPRA.$Function7(...)>
[...]
.__pt_atexit_np [1033] ER PR Calculations.cpp(Calculations.o)
00003720 .text R_RBR [55] .Namespace1::DoSomething(...)
00003750 .text R_RBR [55] .Namespace1::DoSomething(...)
ER: The return code is 8.
ld: 0711-317 ERROR: Undefined symbol: ._ZTH20GLOB_bTracingEnabled
[...]
ld: 0711-317 ERROR: Undefined symbol: .__pt_atexit_np
make: 1254-004 The error code from the last command is 8.
Related
I am currently Solana through a tutorial. After creating the project, adding dependencies and writing my program, I am supposed to run the following command to create a build of my Rust code that is suitable to deploy to Solana
cargo build-bpf --manifest-path=Cargo.toml --bpf-out-dir=dist/program
Upon running this command I get this error:
error: linking with `\\?\C:\Users\Andrew\.local\share\solana\install\releases\1.9.6\solana-release\bin\sdk\bpf\dependencies\bpf-tools\llvm\bin\ld.lld` failed: exit code: 1
|
= note: "\\\\?\\C:\\Users\\Andrew\\.local\\share\\solana\\install\\releases\\1.9.6\\solana-release\\bin\\sdk\\bpf\\dependencies\\bpf-tools\\llvm\\bin\\ld.lld" "--version-script=C:\\Users\\Andrew\\AppData\\Local\\Temp\\rustcfP4dWA\\list" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.1.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.10.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.11.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.12.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.13.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.14.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.15.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.2.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.3.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.4.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.5.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.6.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.7.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.8.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.9.rcgu.o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.uld0kociqtl6etw.rcgu.o" "--as-needed" "-L" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps" "-L" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\release\\deps" "-L" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib" "-Bstatic" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libsolana_program-b2b13310817f5248.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libserde_bytes-aef9648808d9c831.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libblake3-9c296c099c94bc54.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libconstant_time_eq-5c8fe6fb88b82dcc.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libarrayvec-5f41e504062ba5bd.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libdigest-9f0b3cc7612e1076.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libsubtle-a1562280b43e07dc.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libblock_buffer-a147e55a99bb097c.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libcrypto_common-b64c25475c677681.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libarrayref-62e325660dcbcdad.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libsolana_frozen_abi-39b4f96965d78918.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libbs58-4ba0e4b26a8bc639.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libbv-bb7083cc9f8ca62c.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libbytemuck-9d74d8b3a4e69402.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\liblazy_static-40cf5ca4fb226fc4.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libsha3-bbd73384f96d675f.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libkeccak-2002a05ba274f01b.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libsha2-a86070b99a0022c7.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libopaque_debug-2cfb1a43922e8fa5.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libdigest-ea1685ff6f232064.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libblock_buffer-167db070cc2bcdb1.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libblock_padding-aae0a410e0661616.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libgeneric_array-a6d784931f2d5898.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libtypenum-5b6a5cc6c27f3e89.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\liblog-c21ec511aa92c880.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libcfg_if-ff438ac9b30946a3.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libnum_traits-de22efb352be6c17.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libbincode-3947f1bf19062b27.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libserde-04054e8a9cafe1ca.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libthiserror-10d222c05f59092d.rlib" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\libborsh-4c2a80a409a40648.rlib" "--start-group" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libstd-09f30ec6d9bcf4bb.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libpanic_abort-0129f2b71ae47d8c.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libstd_detect-291be22324585073.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libhashbrown-b89a97989cce08e1.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\librustc_std_workspace_alloc-0d0f29f2be0139d5.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libunwind-43e4d5094e6a98d9.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libcfg_if-f7de57aa039b1991.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\liblibc-f568e648f8426533.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\liballoc-ca33e91228706d40.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\librustc_std_workspace_core-2e1fdcf37081a104.rlib" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libcore-38e5758490a5e05e.rlib" "--end-group" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib\\libcompiler_builtins-98c1293c09977ba1.rlib" "-Bdynamic" "--script" "C:\\Users\\Andrew\\AppData\\Local\\Temp\\rustcfP4dWA\\rustc-bpfel-linkfile.ld" "-znoexecstack" "-L" "C:\\Users\\Andrew\\.cache\\solana\\v1.23\\bpf-tools\\rust\\lib\\rustlib\\bpfel-unknown-unknown\\lib" "-o" "C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.so" "--gc-sections" "-shared" "--entry=entrypoint" "-O1"
= note: ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_1 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(borsh::de::BorshDeserialize::try_from_slice::h47523afb23741a51)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_2 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_3 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_4 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: relocation R_BPF_64_32 cannot be used against symbol abort; recompile with -fPIC
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_5 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_5 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_6 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_7 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_8 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_9 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: relocation R_BPF_64_32 cannot be used against symbol abort; recompile with -fPIC
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_5 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(_$LT$alloc..string..String$u20$as$u20$borsh..de..BorshDeserialize$GT$::deserialize::he9fe3c9f5f33a2c2)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_10 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(entrypoint)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_11 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(entrypoint)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_12 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(entrypoint)
ld.lld: error: relocation R_BPF_64_32 cannot be used against symbol abort; recompile with -fPIC
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(entrypoint)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_13 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(entrypoint)
ld.lld: error: relocation R_BPF_64_32 cannot be used against symbol sol_log_; recompile with -fPIC
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(entrypoint)
ld.lld: error: can't create dynamic relocation R_BPF_64_64 against symbol: .L__unnamed_14 in readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to allow text relocations in the output
>>> defined in C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o
>>> referenced by crowd_funding.162a58ac-cgu.0
>>> C:\\Users\\Andrew\\crowd_funding\\crowd-funding\\program\\target\\bpfel-unknown-unknown\\release\\deps\\crowd_funding.crowd_funding.162a58ac-cgu.0.rcgu.o:(entrypoint)
ld.lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
error: could not compile `crowd_funding` due to previous error
My current Solana version is version 1.9.6 and my current rustc version is 1.58.1.
My Cargo.toml file:
[package]
name = "crowd_funding"
version = "0.1.0"
edition = "2021"
[dependencies]
solana-program = "1.7.14"
borsh = "0.9.1"
borsh-derive = "0.9.1"
[features]
no-entrypoint = []
[dev-dependencies]
solana-program-test = "1.7.14"
solana-sdk = "1.7.14"
[lib]
crate-type = ["cdylib", "lib"]
Xargo.toml file:
[target.bpfel-unknown-unknown.dependencies.std]
features = []
Please what can I do to rectify this problem?
I solved the error. /you can't build solana program on a windows environnement.
You need to use a WSL ubuntu subsystem.
I want to have a function in a Foo.Internal module that is used by other things in there, but it should also be exposed by the Foo module. When I reexport the function from Foo to use elsewhere I get linker errors. I am using stack to build the code, so it might be an issue there, or with cabal, not sure.
Minimal working example:
module Foo.Internal where
secrets = "stuff"
module Foo(secrets) where
import Foo.Internal (secrets)
module Main where
import Foo
main = putStrLn secrets
When I compile this with stack build I get
package-0.1.0.0: build
Preprocessing library package-0.1.0.0...
[1 of 2] Compiling Foo.Internal ( src/Foo/Internal.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Foo/Internal.o )
[2 of 2] Compiling Foo ( src/Foo.hs, .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/Foo.o )
In-place registering package-0.1.0.0...
Preprocessing executable 'package-exe' for package-0.1.0.0...
Linking .stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/package-exe/package-exe ...
.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/package-exe/package-exe-tmp/Main.o:(.text+0x26): undefined reference to `packazuEPdwTk5e5ZZOCOiVJMdOJ3P_FooziInternal_secrets_closure'
.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/build/package-exe/package-exe-tmp/Main.o: In function `S2Re_srt':
(.data+0x40): undefined reference to `packazuEPdwTk5e5ZZOCOiVJMdOJ3P_FooziInternal_secrets_closure'
collect2: error: ld returned 1 exit status
I am getting error while compiling qvfb for x11.
1> Now where is this png_create_write_struct is declared that i am getting error related to it ?
2> Does qvbf compilation for x11 looks for libpng in host file system or it looks for libpng inside QT_source_code ?
3> Please suggest How to resolve this error to compile successfully ?
#/qt-everywhere-opensource-src-4.8.5/tools/qvfb$ make
e-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lQtGui -lQtCore -lGL -lpthread -lXext -lX11 -lm
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriter::QAnimationWriter(QString const&, char const*)':
qanimationwriter.cpp:(.text+0xbf): undefined reference to `png_create_write_struct'
qanimationwriter.cpp:(.text+0xca): undefined reference to `png_create_info_struct'
qanimationwriter.cpp:(.text+0xe0): undefined reference to `png_set_compression_level'
qanimationwriter.cpp:(.text+0xff): undefined reference to `png_set_write_fn'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::write(png_struct_def*, unsigned char*, unsigned int)':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG5writeEP14png_struct_defPhj[QAnimationWriterMNG::write(png_struct_def*, unsigned char*, unsigned int)]+0xb): undefined reference to `png_get_io_ptr'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x65): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x78): undefined reference to `png_set_sig_bytes'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0xda): undefined reference to `png_set_IHDR'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0xec): undefined reference to `png_write_info'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x107): undefined reference to `png_set_bgr'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x154): undefined reference to `png_write_image'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x172): undefined reference to `png_write_end'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x184): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1a8): undefined reference to `png_create_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1b3): undefined reference to `png_create_info_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1c9): undefined reference to `png_set_compression_level'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x1e8): undefined reference to `png_set_write_fn'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG12composeImageERK6QImageRK6QPoint[QAnimationWriterMNG::composeImage(QImage const&, QPoint const&)]+0x21f): undefined reference to `png_set_filler'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::~QAnimationWriterMNG()':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0x9e): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0xb0): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD0Ev[_ZN19QAnimationWriterMNGD5Ev]+0x176): undefined reference to `png_write_chunk'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::setImage(QImage const&)':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNG8setImageERK6QImage[QAnimationWriterMNG::setImage(QImage const&)]+0xc3): undefined reference to `png_write_chunk'
.obj/release-shared/qanimationwriter.o: In function `QAnimationWriterMNG::~QAnimationWriterMNG()':
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0x9e): undefined reference to `png_write_chunk'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0xb0): undefined reference to `png_destroy_write_struct'
qanimationwriter.cpp:(.text._ZN19QAnimationWriterMNGD2Ev[_ZN19QAnimationWriterMNGD5Ev]+0x16e): undefined reference to `png_write_chunk'
collect2: ld returned 1 exit status
make: *** [../../bin/qvfb] Error 1
locate command for libpng returns :--
#locate libpng
/lib/i386-linux-gnu/libpng12.so.0
/lib/i386-linux-gnu/libpng12.so.0.46.0
/usr/share/doc/libpng12-0
/usr/share/doc/libpng12-0/ANNOUNCE
/usr/share/doc/libpng12-0/KNOWNBUG
/usr/share/doc/libpng12-0/README.Debian
/usr/share/doc/libpng12-0/README.gz
/usr/share/doc/libpng12-0/TODO
/usr/share/doc/libpng12-0/changelog.Debian.gz
/usr/share/doc/libpng12-0/copyright
/usr/share/doc/libpng12-0/libpng-1.2.46.txt.gz
/usr/share/doc-base/libpng12
/var/lib/doc-base/documents/libpng12
/var/lib/dpkg/info/libpng12-0:i386.list
/var/lib/dpkg/info/libpng12-0:i386.md5sums
/var/lib/dpkg/info/libpng12-0:i386.postinst
/var/lib/dpkg/info/libpng12-0:i386.postrm
/var/lib/dpkg/info/libpng12-0:i386.shlibs
Now if my library is here /lib/i386-linux-gnu/libpng12.so.0 after running nm command :---
$ nm -D /lib/i386-linux-gnu/libpng12.so.0
00000000 A PNG12_0
w _Jv_RegisterClasses
w __cxa_finalize
U __fprintf_chk
w __gmon_start__
U __longjmp_chk
U __memcpy_chk
U __snprintf_chk
U __stack_chk_fail
U _setjmp
U abort
U crc32
U deflate
U deflateEnd
U deflateInit2_
U deflateReset
U fflush
U fputc
U fread
U free
U fwrite
U gmtime
U inflate
U inflateEnd
U inflateInit_
U inflateReset
U malloc
U memcmp
U memcpy
U memset
00004700 T png_access_version_number
00018540 T png_build_grayscale_palette
000039b0 T png_check_sig
0001de60 T png_chunk_error
0001def0 T png_chunk_warning
00014160 T png_convert_from_struct_tm
000141a0 T png_convert_from_time_t
00004470 T png_convert_to_rfc1123
00003c80 T png_create_info_struct
00011120 T png_create_read_struct
00010ca0 T png_create_read_struct_2
00015840 T png_create_write_struct
000154c0 T png_create_write_struct_2
00003cf0 T png_data_freer
000043b0 T png_destroy_info_struct
000130f0 T png_destroy_read_struct
00014930 T png_destroy_write_struct
0001db30 T png_error
0001d8f0 T png_free
00003d80 T png_free_data
0001d8b0 T png_free_default
00006e80 T png_get_IHDR
000071a0 T png_get_PLTE
00007410 T png_get_asm_flagmask
00007400 T png_get_asm_flags
00006a90 T png_get_bKGD
000067f0 T png_get_bit_depth
00006ad0 T png_get_cHRM
00006bf0 T png_get_cHRM_fixed
00006a50 T png_get_channels
00006810 T png_get_color_type
000073e0 T png_get_compression_buffer_size
00006870 T png_get_compression_type
000045c0 T png_get_copyright
0001dfb0 T png_get_error_ptr
00006830 T png_get_filter_type
00006cd0 T png_get_gAMA
00006d10 T png_get_gAMA_fixed
00006e40 T png_get_hIST
00004600 T png_get_header_ver
00004620 T png_get_header_version
00006d90 T png_get_iCCP
000067d0 T png_get_image_height
000067b0 T png_get_image_width
000076e0 T png_get_int_32
00006850 T png_get_interlace_type
00004430 T png_get_io_ptr
000045e0 T png_get_libpng_ver
0001da30 T png_get_mem_ptr
00007430 T png_get_mmx_bitdepth_threshold
00007420 T png_get_mmx_flagmask
00007440 T png_get_mmx_rowbytes_threshold
00006fa0 T png_get_oFFs
00007010 T png_get_pCAL
00007130 T png_get_pHYs
00006930 T png_get_pixel_aspect_ratio
000068f0 T png_get_pixels_per_meter
000204b0 T png_get_progressive_ptr
000073a0 T png_get_rgb_to_gray_status
00006770 T png_get_rowbytes
00006790 T png_get_rows
000071f0 T png_get_sBIT
000070e0 T png_get_sCAL
00006e10 T png_get_sPLT
00006d50 T png_get_sRGB
00006a70 T png_get_signature
000072a0 T png_get_tIME
000072e0 T png_get_tRNS
00007230 T png_get_text
00007710 T png_get_uint_16
00007630 T png_get_uint_31
000076b0 T png_get_uint_32
00007370 T png_get_unknown_chunks
000073c0 T png_get_user_chunk_ptr
00007470 T png_get_user_height_max
0000c720 T png_get_user_transform_ptr
00007450 T png_get_user_width_max
00006750 T png_get_valid
00006990 T png_get_x_offset_microns
000069f0 T png_get_x_offset_pixels
00006890 T png_get_x_pixels_per_meter
000069c0 T png_get_y_offset_microns
00006a20 T png_get_y_offset_pixels
000068c0 T png_get_y_pixels_per_meter
00004640 T png_handle_as_unknown
00003c50 T png_info_init
00003b70 T png_info_init_3
00004450 T png_init_io
00020a90 R png_libpng_ver
0001d7b0 T png_malloc
0001d770 T png_malloc_default
0001d940 T png_malloc_warn
0001d9a0 T png_memcpy_check
0001d9d0 T png_memset_check
00004710 T png_mmx_support
000209e0 R png_pass_dsp_mask
00020a50 R png_pass_inc
000209fc R png_pass_mask
00020a6c R png_pass_start
00020a18 R png_pass_yinc
00020a34 R png_pass_ystart
00006400 T png_permit_empty_plte
00006430 T png_permit_mng_features
00020370 T png_process_data
00020400 T png_progressive_combine_row
00012cd0 T png_read_destroy
000126a0 T png_read_end
00012600 T png_read_image
00011690 T png_read_info
00013250 T png_read_png
00011ea0 T png_read_row
00012510 T png_read_rows
00011e00 T png_read_update_info
000046c0 T png_reset_zstream
0000cb70 T png_save_int_32
0000cba0 T png_save_uint_16
0000cb40 T png_save_uint_32
00005320 T png_set_IHDR
00005750 T png_set_PLTE
0000c110 T png_set_add_alpha
00006700 T png_set_asm_flags
00004d60 T png_set_bKGD
00015d70 T png_set_background
0000bfb0 T png_set_bgr
00004da0 T png_set_cHRM
00004f20 T png_set_cHRM_fixed
00006660 T png_set_compression_buffer_size
00015890 T png_set_compression_level
000158b0 T png_set_compression_mem_level
00015990 T png_set_compression_method
000158d0 T png_set_compression_strategy
000158f0 T png_set_compression_window_bits
00015c20 T png_set_crc_action
00015e70 T png_set_dither
0001df80 T png_set_error_fn
00016a40 T png_set_expand
00016a80 T png_set_expand_gray_1_2_4_to_8
0000c0a0 T png_set_filler
00014a60 T png_set_filter
00014d00 T png_set_filter_heuristics
00014580 T png_set_flush
000050a0 T png_set_gAMA
00005180 T png_set_gAMA_fixed
000169c0 T png_set_gamma
00016aa0 T png_set_gray_1_2_4_to_8
00016ae0 T png_set_gray_to_rgb
00005240 T png_set_hIST
000059c0 T png_set_iCCP
0000c070 T png_set_interlace_handling
000066e0 T png_set_invalid
0000c180 T png_set_invert_alpha
0000c1a0 T png_set_invert_mono
00006450 T png_set_keep_unknown_chunks
0001da00 T png_set_mem_fn
00006720 T png_set_mmx_thresholds
00005470 T png_set_oFFs
000054a0 T png_set_pCAL
00005720 T png_set_pHYs
0000bff0 T png_set_packing
0000c020 T png_set_packswap
00016a60 T png_set_palette_to_rgb
00020450 T png_set_progressive_read_fn
00013620 T png_set_read_fn
00013230 T png_set_read_status_fn
000065c0 T png_set_read_user_chunk_fn
00016d80 T png_set_read_user_transform_fn
00016c70 T png_set_rgb_to_gray
00016b00 T png_set_rgb_to_gray_fixed
000065e0 T png_set_rows
00005830 T png_set_sBIT
000056c0 T png_set_sCAL
00005fb0 T png_set_sPLT
00005860 T png_set_sRGB
00005880 T png_set_sRGB_gAMA_and_cHRM
0000c040 T png_set_shift
00003880 T png_set_sig_bytes
00015e30 T png_set_strip_16
00015e50 T png_set_strip_alpha
0001dfd0 T png_set_strip_error_numbers
0000bfd0 T png_set_swap
0000c160 T png_set_swap_alpha
00005df0 T png_set_tIME
00005e30 T png_set_tRNS
00016ac0 T png_set_tRNS_to_alpha
00005d90 T png_set_text
000063c0 T png_set_unknown_chunk_location
000061e0 T png_set_unknown_chunks
00006730 T png_set_user_limits
0000c6f0 T png_set_user_transform_info
000137c0 T png_set_write_fn
000159f0 T png_set_write_status_fn
00015a10 T png_set_write_user_transform_fn
000038f0 T png_sig_cmp
00011e70 T png_start_read_image
0001dcf0 T png_warning
0000cee0 T png_write_chunk
0000cd10 T png_write_chunk_data
0000ce60 T png_write_chunk_end
0000cc60 T png_write_chunk_start
000146d0 T png_write_destroy
00013f60 T png_write_end
000145a0 T png_write_flush
000144b0 T png_write_image
00013b20 T png_write_info
00013860 T png_write_info_before_PLTE
00015a30 T png_write_png
000141d0 T png_write_row
00014530 T png_write_rows
U pow
U stderr
U strlen
U strtod
I searched for png.h file :---
# locate png.h
/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/src/3rdparty/libpng/png.h
/usr/lib/syslinux/com32/include/png.h
Now lib png source is inside QT_source also :---
/qt-everywhere-opensource-src-4.8.5/src/3rdparty/libpng$ ls
ANNOUNCE pngconf.h pnglibconf.h pngrtran.c pngwrite.c
CHANGES pngdebug.h pngmem.c pngrutil.c pngwtran.c
INSTALL pngerror.c pngpread.c pngset.c pngwutil.c
libpng-manual.txt pngget.c pngpriv.h pngstruct.h README
LICENSE png.h pngread.c pngtrans.c
png.c pnginfo.h pngrio.c pngwio.c
==================================== EDIT ==========================
I performed these steps, both failed :---
1> I followed following link http://www.brunolinux.com/02-The_Terminal/ldconfig.html and
added following line to ld.so.conf file /lib/i386-linux-gnu/ . Then i run the ldconfig command.
I directly copied the command line result of make & added -lpng to it & run it
qt-everywhere-opensource-src-4.8.5/tools/qvfb$ g++ -Wl,-rpath-link,/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -Wl,-O1 -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -o ../../bin/qvfb .obj/release-shared/qvfb.o .obj/release-shared/qvfbview.o .obj/release-shared/qvfbratedlg.o .obj/release-shared/main.o .obj/release-shared/qanimationwriter.o .obj/release-shared/qvfbprotocol.o .obj/release-shared/qvfbshmem.o .obj/release-shared/qvfbmmap.o .obj/release-shared/qlock.o .obj/release-shared/qwslock.o .obj/release-shared/qwssignalhandler.o .obj/release-shared/deviceskin.o .obj/release-shared/qvfbx11view.o .obj/release-shared/x11keyfaker.o .obj/release-shared/moc_qvfb.o .obj/release-shared/moc_qvfbview.o .obj/release-shared/moc_qvfbratedlg.o .obj/release-shared/moc_gammaview.o .obj/release-shared/moc_qvfbprotocol.o .obj/release-shared/moc_qvfbshmem.o .obj/release-shared/moc_qvfbmmap.o .obj/release-shared/moc_deviceskin.o .obj/release-shared/moc_qvfbx11view.o .obj/release-shared/moc_x11keyfaker.o .obj/release-shared/qrc_ClamshellPhone.o .obj/release-shared/qrc_SmartPhone2.o .obj/release-shared/qrc_SmartPhone.o .obj/release-shared/qrc_SmartPhoneWithButtons.o .obj/release-shared/qrc_TouchscreenPhone.o .obj/release-shared/qrc_PortableMedia.o .obj/release-shared/qrc_S60-QVGA-Candybar.o .obj/release-shared/qrc_S60-nHD-Touchscreen.o .obj/release-shared/qrc_qvfb.o -lpng -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lXtst -lQtOpenGL -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lQtGui -lQtCore -lGL -lpthread -lXext -lX11 -lm
/usr/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
make: *** [../../bin/qvfb] Error 1
2> Above step did not worked so i performed below step.
I modified the qvfb.pro file of QT & added the option at the end LIBS += -lpng
qt-everywhere-opensource-src-4.8.5/tools/qvfb$ sudo make
/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/bin/qmake -spec ../../mkspecs/linux-g++ -o Makefile qvfb.pro
g++ -Wl,-rpath-link,/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -Wl,-O1 -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -Wl,-rpath,/opt/Qt5.1.1/4.8.5_X11/gcc/lib -o ../../bin/qvfb .obj/release-shared/qvfb.o .obj/release-shared/qvfbview.o .obj/release-shared/qvfbratedlg.o .obj/release-shared/main.o .obj/release-shared/qanimationwriter.o .obj/release-shared/qvfbprotocol.o .obj/release-shared/qvfbshmem.o .obj/release-shared/qvfbmmap.o .obj/release-shared/qlock.o .obj/release-shared/qwslock.o .obj/release-shared/qwssignalhandler.o .obj/release-shared/deviceskin.o .obj/release-shared/qvfbx11view.o .obj/release-shared/x11keyfaker.o .obj/release-shared/moc_qvfb.o .obj/release-shared/moc_qvfbview.o .obj/release-shared/moc_qvfbratedlg.o .obj/release-shared/moc_gammaview.o .obj/release-shared/moc_qvfbprotocol.o .obj/release-shared/moc_qvfbshmem.o .obj/release-shared/moc_qvfbmmap.o .obj/release-shared/moc_deviceskin.o .obj/release-shared/moc_qvfbx11view.o .obj/release-shared/moc_x11keyfaker.o .obj/release-shared/qrc_ClamshellPhone.o .obj/release-shared/qrc_SmartPhone2.o .obj/release-shared/qrc_SmartPhone.o .obj/release-shared/qrc_SmartPhoneWithButtons.o .obj/release-shared/qrc_TouchscreenPhone.o .obj/release-shared/qrc_PortableMedia.o .obj/release-shared/qrc_S60-QVGA-Candybar.o .obj/release-shared/qrc_S60-nHD-Touchscreen.o .obj/release-shared/qrc_qvfb.o -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lXtst -lpng -lQtOpenGL -L/home/dinesh/qt_source/qt_source_x11/qt-everywhere-opensource-src-4.8.5/lib -L/usr/X11R6/lib -lQtGui -lQtCore -lGL -lpthread -lXext -lX11 -lm
/usr/bin/ld: cannot find -lpng
collect2: ld returned 1 exit status
make: *** [../../bin/qvfb] Error 1
============================= EDIT =================
Thanks everyone its working.
creating softlink works :--
ln -s /lib/i386-linux-gnu/libpng12.so.0 /lib/i386-linux-gnu/libpng.so
this worked :---
-L/lib/i386-linux-gnu -lpng
Also you can directly modify your qvfb.pro file, instead of putting in directly in command line :---
LIBS = -L/lib/i386-linux-gnu -lpng
I had the same problem. If you look at the compilation line to link qvfb that causes the error, you'll see that it just misses -lpng to indicate to link with libpng. It's just a workaround, but once you've run 'make' once, you can simply copy and past the faulty compilation line and add -lpng at the end. It worked for me.
I need to find the offset of an instruction inside a program. Let's say I wanna find the position of open *system_call* in the program cat.
I used objdump to find the position inside the bin file.
objdump -T /bin/cat | grep open :
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 fdopen
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 open
0000000000000000 DF *UND* 0000000000000000 GLIBC_2.2.5 iconv_ope
Unfortunately, analyzing the sible table I cannot retrieve that information because the open function is linked dynamically. The open function is implemented in glibc.
Using the same approach on the Glibc library I retrieved the offset of the open function, though this offset refers to the position inside the /lib/libc.so.6 So this is not useful for me.
00000000000778d0 g DF .text 00000000000004e3 GLIBC_2.2.5 _IO_file_fopen
000000000006be50 g DF .text 000000000000000a GLIBC_2.2.5 fopen
0000000000073540 g DF .text 00000000000000f6 GLIBC_2.4 open_wmemstream
0000000000121cf0 w DF .text 0000000000000107 GLIBC_2.2.5 posix_openpt
000000000006d480 g DF .text 00000000000003bf GLIBC_2.2.5 _IO_proc_open
00000000000e38b0 g DF .text 0000000000000021 GLIBC_2.7 __open64_2
000000000006bfe0 g DF .text 00000000000000fa GLIBC_2.2.5 fopencookie
000000000006d840 g DF .text 0000000000000098 GLIBC_2.2.5 popen
00000000000ddd30 w DF .text 000000000000005e GLIBC_2.2.5 __open64
000000000006be50 g DF .text 000000000000000a GLIBC_2.2.5 _IO_fopen
00000000000de020 w DF .text 0000000000000020 GLIBC_2.7 __openat64_2
00000000000e84d0 g DF .text 0000000000000066 GLIBC_2.2.5 openlog
00000000000ddd30 w DF .text 000000000000005e GLIBC_2.2.5 open64
00000000003aa630 g DO .bss 0000000000000008 GLIBC_PRIVATE _dl_open_hook
00000000000ec840 g DF .text 000000000000005e GLIBC_2.14 open_by_handle_at
0000000000034250 g DF .text 0000000000000254 GLIBC_2.2.5 catopen
000000000006d840 g DF .text 0000000000000098 GLIBC_2.2.5 _IO_popen
0000000000075330 g DF .text 0000000000000355 GLIBC_2.2.5 freopen64
0000000000075eb0 g DF .text 00000000000001d8 GLIBC_2.2.5 fmemopen
00000000000b5b90 w DF .text 000000000000008b GLIBC_2.4 fdopendir
00000000000de020 g DF .text 0000000000000020 GLIBC_2.7 __openat_2
00000000000b5640 w DF .text 000000000000000d GLIBC_2.2.5 opendir
00000000000e3880 g DF .text 0000000000000021 GLIBC_2.7 __open_2
00000000000ddd30 w DF .text 000000000000005e GLIBC_2.2.5 __open
00000000000777f0 g DF .text 00000000000000d2 GLIBC_2.2.5 _IO_file_open
0000000000074370 g DF .text 00000000000000e6 GLIBC_2.2.5 open_memstream
0000000000073ab0 g DF .text 000000000000035d GLIBC_2.2.5 freopen
00000000000345a0 g DF .text 0000000000000837 GLIBC_PRIVATE __open_catalog
00000000000ddd30 w DF .text 000000000000005e GLIBC_2.2.5 open
000000000006b540 g DF .text 0000000000000249 GLIBC_2.2.5 fdopen
0000000000022b20 g DF .text 000000000000020a GLIBC_2.2.5 iconv_open
00000000000e2130 g DF .text 0000000000000373 GLIBC_2.2.5 fts_open
00000000000ddf80 w DF .text 0000000000000092 GLIBC_2.4 openat
000000000006be50 w DF .text 000000000000000a GLIBC_2.2.5 fopen64
00000000000ddf80 w DF .text 0000000000000092 GLIBC_2.4 openat64
0000000000122f30 g DF .text 0000000000000046 GLIBC_PRIVATE __libc_dlopen_mode
00000000000dc650 g DF .text 00000000000000b8 GLIBC_2.2.5 posix_spawn_file_actions_addopen
000000000006b540 g DF .text 0000000000000249 GLIBC_2.2.5 _IO_fdopen
I need the offset to set a tracer when the open function is called by the cat program. If I put a tracer on the Glibc lib I will trace that syscall each time it will be called.
Can you help me?
Have I been clear explaining my problem?
Thanks
Well, cat itself doesn't contain the open system call. It lives in glibc.so. cat calls the library to make use of the function. That's why when you look inside cat, there is no open function in it, it's "undefined" and refers to glibc.so.
You can of course find where cat calls open:
If you search for the symbol open#plt in the symbol table, that's where it calls open. For example objdump -dwhich cat|grep open#plt shows 0000000000401910 <open#plt>:, which is where the jump to the glibc function takes place.
I hope this helps.
Use /proc/$PID/maps to see where a shared object library's segments are loaded in the process memory. E.g.:
# grep libc /proc/$$/maps
7f3243879000-7f3243a2e000 r-xp 00000000 08:01 270246 /lib/x86_64-linux-gnu/libc-2.15.so
7f3243a2e000-7f3243c2d000 ---p 001b5000 08:01 270246 /lib/x86_64-linux-gnu/libc-2.15.so
7f3243c2d000-7f3243c31000 r--p 001b4000 08:01 270246 /lib/x86_64-linux-gnu/libc-2.15.so
7f3243c31000-7f3243c33000 rw-p 001b8000 08:01 270246 /lib/x86_64-linux-gnu/libc-2.15.so
-- so there are 4 segments of libc.so loaded into the address space of the process, we need an executable one, which is marked r-xp ("Read, no write, eXecute, Private"), its start is at *0x7f3243879000. You already know how to get relative offset for a symbols, e.g. freopen from your example is at 000000000000035d from the start of the executable segment, so in my example the symbol can be found at 7f3243879000 + 35d = *0x7f324387935d in the process memory.
A debugger with decent dynamic linker integration should handle this for you, resolving the symbolic name at which you wish to set a breakpoint. It can even do this when the library hasn't yet been loaded at the time you attempt to set the breakpoint.
However, be aware that there's not much of a syscall you can trace with a user-mode debugger. You can trace through the little libc stub which might do something such as re-order paramaters between the platform's C calling convention and its often different syscall convention, or implement a deprecated syscall as a wrapper around a new one, but the actual kernel mode implementation can only be traced with a kernel debugger.
You might also be interested in the strace program, which prints out the paramaters and return values of all syscalls. Another thing usefull in some cases is dynamic library interception, for example using LD_PRELOAD.
I get this error while loading a lib with dlopen():
Cannot dlopen load module '/usr/lib/pa20_64/libpthread.1' because it contains thread specific data.
I looked this up on google and the following export fixed it.
export LD_PRELOAD=/usr/lib/hpux64/libpthread.so.1
Can anybody tell me what exactly LD_PRELOAD does and why I have to preload this lib? Why does the linker not load it?
Compiling with -lpthread does not help either.
ENV: HP-UX hhtenb1 B.11.31 U ia64 3881169896 unlimited-user license
I can't tell you all the details on HPUX, but try linking your program with -lpthread - that may solve your problem.
As is, the library you're dlopen()ing seems to be digging around at run-time to find a version of libpthread. LD_PRELOAD just loads the specified library as if you'd dlopened them, but it does it before the program has a chance to start running.
Not sure of details, but a vague guess: some library you're using has called the pthread static data functions before your dlopen triggers a load of libpthread (but why would it try to load pthread then if the first library had it as a dependency? - not sure / maybe that indicates the former library statically linked some pthread content?).
We had this error below on hpux-11.31 IA64 running DB2-10.1.2 and doing the
"export LD_PRELOAD=/usr/lib/hpux64/libpthread.so.1"
fixed it.
DATA #2 : String, 49 bytes
/home/db2inst1/sqllib/lib64/icc/libgsk8iccs_64.so
CALLSTCK: (Static functions may not be resolved correctly, as they are resolved to the nearest symbol)
[0] 0xC000000032488900 pdOSSeLoggingCallback + 0x980
[1] 0xC000000010CC5A00 ossLog + 0x4E0
[2] 0xC000000010CC5610 ossLog + 0xF0
[3] 0xC00000003255E100 _Z27cryptDynamicLoadGSKitCryptoPc + 0x5F0
[4] 0xC00000003255F460 cryptContextRealInit + 0x200
[5] 0xC000000032561950 cryptContextCheckAndInit + 0x130
[6] 0xC000000032561B70 cryptDHInit + 0x120
[7] 0xC00000003384FBD0 sqlexSlcServerEncryptAccsec + 0x170
[8] 0xC00000003384F7B0 _Z33sqlexSlcServerEncryptAuthenticateP14db2UCinterfacelPj + 0xF0
[9] 0xC0000000321FB7D0 _Z20sqlexAppAuthenticateP14db2UCinterface + 0x1A60
[10] 0xC0000000321F8920 _Z18sqljrDrdaArConnectP14db2UCinterface + 0x140
[11] 0xC0000000321E96F0 _Z16sqleUCdrdaARinitP14db2UCconHandle + 0x230
[12] 0xC000000032238CD0 sqleUCappConnect + 0x13C0
[13] 0xC000000032647B20 _Z14CLI_sqlConnectP15CLI_CONNECTINFOP5sqlcaP19CLI_ERRORHEADERINFO + 0x32A0
[14] 0xC0000000325D5710 _Z11SQLConnect2P15CLI_CONNECTINFOPhsS1_sS1_sS1_sh + 0xA10
[15] 0xC0000000325ADB90 _Z17SQLDriverConnect2P15CLI_CONNECTINFOPvPhsS2_sPsthhP19CLI_ERRORHEADERINFO + 0x26E0
[16] 0xC0000000325AAC00 _Z11SQLConnect1P15CLI_CONNECTINFOPhsS1_sS1_s + 0xB60
[17] 0xC0000000325A8E30 SQLConnect + 0xC10
[18] 0x4000000000001EA0 main + 0x620
[19] 0xC00000000006E9B0 _DYNAMIC + 0xC00000000006E993