# Problem installing kde4



## Bront_in_Hood (Feb 2, 2013)

I have FreeBSD 9.1 x64. And I try to build kde4. But building fails on kdepim.
The error is:

```
Built target kcm_kleopatra_automoc
1 error
*** [all] Error code 2
1 error
*** [do-build] Error code 1
Stop in /usr/ports/deskutils/kdepim44.
```

So. What can I do now to solve it?


----------



## OH (Feb 2, 2013)

For deskutils/kdepim4 the required patch is found here.

It _looks_ like it could be the same problem, but if you don't want to switch to deskutils/kdepim4, you'll probably have to do some manual edittting.


----------



## Bront_in_Hood (Feb 3, 2013)

OH said:
			
		

> For deskutils/kdepim4 the required patch is found here.
> 
> It _looks_ like it could be the same problem, but if you don't want to switch to deskutils/kdepim4, you'll probably have to do some manual edittting.




Thank you very much for reply! But I have 2 more questions..
1. Are you sure that I need patch for deskutils/kdepim4 but not for deskutils/kdepim44? Or this patch is suitable for both?
2. I copied this patch to deskutils/kdepim4/files. But I don't know which command should be correct to make install this patch.


----------



## OH (Feb 3, 2013)

Bront_in_Hood said:
			
		

> Thank you very much for reply! But I have 2 more questions..
> 1. Are you sure that I need patch for deskutils/kdepim4 but not for deskutils/kdepim44? Or this patch is suitable for both?


I am sure that you need a patch for deskutils/kdepim44, but I doubt that port gets a lot of attention these days. Most people have switched to deskutils/kdepim4, which is the latest version. That is why for deskutils/kdepim44 you probably have to find and edit the appropriate CMakeLists.txt yourself.



> 2. I copied this patch to deskutils/kdepim4/files. But I don't know which command should be correct to make install this patch.


For deskutils/kdepim4 that is enough. The file will automatically be incorporated by the FreeBSD ports system.


----------



## Bront_in_Hood (Feb 3, 2013)

I appreciate your help! I'm glad to get so competent recommendation! I've started installation of kdepim4 (not 44)..


----------



## Bront_in_Hood (Feb 3, 2013)

Yes. I've successfully installed kdepim. And return to kde4 installation.

And now I have error in graphviz-2.30.0.
I need recommendation how to pass graphviz problem..


----------



## OH (Feb 3, 2013)

It turns out (as chronicled on two mailinglists now), that rebuilding devel/qt4-moc fixes the problem for kdepim and also for math/rocs. This as a note for the search engines.

@Bront, re: graphics/graphviz: You'll have to specify the problem, if we're to advise you on it.


----------



## Bront_in_Hood (Feb 4, 2013)

Sorry. I did not notice the core error message. Now I found it:

```
Unable to find pthread_create symbol. Aborting.
gmake[5]: *** [install-exec-hook] Abort trap: 6 (core dumped)
gmake[5]: Leaving directory '/usr/ports/graphics/graphviz/work/graphviz-2.30.0/cmd/dot'
gmake[4]: *** [install-exec-am] Error 2....
```

I've searched through internet and found similar bug reports. In one thread is recommended to run such command:

```
env LDFLAGS=-pthread make -C /usr/ports/graphics/graphviz install clean
```
As I understood this will compile graphviz without pthread support.
In another thread (http://www.freebsd.org/cgi/query-pr.cgi?pr=171949) I found this message:

```
Confirm that bug exists.
Also confirm that adding pthread to libs fixes this (yes I have
nvidia-driver installed).
But would recommend to use this patch instead:
Index: Makefile
===================================================================
--- Makefile (revision 308920)
+++ Makefile (working copy)
@@ -108,6 +108,7 @@
 --disable-io --disable-ocaml --disable-java \
 --disable-sharp

+CONFIGURE_ENV+= LIBS="${PTHREAD_LIBS}"
 CONFIGURE_ENV+= MISSING=${TRUE}

 .if ${PORT_OPTIONS:MTK}
```
Seems like this solvation is better?


----------



## Bront_in_Hood (Feb 9, 2013)

Both solutions failed! Still need help with installing graphviz!


----------



## Bront_in_Hood (Feb 9, 2013)

Sorry. With more careful execution the method

```
env LDFLAGS=-pthread make -C /usr/ports/graphics/graphviz install clean"
```
finished successfully...
Returning to kde4 installation..


----------



## Bront_in_Hood (Feb 9, 2013)

Here I am again! Next error while installing kde4:

```
shared "object libffi.so.5" not found required by "g-ir-compiler"
gmake[3]: *** [Notify-0.7.typelib] Error 1
gmake[3]: Leaving directory '/usr/ports/devel/libnotify/work/libnotify-0.7.3/libnotify'
gmake[2]: *** [all] Error 2
bla-bla-bla
```
Google did not give any solution... Please help!
By the way. Why so much problems with ports? I don't remember so much problems in previous versions of FreeBSD..


----------



## OH (Feb 9, 2013)

`# ldd `which g-ir-compiler``
gives on my installation:

```
/usr/local/bin/g-ir-compiler:
(...)
        libffi.so.6 => /usr/local/lib/libffi.so.6 (0x802699000)
```
In your case it will show libffi.so.5, but you have the upgraded libffi.so.6 installed, so then the command:
`# pkg_info -W /usr/local/bin/g-ir-compiler`
shows that it is devel/gobject-introspection that you need to update first.

Also note the 20130128 entry in /usr/ports/UPDATING.


----------



## Bront_in_Hood (Feb 10, 2013)

Thank you!
Finally I have installed kde!


----------

