# Can you help me figure out what is pulling in linux-c6 when I am using linux-c7



## rewtkid (Dec 18, 2018)

I followed the instructions on a mailing list here.

https://www.mail-archive.com/freebsd-emulation@freebsd.org/msg06550.html

So in my /etc/make.conf I now have
DEFAULT_VERSIONS+=linux=c7_64
However when I went to install nvidia-driver via pkg, it tried to pull in linux-c6.
So I installed nvidia-driver from ports and it happily used linux-c7. 

My problem is now when I run pkg upgrade I get the following.




```
root@bsd:/usr/ports # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (5 candidates): 100%
Processing candidates (5 candidates): 100%
Checking integrity... done (4 conflicting)
  - linux-c6-xorg-libs-7.4_10 conflicts with linux-c7-xorg-libs-7.7_5 on /compat/linux/usr/lib/libICE.so.6
  - linux-c6-fontconfig-2.8.0_3 conflicts with linux-c7-fontconfig-2.10.95_3 on /compat/linux/etc/fonts
  - linux-c6-expat-2.0.1_5 conflicts with linux-c7-expat-2.1.0_2 on /compat/linux/usr/bin/xmlwf
  - linux_base-c6-6.10 conflicts with linux_base-c7-7.4.1708_6 on /compat/linux/bin
Checking integrity... done (0 conflicting)
The following 85 package(s) will be affected (of 0 checked):

Installed packages to be REMOVED:
        linux-c7-xorg-libs-7.7_5
        linux-c7-fontconfig-2.10.95_3
        linux-c7-expat-2.1.0_2
        linux_base-c7-7.4.1708_6
        linux-c7-elfutils-libelf-0.168
        linux-c7-dri-17.0.1
        linux-c7-libpciaccess-0.13.4_3
        linux-c7-7.4.1708_1
        linux-c7-pixman-0.34.0
        linux-c7-cairo-1.14.8
        linux-c7-libpng-1.5.13_2
        linux-c7-qt-4.8.5_3
        linux-c7-openssl-libs-1.0.2k
        linux-c7-libssh2-1.4.3_2
        linux-c7-curl-7.29.0_4
        linux-c7-nss-3.28.4_3
        linux-c7-nspr-4.13.1
        linux-c7-openldap-2.4.44
        linux-c7-cyrus-sasl-lib-2.1.26_3
        linux-c7-sqlite-3.7.17_1
        linux-c7-qtwebkit-2.3.4_2
        linux-c7-qt-x11-4.8.5_4
        linux-c7-libtiff-4.0.3_3
        linux-c7-jpeg-1.2.90_2
        linux-c7-jasper-libs-1.900.1_4
        linux-c7-gdk-pixbuf2-2.36.5
        linux-c7-gtk2-2.24.31
        linux-c7-pango-1.40.4
        linux-c7-harfbuzz-1.3.2
        linux-c7-graphite2-1.3.10
        linux-c7-libthai-0.1.14_1
        linux-c7-atk-2.22.0
        linux-c7-sdl_ttf-2.0.11_2
        linux-c7-sdl-1.2.15_1
        linux-c7-sdl_mixer-1.2.12_1
        linux-c7-sdl_image-1.2.12_2
        linux-c7-jbigkit-libs-2.0_2
        linux-c7-alsa-lib-1.1.3
        linux-c7-alsa-plugins-oss-1.1.1
        linux-c7-alsa-utils-1.1.3
        linux-c7-alsa-plugins-pulseaudio-1.1.1
        linux-c7-pulseaudio-libs-10.0
        linux-c7-tcp_wrappers-libs-7.6_2
        linux-c7-libasyncns-0.8_1
        linux-c7-dbus-libs-1.6.12_2
        linux-c7-dbus-glib-0.100_1
        linux-c7-libsndfile-1.0.25_3
        linux-c7-libvorbis-1.3.3_1
        linux-c7-libogg-1.3.0_1
        linux-c7-flac-libs-1.3.0_2
        linux-c7-pulseaudio-utils-10.0
        linux-c7-openal-soft-1.16.0_2
        linux-c7-trousers-0.3.14
        linux-c7-gnutls-3.3.26
        linux-c7-p11-kit-0.23.5
        linux-c7-nettle-2.7.1
        linux-c7-libtasn1-4.10
        linux-c7-cups-libs-1.6.3_4
        linux-c7-avahi-libs-0.6.31_1
        linux-c7-tk85-8.5.13_1
        linux-c7-motif-2.3.4_5
        linux-c7-libxml2-2.9.1_1
        linux-c7-aspell-0.60.6.1_1
        linux-c7-libgpg-error-1.12_2
        linux-c7-libgcrypt-1.5.3_4
        linux-c7-libv4l-0.9.5_2
        linux-c7-libtheora-1.1.1_1
        linux-c7-tcl85-8.5.13_1
        linux-c7-power9-functional-sim-1.1
        linux-c7-glx-utils-8.2.0_4
        linux-c7-sdl20-2.0.3_1
        linux-c7-libsigc++20-2.10.0
        linux-c7-libglade2-2.6.4_1
        linux-c7-devtools-7.4.1708_4
        linux-c7-libgfortran-4.8.5_3
        linux-c7-audiofile-0.3.6_1
        linux-c7-userspace-rcu-0.7.16
        linux-c7-lttng-ust-2.4.1
        linux-c7-icu-50.1.2
        linux-c7-libunwind-1.2

New packages to be INSTALLED:
        linux-c6-xorg-libs: 7.4_10
        linux-c6-fontconfig: 2.8.0_3
        linux-c6-expat: 2.0.1_5
        linux_base-c6: 6.10

Installed packages to be REINSTALLED:
        nvidia-driver-390.87_1 (options changed)

Number of packages to be removed: 80
Number of packages to be installed: 4
Number of packages to be reinstalled: 1

The operation will free 564 MiB.

Proceed with this action? [y/N]: n
root@bsd:/usr/ports #
```

What is the equivalent of DEFAULT_VERSIONS+=linux=c7_64 for pkg? Does it read /etc/make.conf as well? No right? So where do I tell it to use linux-c7? Thank you very much. I will be reading and researching although I already did before this post but perhaps I will get lucky.


----------



## ShelLuser (Dec 18, 2018)

rewtkid said:


> So in my /etc/make.conf I now have
> DEFAULT_VERSIONS+=linux=c7_64
> However when I went to install nvidia-driver via pkg, it tried to pull in linux-c6.


Don't mix ports and packages, that can easily disrupt your system (the underlying dependencies that is).



rewtkid said:


> What is the equivalent of DEFAULT_VERSIONS+=linux=c7_64 for pkg?


There is none.

Packages are build with default options and their dependencies are therefor hardcoded. This is one of the major reasons why you shouldn't mix both ports and packages, because a port can be build against pretty much anything whereas packages have specific dependencies (and therefor requirements).


----------



## rewtkid (Dec 18, 2018)

So I should only use one or the other? (pkg or ports.) And if I want linux-c7, I cant have nvidia-driver installed? Do I understand you correctly?


----------



## ShelLuser (Dec 18, 2018)

rewtkid said:


> And if I want linux-c7, I cant have nvidia-driver installed? Do I understand you correctly?


I don't see why you wouldn't be able to, considering that x11/nvidia-driver doesn't have any dependencies pointing to emulators/linux_base-c7 or vice versa:

```
peter@zefiris:/home/peter $ pkg info -x linux nvidia
linux_base-c7-7.4.1708_6
linuxlibertine-g-20120116_1
nvidia-driver-390.87
nvidia-settings-396.24
nvidia-xconfig-396.24
```
I think that the reason for your deinstallation problems is simply that you mixed both installation methods; they're usually not compatible.


----------



## rewtkid (Dec 18, 2018)

The pkg nvidia-driver is insisting on using linux-c6 is my problem. The port reads my option I set in make.conf and uses linux-c7 fine.


----------



## rewtkid (Dec 18, 2018)

What is calling in linux-c6 when I pkg upgrade above? nvidia-driver right?


----------



## rewtkid (Dec 18, 2018)

Maybe somehow nvidia-driver is still installed by pkg but ports as well. let me check. later today I am going to pkg info > installed.txt use cut to only have the first section and use pkg to uninstall all of it. Then I will install the list from ports.


----------



## ShelLuser (Dec 18, 2018)

rewtkid said:


> What is calling in linux-c6 when I pkg upgrade above? nvidia-driver right?


Highly unlikely:

```
peter@zefiris:/usr/ports/x11/nvidia-driver $ make all-depends-list | grep linux      
peter@zefiris:/usr/ports/x11/nvidia-driver $ pkg info -rx linux
linux_base-c7-7.4.1708_6:
linuxlibertine-g-20120116_1:
        libreoffice-6.0.7_1
peter@zefiris:/usr/ports/x11/nvidia-driver $
```
As you can see it's not required by anything.


----------



## rewtkid (Dec 18, 2018)

I see. So in the above pkg upgrade command how would I find out what is pulling in linux-c6?


----------



## rewtkid (Dec 18, 2018)

is it libice and fonts as well as xmlwf and bin? Is that what its trying to tell me?



```
Checking integrity... done (4 conflicting)
  - linux-c6-xorg-libs-7.4_10 conflicts with linux-c7-xorg-libs-7.7_5 on /compat/linux/usr/lib/libICE.so.6
  - linux-c6-fontconfig-2.8.0_3 conflicts with linux-c7-fontconfig-2.10.95_3 on /compat/linux/etc/fonts
  - linux-c6-expat-2.0.1_5 conflicts with linux-c7-expat-2.1.0_2 on /compat/linux/usr/bin/xmlwf
  - linux_base-c6-6.10 conflicts with linux_base-c7-7.4.1708_6 on /compat/linux/bin
```


----------



## rewtkid (Dec 18, 2018)

Yes, it was nvidia driver pulling in linux-c6 because I am mixing ports and packages like you said is a bad idea. But afaik, its the only way to use nvidia-driver with linux-c7 is to install nvidia-driver from ports as the pkg insists on using c6. I removed nvidia-driver temporarily, and pkg upgrade ran fine without pulling in linux-c6. with nvidia-driver installed, pkg seen it as "options changed" (linux-c7 = c6) for nvidia-driver. I am going to do what I said and just use pkg info > installed.txt, uninstall them all and reinstall from ports. I dont think the pkg system is for me as I like customization. Thank you for your help. This is the thread I read as well as some man pages that solved it for me. https://forums.freebsd.org/threads/why-pkg-upgrade-will-install-new-packages.66458/ Perhaps while this box is busy compiling today although with a modest i7-5930K it shouldnt take too long, I can actually get some housework done. Thanks again.


----------



## T-Daemon (Dec 19, 2018)

rewtkid said:


> But afaik, its the only way to use nvidia-driver with linux-c7 is to install nvidia-driver from ports ...


The question here is do you really need a linux base set. You need it if you want to run linux binaries. There are ports which require to run the emulators/linux_base-c6, approximately 100. The emulators/linux_base-c7 has even less ports which require the set to run. It makes no sense setting in make.conf a specific version of linux if you don’t plan to use linux binaries.

As you describe, you want to use the linux base solely for the x11/nvidia-driver. The Linux compatibility support in the nvidia-driver is only useful if you wish to run Linux OpenGL applications, it is not not a requirement. 

The nvidia-driver, build without linux support has very few shared libraries, unlike with linux support.

(I cut the documentation part from the `pkg info` )

```
nvidia-driver-390.87_1:
    /boot/modules/nvidia-modeset.ko
    /boot/modules/nvidia.ko
    /usr/local/bin/nvidia-bug-report.sh
    /usr/local/bin/nvidia-debugdump
    /usr/local/bin/nvidia-smi
    /usr/local/etc/libmap.d/nvidia.conf
    /usr/local/lib/libEGL-NVIDIA.so
    /usr/local/lib/libEGL-NVIDIA.so.1
    /usr/local/lib/libGL-NVIDIA.so
    /usr/local/lib/libGL-NVIDIA.so.1
    /usr/local/lib/libGLESv1_CM.so
    /usr/local/lib/libGLESv1_CM.so.1
    /usr/local/lib/libGLESv2-NVIDIA.so
    /usr/local/lib/libGLESv2-NVIDIA.so.2
    /usr/local/lib/libnvidia-cfg.so
    /usr/local/lib/libnvidia-cfg.so.1
    /usr/local/lib/libnvidia-eglcore.so
    /usr/local/lib/libnvidia-eglcore.so.1
    /usr/local/lib/libnvidia-glcore.so
    /usr/local/lib/libnvidia-glcore.so.1
    /usr/local/lib/libnvidia-glsi.so
    /usr/local/lib/libnvidia-glsi.so.1
    /usr/local/lib/libnvidia-ml.so
    /usr/local/lib/libnvidia-ml.so.1
    /usr/local/lib/libnvidia-tls.so
    /usr/local/lib/libnvidia-tls.so.1
    /usr/local/lib/libvdpau_nvidia.so
    /usr/local/lib/vdpau/libvdpau_nvidia.so.1
    /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
    /usr/local/lib/xorg/modules/extensions/.nvidia/libglx.so
    /usr/local/lib/xorg/modules/extensions/.nvidia/libglx.so.1
    /usr/local/man/man1/nvidia-smi.1.gz
    /usr/local/share/licenses/nvidia-driver-390.87_1/LICENSE
    /usr/local/share/licenses/nvidia-driver-390.87_1/NVIDIA
    /usr/local/share/licenses/nvidia-driver-390.87_1/catalog.mk
```



rewtkid said:


> I dont think the pkg system is for me as I like customization.


When using ports, run `make config` first to see what options the port has. If you plan to use a port manager, those have “make config” as option.


----------



## rewtkid (Dec 19, 2018)

Hi T-Daemon. Thanks for that post. I decided on using portmaster and have since rebuilt all my ports. I do in fact need linux compat because I am in the middle of getting dwarf fortess linux lazy newb pack working for FreeBSD! (I also got the latest minecraft 1.13.2 and its launcher working instead of the outdated port.) http://dffd.bay12games.com/file.php?id=13244&posted=true#c_1295 I have LNP completely working except for one small thing. For the sake of not typing this twice here is my post there with the one problem I am having. Maybe you can help?

Thank you very much for this. I have a problem with getting this working on FreeBSD12-RELEASE using linux emulation. I had to edit many things including startlnp, distrofixes.sh and others but I have everything working including sound but I have one problem. Read on: Once I get it fully working I plan on releasing and maintaining a port. I know what you are thinking and I am not asking you to support FreeBSD, I just want to know if you or someone who comes across this can help with this question. I have it all working except I faintly hear the sound and music working, so sound does work. But there is an overbearing constant hiss as well. I was just wondering if you know where I should be looking. I am emulating linux-c7 (centos 7) I tried linking libopenal.so and libsndfile.so in the DF libs directory to the libs in /compat/linux/ as well as the base freebsd system with no luck. I get the same result of sound working (i can hear the music.) but with constant hiss even if the libopenal.so and libsndfile.so files are completely missing from the DF libs directory, leading me to believe sound is getting hooked by something else. I tried many other things including ./df sound_output oss and some others. If you help me, I will buy you no such thing as a coffee. I will buy you an ale. Real men drink ale. And if you have ale, there is no need for a sammich. Just drink ale and be merry. Thank you for your work!

That was what I posted to him. I do have system sound working fine, which was a 4 day process! I was able to get realtek HD-audio working with snd_hda and the help of the freebsd forums. Thank god for you guys and google as well as a lot of other sites like expert-exchange!


----------

