Hello to everyone and happy new 2023.
This question starts with a problem strictly related to the FreeBSD world,but ends with a problem strictly related to the Linux world. You will see,so don't start to bother as soon as you start reading that it's not a linux problem :P
Yesterday I have posted this question on the FreeBSD forums :
How to install the AUTOMATIC1111 webui for stable diffusion within my /compat/ubuntu distro using the FreeBSD linuxulator.
You can read the full post here :
https://forums.freebsd.org/threads/can-the-nv-sglrun-wrapper-launch-the-python3-script-needed-to-allow-torch-to-detect-my-gpu.87610/#post-593445
Luckily someone found a solution and wrote a nice tutorial that you can read here :
https://github.com/verm/freebsd-stable-diffusion
so,ok. I started to follow his tutorial,but at some point I've encountered a problem by using cc within the linux environment. I tried to fix it,but for the moment without success. You can read the full log of what I did below :
mario-freebsd@marietto:/home/marietto/Desktop/Files/Scripts/BSD # /compat/ubuntu/bin/cc --sysroot=/compat/ubuntu -m64 -std=c99 -Wall -ldl -fPIC -shared -o dummy-uvm.so uvm_ioctl_override.c
cc: error trying to exec 'cc1': execvp: No such file or directory
mario-freebsd@marietto:/home/marietto/Desktop/Files/Scripts/BSD # chroot /compat/ubuntu /bin/bash
mario-linuxulator@marietto:/# dpkg -l | grep gcc | awk '{print $2}'
gcc
gcc-10
gcc-10-base:amd64
gcc-8
gcc-8-base:amd64
gcc-9
gcc-9-base:amd64
libgcc-10-dev:amd64
libgcc-8-dev:amd64
libgcc-9-dev:amd64
libgcc-s1:amd64
mario-linuxlator@marietto:/# which gcc
/usr/bin/gcc
mario-linuxlator@marietto:/# which cc1
nothing
mario-linuxlator@marietto:/# apt-get install build-essential
Reading package lists... Done
Building dependency tree
Reading state information... Done
build-essential is already the newest version (12.8ubuntu1).
mario-linuxlator@marietto:/# whereis cc1
cc1:
mario-freebsd@marietto:/home/marietto/Desktop/Files/Scripts/BSD # find /compat/ubuntu -name cc1
/compat/ubuntu/usr/lib/gcc/x86_64-linux-gnu/9/cc1
/compat/ubuntu/usr/lib/gcc/x86_64-linux-gnu/10/cc1
mario-freebsd@marietto:/home/marietto/Desktop/Files/Scripts/BSD # cp /compat/ubuntu/usr/lib/gcc/x86_64-linux-gnu/10/cc1 /compat/ubuntu/bin
mario-freebsd@marietto:/home/marietto/Desktop/Files/Scripts/BSD # /compat/ubuntu/bin/cc --sysroot=/compat/ubuntu -m64 -std=c99 -Wall -ldl -fPIC -shared -o dummy-uvm.so uvm_ioctl_override.c
In file included from /compat/ubuntu/usr/include/dlfcn.h:22,
from uvm_ioctl_override.c:3:
/compat/ubuntu/usr/include/features.h:461:12: fatal error: sys/cdefs.h: No such file or directory
461 | # include <sys/cdefs.h>
| ^~~~~~~~~~~~~
compilation terminated.
mario-freebsd@marietto:/home/marietto/Desktop/Files/Scripts/BSD # chroot /compat/ubuntu /bin/bash
mario-linuxlator@marietto:/# apt-get install g++-multilib
....
OK
mario-linuxlator@marietto:/# exit
exit
mario-freebsd@marietto:/home/marietto/Desktop/Files/Scripts/BSD # /compat/ubuntu/bin/cc --sysroot=/compat/ubuntu -m64 -std=c99 -Wall -ldl -fPIC -shared -o dummy-uvm.so uvm_ioctl_override.c
cc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found,compilation terminated.
do you see some mistake between the commands that I have issued ? Do you know how to fix the error ? thanks.