akopytov / sysbench

Scriptable database and system performance benchmark
GNU General Public License v2.0
6.09k stars 1.08k forks source link

Compile Sysbench statically #441

Open clibdev opened 2 years ago

clibdev commented 2 years ago

How Sysbench can be compiled statically on Ubuntu 24.04. I tried to add LDFLAGS="-static" to configure but during compilation I got error.

./autogen.sh
./configure LDFLAGS="-static"
make -j
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
collect2: error: ld returned 1 exit status
qianfei11 commented 11 months ago

try this: https://zhuanlan.zhihu.com/p/630082500

pengzechen commented 1 month ago

How Sysbench can be compiled statically on Ubuntu 24.04. I tried to add LDFLAGS="-static" to configure but during compilation I got error.

./autogen.sh
./configure LDFLAGS="-static"
make -j
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginT.o: relocation R_X86_64_32 against hidden symbol `__TMC_END__' can not be used when making a shared object
collect2: error: ld returned 1 exit status

Are you done?