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

Fedora 20, build fails, /usr/bin/dtrace invalid option, libuv #1276

Closed
alxgrtnstrngl opened this issue Oct 9, 2014 · 12 comments
Closed

Fedora 20, build fails, /usr/bin/dtrace invalid option, libuv #1276

alxgrtnstrngl opened this issue Oct 9, 2014 · 12 comments
Labels
build building and installing Neovim using the provided scripts

Comments

@alxgrtnstrngl
Copy link

Trying to build on Fedora 20 and I have all the buildeps and running:

$ make

Generates build error:

[ 17%] Performing build step for 'libuv'
make[4]: Entering directory `/home/$USER/Projects/neovim/.deps/build/src/libuv-build'
  GEN      include/uv-dtrace.h
/usr/bin/dtrace invalid option -xnolibs
Usage /usr/bin/dtrace [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]
make[4]: *** [include/uv-dtrace.h] Error 1
make[4]: Leaving directory `/home/$USER/Projects/neovim/.deps/build/src/libuv-build'
make[3]: *** [/home/$USER/Projects/neovim/.deps/build/src/libuv-stamp/libuv-build] Error 2
make[3]: Leaving directory `/home/$USER/Projects/neovim/.deps/build/third-party'
make[2]: *** [CMakeFiles/libuv.dir/all] Error 2
make[2]: Leaving directory `/home/$USER/Projects/neovim/.deps/build/third-party'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/$USER/Projects/neovim/.deps/build/third-party'
make: *** [deps] Error 2

What could the problem be and how can I solve this?


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@alxgrtnstrngl alxgrtnstrngl changed the title Fedora 20, build fails, /usr/bin/dtrace invalid option -xnolibs Fedora 20, build fails, /usr/bin/dtrace invalid option, libuv Oct 9, 2014
@justinmk justinmk added the build building and installing Neovim using the provided scripts label Oct 9, 2014
@justinmk
Copy link
Member

justinmk commented Oct 9, 2014

Looks like a libuv issue: joyent/libuv#1478

@justinmk justinmk added bug issues reporting wrong behavior status:blocked-external Needs a third-party / external change or fix and removed bug issues reporting wrong behavior labels Oct 9, 2014
@alxgrtnstrngl
Copy link
Author

@justinmk I went into ".deps/build/src/libuv" and edited "Makefile.am" at line 315-316:

if HAVE_DTRACE
include/uv-dtrace.h: src/unix/uv-dtrace.d
#   $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -h -xnolibs -s $< -o $(top_srcdir)/$@
    $(AM_V_GEN)$(DTRACE) $(DTRACEFLAGS) -h -s $< -o $(top_srcdir)/$@
endif

Removing the '-xnolibs' option allows it to build and confirmed the program runs.

@justinmk
Copy link
Member

justinmk commented Oct 9, 2014

Per joyent/libuv#1478 (comment) , we may just want to disable dtrace probes in cmake altogether.

Also, joyent/libuv#1478 (comment) indicates that Fedora removes this already, maybe if you upgrade Fedora the problem will go away?

@alxgrtnstrngl
Copy link
Author

we may just want to disable dtrace probes in cmake altogether.

I'm not familiar with how cmake pulls in the ".deps", but I think that would be the best route. Maybe run a script on the makefile in the configure that removes the '-xnolibs' reference for those on Linux. The joyent/libuv#1478 (comment) @nalimilan mentioned:

Currently I'm calling sed to remove this argument from the Makefile.

@jszakmeister
Copy link
Contributor

Perhaps this patch would do it?

diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt
index 793be31..f0a83bf 100644
--- a/third-party/CMakeLists.txt
+++ b/third-party/CMakeLists.txt
@@ -78,7 +78,7 @@ if(USE_BUNDLED_LIBUV)
       -P ${CMAKE_CURRENT_SOURCE_DIR}/cmake/DownloadAndExtractFile.cmake
     CONFIGURE_COMMAND sh ${DEPS_BUILD_DIR}/src/libuv/autogen.sh &&
       ${DEPS_BUILD_DIR}/src/libuv/configure --with-pic --disable-shared
-        --prefix=${DEPS_INSTALL_DIR} CC=${DEPS_C_COMPILER}
+        --disable-dtrace --prefix=${DEPS_INSTALL_DIR} CC=${DEPS_C_COMPILER}
     INSTALL_COMMAND ${MAKE_PRG} install)
   list(APPEND THIRD_PARTY_DEPS libuv)
 endif()

@jszakmeister
Copy link
Contributor

I should add that I'd rather not disable dtrace completely--it can be a useful diagnostic tool. Perhaps we could detect the version of dtrace and filter out -xnolibs if the version is sufficient.

@rustushki
Copy link

Can confirm that the patch from @jszakmeister does workaround the problem. I was able to install in Fedora 20 after manually applying the patch in linuxbrew's debug mode.

@rustushki
Copy link

Can confirm this is also a problem in Fedora 19. Looks like the systemtap-sdt-devel package entered stable on 2014/10/08.

@justinmk
Copy link
Member

justinmk commented Nov 4, 2014

Looks like joyent/libuv#1478 is getting mired in a philosophical debate, so we'll probably need to patch around this ourselves.

@justinmk
Copy link
Member

justinmk commented Nov 6, 2014

Fixed by libuv/libuv#3 . When we update to that version of libuv we can close this.

@ghost
Copy link

ghost commented Jan 28, 2015

I assume this can be closed

@jszakmeister
Copy link
Contributor

Sure can. Thanks.

@ghost ghost removed the status:blocked-external Needs a third-party / external change or fix label Apr 19, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build building and installing Neovim using the provided scripts
Projects
None yet
Development

No branches or pull requests

4 participants