jeanguyomarch / eovim

The Enlightened Neovim
https://github.com/jeanguyomarch/eovim/wiki
MIT License
193 stars 3 forks source link

`cmake --build . ` fails on ubuntu #23

Closed sluedtke closed 6 years ago

sluedtke commented 6 years ago

I get the install instructions running including point 3 cmake -DCMAKE_BUILD_TYPE=Release ..

After that, point 4 fails with:

Scanning dependencies of target libeovim
[  4%] Building C object plugins/CMakeFiles/libeovim.dir/lib/eovim.c.o
[  8%] Linking C shared library lib/libeovim.so
[  8%] Built target libeovim
Scanning dependencies of target themes
[ 13%] Generating Edje Theme
[ 13%] Built target themes
Scanning dependencies of target eovim
[ 17%] Building C object CMakeFiles/eovim.dir/src/main.c.o
[ 21%] Building C object CMakeFiles/eovim.dir/src/nvim.c.o
In file included from /usr/include/eina-1/Eina.h:214:0,
                 from /home/sluedtke/.local/tmp/eovim/src/include/eovim/types.h:26,
                 from /home/sluedtke/.local/tmp/eovim/src/include/eovim/nvim_api.h:26,
                 from /home/sluedtke/.local/tmp/eovim/src/nvim.c:23:
/home/sluedtke/.local/tmp/eovim/src/nvim.c: In function ‘_handle_request_response’:
/home/sluedtke/.local/tmp/eovim/src/nvim.c:105:52: error: ‘MSGPACK_OBJECT_STR’ undeclared (first use in this function)
         if (EINA_UNLIKELY(err_args->ptr[1].type != MSGPACK_OBJECT_STR))
                                                    ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:105:52: note: each undeclared identifier is reported only once for each function it appears in
/home/sluedtke/.local/tmp/eovim/src/nvim.c:110:15: error: unknown type name ‘msgpack_object_str’
         const msgpack_object_str *const e = &(err_args->ptr[1].via.str);
               ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:110:67: error: ‘msgpack_object_union {aka union <anonymous>}’ has no member named ‘str’
         const msgpack_object_str *const e = &(err_args->ptr[1].via.str);
                                                                   ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:111:68: error: request for member ‘ptr’ in something not a structure or union
         Eina_Stringshare *const err = eina_stringshare_add_length(e->ptr,
                                                                    ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:112:68: error: request for member ‘size’ in something not a structure or union
                                                                   e->size);
                                                                    ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c: In function ‘_stringshare_extract’:
/home/sluedtke/.local/tmp/eovim/src/nvim.c:151:21: error: ‘MSGPACK_OBJECT_STR’ undeclared (first use in this function)
    if (obj->type == MSGPACK_OBJECT_STR)
                     ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:153:15: error: unknown type name ‘msgpack_object_str’
         const msgpack_object_str *const str = &(obj->via.str);
               ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:153:57: error: ‘msgpack_object_union {aka const union <anonymous>}’ has no member named ‘str’
         const msgpack_object_str *const str = &(obj->via.str);
                                                         ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:154:47: error: request for member ‘ptr’ in something not a structure or union
         return eina_stringshare_add_length(str->ptr, str->size);
                                               ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:154:57: error: request for member ‘size’ in something not a structure or union
         return eina_stringshare_add_length(str->ptr, str->size);
                                                         ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:156:26: error: ‘MSGPACK_OBJECT_BIN’ undeclared (first use in this function)
    else if (obj->type == MSGPACK_OBJECT_BIN)
                          ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:158:15: error: unknown type name ‘msgpack_object_bin’
         const msgpack_object_bin *const bin = &(obj->via.bin);
               ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:158:57: error: ‘msgpack_object_union {aka const union <anonymous>}’ has no member named ‘bin’
         const msgpack_object_bin *const bin = &(obj->via.bin);
                                                         ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:159:47: error: request for member ‘ptr’ in something not a structure or union
         return eina_stringshare_add_length(bin->ptr, bin->size);
                                               ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:159:57: error: request for member ‘size’ in something not a structure or union
         return eina_stringshare_add_length(bin->ptr, bin->size);
                                                         ^
/home/sluedtke/.local/tmp/eovim/src/nvim.c:167:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
CMakeFiles/eovim.dir/build.make:86: recipe for target 'CMakeFiles/eovim.dir/src/nvim.c.o' failed
make[2]: *** [CMakeFiles/eovim.dir/src/nvim.c.o] Error 1
CMakeFiles/Makefile2:100: recipe for target 'CMakeFiles/eovim.dir/all' failed
make[1]: *** [CMakeFiles/eovim.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Any idea?

jeanguyomarch commented 6 years ago

Are you using msgpack bundled by Ubuntu? If I recall correctly, the msgpack package provided by ubuntu is obsolete. Have you tried running

./scripts/get-msgpack.sh

from the top source directory? It downloads and builds an up-to-date version of msgpack. It is not installed on your system (everything is kept in the .deps/ directory), but will be statically linked against eovim.

sluedtke commented 6 years ago

I have run command above but the error remains.

I purged the libmsgpack packages from my system, but by doing so I get an error that msgpack.h is missing ..

So I run command 3 again .. cmake -DCMAKE_BUILD_TYPE=Release ..

and succeed ;-)

So it seems important to remove the system libmsgpack before step 3

jeanguyomarch commented 6 years ago

Nice :) This seems to be a bug from my side. When I try to detect msgpack I first look to see if I was locally fetch, and use this msgpack by default. As a fallback, the system msgpack would have been used. But it seems it does not work quite as expected, since you had to update your system. :/ I'll investigate that. Thanks for the report :)

jeanguyomarch commented 6 years ago

Okay, I'm now closing this :) I've added a setup script that exposes the steps necessary to have a working environment on ubuntu.

sluedtke commented 5 years ago

Hi there, sorry to open that ticket again but I fail again during the build, but with a different error.

nvim --version: 0.3.1 edje_cc --version: Version: 1.20.7 system: Kubuntu 18.04

➜  build git:(master) ✗ cmake -DCMAKE_BUILD_TYPE=Release ..
-- 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
-- Check size of void*
-- Check size of void* - done
-- Short git hash: 24cd28f
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found eina: /usr/lib/x86_64-linux-gnu/libeina.so  
-- Found eet: /usr/lib/x86_64-linux-gnu/libeet.so  
-- Found evas: /usr/lib/x86_64-linux-gnu/libevas.so  
-- Found ecore: /usr/lib/x86_64-linux-gnu/libecore.so  
-- Found ecore_file: /usr/lib/x86_64-linux-gnu/libecore_file.so  
-- Found ecore_input: /usr/lib/x86_64-linux-gnu/libecore_input.so  
-- Found edje: /usr/lib/x86_64-linux-gnu/libedje.so  
-- Found efreet: /usr/lib/x86_64-linux-gnu/libefreet.so  
-- Found elementary: /usr/lib/x86_64-linux-gnu/libelementary.so  
-- Found MsgPack: /home/sluedtke/.local/tmp/eovim/.deps/_sysroot/lib/libmsgpackc.a  
-- Configuring done
-- Generating done
-- Build files have been written to: /home/sluedtke/.local/tmp/eovim/build
➜  build git:(master) ✗ cmake --build .                    
Scanning dependencies of target libeovim
[  3%] Building C object plugins/CMakeFiles/libeovim.dir/lib/eovim.c.o
[  6%] Linking C shared library lib/libeovim.so
[  6%] Built target libeovim
Scanning dependencies of target themes
[ 10%] Generating Edje Theme
[ 10%] Built target themes
Scanning dependencies of target eovim
[ 13%] Building C object CMakeFiles/eovim.dir/src/main.c.o
[ 16%] Building C object CMakeFiles/eovim.dir/src/nvim.c.o
[ 20%] Building C object CMakeFiles/eovim.dir/src/config.c.o
[ 23%] Building C object CMakeFiles/eovim.dir/src/keymap.c.o
[ 26%] Building C object CMakeFiles/eovim.dir/src/gui.c.o
j[ 30%] Building C object CMakeFiles/eovim.dir/src/prefs.c.o
[ 33%] Building C object CMakeFiles/eovim.dir/src/termview.c.o
[ 36%] Building C object CMakeFiles/eovim.dir/src/nvim_event.c.o
[ 40%] Building C object CMakeFiles/eovim.dir/src/event/option_set.c.o
[ 43%] Building C object CMakeFiles/eovim.dir/src/event/mode.c.o
[ 46%] Building C object CMakeFiles/eovim.dir/src/event/cmdline.c.o
[ 50%] Building C object CMakeFiles/eovim.dir/src/nvim_api.c.o
[ 53%] Building C object CMakeFiles/eovim.dir/src/nvim_helper.c.o
[ 56%] Building C object CMakeFiles/eovim.dir/src/nvim_request.c.o
[ 60%] Building C object CMakeFiles/eovim.dir/src/plugin.c.o
[ 63%] Building C object CMakeFiles/eovim.dir/src/options.c.o
[ 66%] Building C object CMakeFiles/eovim.dir/src/contrib.c.o
[ 70%] Linking C executable eovim
/usr/bin/ld: ../.deps/_sysroot/lib/libmsgpackc.a(objectc.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: ../.deps/_sysroot/lib/libmsgpackc.a(unpack.c.o): relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIC
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status
CMakeFiles/eovim.dir/build.make:521: recipe for target 'eovim' failed
make[2]: *** [eovim] Error 1
CMakeFiles/Makefile2:100: recipe for target 'CMakeFiles/eovim.dir/all' failed
make[1]: *** [CMakeFiles/eovim.dir/all] Error 2
Makefile:151: recipe for target 'all' failed
make: *** [all] Error 2

I have no glue what is wrong. I run both, the setup.py script and get_msgpack.sh without errors (finaly) but the build fails.

Any help is appreciated.