CryptoPP build/install on Fedora 26

520 views
Skip to first unread message

Richard Závodný

unread,
Sep 25, 2017, 10:58:17 AM9/25/17
to Crypto++ Users
Hi, how can I install/build CPP on Fedora 26? I tried to install cryptopp-devel using dnf, but I can't compile my code. At Ubuntu this code worked normally.

Jeffrey Walton

unread,
Sep 25, 2017, 11:33:43 AM9/25/17
to Crypto++ Users


On Monday, September 25, 2017 at 10:58:17 AM UTC-4, Richard Závodný wrote:
Hi, how can I install/build CPP on Fedora 26? I tried to install cryptopp-devel using dnf, but I can't compile my code. At Ubuntu this code worked normally.

I believe Fedora place Crypto++ headers in <cryptopp>, not <crypto++> (or maybe vice versa).


Jeff

Richard Závodný

unread,
Sep 25, 2017, 11:54:44 AM9/25/17
to Crypto++ Users
Right now i'm getting error while loading shared libraries: libcryptopp.so.5.6: cannot open shared object file: No such file or directory error. Why? How to fix it. BTW. I also use -lcryptopp as a param using g++ command. Is this param right? When I change it to -lcrypto++ I get the /usr/bin/ld: cannot find -lcrypto++, so i think that -lcryptopp is ok, but not sure about it.

Jeffrey Walton

unread,
Sep 25, 2017, 12:03:10 PM9/25/17
to Crypto++ Users


On Monday, September 25, 2017 at 11:54:44 AM UTC-4, Richard Závodný wrote:
Right now i'm getting error while loading shared libraries: libcryptopp.so.5.6: cannot open shared object file: No such file or directory error. Why? How to fix it. BTW. I also use -lcryptopp as a param using g++ command. Is this param right? When I change it to -lcrypto++ I get the /usr/bin/ld: cannot find -lcrypto++, so i think that -lcryptopp is ok, but not sure about it.

No ideas. You have not told us what you have done, so there's not much for us to suggest. The Linux page on the wiki will probably be helpful for you if you have not compiled and linked before. Also see https://www.cryptopp.com/wiki/Linux.


Jeff

Richard Závodný

unread,
Sep 25, 2017, 12:40:57 PM9/25/17
to Crypto++ Users
I installed CPP using dnf (cryptopp package), that's all. Now i tried to build the library using guide on wiki page you posted, but still it don't work. :(

Jeffrey Walton

unread,
Sep 25, 2017, 12:49:56 PM9/25/17
to Richard Závodný, Crypto++ Users
On Mon, Sep 25, 2017 at 12:40 PM, Richard Závodný
<richard...@gmail.com> wrote:
> I installed CPP using dnf (cryptopp package), that's all. Now i tried to
> build the library using guide on wiki page you posted, but still it don't
> work. :(

If you installed it using dnf then you don't need to build the library.

Move onto the test program.

Jeff

Ingo Naumann

unread,
Sep 25, 2017, 1:00:05 PM9/25/17
to cryptop...@googlegroups.com

In which directory does Cryptopp install the file libcryptopp.so.5.6? In /usr/lib or in /usr/local/lib?

--
--
You received this message because you are subscribed to the "Crypto++ Users" Google Group.
To unsubscribe, send an email to cryptopp-user...@googlegroups.com.
More information about Crypto++ and this group is available at http://www.cryptopp.com.
---
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cryptopp-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Richard Závodný

unread,
Sep 25, 2017, 1:42:47 PM9/25/17
to Crypto++ Users
/usr/local/lib

Jeffrey Walton

unread,
Sep 25, 2017, 1:55:19 PM9/25/17
to Crypto++ Users


On Monday, September 25, 2017 at 1:42:47 PM UTC-4, Richard Závodný wrote:
/usr/local/lib

Something does not sound right. Here is Fedora's spec file for Crypto++: http://pkgs.fedoraproject.org/cgit/rpms/cryptopp.git/tree/cryptopp.pc?h=f27. Fedora installs into /usr/lib, not /usr/local. Also see https://fedoraproject.org/wiki/Packaging:Guidelines.

How did you install with dnf and end up with files in /usr/local? If you don't provide the necessary information to troubleshot, then there's not much we can do to help.

Jeff

Richard Závodný

unread,
Sep 25, 2017, 2:18:12 PM9/25/17
to Crypto++ Users
So... I uninstalled, delete all files from my previous attempts and then installed cryptopp package using dnf. Then i tried compile my program and getting error: fatal error: cryptopp/aes.h: No such file or directory #include <cryptopp/aes.h>, then make search in my system files and found two files (libcryptopp.so.6 and libcryptopp.so.6.0.0 at /usr/lib64). Really don't know what to do. :(

Jeffrey Walton

unread,
Sep 25, 2017, 2:24:12 PM9/25/17
to Crypto++ Users


On Monday, September 25, 2017 at 2:18:12 PM UTC-4, Richard Závodný wrote:
So... I uninstalled, delete all files from my previous attempts and then installed cryptopp package using dnf.

What is the exact command you used to install the library using dnf?
 
Then i tried compile my program and getting error: fatal error: cryptopp/aes.h: No such file or directory #include <cryptopp/aes.h>,

What is the exact command you used to compile (and maybe link) the library?
 
then make search in my system files and found two files (libcryptopp.so.6 and libcryptopp.so.6.0.0 at /usr/lib64).

Crypto++ 6.0 has not been released yet. Something is not right.

It looks like Fedora ships with an SONAME that includes 5.6.3. Did you delete the system's Crypto++ and keep a copy that you tried to build and install? Also see http://pkgs.fedoraproject.org/cgit/rpms/cryptopp.git/tree/cryptopp.pc?h=f27.

Jeff

Richard Závodný

unread,
Sep 25, 2017, 2:42:59 PM9/25/17
to Crypto++ Users

1) sudo dnf install cryptopp
2) g++ test.cpp -o test -lcryptopp

BTW. The search image is on the bottom of this post.

Richard Závodný

unread,
Sep 25, 2017, 2:52:05 PM9/25/17
to Crypto++ Users
OMG. Now i tried to install cryptopp-devel and it WORKS! Finally. There must was be some conflict files, or... whatever. It works, I'm happy. Thanks for your help and time. :)
Reply all
Reply to author
Forward
0 new messages