My favorites | Sign in
vtg
Project Home Downloads Wiki Issues
Search
for
Compile  

Phase-Deploy, Featured
Updated Aug 12, 2011 by seje...@gmail.com

How to compile and install Vala Toys for GEdit

Prerequisites

Last released version:

  * glib at least 2.28.0
  * gtk+ at least 3.0
  * gedit at least 3.0
  * vala 0.12 (0.14 is not supporter yet)

Standard compile instruction for system-wide installation (easy)

./configure --prefix=/usr
make
sudo make install

Local User installation and other installation tips (not always easy)

Compiling

Having installed the required dependecies, you can compile Vtg with this command if you downloaded the source tarball:

./configure --prefix=$HOME/.local
make

or with this if you checked out vtg from the svn repository:

./autogen.sh --prefix=$HOME/.local
make

Alternative method

To workaround the issue 135, caused by the inconsistent generation of the configure script by different version of autotools, I have included in the repository the files required to compile without using autogen.sh.

In this case to compile vtg you should use:

aclocal
automake --add-missing
intltoolize --force
./configure --prefix=$HOME/.local
make

TIP

If you get this error on a 64bit system

/usr/bin/ld: ../gsc-0.7.0/gtksourcecompletion/.libs/libgtksourcecompletion-2.0.a(gsc-provider.o): relocation R_X86_64_32S against `.text' can not be used when making a shared object; recompile with -fPIC
../gsc-0.7.0/gtksourcecompletion/.libs/libgtksourcecompletion-2.0.a: could not read symbols: Bad value
collect2: ld returned 1 exit status

try to recompile with CFLAGS specified:

make CFLAGS="-g -O2 -fPIC"

Installing

Step 1

To install for the current user, from the root folder of the Vtg distribution, do:

make install

Step 2

Now we have to copy vala-gen-project from the gen-project folder to one included in the executable path (eg. /usr/local/bin)

sudo cp gen-project/vala-gen-project /usr/local/bin

Or in alternative add $HOME/.local/bin in front of your $PATH variable

Step 3

Finally, because of this GSetting limit Bug 649717, we have to copy the schema file and updated (compile) the schema cache. From the vala toys source folder:

sudo cp data/org.gnome.gedit.plugins.vala-toys.gschema.xml  /usr/share/glib-2.0/schemas/
sudo glib-compile-schemas
Comment by bigmike.MK, Oct 29, 2008

It should read "make", not "./make". Works fine otherwise, thank you. :-)

Comment by rca...@gmail.com, Nov 3, 2008

"./autogen.sh --prefix="your home dir"/.gnome2/gedit/plugins --datadir="your home dir"/.gnome2/gedit/plugins", not "./configure --prefix="your home dir"/.gnome2/gedit/plugins --datadir="your home dir"/.gnome2/gedit/plugins". Works fine otherwise, thank you. :-)

Comment by project member seje...@gmail.com, Nov 30, 2008

Just notice your comments after one month! I've updated the documentation.

Thanks to both of you. Andrea

Comment by Fiti....@gmail.com, Dec 7, 2008

At the compilation of vsc-shell was an error, readline.h not found. I have installed readline from here http://tiswww.case.edu/php/chet/readline/rltop.html and the library has many errors of sintax. I have fixed the problem comment in vsccompletionshell.c the include and the lines 81 to 96, that containts two calls to this library(readline and add_history)

Comment by adam%med...@gtempaccount.com, Jan 24, 2009

To clarify the above, if you downloaded a tarball, you need to run "./configure --prefix=..." since autogen.sh will not exist. If you synced from Subversion, you need to run "./autogen.sh --prefix=..." since configure will not exist. (This is typical for any package following the GNU Coding Standards.)

Comment by justy...@gmail.com, Jan 25, 2009

Downloaded from svn on Ubuntu-8.10 x86-64. Followed instructions but vtg/.libs/libvtg.so was never built. There weren't any build errors or make error either. It just simply didn't build it. Any ideas?

Comment by project member seje...@gmail.com, Jan 25, 2009

Vtg build is disabled because you missed some required dependency. You can see it at the end of the autogen/configure step.

This thread may helps you: http://groups.google.com/group/vtg-dev/browse_thread/thread/d3cd81f9dd317fc5

Comment by ajsel...@gmail.com, Apr 8, 2009

Hi, I successfully built vtg but after I installed it, the entry in the gedit plugins list is grayed out. I cannot seem to enable the plugin. I'm probably missing something simple...

Thanks for your help.

Comment by noizyl...@gmail.com, Apr 14, 2009

I had to: $ mkdir ~/.gnome2/gedit/plugins/vtg/ui and $ cp ui/vtg.ui ~/.gnome2/gedit/plugins/vtg/ui/ in order for the configure plugin dialog to be displayed.

Comment by LinuxOfL...@gmail.com, Apr 29, 2009

@ajselvig I had the same problem with enabling the plugin in gedit.

When I ran gedit from the terminal I saw the following message despite the fact that I had installed libgtksourcecompletion1.0-0_0.5.2-0~vala1_amd64.deb from the vala team PPA in Ubuntu:

  • (gedit:8868): WARNING : vtg: libgtksourcecompletion-1.0.so.1: cannot open shared object file: No such file or directory

Turns out there was no library inside the .deb file just some docs so I found another version inside a fedora rpm here: http://rpm.pbone.net/index.php3/stat/4/idpl/11898432/com/gtksourcecompletion-0.5.2-1.fc11.x86_64.rpm.html#content

(Note this is the 64bit version google for 32bit version I think fedora is i586)

I converted this to .deb using alien:

sudo alien gtksourcecompletion-0.5.2-1.fc11.x86_64.rpm

Then I could just install the deb with a double click and the gedit plugin worked flawlessly

Comment by mn...@minimum.se, May 19, 2009

First time I did this I accidently used "sudo make install" so all the files whered own by root == didn't work well (the guide above is strange because it mentions "installs VTG for all users" so clearly it's meant to be possible to run it as root but the "make install" doesn't seem to chown the files?)

Second time I followed the instructions but the plugin didn't show up in gedit preferences dialog. When I looked in ~/.gnome2/gedit the makefile had put the files in:

/home/mnemo/.gnome2/gedit/plugins/lib/gedit-2/plugins/libvtg.so

This doesn't work because gedit doesn't traverse the subdirs (I think). When I copied the stuff in the plugins subdir up to the parent "plugins" dir then everything worked.

Comment by ajsel...@gmail.com, May 27, 2009

Okay, so I got the release version (0.4.1) running on a fresh install of Ubuntu 9.04. The one little hickup I had was that GEdit wasn't finding vala-gen-project (wasn't in the path), so I made a little startup script that has this before calling gedit:

PATH=$PATH:/home/andy/.gnome2/gedit/plugins/bin/

So, this seems to work and I can create a new project.

Comment by vpereto...@gmail.com, May 31, 2009

checking for readline/readline.h... yes checking for VTGPLUGIN... no configure: error: vtg-plugin dependencies

Comment by Alexande...@rambler.ru, Jun 2, 2009

The same situation:

checking for VTGPLUGIN... no configure: error: vtg-plugin dependencies

Comment by Alexande...@rambler.ru, Jun 2, 2009

Make crashes at vscsymbolcompletion.c There are lot of mistakes such as "variable tmp1 is undefined" How can I solve the problem?

Comment by kari.pih...@gmail.com, Jul 1, 2009

@vperetokin I had the same problem, but I solved it by following the thread http://groups.google.com/group/vtg-dev/browse_thread/thread/d3cd81f9dd317fc5

Also, I checked out the latest version of vala and vtg (not source tar balls) and installed these packages: libgbf-1-dev, libgnomeui-dev, gnome-common

Finally, there were some errors in vtg-plugin compilation. Since I only wanted vala-gen-project so I disabled vtg-plugin: ./autogen.sh --prefix=/home/kari/.gnome2/gedit/plugins --datadir=/home/kari/.gnome2/gedit/plugins --disable-vtg-plugin

Hope this help!

Comment by ekspi...@gmail.com, Sep 9, 2009

I'm trying to install When I try and make vtg it automakes itself happily with very positive comments at the end of the configure: ---{ vtg 0.5.0 }--- prefix: /home/drop/.gnome2/gedit/plugins sysconfdir: ${prefix}/etc localstatedir: ${prefix}/var C Compiler: gcc CFLAGS: -g -O2 Vala Vapidir: /usr/share/vala/vapi Enable gen-project: yes Enable vsc library: yes Enable vtg: yes Enable vsc-shell: yes

, but when I make the thing, it ends with these errors: vtgoutputview.c: In function ‘vtg_output_view_on_textview_key_press’: vtgoutputview.c:250: error: ‘buffer_length1’ undeclared (first use in this function) vtgoutputview.c:250: error: (Each undeclared identifier is reported only once vtgoutputview.c:250: error: for each function it appears in.)

does anyone have any ideas what may be causing this?

Comment by rjek.ph...@gmail.com, Apr 16, 2010

Doesn't appear to build anymore with Vala 0.8.0; missing Vala.ReadOnlyList? type, and some calls to do with obtaining types of literal values. :(

Comment by project member seje...@gmail.com, Apr 16, 2010

Hi,

the issue was already reported http://code.google.com/p/vtg/issues/detail?id=131 I'll try to fix the issue this weekend and make a release

Comment by agustin....@gmail.com, May 3, 2010

On install, this line is wrong: cp -r images/ ~/.gnome2/gedit/plugins/vtg/

should be: cp -r images ~/.gnome2/gedit/plugins/vtg/

Otherwise images get copied on worng folder

Comment by project member seje...@gmail.com, May 4, 2010

Thanks for the report, fixed now

Comment by lukas.zapletal, May 25, 2010

Thanks!

mkdir ~/.gnome2/gedit/plugins/vtg

should be

mkdir -p ~/.gnome2/gedit/plugins/vtg

Comment by project member seje...@gmail.com, May 26, 2010

Thanks for tip!

Comment by shanepat...@gmail.com, May 28, 2010

I get this error at ./config I have vala 0.8 installed and gtk 2.17 afrodite library dependencies not met:

vala-1.0 >= 0.7.7: not found
./configure: line 12499: xyes: command not found checking for VTGPLUGIN... no vtg-plugin dependencies not met:
gedit-2.20 >= 2.28.0: not found vala-1.0 >= 0.7.7: not found gconf-2.0 >= 2.22.0: not found
configure: error: vtg-plugin dependencies not met: glib-2.0 >= 2.12.0 gio-2.0 >= 2.12.0 gobject-2.0 >= 2.12.0 gthread-2.0 >= 2.16.0 vala-1.0 >= 0.7.7 gtk+-2.0 >= 2.18.0 gedit-2.20 >= 2.28.0 gconf-2.0 >= GCONF_REQUIRED

Comment by project member seje...@gmail.com, May 31, 2010

what's the output of pkg-config --modversion vala-1.0 ?

And please note that the min gtk+ required is 2.18.0

Comment by Twilight...@gmail.com, May 31, 2010

How would I go about compiling and installing only libafrodite, so that I can use it with monodevelop?

Comment by project member seje...@gmail.com, Jun 1, 2010

Try using the -disable-gen-project and --disable-vtg-plugin in the configure, it should work but I never tried it

Comment by Twilight...@gmail.com, Jun 1, 2010

That's what I'm doing, but it doesn't work. I get this interesting output:

Making all in gen-project
make[2]: Entering directory `/home/trent/Source/afrodite-svn/src/vtg-svn/gen-project'
Making all in libgen-project
make[3]: Entering directory `/home/trent/Source/afrodite-svn/src/vtg-svn/gen-project/libgen-project'
make[4]: Entering directory `/home/trent/Source/afrodite-svn/src/vtg-svn/gen-project/libgen-project'
  VALAC  libgen_project_la_vala.stamp
  CC     valaprojectgenerator.lo
valaprojectgenerator.c:28:18: fatal error: glib.h: No such file or directory
compilation terminated.

It looks as if it's trying to compile gen-project anyways.

Comment by project member seje...@gmail.com, Jun 6, 2010

I think that I fixed the configure script: can you retry and verify if it works?

This are the new command switches to use: --disable-gen-project --disable-vtg-plugin --enable-afrodite

Comment by Twilight...@gmail.com, Jun 8, 2010

This time, compilation failed much sooner:

make[2]: Entering directory `/home/trent/Source/afrodite-svn/src/vtg-svn/afrodite'
/usr/bin/valac --Xcc "-D G_DISABLE_DEBUG" -C -H afrodite.h --library afrodite-1.0 --vapidir ../vapi --pkg gio-2.0 --pkg config --pkg vala-1.0 --pkg utils --basedir ../afrodite astmerger.vala astdumper.vala parser.vala symbol.vala symbolresolver.vala datatype.vala voidtype.vala sourcereference.vala sourcefile.vala ast.vala utils.vala completionengine.vala ellipsistype.vala queryoptions.vala queryresult.vala resultitem.vala constants.vala sourceitem.vala
/usr/bin/valac --Xcc "-D G_DISABLE_DEBUG" -C --vapidir ../vapi --vapidir ./ --pkg afrodite-1.0 --pkg gio-2.0 --pkg config --pkg vala-1.0 --pkg utils --basedir ../afrodite afroditetest.vala
error: afrodite-1.0 not found in specified Vala API directories or GObject-Introspection GIR directories
Compilation failed: 1 error(s), 0 warning(s)
Comment by Twilight...@gmail.com, Jun 8, 2010

P.S.: Thank you for your efforts. :)

Comment by project member seje...@gmail.com, Jun 8, 2010

can you do a clean compilation? I see no reason why afroditetest doesn't found the vapi.

For clean I mean:

1) rerun ./autogen.sh with your options 
2) make clean; rm */*.stamp; make

Thanks

Comment by Twilight...@gmail.com, Jun 8, 2010

Okay. After some more testing, I figured out that it's failing when the prefix is set. When I remove the --prefix=/usr option, it starts working. I can't make an Arch PKGBUILD without this option.

Comment by project member seje...@gmail.com, Jun 8, 2010

I'm sorry but I can't reproduce your bug.

This is what I've done to try to reproduce it:

1) checkout a fresh copy of vtg from the svn repos (trunk HEAD)
2) ./autogen.sh
3) ./configure --prefix=/usr --disable-vtg-plugin --disable-gen-project --enable-afrodite
4) make

Afrodite & afrodite test build fine here.

P.S. Can we continue to debug this issue using the bug tracker: http://code.google.com/p/vtg/issues/detail?id=135

It will be easier for me to track the discussion, thanks.

Comment by powelld...@gmail.com, Aug 16, 2010

Hi:

I'm on Ubuntu 10.04 Lucid. I compiled and installed the code as per instructions. When I try to open a new project, I see a dialog box asking me for a file name. No matter what I choose, a new or old file, I get an error: "Can't load project. No suitable backend found"

My .gnome2/gedit/plugins directory tree looks like: ~/.gnome2/gedit/plugins$ ls -R .: libvtg.so vtg vtg.gedit-plugin

./vtg: images ui

./vtg/images: element-class-16.png element-interface-16.png element-structure-16.png element-delegate-16.png element-literal-16.png Makefile element-enumeration-16.png element-method-16.png Makefile.am element-event-16.png element-namespace-16.png Makefile.in element-field-16.png element-property-16.png README

./vtg/ui: vtg.ui

I assume it's something stupid I'm doing. Any ideas?

Thanks in advance.

Dean Powell

Comment by project member seje...@gmail.com, Aug 17, 2010

Hi,

you haven't done anything wrong, but the compile/install page is incomplete.

You are experiencing a bug: vala toys can't find vala-gen-project in the path. The reason is that you haven't installed vala-gen-project (because I haven't written anything about it in the install paragrapher).

I advise you to uninstall vala toys and follow the system-wide instruction since they are pretty standard and easier.

If you still want to install vala toys as a local user please follow my additions about vala-gen-project in the install section.

Regards,

Andrea

Comment by uzytkown...@gmail.com, Sep 2, 2010

Instead of writing

./configure --prefix="your home dir"/.gnome2/gedit/plugins --datadir="your home dir"/.gnome2/gedit/plugins

it could be written

./configure --prefix=$HOME/.gnome2/gedit/plugins --datadir=$HOME/.gnome2/gedit/plugins
Comment by project member seje...@gmail.com, Sep 2, 2010

done, thanks

Comment by dursunca...@gmail.com, Sep 27, 2010

afrodite library dependencies not met:

vala-0.10 >= 0.9.5: not found
configure: error: afrodite library dependencies not met: glib-2.0 >= 2.12.0 gio-2.0 >= 2.12.0 gobject-2.0 >= 2.12.0 gthread-2.0 >= 2.16.0 vala-0.10 >= 0.9.5

I try everything I know.

autoreconf --force autoreconf --install autoreconf --symlink

It doesn't change anything..

Comment by project member seje...@gmail.com, Sep 28, 2010

what is your installed vala version?

Can you verify that this directory exists $(PREFIX)/share/vala-0.10/vapi ?

Comment by dursunca...@gmail.com, Oct 5, 2010

Well when I try to run autogen.sh from the source code of the vtg. I get this error :

configure: error: afrodite library dependencies not met:

glib-2.0 >= 2.12.0 gio-2.0 >= 2.12.0 gobject-2.0 >= 2.12.0 gthread-2.0 >= 2.16.0 libvala-0.12 >= 0.9.7

Bu these libraries are comes from ubuntu launchpad vtg ppa. May be for this case, I can't create gedit plugin and also libraries using vgt. But there is no problem with the application creating.

Comment by project member seje...@gmail.com, Oct 6, 2010

Probably you have vala 0.10 installed but you are trying to compile vtg from trunk. As written on the top of this page you have to use:

  • vtg_0_10_x branch if your installed vala is 0.10
  • trunk for vala 0.11 (master)
Comment by bpwinfrey@gmail.com, Jul 19, 2011

I had some difficulties getting VTG to install in Gnome 3 using the latest Vala 0.13.1 Here's what I had to do:

get source: aee1d171748467015f1b8bb217b94592130d3282 7-12-2011, Compiled beta 5

modify source: diff --git a/configure.ac b/configure.ac index 4504acf..30ab3bb 100644 --- a/configure.ac +++ b/configure.ac @@ -34,11 +34,11 @@ GTK_REQUIRED=3.0.0

GEDIT_REQUIRED=2.91.0 GTKSOURCEVIEW_REQUIRED=2.91.0 VALA_REQUIRED=0.11.0
-VALA_VERSION=0.12 +VALA_VERSION=0.14
PEAS_REQUIRED=0.7.4 AFRODITE_REQUIRED=
-PACKAGE_SUFFIX=-0.12 +PACKAGE_SUFFIX=-0.14
AC_SUBST(PACKAGE_SUFFIX) AC_DEFINE_UNQUOTED(PACKAGE_SUFFIX, "$PACKAGE_SUFFIX", the suffix of this package?)
diff --git a/vtg/vtgprojectmanagerui.vala b/vtg/vtgprojectmanagerui.vala index 828706d..e8cb8dd 100644 --- a/vtg/vtgprojectmanagerui.vala +++ b/vtg/vtgprojectmanagerui.vala @@ -131,7 +131,7 @@ namespace Vtg
</ui>""";
private uint ui_id;
- const ActionEntry? action_entries = { + const Gtk.ActionEntry? action_entries = {
{"ProjectNew?", null, N("New Project..."), null, N("Create a new project"), on_project_new}, {"ProjectOpen?", null, N("Op_en Project..."), "<control><alt>O", N("Open an existing project"), on_project_open}, {"ProjectSaveAll?", null, N("Save All"), null, N("Save all project files"), on_project_save_all},
diff --git a/vtg/vtgprojectview.vala b/vtg/vtgprojectview.vala index 0cffe6d..577298f 100644 --- a/vtg/vtgprojectview.vala +++ b/vtg/vtgprojectview.vala @@ -56,7 +56,7 @@ namespace Vtg
</ui>""";
- const ActionEntry? action_entries = { + const Gtk.ActionEntry? action_entries = {
{"packages-open-configure", Gtk.Stock.OPEN, N("Open configure file..."), "<control><shift>C", N("Open configure.ac file"), on_packages_open_configure}, {"target-open-makefile", Gtk.Stock.OPEN, N("Open makefile"), "<control><shift>M", N("Open makefile.am file"), on_target_open_makefile}
};
diff --git a/vtg/vtgsourceoutlinerview.vala b/vtg/vtgsourceoutlinerview.vala index 670ea19..a4d0d94 100644 --- a/vtg/vtgsourceoutlinerview.vala +++ b/vtg/vtgsourceoutlinerview.vala @@ -83,7 +83,7 @@ namespace Vtg
</popup> </ui>""";
- const ActionEntry? action_entries = { + const Gtk.ActionEntry? action_entries = {
{"source-outliner-goto", Gtk.Stock.OPEN, N("Goto definition..."), null, N("Goto symbol definition"), on_source_outliner_goto}
};

compile: ./autogen.sh prefix=/usr sysconfdir=/etc

~ or ~
./configure prefix=/usr sysconfdir=/etc cp /usr/share/vtg ~/.local/share/gedit/plugins/ cp /usr/lib/gedit/plugins/ ~/.local/share/gedit/plugins/

Comment by rasters...@gmail.com, Oct 16, 2011

There's another bug which prevents to compile it with valac-0.14: the VTG Makefile searchs for afrodite-0.14.vapi instead of libafrodite-0.14.vapi. To fix it, just add this patch:

diff --git a/vtg/Makefile.am b/vtg/Makefile.am
index e7c98b9..aa0068b 100644
--- a/vtg/Makefile.am
+++ b/vtg/Makefile.am
@@ -85,7 +85,7 @@ libvtg_la_SOURCES = \
 	$(NULL)
 
 libvtg_la.vala.stamp: $(libvtg_la_VALASOURCES)
-	$(VALAC) $(DEBUG_FLAGS) -C $(VTGUTILITYLIBS_VALAFLAGS) --vapidir ../vapi --vapidir ../vbf --basedir $(top_srcdir)/vtg --pkg config --pkg vbf-1.0 --pkg afrodite@PACKAGE_SUFFIX@ --pkg libvala-$(VALA_VERSION) --pkg gedit-3.0 --pkg gtk+-3.0 --pkg gtksourceview-3.0 --pkg PeasGtk-1.0 --pkg utils --pkg gdkkeysyms $^
+	$(VALAC) $(DEBUG_FLAGS) -C $(VTGUTILITYLIBS_VALAFLAGS) --vapidir ../vapi --vapidir ../vbf --basedir $(top_srcdir)/vtg --pkg config --pkg vbf-1.0 --pkg libafrodite@PACKAGE_SUFFIX@ --pkg libvala-$(VALA_VERSION) --pkg gedit-3.0 --pkg gtk+-3.0 --pkg gtksourceview-3.0 --pkg PeasGtk-1.0 --pkg utils --pkg gdkkeysyms $^
 	touch $@
 
 libvtg_la_LDFLAGS = \

Sign in to add a comment
Powered by Google Project Hosting