oakes / SolidOak

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

Build error: failed to run custom build command for glib-sys #10

Closed leonardinius closed 9 years ago

leonardinius commented 9 years ago

Error

λ ~/projects/SolidOak/ master cargo build --verbose                                                                                                     
       Fresh c_vec v1.0.8 (https://github.com/oakes/c_vec-rs.git#6cb6f620)                                                                              
       Fresh pkg-config v0.3.0                                                                                                                          
       Fresh rustc-serialize v0.3.1                                                                                                                     
       Fresh libc v0.1.2                                                                                                                                
       Fresh bitflags v0.1.1                                                                                                                            
       Fresh neovim-rs v0.0.9 (https://github.com/oakes/neovim-rs#dbaabf31)                                                                             
       Fresh racer v0.0.1 (https://github.com/oakes/racer#fd596824)                                                                                     
       Fresh gcc v0.3.1                                                                                                                                 
   Compiling cairo-sys v0.1.0 (https://github.com/oakes/rgtk#01b611cf)                                                                                  
     Running `/home/vagrant/projects/SolidOak/target/debug/build/cairo-sys-fbbf5b476f8c9abf/build-script-build`                                         
   Compiling glib-sys v0.1.0 (https://github.com/oakes/rgtk#01b611cf)                                                                                   
     Running `/home/vagrant/projects/SolidOak/target/debug/build/glib-sys-315c48ed6be1c944/build-script-build`                                          
Build failed, waiting for other jobs to finish...                                                                                                       
failed to run custom build command for `glib-sys v0.1.0 (https://github.com/oakes/rgtk#01b611cf)`                                                       
Process didn't exit successfully: `/home/vagrant/projects/SolidOak/target/debug/build/glib-sys-315c48ed6be1c944/build-script-build` (exit code: 101)    
--- stderr                                                                                                                                              
thread '<main>' panicked at '`"pkg-config" "--libs" "--cflags" "glib-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                                                                                                                             
', /home/vagrant/.cargo/git/checkouts/rgtk-3e0fc177da20fde3/master/glib-sys/build.rs:6                                                                  

Sys Info

λ ~/projects/SolidOak/ master cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
λ ~/projects/SolidOak/ master uname -a
Linux localdev 3.13.0-44-generic #73-Ubuntu SMP Tue Dec 16 00:22:43 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux```
oakes commented 9 years ago

Can you verify that you've installed the libraries from apt-get? Once they are installed, that pkg-config command should return something.

leonardinius commented 9 years ago
root@localdev:~/projects/SolidOak# apt-get install libgtk-3-dev libglib2.0-dev libcairo2-dev libvte-2.90-dev -y  -qq && echo Done
apt-get install libtool autoconf automake cmake libncurses5-dev g++ pkg-config unzip -y -qq && echo Done
Done
root@localdev:~/projects/SolidOak# apt-get install libtool autoconf automake cmake libncurses5-dev g++ pkg-conf ig unzip -y -qq && echo Done
Done
oakes commented 9 years ago

Try this: pkg-config --libs --cflags glib-2.0

leonardinius commented 9 years ago

It gives me the following

Edit: email formatting broke it

root@localdev:~/projects/SolidOak#  pkg-config --libs --cflags glib-2.0
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
root@localdev:~/projects/SolidOak#
oakes commented 9 years ago

Try pkg-config --list-all. You don't need to paste the results if it's a big list. I'm just curious if it finds anything.

On Wed, Mar 11, 2015 at 10:26 AM, Leonids Maslovs notifications@github.com wrote:

It gives me the following

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
root@localdev:~/projects/SolidOak#

On 2015.03.11. 16:24, Zach Oakes wrote:

|pkg-config --libs --cflags glib-2.0|

-- Reply to this email directly or view it on GitHub https://github.com/oakes/SolidOak/issues/10#issuecomment-78272843.

leonardinius commented 9 years ago

It's not that big list

λ ~/projects/SolidOak/ master pkg-config --list-all
vte-2.90    vte - Vte terminal widget.
liblzma     liblzma - General purpose data compression library
dbus-python dbus-python - Python bindings for D-Bus
oakes commented 9 years ago

Weird. If you run ls /usr/lib/x86_64-linux-gnu/pkgconfig do you see a lot of *.pc files?

On Wed, Mar 11, 2015 at 10:46 AM, Leonids Maslovs notifications@github.com wrote:

It's not that big list

ë ~/projects/SolidOak/ master pkg-config --list-all vte-2.90 vte - Vte terminal widget. liblzma liblzma - General purpose data compression library dbus-python dbus-python - Python bindings for D-Bus

Reply to this email directly or view it on GitHub https://github.com/oakes/SolidOak/issues/10#issuecomment-78277089.

leonardinius commented 9 years ago

yep, I also see

 ls /usr/lib/x86_64-linux-gnu/pkgconfig/*glib*
/usr/lib/x86_64-linux-gnu/pkgconfig/glib-2.0.pc
oakes commented 9 years ago

Try export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig. I never had to do this, but it looks like in your case pkg-config doesn't seem to be finding this directory.

leonardinius commented 9 years ago

It partially helped. It solved glib issue, however I'm facing the new one.

Process didn't exit successfully: `/home/vagrant/projects/SolidOak/target/debug/build/cairo-sys-fbbf5b476f8c9abf/build-script-build` (exit code: 101)
--- stderr
thread '<main>' panicked at '`"pkg-config" "--libs" "--cflags" "cairo"` did not exit successfully: exit code: 1 --- stderr
Package xproto was not found in the pkg-config search path.
Perhaps you should add the directory containing `xproto.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xproto', required by 'xau', not found
', /home/vagrant/.cargo/git/checkouts/rgtk-3e0fc177da20fde3/master/cairo-sys/build.rs:6

and the meta is below

λ ~/projects/SolidOak/ master ls /usr/lib/x86_64-linux-gnu/pkgconfig/*cairo*
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo-fc.pc       /usr/lib/x86_64-linux-gnu/pkgconfig/cairo-svg.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo-ft.pc       /usr/lib/x86_64-linux-gnu/pkgconfig/cairo-tee.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo-gobject.pc  /usr/lib/x86_64-linux-gnu/pkgconfig/cairo-xcb.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo.pc          /usr/lib/x86_64-linux-gnu/pkgconfig/cairo-xcb-shm.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo-pdf.pc      /usr/lib/x86_64-linux-gnu/pkgconfig/cairo-xlib.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo-png.pc      /usr/lib/x86_64-linux-gnu/pkgconfig/cairo-xlib-xrender.pc /usr/lib/x86_64-linux-gnu/pkgconfig/cairo-ps.pc       /usr/lib/x86_64-linux-gnu/pkgconfig/pangocairo.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/cairo-script.pc

λ ~/projects/SolidOak/ master ls /usr/lib/x86_64-linux-gnu/pkgconfig/*proto*
zsh: no matches found: /usr/lib/x86_64-linux-gnu/pkgconfig/*proto*

λ ~/projects/SolidOak/ master ls /usr/lib/x86_64-linux-gnu/pkgconfig/*xau*
/usr/lib/x86_64-linux-gnu/pkgconfig/xau.pc
oakes commented 9 years ago

OK, try this: export PKG_CONFIG_PATH=/usr/share/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig

leonardinius commented 9 years ago

That was it.

Thanks for your patience and effort. I would try to solve it myself, unfortunately I'm not that familiar with Linux and pkg-config particularly.


I was 5 seconds away from hitting 'close and comment' button, when build failed with that ld error https://gist.github.com/leonardinius/31617d848cde1b508465#file-build-log

tl;dr;

note: /usr/bin/ld: cannot find -lnvim
/usr/bin/ld: cannot find -lmsgpack
collect2: error: ld returned 1 exit status

Is it nvim error, or is it something controlled by SolidOak?

leonardinius commented 9 years ago

I tried to rm -rf /home/vagrant/.cargo/git/checkouts/neovim-rs-2bb65758e77de428 and then to retry cargo build, with same result.

leonardinius commented 9 years ago

Additional info (might be useful): I've recently & successfully done brew reinstall --HEAD neovim (around 1h ago).

oakes commented 9 years ago

Looks like Neovim didn't build correctly. Cargo doesn't show the full output, so the best way to see what happened is to clone https://github.com/oakes/neovim and run make libnvim in that repo. Let me know what errors you get.

leonardinius commented 9 years ago

hmmm

...
[100%] Built target libnvim
make[3]: Leaving directory `/home/vagrant/projects/neovim-oakes/build'
make[2]: Leaving directory `/home/vagrant/projects/neovim-oakes/build'
make[1]: Leaving directory `/home/vagrant/projects/neovim-oakes/build'

λ ~/projects/neovim-oakes/ master* ls build/lib/libnvim.a
build/lib/libnvim.a
oakes commented 9 years ago

Wow, so it worked. Can you try cargo clean && cargo build in SolidOak? It's building the exact same project behind the scenes.

leonardinius commented 9 years ago

That solved it. Once again, thanks for your patience and effort.

PS> Gave it a quick try. SolidOak so far looks fantastic and just works. Will try to start using it on regular basis and looking towards future releases.