oakes / SolidOak

An IDE for Rust
https://sekao.net/solidoak/
The Unlicense
893 stars 60 forks source link

cargo build failed #33

Closed xooder closed 9 years ago

xooder commented 9 years ago

saklhc-2:SolidOak saklhc$ cargo build Compiling neovim-rs v0.1.0 (https://github.com/oakes/neovim-rs#a622fa28) Compiling gtk-sys v0.1.1 (https://github.com/oakes/gtk#a706742f) Build failed, waiting for other jobs to finish... error: could not find native static library nvim, perhaps an -L flag is missing? failed to run custom build command for gtk-sys v0.1.1 (https://github.com/oakes/gtk#a706742f) Process didn't exit successfully: /Users/saklhc/Support/SolidOak/target/debug/build/gtk-sys-52a287d39e6c515b/build-script-build (exit code: 101) --- stdout cargo:rustc-link-search=native=/usr/local/Cellar/gtk+3/3.14.6/lib cargo:rustc-link-search=native=/usr/local/Cellar/pango/1.36.8/lib cargo:rustc-link-search=native=/usr/local/Cellar/atk/2.16.0/lib cargo:rustc-link-search=native=/usr/local/Cellar/cairo/1.14.2/lib cargo:rustc-link-search=native=/usr/local/Cellar/gdk-pixbuf/2.30.8/lib cargo:rustc-link-search=native=/usr/local/Cellar/glib/2.44.0/lib cargo:rustc-link-search=native=/usr/local/opt/gettext/lib cargo:rustc-link-lib=gtk-3 cargo:rustc-link-lib=gdk-3 cargo:rustc-link-lib=pangocairo-1.0 cargo:rustc-link-lib=pango-1.0 cargo:rustc-link-lib=atk-1.0 cargo:rustc-link-lib=cairo-gobject cargo:rustc-link-lib=cairo cargo:rustc-link-lib=gdk_pixbuf-2.0 cargo:rustc-link-lib=gio-2.0 cargo:rustc-link-lib=gobject-2.0 cargo:rustc-link-lib=glib-2.0 cargo:rustc-link-lib=intl

--- stderr thread '

' panicked at '"pkg-config" "--libs" "--cflags" "vte-2.90" did not exit successfully: exit code: 1 --- stderr Package vte-2.90 was not found in the pkg-config search path. Perhaps you should add the directory containing `vte-2.90.pc' to the PKG_CONFIG_PATH environment variable No package 'vte-2.90' found ', /Users/saklhc/.cargo/git/checkouts/gtk-38cf3f4d9926c12a/master/gtk-sys/build.rs:25

oakes commented 9 years ago

Did you run all the steps in the readme? It looks like you don't have the vte library, nor the libraries required to build neovim.

xooder commented 9 years ago

run all the steps in the readme,but build failed

saklhc:SolidOak saklhc$ brew install gtk+3 vte3 --without-x11 Warning: gtk+3-3.16.5 already installed Warning: vte3-0.40.2 already installed Error: Cannot write to /usr/local/Cellar saklhc:SolidOak saklhc$ brew install libtool automake cmake pkg-config gettext Warning: libtool-2.4.6 already installed Warning: automake-1.15 already installed Warning: cmake-3.2.3 already installed Warning: pkg-config-0.28 already installed Warning: gettext-0.19.4 already installed Error: Cannot write to /usr/local/Cellar saklhc:SolidOak saklhc$ sudo brew install libtool automake cmake pkg-config gettext Warning: libtool-2.4.6 already installed Warning: automake-1.15 already installed Warning: cmake-3.2.3 already installed Warning: pkg-config-0.28 already installed Warning: gettext-0.19.4 already installed saklhc:SolidOak saklhc$ clear

saklhc:SolidOak saklhc$ sudo brew install gtk+3 vte3 --without-x11 Warning: gtk+3-3.16.5 already installed Warning: vte3-0.40.2 already installed saklhc:SolidOak saklhc$ sudo brew install libtool automake cmake pkg-config gettext Warning: libtool-2.4.6 already installed Warning: automake-1.15 already installed Warning: cmake-3.2.3 already installed Warning: pkg-config-0.28 already installed Warning: gettext-0.19.4 already installed saklhc:SolidOak saklhc$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig saklhc:SolidOak saklhc$ cargo build Compiling neovim-rs v0.1.0 (https://github.com/oakes/neovim-rs#a622fa28) Compiling gtk-sys v0.1.1 (https://github.com/oakes/gtk#a706742f) Build failed, waiting for other jobs to finish... error: could not find native static library nvim, perhaps an -L flag is missing? failed to run custom build command for gtk-sys v0.1.1 (https://github.com/oakes/gtk#a706742f) Process didn't exit successfully: /Users/saklhc/Support/SolidOak/target/debug/build/gtk-sys-52a287d39e6c515b/build-script-build (exit code: 101) --- stdout cargo:rustc-link-search=native=/usr/local/Cellar/gtk+3/3.16.5/lib cargo:rustc-link-search=native=/usr/local/Cellar/pango/1.36.8_1/lib cargo:rustc-link-search=native=/usr/local/Cellar/atk/2.16.0/lib cargo:rustc-link-search=native=/usr/local/Cellar/cairo/1.14.2_1/lib cargo:rustc-link-search=native=/usr/local/Cellar/gdk-pixbuf/2.30.8/lib cargo:rustc-link-search=native=/usr/local/Cellar/glib/2.44.1/lib cargo:rustc-link-search=native=/usr/local/opt/gettext/lib cargo:rustc-link-lib=gtk-3 cargo:rustc-link-lib=gdk-3 cargo:rustc-link-lib=pangocairo-1.0 cargo:rustc-link-lib=pango-1.0 cargo:rustc-link-lib=atk-1.0 cargo:rustc-link-lib=cairo-gobject cargo:rustc-link-lib=cairo cargo:rustc-link-lib=gdk_pixbuf-2.0 cargo:rustc-link-lib=gio-2.0 cargo:rustc-link-lib=gobject-2.0 cargo:rustc-link-lib=glib-2.0 cargo:rustc-link-lib=intl

--- stderr thread '

' panicked at '"pkg-config" "--libs" "--cflags" "vte-2.90" did not exit successfully: exit code: 1 --- stderr Package vte-2.90 was not found in the pkg-config search path. Perhaps you should add the directory containing `vte-2.90.pc' to the PKG_CONFIG_PATH environment variable No package 'vte-2.90' found ', /Users/saklhc/.cargo/git/checkouts/gtk-38cf3f4d9926c12a/master/gtk-sys/build.rs:25

oakes commented 9 years ago

This seems like a problem: "Error: Cannot write to /usr/local/Cellar" It sounds like Homebrew isn't working on your machine for some reason.

sheady commented 9 years ago

I'm also trying to build on an osx machine, the build error I'm receiving is:

error: could not find native static library nvim, perhaps an -L flag is missing? failed to run custom build command for glib-sys v0.1.1 (https://github.com/rust-gnome/glib#4cbc30cb) Process didn't exit successfully: /Users/sheady/Documents/experiment/rust/SolidOak/target/debug/build/glib-sys-8d1e6aa0245c5e97/build-script-build (exit code: 101) --- stderr thread '

' panicked at '"pkg-config" "--libs" "--cflags" "glib-2.0 gio-2.0 gobject-2.0" did not exit successfully: exit code: 1 --- stderr Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Package gio-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containinggio-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gio-2.0' found Package gobject-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gobject-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gobject-2.0' found ', /Users/sheady/.cargo/git/checkouts/glib-27833b4b6d67ca46/master/glib-sys/build.rs:6

I followed all the steps for osx installation in the readme

oakes commented 9 years ago

@sheady It looks like there are two separate errors here: nvim and the pkg-config problem. To figure out why nvim isn't building, try cloning it directly and running make libnvim. That should give you more specific errors. As for pkg-config, make sure you run export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig every time you start a new terminal window. It does not persist once you close the window.

sheady commented 9 years ago

While running make libnvim I see the following

==== Building LuaJIT 2.0.4 ====
HOSTCC    host/minilua.o
HOSTLINK  host/minilua
ld: library not found for -lgcc_s.10.4
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[5]: *** [host/minilua] Error 1
make[4]: *** [src/luajit] Error 2
make[3]: *** [build/src/luajit-stamp/luajit-install] Error 2
make[2]: *** [CMakeFiles/luajit.dir/all] Error 2
make[1]: *** [all] Error 2
make: *** [deps] Error 2

Also I made sure to run export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig before trying to run cargo build

oakes commented 9 years ago

I wonder if you don't have gcc. Do you have Xcode installed with the command line tools?

sheady commented 9 years ago

Yes, I regularly use Xcode and installed the command line tools for another project

thePalindrome commented 9 years ago

Noting that SolidOak fails to build on Gentoo with the following error (after passing --verbose)

Updating git repository `https://github.com/oakes/gtk`
Unable to update https://github.com/oakes/gtk#a706742f

Caused by:
  [4] Revspec 'a706742fbf506fae801dc42bd85e18c76f0abb3f' not found.

Cargo.lock forces that commit to oakes/gtk, which doesn't seem to exist. Visiting the link (as noted here) results in the expected diff, so why can't cargo find it? oakes/gtk@a706742fbf506fae801dc42bd85e18c76f0abb3

It seems that that particular commit isn't part of a branch, could that be what's irritating cargo?

EDIT:

Changing the commit in Cargo.lock almost fixes things, I'm having to update version numbers, which I'm not sure is ideal.

EDIT 2: After severely modifying Cargo.lock to remove (almost) all specific commit links, as well as to fix version numbers, and then dealing with rust-gnome/gtk#124, I'm able to get SolidOak to build. Pull Request should be soon, so that ebuilds and such should work. It should also be noted that neovim didn't make itself, I had to do that manually.

oakes commented 9 years ago

@thePalindrome That was my fault. All I had to do is run cargo update which fixed the lock file. No need to edit it manually.

oakes commented 9 years ago

@sheady Could you let me know what version of OS X you are on? I'm trying to reproduce that error.

sheady commented 9 years ago

I'm running the dev preview build 2, so if you are having trouble reproducing I'm assuming it has to do with that.

Sean1708 commented 9 years ago

Fails on a standard build of OS X 10.10.4 aswell.

Seans-MacBook-Pro:SolidOak sean$ brew install gtk+3 vte3 --without-x11
==> Downloading https://homebrew.bintray.com/bottles/gtk+3-3.16.6.yosemite.bottle.tar.gz
Already downloaded: /Library/Caches/Homebrew/gtk+3-3.16.6.yosemite.bottle.tar.gz
==> Pouring gtk+3-3.16.6.yosemite.bottle.tar.gz
==> /usr/local/opt/glib/bin/glib-compile-schemas /usr/local/share/glib-2.0/schemas
🍺  /usr/local/Cellar/gtk+3/3.16.6: 1298 files, 79M
==> Downloading https://download.gnome.org/sources/vte/0.40/vte-0.40.2.tar.xz
Already downloaded: /Library/Caches/Homebrew/vte3-0.40.2.tar.xz
==> ./configure --prefix=/usr/local/Cellar/vte3/0.40.2 --disable-Bsymbolic --enable-introspection=yes
==> make install
🍺  /usr/local/Cellar/vte3/0.40.2: 141 files, 3.6M, built in 39 seconds
Seans-MacBook-Pro:SolidOak sean$ brew install libtool automake cmake pkg-config gettext
Warning: libtool-2.4.6 already installed
Warning: automake-1.15 already installed
Warning: cmake-3.3.0 already installed
Warning: pkg-config-0.28 already installed
Warning: gettext-0.19.5.1 already installed
Seans-MacBook-Pro:SolidOak sean$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
Seans-MacBook-Pro:SolidOak sean$ cargo build
   Compiling gtk-sys v0.1.3 (https://github.com/oakes/gtk#f49bf0b5)
   Compiling cairo-rs v0.0.4 (https://github.com/rust-gnome/cairo#2c95d05c)
   Compiling pango v0.0.3 (https://github.com/rust-gnome/pango#80e4bbec)
Build failed, waiting for other jobs to finish...
failed to run custom build command for `gtk-sys v0.1.3 (https://github.com/oakes/gtk#f49bf0b5)`
Process didn't exit successfully: `/Users/sean/Projects/SolidOak/target/debug/build/gtk-sys-9bdd8b518517f944/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=native=/usr/local/Cellar/gtk+3/3.16.6/lib
cargo:rustc-link-search=native=/usr/local/Cellar/pango/1.36.8_2/lib
cargo:rustc-link-search=native=/usr/local/Cellar/atk/2.16.0/lib
cargo:rustc-link-search=native=/usr/local/Cellar/cairo/1.14.2_1/lib
cargo:rustc-link-search=native=/usr/local/Cellar/gdk-pixbuf/2.30.8/lib
cargo:rustc-link-search=native=/usr/local/Cellar/glib/2.44.1/lib
cargo:rustc-link-search=native=/usr/local/opt/gettext/lib
cargo:rustc-link-lib=gtk-3
cargo:rustc-link-lib=gdk-3
cargo:rustc-link-lib=pangocairo-1.0
cargo:rustc-link-lib=pango-1.0
cargo:rustc-link-lib=atk-1.0
cargo:rustc-link-lib=cairo-gobject
cargo:rustc-link-lib=cairo
cargo:rustc-link-lib=gdk_pixbuf-2.0
cargo:rustc-link-lib=gio-2.0
cargo:rustc-link-lib=gobject-2.0
cargo:rustc-link-lib=glib-2.0
cargo:rustc-link-lib=intl
cargo:rustc-cfg=gtk_3_6
cargo:rustc-cfg=gtk_3_8
cargo:rustc-cfg=gtk_3_10
cargo:rustc-cfg=gtk_3_12
cargo:rustc-cfg=gtk_3_14
cargo:rustc-cfg=gtk_3_16
cargo:cfg=gtk_3_6 gtk_3_8 gtk_3_10 gtk_3_12 gtk_3_14 gtk_3_16

--- stderr
thread '<main>' panicked at '`"pkg-config" "--libs" "--cflags" "vte-2.90"` did not exit successfully: exit code: 1
--- stderr
Package vte-2.90 was not found in the pkg-config search path.
Perhaps you should add the directory containing `vte-2.90.pc'
to the PKG_CONFIG_PATH environment variable
No package 'vte-2.90' found
', /Users/sean/.cargo/git/checkouts/gtk-61164953be1831c6/master/gtk-sys/build.rs:45

Seans-MacBook-Pro:SolidOak sean$ cargo clean
Seans-MacBook-Pro:SolidOak sean$ cargo build
   Compiling neovim-rs v0.1.0 (https://github.com/oakes/neovim-rs#a622fa28)
   Compiling cairo-rs v0.0.4 (https://github.com/rust-gnome/cairo#2c95d05c)
   Compiling gtk v0.0.3 (https://github.com/oakes/gtk#f49bf0b5)
   Compiling solidoak v0.1.3 (file:///Users/sean/Projects/SolidOak)
   Compiling gdk v0.1.1 (https://github.com/rust-gnome/gdk#9bdca522)
   Compiling gcc v0.3.11
   Compiling libc v0.1.8
   Compiling pkg-config v0.3.5
   Compiling bitflags v0.1.1
   Compiling c_vec v1.0.12
   Compiling rustc-serialize v0.3.15
   Compiling gdk-sys v0.1.1 (https://github.com/rust-gnome/gdk#9bdca522)
   Compiling cairo-sys-rs v0.1.3 (https://github.com/rust-gnome/cairo#2c95d05c)
   Compiling glib-sys v0.1.2 (https://github.com/rust-gnome/glib#ccbc2696)
   Compiling pango-sys v0.1.2 (https://github.com/rust-gnome/pango#80e4bbec)
   Compiling gtk-sys v0.1.3 (https://github.com/oakes/gtk#f49bf0b5)
   Compiling glib v0.0.3 (https://github.com/rust-gnome/glib#ccbc2696)
Build failed, waiting for other jobs to finish...
failed to run custom build command for `gtk-sys v0.1.3 (https://github.com/oakes/gtk#f49bf0b5)`
Process didn't exit successfully: `/Users/sean/Projects/SolidOak/target/debug/build/gtk-sys-9bdd8b518517f944/build-script-build` (exit code: 101)
--- stdout
cargo:rustc-link-search=native=/usr/local/Cellar/gtk+3/3.16.6/lib
cargo:rustc-link-search=native=/usr/local/Cellar/pango/1.36.8_2/lib
cargo:rustc-link-search=native=/usr/local/Cellar/atk/2.16.0/lib
cargo:rustc-link-search=native=/usr/local/Cellar/cairo/1.14.2_1/lib
cargo:rustc-link-search=native=/usr/local/Cellar/gdk-pixbuf/2.30.8/lib
cargo:rustc-link-search=native=/usr/local/Cellar/glib/2.44.1/lib
cargo:rustc-link-search=native=/usr/local/opt/gettext/lib
cargo:rustc-link-lib=gtk-3
cargo:rustc-link-lib=gdk-3
cargo:rustc-link-lib=pangocairo-1.0
cargo:rustc-link-lib=pango-1.0
cargo:rustc-link-lib=atk-1.0
cargo:rustc-link-lib=cairo-gobject
cargo:rustc-link-lib=cairo
cargo:rustc-link-lib=gdk_pixbuf-2.0
cargo:rustc-link-lib=gio-2.0
cargo:rustc-link-lib=gobject-2.0
cargo:rustc-link-lib=glib-2.0
cargo:rustc-link-lib=intl
cargo:rustc-cfg=gtk_3_6
cargo:rustc-cfg=gtk_3_8
cargo:rustc-cfg=gtk_3_10
cargo:rustc-cfg=gtk_3_12
cargo:rustc-cfg=gtk_3_14
cargo:rustc-cfg=gtk_3_16
cargo:cfg=gtk_3_6 gtk_3_8 gtk_3_10 gtk_3_12 gtk_3_14 gtk_3_16

--- stderr
thread '<main>' panicked at '`"pkg-config" "--libs" "--cflags" "vte-2.90"` did not exit successfully: exit code: 1
--- stderr
Package vte-2.90 was not found in the pkg-config search path.
Perhaps you should add the directory containing `vte-2.90.pc'
to the PKG_CONFIG_PATH environment variable
No package 'vte-2.90' found
', /Users/sean/.cargo/git/checkouts/gtk-61164953be1831c6/master/gtk-sys/build.rs:45

Seans-MacBook-Pro:SolidOak sean$ ls /usr/local/lib/pkgconfig | grep vte
vte-2.91.pc
Seans-MacBook-Pro:SolidOak sean$ ls /opt/X11/lib/pkgconfig | grep vte
Seans-MacBook-Pro:SolidOak sean$ 

Note that Rust errors because it can't find vte-2.90 whereas Homebrew seems to install vte-2.91.

oakes commented 9 years ago

This may be because the vte3 package was updated. I wonder if it would work if we changed vte-2.90 to vte-2.91 in this file. I'll try it when I get home today.

oakes commented 9 years ago

OK that was indeed the problem. It should now build, and happily you no longer need to run the export command. However, you need to edit the new vte3 formula with this change before installing it. I have added those directions to the README. I submitted a pull request to the homebrew project so hopefully this won't be necessary for long. Thanks very much @Sean1708 for figuring out what the problem was.

oakes commented 9 years ago

I changed my mind. Instead of upgrading for vte-2.91, I'm going to include the old vte formula in this repo and have people install that. I can't use 2.91 right now because it's not even available in apt-get for Linux users yet.

Sean1708 commented 8 years ago

Ah, awesome thanks. I'll give building it a go this evening.

Sean1708 commented 8 years ago

Works perfectly for me.

oakes commented 8 years ago

Great, thanks for letting me know.