Missing files in /usr/include

I have not had to build any programs from ports in awhile
I recently upgraded to 14.2-RELEASE-p1 and now while building for ports I am missing files from /usr/src and /usr/includes
I have been able to get the files missing from /usr/src but I can not find a way to retrieve the files for /usr/includes

example of missing files (but I suspect I may be missing others):
/usr/include/c++/v1/__utility/pair.h:21:10: fatal error: '__tuple/pair_like.h' file not found
/usr/include/c++/v1/__algorithm/find.h:23:10: fatal error: '__string/constexpr_c_functions.h' file not found

I have reload these pkg hoping to get the needed file but no successs:
gcc-13_5
gcc12-12.4.0_1
gcc13-13.3.0
llvm-19_1,1
llvm19-19.1.7_1
llvm20-20.1.0.r3
 
I used to buildworld from source by lately just been using freeebsd-update
/etc/freebsd-update.conf contains
Code:
Components src world kernel

I am having the same problems on my development system (also 14.2-RELEASE-p1) but I found /usr/src was empty?!?!?

I fetched the /usr/src and tried

cd /usr/src & make includes

but just got
Code:
install: target directory `/usr/include/c++/v1/__string/' does not exist

Now that 14.2-RELEASE is loaded what steps can I take to remove the old /usr/src and /usr/include files and just end up with the correct ones.
 
CSS:
cd /usr/src
make delete-old
>>> Removing old files (only deletes safe to delete libs)
remove /etc/host.conf? y
remove /etc/opiekeys? y
>>> Old files removed
>>> Removing old directories
rmdir: /var/db/portsnap: Directory not empty
>>> Old directories removed
To remove old libraries run 'make delete-old-libs'.
desk11 /usr/src#make delete-old-libs
>>> Removing old libraries
Please be sure no application still uses those libraries, else you
can not start such an application. Consult UPDATING for more
information regarding how to cope with the removal/revision bump
of a specific library.
>>> Old libraries removed
same files not found so I reinstalled libs
Code:
pkg install llvm gcc
same problem....
 
if you install them from packages ( gcc, llvm), they install files, libs, includes into /usr/local/
that way it is separated from your base system.
/usr/include is your base's INCLUDEDIR. It would be nice to know which ports are failing.
 
pkg install wkhtmltopdf
but this version gives "Segmentation fault (core dumped)" when run

So I am trying build a version from ports
Code:
cd /usr/ports/converters/wkhtmltopdf & make
...
In file included from /usr/include/c++/v1/variant:220:
In file included from /usr/include/c++/v1/__functional/hash.h:24:
/usr/include/c++/v1/__utility/pair.h:21:10: fatal error: '__tuple/pair_like.h' file not found
   21 | #include <__tuple/pair_like.h>
So I do have SOME files just not all (maybe they are outdated, at this point I just do not know),
Code:
cd /usr/local/
find * | grep pair_like.h
finds nothing!

Same thing is happening on both systems....
 
I obviously forgot the details, but the problem isn't missing files, it is outdated files that then try to include the wrong thing.

I would nuke /usr/include and untar from the release tarballs.
 
the problem isn't missing files, it is outdated files that then try to include the wrong thing.
I understood this I just thought reinstalling the libs would overwrite the old files. I was wrong

Your suggesting worked:
Code:
mkdir /backup/workdir
cd /backup/
fetch -o - ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/14.2-RELEASE/base.txz | tar xf - -C workdir
mv -v /backup/workdir/usr/include/ /usr

the port now successfully builds but still has the same problem as the pkg version
Off to me next problem, thanks for the help. It will surely prevent other problems in the future.
 
Back
Top