|
Compile
How to compile and install Vala Toys for GEditPrerequisitesLast 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)CompilingHaving 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" InstallingStep 1To install for the current user, from the root folder of the Vtg distribution, do: make install Step 2Now 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 3Finally, 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 |
It should read "make", not "./make". Works fine otherwise, thank you. :-)
"./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. :-)
Just notice your comments after one month! I've updated the documentation.
Thanks to both of you. Andrea
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)
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.)
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?
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
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.
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.
@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:
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
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:
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.
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.
checking for readline/readline.h... yes checking for VTGPLUGIN... no configure: error: vtg-plugin dependencies
The same situation:
checking for VTGPLUGIN... no configure: error: vtg-plugin dependencies
Make crashes at vscsymbolcompletion.c There are lot of mistakes such as "variable tmp1 is undefined" How can I solve the problem?
@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!
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?
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. :(
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
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
Thanks for the report, fixed now
Thanks!
mkdir ~/.gnome2/gedit/plugins/vtg
should be
mkdir -p ~/.gnome2/gedit/plugins/vtg
Thanks for tip!
I get this error at ./config I have vala 0.8 installed and gtk 2.17 afrodite library dependencies not met:
./configure: line 12499: xyes: command not found checking for VTGPLUGIN... no vtg-plugin dependencies not met: 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_REQUIREDwhat's the output of pkg-config --modversion vala-1.0 ?
And please note that the min gtk+ required is 2.18.0
How would I go about compiling and installing only libafrodite, so that I can use it with monodevelop?
Try using the -disable-gen-project and --disable-vtg-plugin in the configure, it should work but I never tried it
That's what I'm doing, but it doesn't work. I get this interesting output:
It looks as if it's trying to compile gen-project anyways.
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
This time, compilation failed much sooner:
P.S.: Thank you for your efforts. :)
can you do a clean compilation? I see no reason why afroditetest doesn't found the vapi.
For clean I mean:
Thanks
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.
I'm sorry but I can't reproduce your bug.
This is what I've done to try to reproduce it:
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.
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
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,
Instead of writing
it could be written
done, thanks
afrodite library dependencies not met:
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.5I try everything I know.
It doesn't change anything..
what is your installed vala version?
Can you verify that this directory exists $(PREFIX)/share/vala-0.10/vapi ?
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.
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:
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
-VALA_VERSION=0.12 +VALA_VERSION=0.14 -PACKAGE_SUFFIX=-0.12 +PACKAGE_SUFFIX=-0.14 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 - const ActionEntry? action_entries = { + const Gtk.ActionEntry? action_entries = { ("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 - const ActionEntry? action_entries = { + const Gtk.ActionEntry? action_entries = { 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 - const ActionEntry? action_entries = { + const Gtk.ActionEntry? action_entries = {compile: ./autogen.sh prefix=/usr sysconfdir=/etc
./configure prefix=/usr sysconfdir=/etc cp /usr/share/vtg ~/.local/share/gedit/plugins/ cp /usr/lib/gedit/plugins/ ~/.local/share/gedit/plugins/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: