• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ /usr/bin/ld: cannot find -lcryptopp-static

junaoloko

New Member
Joined
Apr 15, 2022
Messages
8
Reaction score
0
/usr/bin/ld: cannot find -lcryptopp-static
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/tfs.dir/build.make:1476: bin/tfs] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: src/CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

otbr 12.91
 
mesmo erro persistiu


/usr / bin / ld: não é possível encontrar -lcryptopp-static
collect2: erro: ld retornou 1 status de saída
make [ 2 ]: *** [ src / CMakeFiles / tfs.dir / build.make: 1476: bin / tfs ] Erro 1
make [ 1 ]: *** [ CMakeFiles / Makefile2: 98: src / CMakeFiles / tfs.dir / all ] Erro 2
make: *** [ Makefile: 91: all ] Erro 2
Post automatically merged:

8")
-- Configuring done (1.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/Dunamaster/build
[ 1%] Linking CXX executable ../bin/tfs
/usr/bin/ld: cannot find -lcryptopp-static
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/tfs.dir/build.make:1476: bin/tfs] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: src/CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
root@OTS:/home/Dunamaster/build#
 
mesmo erro persistiu


/usr / bin / ld: não é possível encontrar -lcryptopp-static
collect2: erro: ld retornou 1 status de saída
make [ 2 ]: *** [ src / CMakeFiles / tfs.dir / build.make: 1476: bin / tfs ] Erro 1
make [ 1 ]: *** [ CMakeFiles / Makefile2: 98: src / CMakeFiles / tfs.dir / all ] Erro 2
make: *** [ Makefile: 91: all ] Erro 2
Post automatically merged:

8")
-- Configuring done (1.5s)
-- Generating done (0.0s)
-- Build files have been written to: /home/Dunamaster/build
[ 1%] Linking CXX executable ../bin/tfs
/usr/bin/ld: cannot find -lcryptopp-static
collect2: error: ld returned 1 exit status
make[2]: *** [src/CMakeFiles/tfs.dir/build.make:1476: bin/tfs] Error 1
make[1]: *** [CMakeFiles/Makefile2:98: src/CMakeFiles/tfs.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
root@OTS:/home/Dunamaster/build#
I sended you a message with the correct cryptopp file.
You are trying to compile Hellgrave v5.5 server, and it's missing a lib file on vcpkg installation, that i uploaded and i have already sended you a private message with download link, follow steps and add it to your dataserver/out/vcpkg_installed/x64windows or linux/lib, and /debug/lib.

This will work on windows, on linux i think i will fix also this problem.
 

I'd say latest canary no longer needs cryptopp, so if the sources you have uses it I'd add that back (assuming you're using canary):
 
Last edited:

I'd say latest canary no longer needs cryptopp, so if the sources you have uses it I'd add that back (assuming you're using canary):
It was old otservbr because i didnt find tfs 1.3 clean when i start the project.
Canary is different and this 12.72 needs crypto.
But i never use linux and i cannot integrate linux compilation on visual because i got an error and i dont know how to fix it. But is already compiled waiting v6.0 just play without changing sources , sorry. I will try to talk with the guy who compile it.
 
It was old otservbr because i didnt find tfs 1.3 clean when i start the project.
Canary is different and this 12.72 needs crypto.
But i never use linux and i cannot integrate linux compilation on visual because i got an error and i dont know how to fix it. But is already compiled waiting v6.0 just play without changing sources , sorry. I will try to talk with the guy who compile it.
Try to build on docker then
 
Você pode fazer alterações como alterações para min no unbutu 20.04 ?
Era velho otservbr porque eu não achei o tfs 1.3 limpo quando iniciei o projeto.
Canário é diferente e este 12,72 precisa de criptografia.
Mas nunca uso o linux e não consigo integrar a compilação do linux no visual porque recebi um erro e não sei como corrigi-lo. Mas já está compilado esperando v6.0, basta jogar sem alterar as fontes, desculpe. Vou tentar conversar com o cara que o compila.
assim que você puder me dar uma luz, tentei de tudo
Post automatically merged:

Try to build on docker then
as soon as you can give me a light, I've tried everything
 
Salve galera, consegui resolver essa bronca, então vou deixar aqui o meu passo a passo.

Quando tentei executar ele falava que não encontrava o pacote -lcryptopp-static então fui procurar onde é que ele realmente estava sendo chamado e vi que era dentro do diretório: otserv/src/CMakeList.txt e por volta da linha 242 tinha a chamada do cryptopp-static.
Mas essa pasta com o pacote cryptopp realmente não existia, pois se trata de uma instalação manual, então resolvi criar um shellscript para baixar o Cryptopp diretamente do site deles e compilar manualmente.
Então no shellscript pedi para ele salvar no diretório do linux /usr/local/cryptopp e lá no arquivo CMakeList.txt alterei o nome de cryptoapp-static e deixei somente cryptopp que foi o nome da pasta que instalei o pacote, depois só recompilei e voalá, compilou com sucesso.


Vocês podem criar o arquivo para ser o shellscript em qualquer lugar, mas terá que executar o mesmo com o sudo ou como root.
eu chamei o arquivo $ nano install-cryptoapp.sh e depois executei sh install-cryptoapp.sh e depois daqui só esperar finalizar a instalação do pacote e recompilar sua source e GG.

Espero ter ajudado alguém com esse problema também. Tmj o/​
Bash:
#!/bin/bash

# Define a variável de destino da instalação
INSTALL_DIR=/usr/local/cryptopp

# Baixa a versão mais recente do Crypto++ do site oficial
wget https://www.cryptopp.com/cryptopp870.zip -O cryptopp.zip

# Descompacta o arquivo baixado
unzip cryptopp.zip -d cryptopp

# Acessa o diretório da biblioteca

cd cryptopp

# Compila a biblioteca em modo estático
make libcryptopp.a

# Cria o diretório de destino da instalação
mkdir -p $INSTALL_DIR/lib $INSTALL_DIR/include

# Copia a biblioteca e o arquivo de cabeçalho para o diretório de destino
cp libcryptopp.a $INSTALL_DIR/lib/
cp *.h $INSTALL_DIR/include/

# Atualiza as bibliotecas compartilhadas do sistema
sudo ldconfig

# Remove os arquivos temporários
cd ..
rm -rf cryptopp.zip cryptopp


Site com a lista das versões do cryptopp:
Crypto++ Library 8.7 | Free C++ Class Library of Cryptographic Schemes (cryptopp.com)
 
Back
Top