Problems compling the latest version of Viking

Asked by LEGOManiac

When running ./configure on the latest version of Viking, I get:

checking for XML_ParserCreate in -lexpat... no
configure: error: Could not find the Expat library

What bugs me is that I had done this successfully under 10.10 but I've since upgraded to 11.04 and this appears to be broken.

I have Expat 2.0.1-7ubuntu3 installed. I suppose it's possible that they've moved it or re-named it in 11.04 from where ever it was or whatever it was called in 10.10.

I just don't know how to fix this.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu viking Edit question
Assignee:
No assignee Edit question
Solved by:
Eliah Kagan
Solved:
Last query:
Last reply:
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#1

You need to also have libexpat1 and libexpat1-dev installed.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#2

Thank you. That got me past that point. It was the libexpat1-dev package that wasn't installed. As an aside, why is a -dev file necessary? I thought they were used by developers who wanted to work on the package as opposed to people who just wanted to use the package?

I'm now stuck at this point:
configure: error: libcurl is needed but not found

libcurl3 is installed on the system. Following your example, I looked for a libcurl3-dev package but couldn't find one. there was a libcurl3-nss - I have no idea what the nss indicates - but installing it didn't help. I removed it again.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#3

-dev packages contain header files for a package (http://en.wikipedia.org/wiki/Header_file), which are necessary for buidling software that calls functions provided by compiled libraries in the corresponding package (without -dev in its name). This is not the same thing as a source package, which you may have been thinking of -- -dev packages and source packages are different. (And -dbg / -dbgsym packages are different from both.)

As for what package you need for libcurl, you might find that simulating an installation of the currently packaged version of Viking's build dependencies will provide you with the necessary information:

apt-get -s install build-dep viking

(A leading "sudo" is intentionally not present.)

On my Natty amd64 system, I find that libcurl4-gnutls-dev is the relevant package that appears to be required.

Another way to easily research available packages from the command line is to type the beginning of the name and press tab (sometimes you have to press it twice). This lists the options for autocompletion, or partially or fully autocompletes the name if possible.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#4

Thanks for the clarification on -dev packages. I did not know that. I presumed they were the same as source files.

sudo apt-get -s install build-dep viking

resulted in an error that it could not locate the package "build-dep". Checking the man pages, I see that build-dep is an action for apt-get, much like install, but I'm guessing they are mutually exclusive?

sudo apt-get build-dep viking gave me a list of packages. Adding | grep curl to (hopefully) see which libcurl package it was looking for turned up nothing. I suppose it's possible that the new version of viking uses a package that the old one did not.

Also, It turns out that libcurl4-gnutls-dev is already installed on my system, so it must be looking for something else.

Revision history for this message
mycae (mycae) said :
#5

Hi legomaniac,

you can find out which test is failing by examining config.log in the build directory. This should show you, if you scroll backwards through the log a bit, which program it is compiling in order to test libcurl functionality.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#6

Sorry, I should have said:

apt-get -s build-dep viking

If you ran that command with sudo and without -s, then it actually installed (or tried to install) the packages. This is why I specifically indicated that you need not use sudo--it is a backup in case you accidentally leave out -s. You may not want all the packages. (The build dependencies for the viking package in Ubuntu are not necessarily the same as the build dependencies of the version of viking that you are trying to build manually!)

"Also, It turns out that libcurl4-gnutls-dev is already installed on my system, so it must be looking for something else."

Did you try building viking again, after running "sudo apt-get build-dep viking"?

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#7

Thanks for the help so far...

I've advanced to the point where I get:

configure: error: Package requirements (
        glib-2.0 >= 2.12
        gthread-2.0 >= 2.2
        gtk+-2.0 >= 2.12
        gio-2.0 >= 2.12
) were not met:

No package 'gtk+-2.0' found

According to synaptic, libglib-2.0-0 and libglib-2.0-dev are installed and are version 2.28.6-0ubuntu1
Synaptic says gthread doesn't exist at all. Googleing that problem suggests I should install glib-2.0 first.... Curiously, though, I did find it in my file system:

/usr/include/bits/sigthread.h
/usr/include/glib-2.0/gio/gthreadedsocketservice.h
/usr/include/glib-2.0/glib/gthread.h
/usr/include/glib-2.0/glib/gthreadpool.h
/usr/lib/i386-linux-gnu/libgthread-2.0.a
/usr/lib/i386-linux-gnu/libgthread-2.0.la
/usr/lib/i386-linux-gnu/libgthread-2.0.so
/usr/lib/i386-linux-gnu/libgthread-2.0.so.0
/usr/lib/i386-linux-gnu/libgthread-2.0.so.0.2800.6
/usr/lib/i386-linux-gnu/pkgconfig/gthread-2.0.pc
/usr/lib/perl/5.10.1/bits/sigthread.ph

Could not "locate gtk+-2.0" in the file system, nor in synaptic.

Similarly, libgio was not installed according to synaptic, but
it's also in the file system. I also manually installed libgio2.0-cil-dev on a hunch.

/usr/lib/i386-linux-gnu/libgio-2.0.a
/usr/lib/i386-linux-gnu/libgio-2.0.la
/usr/lib/i386-linux-gnu/libgio-2.0.so
/usr/lib/i386-linux-gnu/libgio-2.0.so.0
/usr/lib/i386-linux-gnu/libgio-2.0.so.0.2800.6
/usr/lib/i386-linux-gnu/pkgconfig/gio-2.0.pc

I'm confused.

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#8

You have libglib-2.0-dev installed. Do you have libgtk2.0-dev installed?

As for gthread and gio, those are provided by the gtk2.0 package, so it is strange that, with that package's corresponding -dev package installed, you don't have the necessary header files (or they are not being recognized by Viking's configure script). See http://packages.ubuntu.com/search?searchon=contents&keywords=libgthread-2.0.so.0&mode=exactfilename&suite=natty&arch=any and http://packages.ubuntu.com/search?searchon=contents&keywords=libgio-2.0.so.0&mode=exactfilename&suite=natty&arch=any.

Please also post the output of the following command:

lsb_release -a; uname -a

And please let me know if you are attempting to build the latest source release version (1.2.1), or from the latest git sources, so that I can try to reproduce this problem myself.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#9

Output from lsb_release -a; uname -a

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.04
Release: 11.04
Codename: natty
Linux silverpc 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:18:14 UTC 2011 i686 i686 i386 GNU/Linux

I'm trying to install the source for viking-1.2. I'm not familiar with git, beyond being aware of it, so I'm not using it for this.

If it helps, here's the the results of some locates:

legomaniac@silverpc:~$ locate libgthread-2.0.so.0
/usr/lib/i386-linux-gnu/libgthread-2.0.so.0
/usr/lib/i386-linux-gnu/libgthread-2.0.so.0.2800.6
legomaniac@silverpc:~$ locate libgio-2.0.s0.0
legomaniac@silverpc:~$ locate gtk2.0
/usr/lib/libgtk2.0-0
/usr/lib/libgtk2.0-0/gtk-query-immodules-2.0
/usr/lib/libgtk2.0-0/gtk-update-icon-cache
/usr/share/cli-common/packages.d/libgtk2.0-cil.installcligac
/usr/share/cli-common/packages.d/libgtk2.0-cil.mono
/usr/share/cli-common/policies.d/libgtk2.0-cil
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.atk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.atk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.gdk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.gdk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.gtk-dotnet.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.gtk-dotnet.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.gtk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.gtk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.pango-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.10.pango-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.atk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.atk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.gdk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.gdk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.gtk-dotnet.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.gtk-dotnet.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.gtk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.gtk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.pango-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.4.pango-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.atk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.atk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.gdk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.gdk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.gtk-dotnet.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.gtk-dotnet.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.gtk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.gtk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.pango-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.6.pango-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.atk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.atk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.gdk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.gdk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.gtk-dotnet.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.gtk-dotnet.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.gtk-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.gtk-sharp.dll
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.pango-sharp.config
/usr/share/cli-common/policies.d/libgtk2.0-cil/policy.2.8.pango-sharp.dll
/usr/share/doc/libgtk2.0-0
/usr/share/doc/libgtk2.0-bin
/usr/share/doc/libgtk2.0-cil
/usr/share/doc/libgtk2.0-common
/usr/share/doc/libgtk2.0-0/NEWS.gz
/usr/share/doc/libgtk2.0-0/README.Debian
/usr/share/doc/libgtk2.0-0/README.gz
/usr/share/doc/libgtk2.0-0/changelog.Debian.gz
/usr/share/doc/libgtk2.0-0/copyright
/usr/share/doc/libgtk2.0-bin/NEWS.gz
/usr/share/doc/libgtk2.0-bin/README.gz
/usr/share/doc/libgtk2.0-bin/changelog.Debian.gz
/usr/share/doc/libgtk2.0-bin/copyright
/usr/share/doc/libgtk2.0-cil/changelog.Debian.gz
/usr/share/doc/libgtk2.0-cil/copyright
/usr/share/doc/libgtk2.0-common/NEWS.gz
/usr/share/doc/libgtk2.0-common/README.gz
/usr/share/doc/libgtk2.0-common/changelog.Debian.gz
/usr/share/doc/libgtk2.0-common/copyright
/var/lib/dpkg/info/libgtk2.0-0.conffiles
/var/lib/dpkg/info/libgtk2.0-0.list
/var/lib/dpkg/info/libgtk2.0-0.md5sums
/var/lib/dpkg/info/libgtk2.0-0.postinst
/var/lib/dpkg/info/libgtk2.0-0.postrm
/var/lib/dpkg/info/libgtk2.0-0.preinst
/var/lib/dpkg/info/libgtk2.0-0.prerm
/var/lib/dpkg/info/libgtk2.0-0.shlibs
/var/lib/dpkg/info/libgtk2.0-0.symbols
/var/lib/dpkg/info/libgtk2.0-0.triggers
/var/lib/dpkg/info/libgtk2.0-bin.list
/var/lib/dpkg/info/libgtk2.0-bin.md5sums
/var/lib/dpkg/info/libgtk2.0-bin.preinst
/var/lib/dpkg/info/libgtk2.0-bin.prerm
/var/lib/dpkg/info/libgtk2.0-cil.clilibs
/var/lib/dpkg/info/libgtk2.0-cil.list
/var/lib/dpkg/info/libgtk2.0-cil.md5sums
/var/lib/dpkg/info/libgtk2.0-cil.postinst
/var/lib/dpkg/info/libgtk2.0-cil.postrm
/var/lib/dpkg/info/libgtk2.0-cil.prerm
/var/lib/dpkg/info/libgtk2.0-common.list
/var/lib/dpkg/info/libgtk2.0-common.md5sums
/var/lib/dpkg/info/libgtk2.0-common.preinst

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#10

Since 1.2.1 is the latest stable version of Viking, it seems strange that you are trying to install viking 1.2 from source. Why is this?

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#11

I went to the web site. I downloaded the tar.gz file, claimed at the time to be the latest. I installed it on my previous computer and lived happily with it for months. That computer became unstable and I switched to another one and tried to install the same file (pulled from the backups on my server). I have not gone back to the viking web site to see if a newer version was available. Actually, I hadn't thought of it. I just figured if it worked the last time it should work now. Mind you, the previous computer had Ubuntu 10.10 while this one has 11.04. Also, the previous one had a lot more software installed on it over time and I suppose it's quite probable that the missing libraries had already been installed at the time I first installed Viking (mid June), hence I wouldn't have noticed a problem.

Good point, though, I'll go to the viking site and get the latest version, but I suspect it's still going to need those missing packages.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#12

OK. I tried 1.2.1 and I get the same error messages.

I also tried reinstalling the 4 missing packages. Synaptic doesn't have gthread for some reason (probably belongs to some other package) but I marked everything that had anything to do with glib-2.0, gtk+-2.0 and gio-2.0 for re-installation and re-installed them. Same results.

I'm still puzzled by the message:

No package 'gtk+-2.0' found

It looks like I have it installed, but perhaps it's the wrong version, or in the wrong location?

Revision history for this message
Eliah Kagan (degeneracypressure) said :
#13

I am able to build the viking 1.2.1 sources on my Natty system without problems.

What is the output of:

apt-cache policy libgtk2.0-dev

?

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#14

apt-cache policy libgtk2.0-dev
libgtk2.0-dev:
  Installed: (none)
  Candidate: 2.24.4-0ubuntu2
  Version table:
     2.24.4-0ubuntu2 0
        500 http://ca.archive.ubuntu.com/ubuntu/ natty/main i386 Packages

Revision history for this message
Best Eliah Kagan (degeneracypressure) said :
#15

That's probably your problem then. You should install the package called libgtk2.0-dev.

Revision history for this message
LEGOManiac (bzflaglegomaniac) said :
#16

Thanks Eliah Kagan, that solved my question.