vim build error (librpcsvc.so.4, needed by /usr/local/lib/libXrandr.so, not found)

Hi Folks,

I added
Code:
WITH_GTK2=yes
in /etc/make.conf and attempted to rebuild vim on FreeBSD-CURRENT system.
Unfortunately, build failed at compilation of gtk20:

Code:
gnome-libtool: link: ( cd ".libs" && rm -f "libgdk-x11-2.0.la" && ln -s "../libgdk-x11-2.0.la" "libgdk-x11-2.0.la" )
/usr/local/bin/g-ir-scanner --add-include-path=../gdk-pixbuf --namespace=Gdk --nsversion=2.0 --libtool="/bin/sh /usr/ports/x11-
toolkits/gtk20/work/gnome-libtool"  --library=libgdk-x11-2.0.la  --include=Gio-2.0 --include=GdkPixbuf-2.0 --include=Pango-1.0 --strip-prefix=Gdk 
--add-include-path=../gdk-pixbuf -DG_LOG_DOMAIN=\"Gdk\" -DGDK_COMPILATION -I.. -I../gdk -I../gdk-pixbuf -DG_DISABLE_CAST_CHECKS -D_REENTRANT -
D_THREAD_SAFE -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include/pango-1.0 -I/usr/local/include/cairo -
I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include/gio-unix-2.0/     gdk.h 
gdkapplaunchcontext.h gdkcairo.h gdkcolor.h gdkcursor.h gdkdisplay.h gdkdisplaymanager.h gdkdnd.h gdkdrawable.h gdkevents.h gdkfont.h gdkgc.h 
gdki18n.h gdkimage.h gdkinput.h gdkkeys.h gdkkeysyms.h gdkpango.h gdkpixbuf.h gdkpixmap.h gdkprivate.h gdkproperty.h gdkregion.h gdkrgb.h 
gdkscreen.h gdkselection.h gdkspawn.h gdktestutils.h gdktypes.h gdkvisual.h gdkwindow.h gdk.c gdkapplaunchcontext.c gdkcairo.c gdkcolor.c 
gdkcursor.c gdkdisplay.c gdkdisplaymanager.c gdkdnd.c gdkdraw.c gdkevents.c gdkfont.c gdkgc.c gdkglobals.c gdkimage.c gdkkeys.c gdkkeyuni.c 
gdkoffscreenwindow.c gdkpango.c gdkpixbuf-drawable.c gdkpixbuf-render.c gdkpixmap.c gdkpolyreg-generic.c gdkrectangle.c gdkregion-generic.c 
gdkrgb.c gdkscreen.c gdkselection.c gdkvisual.c gdkwindow.c gdkwindowimpl.c gdkenumtypes.c gdkenumtypes.h x11/checksettings.c 
x11/gdkapplaunchcontext-x11.c x11/gdkasync.c x11/gdkcolor-x11.c x11/gdkcursor-x11.c x11/gdkdisplay-x11.c x11/gdkdnd-x11.c x11/gdkdrawable-x11.c 
x11/gdkevents-x11.c x11/gdkfont-x11.c x11/gdkgc-x11.c x11/gdkgeometry-x11.c x11/gdkglobals-x11.c x11/gdkim-x11.c x11/gdkimage-x11.c x11/gdkinput-
none.c x11/gdkinput-x11.c x11/gdkinput-xfree.c x11/gdkinput.c x11/gdkkeys-x11.c x11/gdkmain-x11.c x11/gdkpixmap-x11.c x11/gdkproperty-x11.c 
x11/gdkscreen-x11.c x11/gdkselection-x11.c x11/gdksettings.c x11/gdkspawn-x11.c x11/gdktestutils-x11.c x11/gdkvisual-x11.c x11/gdkwindow-x11.c 
x11/gdkxftdefaults.c x11/gdkxid.c x11/xsettings-client.c x11/xsettings-common.c libgdk-x11-2.0.la Makefile --output Gdk-2.0.gir
/usr/bin/ld: warning: librpcsvc.so.4, needed by /usr/local/lib/libXrandr.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libz.so.5, needed by /usr/local/lib/libfontconfig.so, may conflict with libz.so.6
/libexec/ld-elf.so.1: Shared object "librpcsvc.so.4" not found, required by "libXrandr.so.2"
Command '['/usr/ports/x11-toolkits/gtk20/work/gtk+-2.20.1/gdk/tmp-introspectAVkJXG/Gdk-2.0', '--introspect-dump=/usr/ports/x11-
toolkits/gtk20/work/gtk+-2.20.1/gdk/tmp-introspectAVkJXG/types.txt,/usr/ports/x11-toolkits/gtk20/work/gtk+-2.20.1/gdk/tmp-
introspectAVkJXG/dump.xml']' returned non-zero exit status 1
gmake[4]: *** [Gdk-2.0.gir] Error 1
gmake[4]: Leaving directory `/usr/ports/x11-toolkits/gtk20/work/gtk+-2.20.1/gdk'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/usr/ports/x11-toolkits/gtk20/work/gtk+-2.20.1/gdk'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/ports/x11-toolkits/gtk20/work/gtk+-2.20.1/gdk'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/x11-toolkits/gtk20/work/gtk+-2.20.1'
gmake: *** [all] Error 2
*** Error code 1

Stop in /usr/ports/x11-toolkits/gtk20.
*** Error code 1

Stop in /usr/ports/editors/vim.
krived@csx-spb-freebsd9 15:16:15 /usr/ports/editors/vim $ [1]

I searched through the forum and google, but didn't find an answer :(
How can I fix the problem?

Thanks in advance!
 
Is not silly question.
Try
Code:
pkg_add -r gtk20
And try to recompile vim again.
Don't forget to run
Code:
make clean
before run again
Code:
make install clean
 
Hi!
I run

sudo pkg_add -r gtk20

but got:

Code:
Error: Unable to get [url]ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/gtk20.tbz:[/url] File unavailable 
(e.g., file not found, no access)
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-9-current/Latest/gtk20.tbz' by URL

I'm using FreeBSD-CURRENT.

Also, my ports tree is up-to-date.

And yes, I run make clean before make install clean

Any other ideas?

Thanks!
 
Thanks! I installed gtk20.tgz and built vim.
But I got an installation error
Code:
krived@csx-spb-freebsd9 13:11:40 /usr/ports/editors/vim $ [0] sudo make install
===>  Installing for vim-gtk2-7.2.411
===>   vim-gtk2-7.2.411 depends on file: /usr/local/libdata/pkgconfig/xt.pc - found
===>   vim-gtk2-7.2.411 depends on executable: pkg-config - found
===>   vim-gtk2-7.2.411 depends on file: /usr/local/lib/gio/modules/libgiofam.so - found
===>   vim-gtk2-7.2.411 depends on shared library: iconv.3 - found
===>   vim-gtk2-7.2.411 depends on shared library: atk-1.0.0 - found
===>   vim-gtk2-7.2.411 depends on shared library: glib-2.0.0 - found
===>   vim-gtk2-7.2.411 depends on shared library: gtk-x11-2.0.0 - found
===>   vim-gtk2-7.2.411 depends on shared library: pango-1.0.0 - found
===>   Generating temporary packing list
===>  Checking if editors/vim already installed
===>   An older version of editors/vim is already installed (vim-7.2.411)
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of editors/vim
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/editors/vim.
krived@csx-spb-freebsd9 13:11:50 /usr/ports/editors/vim $ [1]

Then I tried deinstall && reinstall, but it doesn't work:

Code:
krived@csx-spb-freebsd9 13:13:30 /usr/ports/editors/vim $ [1] sudo make deinstall
===>  Deinstalling for editors/vim
krived@csx-spb-freebsd9 13:13:43 /usr/ports/editors/vim $ [0] sudo make reinstall
===>  Installing for vim-gtk2-7.2.411
===>   vim-gtk2-7.2.411 depends on file: /usr/local/libdata/pkgconfig/xt.pc - found
===>   vim-gtk2-7.2.411 depends on executable: pkg-config - found
===>   vim-gtk2-7.2.411 depends on file: /usr/local/lib/gio/modules/libgiofam.so - found
===>   vim-gtk2-7.2.411 depends on shared library: iconv.3 - found
===>   vim-gtk2-7.2.411 depends on shared library: atk-1.0.0 - found
===>   vim-gtk2-7.2.411 depends on shared library: glib-2.0.0 - found
===>   vim-gtk2-7.2.411 depends on shared library: gtk-x11-2.0.0 - found
===>   vim-gtk2-7.2.411 depends on shared library: pango-1.0.0 - found
===>   Generating temporary packing list
===>  Checking if editors/vim already installed
===>   An older version of editors/vim is already installed (vim-7.2.411)
      You may wish to ``make deinstall'' and install this port again
      by ``make reinstall'' to upgrade it properly.
      If you really wish to overwrite the old port of editors/vim
      without deleting it first, set the variable "FORCE_PKG_REGISTER"
      in your environment or the "make install" command line.
*** Error code 1

Stop in /usr/ports/editors/vim.
*** Error code 1

Stop in /usr/ports/editors/vim.
krived@csx-spb-freebsd9 13:13:49 /usr/ports/editors/vim $ [1]

Another interesting question is why built vim binary uses GTK-1.2 instead of GTK-2.0:

Code:
krived@csx-spb-freebsd9 13:14:24 /usr/ports/editors/vim $ [1] find . -name vim
./work/vim72/src/vim
krived@csx-spb-freebsd9 13:14:30 /usr/ports/editors/vim $ [0] ldd ./work/vim72/src/vim
./work/vim72/src/vim:
        libgtk-12.so.2 => /usr/local/lib/libgtk-12.so.2 (0x8007f4000)
        libgdk-12.so.2 => /usr/local/lib/libgdk-12.so.2 (0x800a54000)
        libgmodule-12.so.3 => /usr/local/lib/libgmodule-12.so.3 (0x800b91000)
        libglib-12.so.3 => /usr/local/lib/libglib-12.so.3 (0x800c94000)
        libintl.so.9 => /usr/local/lib/libintl.so.9 (0x800dbd000)
        libXi.so.6 => /usr/local/lib/libXi.so.6 (0x800ec6000)
        libXext.so.6 => /usr/local/lib/libXext.so.6 (0x800fd4000)
        libXt.so.6 => /usr/local/lib/libXt.so.6 (0x8010e5000)
        libm.so.5 => /lib/libm.so.5 (0x801245000)
        libncurses.so.8 => /lib/libncurses.so.8 (0x801372000)
        libc.so.7 => /lib/libc.so.7 (0x8014ce000)
        libX11.so.6 => /usr/local/lib/libX11.so.6 (0x80177e000)
        libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x8019ad000)
        libSM.so.6 => /usr/local/lib/libSM.so.6 (0x801ba8000)
        libICE.so.6 => /usr/local/lib/libICE.so.6 (0x801cb0000)
        libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x801dca000)
        libXau.so.6 => /usr/local/lib/libXau.so.6 (0x801ee4000)
        libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x801fe7000)
        libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x8020ec000)
        librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x8021ed000)
krived@csx-spb-freebsd9 13:14:35 /usr/ports/editors/vim $ [0]

Ideas?
 
The problem is solved.
I looked into config.log and found a problem with libXrandr (that's why GTK-1.2 was used instead of GTK-2).
Then I reinstalled libXrandr and then vim.
Now it compiled with GTK-2 support and works fine.
 
Back
Top