# Chromium conflict with xproto



## alexseitsinger (Aug 23, 2018)

I have been installing all my programs via `pkg install`, either from my poudriere repository or from the FreeBSD repository (some packages wont compile successfully via poudriere). I have recently run `pkg upgrade` and it installed the package x11/xorgproto. Following that installation, it removed some packages, among them www/chromium. I am now trying to reinstall www/chromium via `pkg install`, but when I attempt this it fails with a conflict that cannot be resolved via the SAT resolver, (xproto-7.0.31 [FreeBSD] conflicts with xorgproto-2018.4 [installed] on /usr/local/include/X11/DECkeysym.h). I have read the entry in /usr/ports/UPDATING and it makes mention of deleting stale packages. I have only installed precompiled binaries via `pkg install`, and there are no files found from the command provided (`pkg version -l \? | cut -f 1 -w | grep -v compat | xargs pkg delete -fy`). I am curious what I am doing wrong, and how I could fix this so I can install www/chromium again?


----------



## rigoletto@ (Aug 24, 2018)

alexseitsinger said:


> some packages wont compile successfully via poudriere



This is curious because ports-mgmt/poudriere is exactly the tool used to build the FreeBSD official packages. See HERE.

It seems you are mixing the official packages ( probably from the quarterly repository ) with local built ports, otherwise you would not having this problem.


----------



## alexseitsinger (Aug 24, 2018)

lebarondemerde said:


> This is curious because ports-mgmt/poudriere is exactly the tool used to build the FreeBSD official packages. See HERE.
> 
> It seems you are mixing the official packages ( probably from the quarterly repository ) with local built ports, otherwise you would not having this problem.



I constantly get "Bad C++ Code" errors when I try to compile www/chromium via ports-mgmt/poudriere. I can't figure out why this happens, but it does every time. The only way I can install it is by using the FreeBSD repository. The rest of my packages are installed from my local repository via `pkg install`.


----------



## ShelLuser (Aug 24, 2018)

Don't mix binary repository packages with ports you build yourself. That in itself is a recipe for disaster and most likely the reason you've been having these issues.

(edit)


```
$ make all-depends-list | grep prot
/usr/ports/x11/xcb-proto
/usr/ports/x11/xorgproto
/usr/ports/devel/protobuf
```
www/chromium doesn't conflict with xorgproto it even depends on it. Which definitely leads into the direction of ports and packages.


----------



## alexseitsinger (Aug 24, 2018)

ShelLuser said:


> Don't mix binary repository packages with ports you build yourself. That in itself is a recipe for disaster and most likely the reason you've been having these issues.
> 
> (edit)
> 
> ...



I dont even have /usr/ports populated on this system. There are no conflicts as far as that goes. I have installed all programs via `pkg install`.


----------



## leebrown66 (Aug 24, 2018)

_Y_our problem is multiple repo's.  As you can see, my workstation is a mess, using the official repo (FreeBSD), several of mine (AB, AB-work-small, AB-ws-large) and probably a port (unknown):
`$ pkg query -a '%R %n-%v' | awk '{print $1}' | sort | uniq
FreeBSD
AB
AB-work-small
AB-ws-large
unknown-repository`

But my NAS is good.  This is what you should aim for.
`root@svr-nas-rl:~ # pkg query '%R %n-%v' | awk '{print $1}' | sort | uniq
AB-Server`

Ensure the poudriere jail version is up-to-date, which may necessitate updating your host OS version too.

Poudriere typically reuses already built packages, but if there's some problem (which the Bad C++ code message indicates), it won't necessarily self-correct.  Use the -c switch with the bulk command to wipe out everything and rebuild it all from scratch.  It's a major pain, but sometimes the only way forward.

Get a list of all packages you installed:

`pkg query -e '%a=0' '%n' > /tmp/pkg-list`

Remove all packages, *disable the FreeBSD repo*, then reinstall them from the fresh local repo you created from scratch.  Check everything is now using the single repo you created.


----------



## rigoletto@ (Aug 24, 2018)

alexseitsinger said:


> I constantly get "Bad C++ Code" errors when I try to compile www/chromium via ports-mgmt/poudriere. I can't figure out why this happens, but it does every time. The only way I can install it is by using the FreeBSD repository. The rest of my packages are installed from my local repository via  pkg install.



www/chromium needs a *lot of memory *to compile, you may be running out of it during the build process. Also, clean the ccache cache if you are using it.


----------



## cpm@ (Aug 24, 2018)

I've seen a lot of build timeout for chromium/iridium via pkg-fallout. On my machine chromium package build takes 5 hours and 40 minutes.

Poudriere kills the job if it does not end in a specific amount of time. You can configure MAX_EXECUTION_TIME and NOHANG_TIME.
See /usr/local/etc/poudriere.conf.sample

86400 seconds (which is one day) is the default value of MAX_EXECUTION_TIME, so putting  MAX_EXECUTION_TIME=172800 (2 days) or whatever value larger than 86400 would be fine.

If you are using poudriere on a slow machine, you might need to increase the package build timeout values in /usr/local/etc/poudriere.conf


----------



## ShelLuser (Aug 24, 2018)

alexseitsinger said:


> I dont even have /usr/ports populated on this system. There are no conflicts as far as that goes. I have installed all programs via `pkg install`.


Yet one of those sources is your poudriere repository where you manually build your own ports. That can cause problematic conflicts, especially when those packages are used in combination with those from the regular repositories:



alexseitsinger said:


> I have been installing all my programs via `pkg install`, either from my poudriere repository or from the FreeBSD repository (some packages wont compile successfully via poudriere).


Which is plain and simple a very bad idea. Don't mix ports and packages.


----------



## kpa (Aug 24, 2018)

cpm@ said:


> I
> 
> If you are using poudriere on a slow machine, you might need to increase the package build timeout values in /usr/local/share/poudriere/common.sh



Not sure why you say this, all the timeouts can be set in the poudriere.conf configuration file unless I'm missing something?


----------



## shkhln (Aug 24, 2018)

ShelLuser said:


> Don't mix ports and packages.



This advice should rather be "don't mix packages from different sources".

Occasional _local_ port usage isn't a problem there:

```
% pkg info wine-devel | grep Installed
Installed on   : Thu Aug 23 01:03:53 2018 MSK
% pkg query %R wine-devel
unknown-repository
% pkg info -d wine-devel | grep proto
    xproto-7.0.31
% pkg query %R xproto
FreeBSD
```


----------



## kpa (Aug 24, 2018)

shkhln said:


> This advice should rather be "don't mix packages from different sources".
> 
> Occasional _local_ port usage isn't a problem there:
> 
> ...



Yes it's fine as long as you're dealing with leaf ports that no other ports depend on and you're sure that the dependencies are kosher. The situation changes as soon as you start installing packages from different sources that have very different runtime library dependencies.


----------



## SirDice (Aug 24, 2018)

Are you building packages for 11.2 on your Poudriere? The official packages are still built for 11.1 and I noticed some ports fail to build with 11.2. This might be due to compiler changes between 11.1 and 11.2.


----------



## cpm@ (Aug 24, 2018)

kpa said:


> Not sure why you say this, all the timeouts can be set in the poudriere.conf configuration file unless I'm missing something?



Yes, you are right. I've edited my first comment to reflect this.


----------



## cpm@ (Aug 24, 2018)

SirDice said:


> Are you building packages for 11.2 on your Poudriere? The official packages are still built for 11.1 and I noticed some ports fail to build with 11.2. This might be due to compiler changes between 11.1 and 11.2.



Today I've reported the problem and now this will be fixed as soon as portmgr@ changes the build timeout values in the package building clusters.


----------



## alexseitsinger (Aug 24, 2018)

lebarondemerde said:


> www/chromium needs a *lot of memory *to compile, you may be running out of it during the build process. Also, clean the ccache cache if you are using it.



I have a feeling that this is the reason I can't compile www/chromium (and www/iridium) successfully. My current server has a dual core 2.4GHz processor and 4GB of RAM. Currently, the only way to compile everything else successfully requires me to use disk I/O for the whole build process. I kept running into errors when trying to offload some of the build into RAM. I wish there were a way to build specific ports using tmpfs while others not.



cpm@ said:


> I've seen a lot of build timeout for chromium/iridium via pkg-fallout. On my machine chromium package build takes 5 hours and 40 minutes.
> 
> Poudriere kills the job if it does not end in a specific amount of time. You can configure MAX_EXECUTION_TIME and NOHANG_TIME.
> See /usr/local/etc/poudriere.conf.sample
> ...



I have updated my /usr/local/etc/poudriere.conf to reflect these changes. Hopefully it makes a difference.



SirDice said:


> Are you building packages for 11.2 on your Poudriere? The official packages are still built for 11.1 and I noticed some ports fail to build with 11.2. This might be due to compiler changes between 11.1 and 11.2.



I am building packages for 10.4. They should be using the most updated ports tree since my cron job updates it and the jail before every build.


----------

