# Can't build GTK2 apps after cleanup



## freemason (Sep 10, 2012)

hallo.

How can I install gtk2 development headers from ports?
They are needed to build pidgin, but I can't find them in ports!

ACTION:

```
: cd /usr/ports/net-im/pidgin
: sudo make install clean
```


ERROR:

```
checking for GTK... no
no
configure: error: 

You must have GTK+ 2.10.0 or newer development headers installed to compile
Pidgin.  If you want to build only Finch then specify --disable-gtkui when
running configure.

===>  Script "configure" failed unexpectedly.
Please report the problem to marcus@FreeBSD.org [maintainer] and attach the
"/usr/ports/net-im/pidgin/work/pidgin-2.10.6/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a /usr/sbin/pkg_info
-Ea).
*** [do-configure] Error code 1

Stop in /usr/ports/net-im/pidgin.
*** [install] Error code 1

Stop in /usr/ports/net-im/pidgin.
```

Also, I have gtk2 installed.


----------



## ColdfireMC (Sep 10, 2012)

cd to usr/ports and then


```
#make search name=gtk | more
```
 this will show u all ports related to GTK on it's name. output will be paged with more using a pipe.


```
#make search key=gtk | more
```
 this will show you al ports related by any reason with gtk

if you have already installed and configured sudo, place "sudo" before any of those 2 commands to avoid use root account(isn't safe to use root everyday).

 every port has a directory in ports tree. find the port that you need, cd to that directory and type "make install". some ports have huge dependence lists, so you can pre-configure them with "make config-recursive" and save tons of time, ensure that your configs aren't broken.
it's hihgly recommended to update ports tree, use portsnap(read man) or cvsup. avoid to use packages with ports mixed.


----------



## SirDice (Sep 11, 2012)

Are there any options in /etc/make.conf that might interfere?


----------



## freemason (Sep 11, 2012)

You mean one of these?


```
WITH_KMS="YES"
WITH_NEW_XORG="YES"
KERNCONF=LITE
WITHOUT_MODULES="netgraph"
CPUTYPE?=core2
CFLAGS= -O2 -fno-strict-aliasing -pipe
MAKE_SHELL?=sh
COPTFLAGS= -O -pipe
PERL_VERSION=5.14.2
```


----------



## SirDice (Sep 11, 2012)

freemason said:
			
		

> You mean one of these?


Yep.


> ```
> CFLAGS= -O2 -fno-strict-aliasing -pipe
> COPTFLAGS= -O -pipe
> ```


Remove these. They will do more harm than good.


----------



## freemason (Sep 21, 2012)

SirDice said:
			
		

> Remove these. They will do more harm than good.



Compile options are not the cause of my problem.

Once again, after cleaning up (doing *sudo make clean* in the */usr/ports*) the whole ports tree (and removing unused dependencies from already installed packages with *pkg_cutleaves*) I can't build any port that uses GLIB/GTK2 headers to compile.

For example, now I'm trying to build package for gmrun to install it, but it cannot locate glib/gtk2 development headers and so gives lots of errors and doesn't build properly.

I'm lost somewhere. Please help


----------



## break19 (Sep 21, 2012)

re-install both gtk2 and glib2 - if you have those installed, the headers should be as well.. if not, then your installations of them are corrupt. FreeBSD does not separate headers from libraries..


----------



## wblock@ (Sep 21, 2012)

Changing settings from defaults without good reason to do so can cause that.  CFLAGS are a known source of problems.  I'm also curious about MAKE_SHELL.  Why change that?


----------



## freemason (Sep 21, 2012)

now I'll wipe the ports tree and begin a new life



			
				wblock@ said:
			
		

> I'm also curious about MAKE_SHELL.  Why change that?


MAKE_SHELL was written here before. I didn't touch it.

Also, glib and gtk headers are in the place, but are not seen by ports...


----------

