Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure ‘msgpack_object_union’ has no member named ‘dec’ #1899

Closed
JelteF opened this issue Jan 27, 2015 · 7 comments
Closed

Build failure ‘msgpack_object_union’ has no member named ‘dec’ #1899

JelteF opened this issue Jan 27, 2015 · 7 comments

Comments

@JelteF
Copy link
Contributor

JelteF commented Jan 27, 2015

I can't get the current source to build. Doing this on Gentoo with the ebuild from the lua overlay and GCC 4.9.2

<built-in>: note: this is the location of the previous definition
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c: In function ‘msgpack_rpc_to_float’:
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c:89:18: error: ‘msgpack_object_union’ has no member named ‘dec’
   *arg = obj->via.dec;
                  ^
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c:90:23: error: ‘MSGPACK_OBJECT_DOUBLE’ undeclared (first use in this function)
   return obj->type == MSGPACK_OBJECT_DOUBLE;
                       ^
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c:90:23: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c: In function ‘msgpack_rpc_to_object’:
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c:123:10: error: ‘MSGPACK_OBJECT_DOUBLE’ undeclared (first use in this function)
     case MSGPACK_OBJECT_DOUBLE:
          ^
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c: In function ‘msgpack_rpc_to_float’:
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/helpers.c:91:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
src/nvim/CMakeFiles/nvim.dir/build.make:2795: recipe for target 'src/nvim/CMakeFiles/nvim.dir/msgpack_rpc/helpers.c.o' failed
make[2]: *** [src/nvim/CMakeFiles/nvim.dir/msgpack_rpc/helpers.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/channel.c: In function ‘job_err’:
/var/tmp/portage/app-editors/neovim-9999/work/neovim-9999/src/nvim/msgpack_rpc/channel.c:346:12: warning: unused variable ‘channel’ [-Wunused-variable]
   Channel *channel = job_data(data);
            ^
@JelteF
Copy link
Contributor Author

JelteF commented Jan 27, 2015

It seems this msgpack/msgpack-c#191 has something to do with it.
This probably fixes it: https://github.com/msgpack/msgpack-c/wiki/cpp_configure

@ghost
Copy link

ghost commented Jan 28, 2015

I've always had this issue when building with msgpack-c from git, and IIRC you aren't supposed to do that. Currently, it seems like a specific msgpack revision should be used, like what's done in this pkgbuild, although I think passing the cpp flag you mentioned would be a more elegant way of dealing with things.

It doesn't look like it'd be too hard to update to the new names in the float format family, detailed in msgpack/msgpack-c@737e670).

@ghost
Copy link

ghost commented Jan 28, 2015

Yep, builds fine with that cpp flag. I've no idea how to pass arbitrary flags to cmake on the command line, so I did this:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 42eb50a..87fdf02 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -141,6 +141,7 @@ endif()

 add_definitions(-DINCLUDE_GENERATED_DECLARATIONS)
 add_definitions(-DHAVE_CONFIG_H)
+add_definitions(-DMSGPACK_USE_LEGACY_NAME_AS_FLOAT)

 if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_NAME STREQUAL "Linux")
   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")

@ghost
Copy link

ghost commented Jan 28, 2015

@JelteF I submitted a PR, let me know if the commit over there fixes your issue.

@ghost
Copy link

ghost commented Feb 7, 2015

ping @JelteF

@JelteF
Copy link
Contributor Author

JelteF commented Feb 7, 2015

Sorry for the late response, it works when I change the repo to your fork.

@ghost
Copy link

ghost commented Feb 7, 2015

Good to hear.

@ghost ghost mentioned this issue Feb 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant