Nautilus Extensions on Ubuntu Desktop 18.04


#1

Hi everybody,

I am using Ubuntu Desktop 18.04 with seafile client 6.1.8 installed via official repositories:

sudo add-apt-repository ppa:seafile/seafile-client
sudo apt-get update
sudo apt-get install seafile-gui

Now I tried to install the nautilus extensions. Therefore I did:

sudo apt-get install cmake libnautilus-extension-dev libccnet-dev libsearpc-dev libjansson-dev libseafile-dev
wget https://github.com/haiwen/seafile-client/archive/nautilus_extension.zip
unzip nautilus_extension.zip
./build.sh
make install

Unfortunately some errors pop up. Can somebody help me what to do?

Here are the errors

...# ./build.sh 

+ set -e
++ dirname ./build.sh
+ CURRENT_PWD=.
++ uname -s
+ '[' Linux '!=' Linux ']'
+ pushd .
/home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile /home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile
+ CONFIG=Debug
+ '[' a '!=' adebug ']'
+ rm -rf CMakeCache.txt CMakeFiles
+ CONFIG=Release
+ cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=on
-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for module 'glib-2.0>=2.15'
--   Found glib-2.0, version 2.56.3
-- Checking for module 'libnautilus-extension>=2.0'
--   Found libnautilus-extension, version 3.26.4
-- Checking for module 'libccnet>=1.3'
--   Found libccnet, version 6.0.4
-- Checking for module 'libsearpc>=1.0'
--   Found libsearpc, version 3.1.0
-- Checking for module 'libseafile>=1.7'
--   Found libseafile, version 6.1.5
-- Configuring done
-- Generating done
-- Build files have been written to: /home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile
+ make
Scanning dependencies of target nautilus-seafile
[ 25%] Building C object CMakeFiles/nautilus-seafile.dir/seafile-module.c.o
In file included from /usr/include/glib-2.0/glib.h:62:0,
                 from /home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/nautilus-seafile.h:3,
                 from /home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c:2:
/home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c: In function ‘nautilus_module_initialize’:
/home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c:8:16: warning: too many arguments for format [-Wformat-extra-args]
     g_message ("Initializing nautilus-seafile extension\n", NULL);
                ^
/usr/include/glib-2.0/glib/gmessages.h:333:32: note: in definition of macro ‘g_message’
                                __VA_ARGS__)
                                ^~~~~~~~~~~
/home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c: In function ‘nautilus_module_shutdown’:
/home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-module.c:15:16: warning: too many arguments for format [-Wformat-extra-args]
     g_message ("Unloading nautilus-seafile extension\n", NULL);
                ^
/usr/include/glib-2.0/glib/gmessages.h:333:32: note: in definition of macro ‘g_message’
                                __VA_ARGS__)
                                ^~~~~~~~~~~
[ 50%] Building C object CMakeFiles/nautilus-seafile.dir/nautilus-seafile.c.o
[ 75%] Building C object CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o
/home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c: In function ‘seafile_rpc_instance_connect’:
/home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c:42:9: error: too few arguments to function ‘ccnet_client_load_confdir’
     if (ccnet_client_load_confdir (sync_client_, ccnet_dir) < 0)
         ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/local/include/ccnet.h:17:0,
                 from /home/christoph/Downloads/seafile-client-nautilus_extension/nautilus-seafile/seafile-rpc-client.c:5:
/usr/local/include/ccnet/ccnet-client.h:125:5: note: declared here
 int ccnet_client_load_confdir (CcnetClient *client, const char *central_config_dir, const char *confdir);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
CMakeFiles/nautilus-seafile.dir/build.make:110: recipe for target 'CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o' failed
make[2]: *** [CMakeFiles/nautilus-seafile.dir/seafile-rpc-client.c.o] Error 1
CMakeFiles/Makefile2:99: recipe for target 'CMakeFiles/nautilus-seafile.dir/all' failed
make[1]: *** [CMakeFiles/nautilus-seafile.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2

Thanks in Advance
Christoph


#2

I’ve never used or tried it myself, but I found something other people (e.g. shoeper) did that seems to have worked for them:

Change the line the compiler complains about, line 42 in seafile-rpc-client.c, from this:

if (ccnet_client_load_confdir (sync_client_, ccnet_dir) < 0)

to this:

if (ccnet_client_load_confdir (sync_client_, NULL, ccnet_dir) < 0)

See:

Hope it works for you as well!

Markus