kde4 installation fails, libiodbc-3.52.7 conflicts with unixODBC-2.3.0

Installing and maintaining the FreeBSD Ports Collection or FreeBSD Packages (i.e. third party software).

kde4 installation fails, libiodbc-3.52.7 conflicts with unixODBC-2.3.0

Postby dheerajsuthar » 20 Jun 2010, 08:27

Hi!

FreeBSD on my machine is: FreeBSD 8.0-RELEASE-p3. It's completely updated with [FILE]freebsd-update[/FILE] and ports updated with [CMD]portsnap update[/CMD].

I tried to install KDE4 (through ports) and got following errors during [CMD]make[/CMD]:
Code: Select all
libiodbc-3.52.7 conflicts with installed package(s):
      unixODBC-2.3.0

I chose default options during [CMD]make config-recursive[/CMD].

Now, should I remove the said package? But will it not make installed packaged dependent on it unstable? Or is there any other way?

Kindly help me on this issues as I am getting the same problem while installing many other ports too. Should I go ahead and remove conflict packages in such cases?

Thanks in advance.
dheerajsuthar
Junior Member
 
Posts: 45
Joined: 04 Dec 2009, 16:30

Postby Dereckson » 21 Jun 2010, 09:55

Hi,

I had the same issue on FreeBSD 8.0 installing GNOME, then KDE4. Here the fix and how to solve this kind of issues:

(1) We need a general understanding of the problem. A google search on unixodbc and libiodbc explains its two drivers doing the same job, on a rather compatible way.

(2) We need a local understanding of the problem, ie here "what port uses this unixODBC?". To get the answer, pkg_delete unixODBC-2.3.0 (pkg_delete won't delete anything used by other packages). It gives a list of the packages using the library. On my computer, it were:

Code: Select all
scherzo# pkg_delete unixODBC-2.3.0
pkg_delete: package 'unixODBC-2.3.0' is required by these other packages
and may not be deinstalled:
ekiga3-3.2.6_5
gnome2-2.30.1_1
opal3-3.6.6_6
ptlib-2.6.5_2


Okay, let's play Sherlock Holmes and read the Makefile of the ports.

We can safely ignore gnome2, as it's a metaport. The result give us ekiga3 depends of opal3, which depends of ptlib.

Code: Select all
cd /usr/ports/devel/ptlib
make config

grrr no option to disable odbc (but it's always valuable to try).

Let's read the Makefile. Er... there is a --disable-odbc enabled. Something is wrong, oh it conflicts with ptlib26, it's one of those multiversions ports!

Bye ptlib, a ls ../ptlib* tells us the correct package name is devel/ptlib26. Let's retry make config. Oh! An option to disable ODBC support.

(3) We need to apply the solution/fix/workaround/kludge found:

Code: Select all
cd /usr/ports/devel/ptlib26
make deinstall clean
make config #and we disable Use ODBC this time
make reinstall clean


Code: Select all
cd /usr/ports/devel/ptlib26
make deinstall clean
make config #and we disable Use ODBC this time
make reinstall clean


And let's deinstall unixodbc:

Code: Select all
scherzo# cd /usr/ports/databases/unixODBC
scherzo# make deinstall
===>  Deinstalling for databases/unixODBC
===>   Deinstalling unixODBC-2.3.0
pkg_delete: package 'unixODBC-2.3.0' is required by these other packages
and may not be deinstalled (but I'll delete it anyway):
ekiga3-3.2.6_5
gnome2-2.30.1_1
opal3-3.6.6_6


(4) Cleans the mess

So this time, ptlib dependency have disappeared and unixODBC is deinstalled.

A (now erroneous) dependency still exists between ports built against ptlib.

To fix that, there is a tool called ''pkgdb''. Invoke it with the -F (short for --fix) options:

Code: Select all
scherzo# pkgdb -F
--->  Checking the package registry database
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 808 packages found (         -2 +41) (...)......................................... done]
Stale dependency: ekiga3-3.2.6_5 -> unixODBC-2.3.0 (databases/unixODBC):
-> Deleted. (irrelevant)
Stale dependency: gnome2-2.30.1_1 -> unixODBC-2.3.0 (databases/unixODBC):
-> Deleted. (irrelevant)
Stale dependency: opal3-3.6.6_6 -> unixODBC-2.3.0 (databases/unixODBC):
-> Deleted. (irrelevant)


Hop, it have cleaned our dependencies automatically.

We can now resume our KDE compilation. It should resume with the libiodbc installation.
User avatar
Dereckson
Junior Member
 
Posts: 63
Joined: 14 Mar 2009, 14:41
Location: Brussels, BE

Postby dheerajsuthar » 21 Jun 2010, 19:16

Thanks will try that on my system.I really appreciate you kind detailed reply.
dheerajsuthar
Junior Member
 
Posts: 45
Joined: 04 Dec 2009, 16:30

Postby chrisstankevitz » 02 Jul 2010, 21:52

Dereckson wrote:(1) We need a general understanding of the problem. A google search on unixodbc and libiodbc explains its two drivers doing the same job, on a rather compatible way.

(2) We need a local understanding of the problem, ie here "what port uses this unixODBC?". To get the answer, pkg_delete unixODBC-2.3.0 (pkg_delete won't delete anything used by other packages). It gives a list of the packages using the library.


Awesome post, thank you!

Chris
chrisstankevitz
Junior Member
 
Posts: 9
Joined: 01 Jul 2010, 05:39

Postby hedgehog » 03 Jul 2010, 12:37

Dereckson wrote:(2) We need a local understanding of the problem, ie here "what port uses this unixODBC?". To get the answer, pkg_delete unixODBC-2.3.0 (pkg_delete won't delete anything used by other packages). It gives a list of the packages using the library.

i think there is much better way to get such info without a risk of removing package :]
Code: Select all
$ man pkg_info | egrep -A 1 '\-R'
     -R      For each of the specified packages, show the list of installed
             packages which require it.


[CMD=" "]pkg_info -R unixODBC-2.3.0[/CMD]
User avatar
hedgehog
Member
 
Posts: 191
Joined: 27 Nov 2009, 10:25
Location: Kharkov, Ukraine

Postby ikbendeman » 06 Oct 2010, 18:00

I don't think ekiga will build correctly without unixODBC, which is a problem since it's part of [port]x11/gnome2[/port]. How hard would it be to configure [port]devel/ptlib26[/port] to build against [port]databases/libiodbc[/port] instead of [port]databases/unixODBC[/port]? I mean, they're supposed to be compatible from what I understand...
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Postby ikbendeman » 06 Oct 2010, 18:21

I got it to work! I edited [FILE]/usr/local/ports/devel/ptlib26/Makefile[/FILE] and changed the following section:

Code: Select all
line 53 | .if defined(WITH_ODBC)
line 54 | CONFIGURE_ARGS+=     --enable-odbc
line 55 | LIB_DEPENDS+=        odbc.1:${PORTSDIR}/databases/unixODBC
line 56 | .esle
line 57 | CONFIGURE_ARGS+=     --disable-odbc


to the following:

Code: Select all
line 53 | .if defined(WITH_ODBC)
line 54 | CONFIGURE_ARGS+=     --enable-odbc
line 55 | LIB_DEPENDS+=        iodbc.3:${PORTSDIR}/databases/libiodbc
line 56 | .else
line 57 | CONFIGURE_ARGS+=     --disable-odbc
line 58 | .endif
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Postby BostonDriver » 12 Dec 2010, 16:25

Any idea how to solve for a "package only" based system?

[FILE]/usr/ports[/FILE] doesn't even exist on this machine. I'd like to keep it this way until time permits to upgrade to stable.

In my case, I have kde4 installed first, now I'm trying to get gnome2 installed. I'm on a fresh 8.1-Release system (amd64), installed from dvd iso found via FreeBSD torrents.

I'm only using e.g. [CMD=" "]pkg_add -r gnome2[/CMD] (as there are a few people who want to use gnome instead of kde4.)
BostonDriver
Junior Member
 
Posts: 44
Joined: 18 Nov 2008, 16:55
Location: Boston

Postby wblock@ » 12 Dec 2010, 17:08

BostonDriver wrote:Any idea how to solve for a "package only" based system?


Make the modifications on a system with ports and build a package... The net result of packages is that you can't change them, they're binaries.

/usr/ports doesn't even exist on this machine. I'd like to keep it this way until time permits to upgrade to stable.


Ports and the OS are not tied together, and as long as you don't change major versions of the OS, your installed applications will continue to work. So you can run newer ports without upgrading to -stable, or upgrade to -stable and continue to run your existing applications.
User avatar
wblock@
Old Fart
 
Posts: 10168
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy

Postby BostonDriver » 12 Dec 2010, 19:22

wblock wrote:Make the modifications on a system with ports and build a package... The net result of packages is that you can't change them, they're binaries.


The only system I have with ports is FreeBSD 4.10-Stable.

As binaries, I'd (foolishly) expected the packages for -Release to just work together and keep out of each others way.

If I had time, I'd just make 'em all via portupgrade.... I don't have time right now. This is also my first 64bit machine (at home anyway) so any packages I built from ports on one of the other 32bit systems would only be 32bit. I hoped the 64bit versions were pre-built, it would same me the effort until time permits and/or I really needed "make config" to change things to my specific needs.

I guess for now, the gnome users are stuck with kde or just a shell lol

Thanks for your suggestion
BostonDriver
Junior Member
 
Posts: 44
Joined: 18 Nov 2008, 16:55
Location: Boston

Postby Dereckson » 13 Dec 2010, 08:27

(i) Compilation isn't so problematic : you can use another desktop environment during the few hours to 3 days needed to compile all, your system stays responsive, there are still free RAM.

(ii) Fresh FreeBSD install + pkg_add -r gnome2 just works, the problem in this topic only concerns dual KDE/Gnome installations.

(iii) You can start the install from packages, then compile the problematic port, then resume the install from packages. So you'll only have ONE port and its dependencies not yet installed through packages to compile. I'll be happy to assist you in the process.

(iv) You can put the ports where you want: /home/bostondriver/ports, /tmp/ports are maybe some interesting locations outside your /usr partition.

(v) You can use and upgrade -STABLE with a /usr/ports folder, freebsd-update doesn't touch this folder.
It's only after we've lost everything that we're free to do anything.
— Tyler Durden in Fight Club.

Some ports I maintain: astro/astrometry, editors/komodo-ide, math/bargraph, devel/git-review, graphics/commons-utilities.
User avatar
Dereckson
Junior Member
 
Posts: 63
Joined: 14 Mar 2009, 14:41
Location: Brussels, BE

Postby BostonDriver » 13 Dec 2010, 14:25

Dereckson wrote:
(ii) Fresh FreeBSD install + pkg_add -r gnome2 just works, the problem in this topic only concerns dual KDE/Gnome installations.


Understood. pkg_add -r kde4 went flawlessly. Adding gnome2 (or trying to) a day or two later hit the issue.

I actually added kde4 via sysinstall. I hit this gnome2/kde4 co-exist problem when also trying to use sysinstall. My attempt to add gnome2 came after the install install of kde and after some people complained that kde (via tightvnc) wasn't "working" as they are used to. (This is something I'm looking into, but out of scope of this thread.) So gnome was installed, or I tried to.

Since prior posts, I used pkg_add -r gnome2 (not sysinstall) to see what happens. The problem in this thread still exists, but at least pkg_add didn't stop. "Enough" of gnome2 exists where gnome can be used (and does behave a lot better under vnc than kde.)

We also have FreeBSD 8.1 running as a KVM guest, and there kde4 via tightvnc is awful! (Other vnc packages will be tried shortly.) Moving to gnome2 works far better, and users want to standardize on one, so I need gnome on this machine... at least until I can get kde to behave.
BostonDriver
Junior Member
 
Posts: 44
Joined: 18 Nov 2008, 16:55
Location: Boston

2013, still here....

Postby ikbendeman » 18 Sep 2013, 10:12

It looks like this is still a problem. My fix posted above still works... how do I contact the port maintainer and get them to fix this? [FILE]libiodbc[/FILE] works just fine in place of unixODBC (I hear that unixODBC may work in place of [FILE]libiodbc[/FILE]). Anyways, they both implement the same ABI but since I haven't yet learned SQL, I've yet to use either library while writing any of my own software.
User avatar
ikbendeman
Member
 
Posts: 229
Joined: 01 Dec 2009, 17:05
Location: California, US

Postby wblock@ » 18 Sep 2013, 13:16

A port's maintainer can be found with the [file]maintainer[/file] target:
Code: Select all
# cd /usr/ports/databases/unixODBC
# make maintainer


For that port, maintainer is [file]ports@[/file], meaning there is no specific maintainer.

It is usually preferable to enter a PR so the problem can be tracked.
User avatar
wblock@
Old Fart
 
Posts: 10168
Joined: 07 Sep 2009, 23:23
Location: Milky Way galaxy


Return to Installation and Maintenance of FreeBSD Ports or Packages

Who is online

Users browsing this forum: No registered users and 2 guests