FreeBSD + Clang : supported?

Hi,

I’ve tried to compile Urbackup with FreeBSD 10.0 and Clang 3.3. I’ve some errors. Is Clang compiler supported?

Thank you.

make all-recursive
Making all in .
c++ -DHAVE_CONFIG_H -I. -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -D_THREAD_SAFE -pthread -DLINUX -g -O2 -MT AcceptThread.o -MD -MP -MF .deps/AcceptThread.Tpo -c -o AcceptThread.o AcceptThread.cpp
In file included from AcceptThread.cpp:22:
In file included from ./Server.h:12:
In file included from ./Interface/Server.h:5:
./Interface/Types.h:69:7: error: ‘<anonymous class at ./Interface/Types.h:69:7>’ can not be defined in the result type of a function
const class
^
./Interface/Types.h:77:1: error: functions that differ only in their return type cannot be overloaded
nullptr = {};
^
/usr/include/c++/v1/cstddef:88:24: note: expanded from macro ‘nullptr’
#define nullptr _VSTD::__get_nullptr_t()
^
/usr/include/c++/v1/cstddef:86:58: note: previous definition is here
inline _LIBCPP_ALWAYS_INLINE _LIBCPP_CONSTEXPR nullptr_t __get_nullptr_t() {return nullptr_t(0);}
^
2 errors generated.
*** Error code 1

Stop.
make[2]: stopped in /tmp/urbackup-server-1.3.2
*** Error code 1

Stop.
make[1]: stopped in /tmp/urbackup-server-1.3.2
*** Error code 1

Stop.
make: stopped in /tmp/urbackup-server-1.3.2

Have you tried the release here? http://sourceforge.net/projects/urbackup/files/Server/1.3.2PBI/

There is a Makefile for ports as well.

I haven’t tested the above on FreeBSD 10.

I’ve tried 1.3.2, not 1.3.2PBI. What means PBI, what is the difference between 1.3.2 and 1.3.2 PBI?

It has compiled. I just had to modify the makefile for cryptopp in ports by removing STATIC from OPTIONS_DEFAULT so it was compiled with -fPIC.
I have not yet tried to start server.

Thanks.

Yeah, I haven’t found out how to add that option to the dependency list.

Hi,
I’ve tried to start the PBI. I had access to web interface, but the server didn’t see the client.

I have then tried to compile 1.4_beta2 and there was no error, after install I had access one time to the web interface but after reboot no more access (perhaps it was not a good idea to install the new version above the older?). dmesg shows urbackup_srv exited with signal 11.

I have then removed the old urbackup_srv startup script and tried the following command line (UrBackup and FreeNas 8.3 - Backup and Windows BareMetal Restore - Fantastic solution | TrueNAS Community):
cd /usr/local/var
/usr/local/sbin/urbackup_srv --plugin

/usr/local/lib/liburbackupserver_urlplugin.so --plugin
/usr/local/lib/liburbackupserver_cryptoplugin.so --plugin
/usr/local/lib/liburbackupserver_downloadplugin.so --plugin
/usr/local/lib/liburbackupserver_fsimageplugin.so --plugin
/usr/local/lib/liburbackupserver_httpserver.so --plugin
/usr/local/lib/liburbackupserver.so --http_root /usr/local/var/urbackup/www –
workingdir /usr/local/var --user urbackup --http_port 55414

Here is the resulting log:

2014-07-26 23:20:07: done.
2014-07-26 23:20:07: Loaded -cryptoplugin- plugin
2014-07-26 23:20:07: Loaded -download- plugin
2014-07-26 23:20:07: Loaded -fsimageplugin- plugin
2014-07-26 23:20:07: Starting HTTP-Server on port 55414
2014-07-26 23:20:07: HTTP: Server started up sucessfully!
2014-07-26 23:20:07: Creating files Indices…
2014-07-26 23:20:07: ERROR: Error preparing Query [SELECT value FROM settings_db.settings WHERE key=? AND clientid=0]: no such table: settings_db.settings
2014-07-26 23:20:07: Started UrBackup…
2014-07-26 23:20:07: Error loading IUrlFactory
2014-07-26 23:20:07: ERROR: Error preparing Query [SELECT value FROM settings_db.settings WHERE key=?]: no such table: settings_db.settings
2014-07-26 23:20:07: ERROR: Error preparing Query [SELECT value FROM settings_db.settings WHERE key=?]: no such table: settings_db.settings
Backupfolder not set
2014-07-26 23:20:07: Backup destination cannot handle subvolumes and snapshots. Snapshots disabled.
2014-07-26 23:20:07: ERROR: Error preparing Query [SELECT id,hostname FROM settings_db.extra_clients]: no such table: settings_db.extra_clients
2014-07-26 23:20:07: ERROR: Error preparing Query [UPDATE settings_db.extra_clients SET lastip=? WHERE id=?]: no such table: settings_db.extra_clients
2014-07-26 23:20:07: UrBackup Server start up complete.
2014-07-26 23:20:07: Creating SOCKET…
2014-07-26 23:20:07: done.
2014-07-26 23:20:07: Server started up sucessfully!
2014-07-26 23:20:07: ERROR: Error preparing Query [SELECT id FROM backups WHERE archived=1 AND archive_timeout<>0 AND archive_timeout<?]: no such column: archived
2014-07-26 23:20:07: ERROR: Error preparing Query [SELECT value FROM settings_db.settings WHERE clientid=? AND key=?]: no such table: settings_db.settings

Do you have an idea of what I could try in order to resolve the problems?

Thank you.

Hmm looks like backup_server.db and backup_server_settings.db aren’t in sync. Maybe replace them both with the version from the source package?

With 1.4. you should also be able to start the urbackup server with start_urbackup_server on FreeBSD, given that getopt from ports is installed in /usr/local/bin.