Make install doesnt compile succesfully for urbackup server on freenas jail

Im following the instructions on https://www.urbackup.org/freenasserverinstall.html to install in freenas jail but i come up with the following error:

Shell
( )
6 warnings and 1 error generated.
*** [urbackupsrv-Server.o] Error code 1

make[1]: stopped in /urbackup-server-2.2.11
— libfastcgi/urbackupsrv-fastcgi.o —
mv -f libfastcgi/.deps/urbackupsrv-fastcgi.Tpo libfastcgi/.deps/urbackupsrv-fast
cgi.Po
— urbackupsrv-md5.o —
In file included from md5.cpp:49:
./md5.h:149:2: error: unknown type name ‘byte’; did you mean ‘CryptoPP::byte’?
byte digest[CryptoPP::Weak::MD5::DIGESTSIZE];
^~~~
CryptoPP::byte
/usr/local/include/cryptopp/config.h:237:23: note: ‘CryptoPP::byte’ declared her
e
typedef unsigned char byte;
^
md5.cpp:582:13: warning: using the result of an assignment as a condition withou
t parentheses [-Wparentheses]
while (len = (int)fread(buffer, 1, 1024, file))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
md5.cpp:582:13: note: place parentheses around the assignment to silence this wa
rning
while (len = (int)fread(buffer, 1, 1024, file))
^
( )
md5.cpp:582:13: note: use ‘==’ to turn this assignment into an equality comparis
on
while (len = (int)fread(buffer, 1, 1024, file))
^
==
1 warning and 1 error generated.
*** [urbackupsrv-md5.o] Error code 1

make[1]: stopped in /urbackup-server-2.2.11
— urbackupsrv-stringtools.o —
6 warnings generated.
mv -f .deps/urbackupsrv-stringtools.Tpo .deps/urbackupsrv-stringtools.Po
2 errors

make[1]: stopped in /urbackup-server-2.2.11
*** [install-recursive] Error code 1

make: stopped in /urbackup-server-2.2.11
1 error

make: stopped in /urbackup-server-2.2.11
root@ur:/urbackup-server-2.2.11 #
root@ur:/urbackup-server-2.2.11 #

any idea why it wont compitle? Everything is vanilla per the instructions and all seem to be error free until the make install command

What version/build of FreeNAS are you using?

11 I finally got it working with pkg install rather than compile and make after finding another link which pointed me to that

Nice on freenas in any case

The pre-configured Urbackup Server package has disappeared on my test FreeNAS system, the jail system in freenas is under major flux atm. I’m letting it settle down before re-investigating.

I’m on FreeNAS 11.2 RC1 and unable to compile too. Here the error when I ‘make install’ Any clue ? It used to work fine.

In file included from Server.cpp:44:
./md5.h:149:2: error: unknown type name ‘byte’; did you mean ‘CryptoPP::byte’?
byte digest[CryptoPP::Weak::MD5::DIGESTSIZE];
^~~~
CryptoPP::byte
/usr/local/include/cryptopp/config.h:237:23: note: ‘CryptoPP::byte’ declared here
typedef unsigned char byte;
^
In file included from Server.cpp:52:
In file included from ./utf8/utf8.h:31:
./utf8/utf8/checked.h:120:58: warning: ‘&’ within ‘|’ [-Wbitwise-op-parentheses]
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
~~~~~~^~ ~
./utf8/utf8/checked.h:120:58: note: place parentheses around the ‘&’ expression to silence this warning
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
^
( )
./utf8/utf8/checked.h:125:58: warning: ‘&’ within ‘|’ [-Wbitwise-op-parentheses]
*(result++) = static_cast<uint8_t>((cp >> 12)& 0x3f | 0x80);
~~~~~~^~ ~
./utf8/utf8/checked.h:125:58: note: place parentheses around the ‘&’ expression to silence this warning
*(result++) = static_cast<uint8_t>((cp >> 12)& 0x3f | 0x80);
^
( )
./utf8/utf8/checked.h:126:58: warning: ‘&’ within ‘|’ [-Wbitwise-op-parentheses]
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
~~~~~~^~ ~
./utf8/utf8/checked.h:126:58: note: place parentheses around the ‘&’ expression to silence this warning
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
^
( )
In file included from Server.cpp:52:
In file included from ./utf8/utf8.h:32:
./utf8/utf8/unchecked.h:48:62: warning: ‘&’ within ‘|’ [-Wbitwise-op-parentheses]
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
~~~~~~^~ ~
./utf8/utf8/unchecked.h:48:62: note: place parentheses around the ‘&’ expression to silence this warning
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
^
( )
./utf8/utf8/unchecked.h:53:62: warning: ‘&’ within ‘|’ [-Wbitwise-op-parentheses]
*(result++) = static_cast<uint8_t>((cp >> 12)& 0x3f | 0x80);
~~~~~~^~ ~
./utf8/utf8/unchecked.h:53:62: note: place parentheses around the ‘&’ expression to silence this warning
*(result++) = static_cast<uint8_t>((cp >> 12)& 0x3f | 0x80);
^
( )
./utf8/utf8/unchecked.h:54:62: warning: ‘&’ within ‘|’ [-Wbitwise-op-parentheses]
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);
~~~~~~^~ ~
./utf8/utf8/unchecked.h:54:62: note: place parentheses around the ‘&’ expression to silence this warning
*(result++) = static_cast<uint8_t>((cp >> 6) & 0x3f | 0x80);

https://www.urbackup.org/freenasserverinstall.html is updated, so that you don’t need to compile…
If you want to compile try this version: Server 2.3.3 beta/Restore 2.2.2 beta

I’m trying to understand why it does not compile anymore. Any idea ? my urbackup database is not compatible with this precompiled urbackup version.

I managed to ‘make’ urbackup successfully by reverting cryptopp from 7.0.0 to 5.6.5_4. I still get those warnings though. Any clue ?

I filled a bug report to FreeBSD Bugzilla about the update to cryptopp to 7.0.0.

Here is one of there comments :

This is more a problem for Urbackup upstream. I patched the version in the ports tree and they still need to fix their software to work with the new CryptoPP API. From what I can tell, they mostly fixed it. But <source_root>/md5.h still needs patched. Easy hack: change line 149, byte digest[CryptoPP::Weak::MD5::DIGESTSIZE]; to CryptoPP::byte digest[CryptoPP::Weak::MD5::DIGESTSIZE]; You also need to make sure the output of pkgconf --cflags-only-other libcryptopp is appended to your CXXFLAGS (which the port does).

still not compiling with cryptopp 7
any solution since i cant found the pkg for cryptopp 5.6.5_4 anymore

You are right it’s still not compiling on cryptopp 7. I can send you cryptopp-5.6.5_4 if you wish.

Hi adumas,
Please please sync up via private message
i am trying to build on freenas 11.2

Going back to cryptopp-5.6.5_4 resolves the issue. uroni can this be fixed in an upcoming update ? Thanks.

Copy and paste the error message and please tell us which version you are trying to compile?

Just tried an install of 2.3.7 in a fake jail with cryptopp 7.0.0. Here is what I get :

/urbackup-server-2.3.7/luaplugin/src/loslib.c:169: warning: warning: tmpnam() possibly used unsafely; consider using mkstemp()
cryptoplugin/urbackupsrv-AESDecryption.o: In function CryptoPP::CFB_ModePolicy::~CFB_ModePolicy()': AESDecryption.cpp:(.text._ZN8CryptoPP14CFB_ModePolicyD2Ev[_ZN8CryptoPP14CFB_ModePolicyD2Ev]+0xa3): undefined reference to CryptoPP::AlignedDeallocate(void*)’
cryptoplugin/urbackupsrv-CryptoFactory.o: In function CryptoPP::DL_PrivateKeyImpl<CryptoPP::DL_GroupParameters_DSA>::Validate(CryptoPP::RandomNumberGenerator&, unsigned int) const': CryptoFactory.cpp:(.text._ZNK8CryptoPP17DL_PrivateKeyImplINS_22DL_GroupParameters_DSAEE8ValidateERNS_21RandomNumberGeneratorEj[_ZNK8CryptoPP17DL_PrivateKeyImplINS_22DL_GroupParameters_DSAEE8ValidateERNS_21RandomNumberGeneratorEj]+0x11e): undefined reference to CryptoPP::AlignedDeallocate(void*)’
CryptoFactory.cpp:(.text._ZNK8CryptoPP17DL_PrivateKeyImplINS_22DL_GroupParameters_DSAEE8ValidateERNS_21RandomNumberGeneratorEj[_ZNK8CryptoPP17DL_PrivateKeyImplINS_22DL_GroupParameters_DSAEE8ValidateERNS_21RandomNumberGeneratorEj]+0x184): undefined reference to CryptoPP::AlignedDeallocate(void*)' cryptoplugin/urbackupsrv-CryptoFactory.o: In function CryptoPP::DL_GroupParametersImpl<CryptoPP::ModExpPrecomputation, CryptoPP::DL_FixedBasePrecomputationImplCryptoPP::Integer, CryptoPP::DL_GroupParameters_IntegerBased>::DL_GroupParametersImpl()’:
CryptoFactory.cpp:(.text._ZN8CryptoPP22DL_GroupParametersImplINS_20ModExpPrecomputationENS_30DL_FixedBasePrecomputationImplINS_7IntegerEEENS_31DL_GroupParameters_IntegerBasedEEC2Ev[_ZN8CryptoPP22DL_GroupParametersImplINS_20ModExpPrecomputationENS_30DL_FixedBasePrecomputationImplINS_7IntegerEEENS_31DL_GroupParameters_IntegerBasedEEC2Ev]+0x150): undefined reference to CryptoPP::AlignedDeallocate(void*)' cryptoplugin/urbackupsrv-CryptoFactory.o: In function CryptoPP::DL_SignerBaseCryptoPP::EC2NPoint::SignAndRestart(CryptoPP::RandomNumberGenerator&, CryptoPP::PK_MessageAccumulator&, unsigned char*, bool) const’:
CryptoFactory.cpp:(.text._ZNK8CryptoPP13DL_SignerBaseINS_9EC2NPointEE14SignAndRestartERNS_21RandomNumberGeneratorERNS_21PK_MessageAccumulatorEPhb[_ZNK8CryptoPP13DL_SignerBaseINS_9EC2NPointEE14SignAndRestartERNS_21RandomNumberGeneratorERNS_21PK_MessageAccumulatorEPhb]+0x2ec): undefined reference to CryptoPP::AlignedDeallocate(void*)' cryptoplugin/urbackupsrv-CryptoFactory.o:CryptoFactory.cpp:(.text._ZNK8CryptoPP13DL_SignerBaseINS_9EC2NPointEE14SignAndRestartERNS_21RandomNumberGeneratorERNS_21PK_MessageAccumulatorEPhb[_ZNK8CryptoPP13DL_SignerBaseINS_9EC2NPointEE14SignAndRestartERNS_21RandomNumberGeneratorERNS_21PK_MessageAccumulatorEPhb]+0x39f): more undefined references to CryptoPP::AlignedDeallocate(void*)’ follow
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** [urbackupsrv] Error code 1

make[1]: stopped in /urbackup-server-2.3.7
1 error

make[1]: stopped in /urbackup-server-2.3.7
*** [install-recursive] Error code 1

make: stopped in /urbackup-server-2.3.7
1 error

Seems like this issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231998

You’ll have to configure with ./configure CXXFLAGS="$(pkgconf --cflags-only-other libcryptopp)"

Obviously at this point it is better to just use/compile from freebsd ports, just like https://www.urbackup.org/freenasserverinstall.html describes.

I get “Illegal variable name” with this command. :frowning_face:

I understand but i prefer, if possible, to use the lastest version.

Same here
the port version is way behind :frowning:
I was able to build 2.3.7 by downgrading cryptopp to 5.6.5_4