Building client on FreeBSD without bundled crypto++

The headless client successfully builds and runs on FreeBSD using the configure options “–enable-headless” and “–enable-embedded-cryptopp”.

I’m working on creating a port, but I am unable to get the client to build using FreeBSD’s own cryptopp port. FreeBSD frowns on ports using bundled libraries unless absolutely necessary (https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/bundled-libs.html).

When you remove the “–enable-embedded-cryptopp” configure option the build errors trying to find a cryptopp header file:

In file included from Server.cpp:44:
./md5.h:124:10: fatal error: ‘cryptopp/md5.h’ file not found

The file md5.h does exist, under /usr/local/include/cryptopp/. I can get the build to proceed further by adding “–with-crypto-prefix=/usr/local/include/cryptopp”, but it then errors finding libcryptopp.a:

c++: error: no such file or directory: ‘/usr/local/include/cryptopp/libcryptopp.a’

The libcryptopp.a does exist, but it’s under /usr/local/lib/.

Any suggestions?

Note that the server builds fine with FreeBSD’s own cryptopp port. I’ve already submitted a port for the server: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225148

Does it work if you run configure with ./configure CPPFLAGS="-I/usr/local/include"?

I guess I also found the makefile difference that may cause this.

There are other bundled libs btw. like e.g. SQLite (the largest), lua. I can add another configure flag for that, but you are really on your own wrt. to testing there.

Thanks.

It works with ./configure --enable-headless CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib".

If you want to add configure flags for other bundled libraries, I’d be happy to test on FreeBSD. That goes for the server as well, if it has additional bundled libraries too.