# xorg compile problems



## nedry (Oct 15, 2016)

Hello I am trying to compile x11/xorg and the system seems to be in a dependency loop it keeps wanting x11-toolkits/gtk20 and print/cups, the system memory systematically get used up and then the swap space is used up and the system generates swap error. I am going to try compiling x11-toolkits/gtk20 and print/cups separately. I have compiled and installed x11/xorg in the past and not had this problem.
nedry


----------



## SirDice (Oct 17, 2016)

Building x11/xorg doesn't pull in gtk2 or cups, they're simply not a dependency. I don't know how you managed to get them as a dependency.


----------



## nedry (Oct 17, 2016)

I found it strange as well as I have successfully compiled x11/xorg several times in the past.


----------



## SirDice (Oct 17, 2016)

What's in /etc/make.conf? And post the output of `make -C /usr/ports/x11/xorg all-depends-list`.


----------



## nedry (Oct 17, 2016)

What would be the best way to remove the extracted ports tree and re download with `portsnapt fetch` would a `rm -rf /usr/ports` be ok? or would this brake the ability to do a `make deinstall` in compiled programs after restoring the ports tree from doing a `portsnap extract`. Thanks
nedry


----------



## nedry (Oct 17, 2016)

OK will post the files and output of `make -C /usr/ports/x11/xorg all-depends-list` I have to go to work now but when I return will look into this
nedry


----------



## SirDice (Oct 17, 2016)

nedry said:


> What would be the best way to remove the extracted ports tree and re download with  portsnapt fetch would a  `rm -rf /usr/ports` be ok?


Yes, that might be a good idea. Perhaps your ports tree is corrupt. If you want to start fresh this should do the trick:

```
rm -rf /usr/ports # remove the old ports tree
rm -rf /var/db/portsnap/* # remove the downloaded bits
portsnap fetch # fetch a fresh download
portsnap extract # extract a whole new /usr/ports
```


----------



## nedry (Oct 17, 2016)

SirDice said:


> What's in /etc/make.conf? And post the output of `make -C /usr/ports/x11/xorg all-depends-list`.



I cant find a /etc/make.conf but i did a `make -C /usr/ports/x11/xorg all-depends-list  > all-depends.txt`

I have attached all-depends.txt


----------



## SirDice (Oct 17, 2016)

Looks like you enabled something on one or more dependencies that pulls in gtk20, not sure what though. Run `make -C /usr/ports/x11/xorg rmconfig-recursive` to remove all config settings. Start with a default build.


----------



## nedry (Oct 17, 2016)

OK good idea, i tried `rm -rf /usr/ports` and then `rm -rf /var/db/portsnap/*` and then redid `portsnap fetch` and then `portsnap extract` but its still wanting the dependencies. I will try `make -C /usr/ports/x11/xorg rmconfig-recursive` and then a `make install within [port]/usr/ports/x11/xorg[/port] and see what happens.`


----------



## nedry (Oct 17, 2016)

Ok I performed a `make -C /usr/ports/x11/xorg rmconfig-recursive` and then a `make install` within /usr/ports/x11/xorg and it compiled and installed ok.


----------



## cpm@ (Oct 17, 2016)

If you're not completely sure about what are you doing, it's always better to use the default port options.


----------



## nedry (Oct 17, 2016)

I agree, I cant remember choosing anything unusual, but its what the dependency loop did that I found rather interesting, It kept looping using up more and more system RAM eventually causing a swapper error. I now know how to reset a port and dependencies to defaults. 
nedry


----------



## SirDice (Oct 18, 2016)

I regularly get loops because I like to play around with various settings. Sometimes I find the exact culprit, sometime I don't. If you get weird build errors it's always a good idea to revert to the default settings and work from there.


----------



## nedry (Oct 20, 2016)

OK today I tried again to compile x11/xorg without choosing unusual options got a loop again. My solution was to uncheck  print/cups from the x11-toolkits/gtk20 configure screen and try again. The loop was broken.


----------



## SirDice (Oct 20, 2016)

Yeah, that's probably it. Both GTK3 and GTK2 have CUPS enabled by default. This always causes build loops for me too.


----------

