More NetBSD-current fun at Linveo!

13»

Comments

  • @Not_Oles said:
    Since @Crab is here maybe I should try FreeBSD again? Since @AuroraZero is here, maybe I should try Slackware again?

    My friend you cannot pass FreeBSD 15!

    Thanked by (1)Not_Oles
  • Someone mention Slackware????

    Thanked by (1)Not_Oles
  • Not_OlesNot_Oles Hosting ProviderContent Writer

    How to understand and fix this error, "type mismatch: specfile link, tree file"?

    Thanks for any hints and help! :)

    Sun Dec 14 22:17:17 UTC 2025
    /usr/src
    root
    ===> build.sh command:    ./build.sh -j 2 -O ../obj -T ../tools -U install=/
    ===> build.sh started:    Sun Dec 14 22:17:18 UTC 2025
    ===> NetBSD version:      11.99.4
    ===> MACHINE:             amd64
    ===> MACHINE_ARCH:        x86_64
    ===> Build platform:      NetBSD 11.99.4 amd64
    ===> HOST_SH:             /bin/sh
    ===> share/mk MAKECONF:   /etc/mk.conf
    ===> MAKECONF file:       /etc/mk.conf
    ===> TOOLDIR path:        /usr/src/../tools
    ===> DESTDIR path:        /usr/src/../obj/destdir.amd64
    ===> RELEASEDIR path:     /usr/src/../obj/releasedir
    ===> Updated makewrapper: /usr/src/../tools/bin/nbmake-amd64
    installsets ===> distrib/sets   (with: INSTALLDIR=/ INSTALLSETS=)
      [ . . . ]
    #   execute  maketars for installsets
    cd /usr/src/distrib/sets &&  DESTDIR=/usr/src/../obj/destdir.amd64  MACHINE=amd64  MACHIN
    E_ARCH=x86_64  AWK=/usr/src/../tools/bin/nbawk  CKSUM=/usr/src/../tools/bin/nbcksum  DB=/
    usr/src/../tools/bin/nbdb  EGREP=/usr/src/../tools/bin/nbgrep\ -E  HOST_SH=/bin/sh  MAKE=
    /usr/src/../tools/bin/nbmake  MKTEMP=/usr/src/../tools/bin/nbmktemp  MTREE=/usr/src/../to
    ols/bin/nbmtree  PAX=/usr/src/../tools/bin/nbpax  COMPRESS_PROGRAM=/usr/src/../tools/bin/
    nbxz  GZIP=-n  XZ_OPT=-9  TAR_SUFF=tar.xz  PKG_CREATE=/usr/src/../tools/bin/nbpkg_create 
     SED=/usr/src/../tools/bin/nbsed  TSORT=/usr/src/../tools/bin/nbtsort\ -q  /bin/sh ./make
    tars -d /usr/src/../obj/destdir.amd64   -M /usr/src/../obj/destdir.amd64/METALOG.sanitise
    d -N /usr/src/etc  -L base -i / 
    Creating flist.base
    Creating set.base
    Creating flist.base32
    Creating set.base32
    Creating flist.comp
    Creating set.comp
    Creating flist.games
    Creating set.games
    Creating flist.gpufw
    Creating set.gpufw
    Creating flist.man
    Creating set.man
    Creating flist.manhtml
    Creating set.manhtml
    Creating flist.misc
    Creating set.misc
    Creating flist.modules
    Creating set.modules
    Creating flist.rescue
    Creating set.rescue
    Creating flist.tests
    Creating set.tests
    Creating flist.text
    Creating set.text
    Copying set base
    Copying set base32
    Copying set comp
    pax: line 110: ./usr/include/elf.h: type mismatch: specfile link, tree file
    Copying set games
    Copying set gpufw
    Copying set man
    Copying set manhtml
    Copying set misc
    Copying set modules
    Copying set rescue
    Copying set tests
    Copying set text
    
    *** Failed target:  installsets
     [ . . . ]
    

    I hope everyone gets the servers they want!

  • edited December 15

    I might be wrong, but I think it is complaining about elf.h being a file and not a sym link as it apparently is expecting. Since you have been having so much fun with NetBSD and building stuff, perhaps there are some old files that need to be cleaned up.

    In NetBSD‑current, usr/include/elf.h is a symlink to ../sys/elf.h. Modify that and see if it helps. Alternatively you could just remove everything under destination directory and build it from the scratch.

    Thanked by (1)Not_Oles
  • Not_OlesNot_Oles Hosting ProviderContent Writer

    Hey, hey, hey @Crab! :)

    FWIW, I haven't changed anything yet.

    linveo# cd /usr/include/
    linveo# ls -l elf.h
    lrwxr-xr-x  1 root  wheel  14 Oct 17 01:12 elf.h -> sys/exec_elf.h
    linveo# 
    

    Hmm . . . October.

    Do you think sys/exec_elf.h is now wrong as the target object?

    Do you mean that the target should be /usr/include/../sys/elf.h? There doesn't seem to be a /usr/sys directory.

    Thank you, as always!

    I hope everyone gets the servers they want!

  • See the path has a dot in front so it is a relative path to your current path at /usr/src and not pointing to /, right?

    ./usr/include/elf.h

    Thanked by (1)Not_Oles
  • What's the point of using NetBSD instead of FreeBSD?

    Thanked by (1)Not_Oles
  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @Crab said:
    See the path has a dot in front so it is a relative path to your current path at /usr/src and not pointing to /, right?

    ./usr/include/elf.h

    Yes, but if I am in /usr/src, then ./usr/include/elf.h would refer to /usr/usr/include/elf.h.

    But /usr/src has no /usr/src/usr subdirectory. There are /usr/src/usr.bin and /usr/src/usr.sbin.

    I am still confused. . . . :)

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @Neat321 said:
    What's the point of using NetBSD instead of FreeBSD?

    Back in the 1990s I started using NetBSD because, with some help, I managed to run it on the x86, MIPS, and Power machines I had at that time.

    @Crab :star: recently helped me try FreeBSD, which is equally great.

    For me it's very fun to try different OSes. :) My suggestion is that you try NetBSD, OpenBSD, and FreeBSD in addition to Linux, and see which one you like best for your equipment and workflow. :)

    Thanked by (1)Neat321

    I hope everyone gets the servers they want!

  • @Not_Oles said:
    I am still confused. . . . :)

    Can you check what's under cd /usr/src/distrib/sets? I am not super familiar with NetBSD, but I don't believe that leading dot is there for no reason making it a relative directory to some other location than root (/). Can you check with find command if there's another elf.h somewhere else under /usr/src?

    Thanked by (1)Not_Oles
  • Not_OlesNot_Oles Hosting ProviderContent Writer

    I checked the /usr/src/UPDATING file, which says nothing about the issue on the table here.

    Previously in this thread I listed what's currently installed:

    @Not_Oles said:

    linveo# cd /usr/include/
    linveo# ls -l elf.h
    lrwxr-xr-x  1 root  wheel  14 Oct 17 01:12 elf.h -> sys/exec_elf.h
    linveo# 
    

    What's in $DESTDIR is different. It seems now a real file instead of a symlink.

    linveo# pwd
    /usr/obj/destdir.amd64/usr/include
    linveo# ls -l elf.h
    -r--r--r--  1 tom  wheel  1723 Dec 14 00:27 elf.h
    linveo# 
    

    Here is the file pointed to by the symlink:

    linveo# pwd
    /usr/include/sys
    linveo# ls -l elf.h
    ls: elf.h: No such file or directory
    linveo# ls -l exec_elf.h
    -r--r--r--  1 root  wheel  55842 Dec 11 01:14 exec_elf.h
    linveo# 
    

    Maybe I could replace the present symlink with the present pointed-to file? Then the new file would not be a different type of file but would have different content.

    I am missing out on understanding how the difference is detected by pax(1).

    The error refers to "line 110:"

    pax: line 110: ./usr/include/elf.h: type mismatch: specfile link, tree file
    

    But line 110 of what?

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @Crab said: Can you check what's under cd /usr/src/distrib/sets?

    linveo# cd /usr/src/distrib/sets
    linveo# ls
    CVS           checkflist    fmt-list      makeflist     maketars      sets.subr
    Makefile      comments      getdirs.awk   makeobsolete  metalog.subr  sort-list
    README        culldeps      join.awk      makeplist     mkvars.mk     syspkgdeps
    TODO          deps          listpkgs      makesrctars   regpkg        versions
    attrs         descrs        lists         makesums      regpkgset
    linveo# 
    

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @Crab said: Can you check with find command if there's another elf.h somewhere else under /usr/src?

    linveo# find /usr/src -name "elf.h"
    /usr/src/external/cddl/osnet/sys/elf.h
    /usr/src/external/cddl/osnet/sys/sys/elf.h
    /usr/src/external/gpl3/binutils/dist/libctf/elf.h
    /usr/src/external/gpl3/binutils.old/dist/libctf/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/arc/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/arm/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/alpha/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/avr/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/bfin/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/c6x/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/h8300/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/ia64/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/loongarch/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/mips/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/nds32/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/nios2/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/or1k/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/pa/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/riscv/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/sh/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/vax/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/visium/elf.h
    /usr/src/external/gpl3/gcc/dist/gcc/config/xtensa/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/arc/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/arm/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/alpha/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/avr/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/bfin/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/c6x/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/h8300/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/ia64/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/mips/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/nds32/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/nios2/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/pa/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/riscv/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/sh/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/vax/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/visium/elf.h
    /usr/src/external/gpl3/gcc.old/dist/gcc/config/xtensa/elf.h
    /usr/src/external/gpl3/gdb/dist/libctf/elf.h
    /usr/src/external/gpl3/gdb.old/dist/libctf/elf.h
    /usr/src/include/elf.h
    /usr/src/sys/arch/epoc32/stand/e32boot/include/elf.h
    /usr/src/sys/arch/mipsco/include/elf.h
    linveo# 
    

    I hope everyone gets the servers they want!

  • edited December 15

    I gave this to Co-pilot and this is what it says.

    Here’s what’s happening in your NetBSD build:

    🔎 What the error means
    • During installsets, the build system uses pax together with the METALOG spec file to copy files into the DESTDIR.
    • The spec file says that ./usr/include/elf.sh should be a symlink (usually pointing to ../sys/elf.h).
    • In your actual DESTREE tree, elf.h is a regular file instead of a symlink.
    • pax detects this mismatch and aborts with:

    pax: line 110: ./usr/include/elf.h: type mismatch: specfile link, tree file

    ⚙️ Why this happens
    • Stale DESTDIR: If you’ve run builds before, leftover files in may not match the current source tree’s expectations.
    • Header reorganization: NetBSD’s source tree sometimes changes headers from files to symlinks (or vice versa). If your tree is mid‑upgrade, you can get mismatches.
    • Partial rebuild: Running "build.sh install=/" without a clean DESTDIR can leave behind old files.

    🛠 How to fix
    1. Clean DESTDIR completely

    rm -rf ../obj/destdir.amd64

    1. Then rerun your build.sh command. This ensures no stale headers remain.
    2. Rebuild includes explicitly
      From /usr/src :

    ./build.sh -O ../obj -T ../tools -U -D ../obj/destdir.amd64 includes

    1. This regenerates symlinks like usr/include/elf.h.
    2. Check expected state
      In NetBSD‑current, usr/include/elf.h is a symlink to ../sys/elf.h. Verify in your source tree:

    ls -l /usr/src/include/elf.h

    1. It should show elf.h -> ../sys/elf.h.

    ✅ Summary
    Your build failed because elf.h in DESTDIR is a file, but the spec expects a symlink. The cure is to wipe DESTDIR and rebuild includes so the symlink is created correctly.

    Thanked by (1)Not_Oles
  • Not_OlesNot_Oles Hosting ProviderContent Writer
    edited 1:12AM

    Co-pilot said

    @Crab's Co-pilot said:

    🛠 How to fix
    1. Clean DESTDIR completely
    rm -rf ../obj/destdir.amd64
    Then rerun your build.sh command. This ensures no stale headers remain.

    It seemed like a good idea to clean DESTDIR.amd64, which is inside /obj. So, I moved /usr/obj to /usr/obj-broken and made a new, empty /usr/obj directory:

    linveo# pwd
    /usr
    linveo# ls -l | grep obj
    drwxr-xr-x  23 tom   wheel    512 Dec 16 00:11 obj
    drwxr-xr-x  23 tom   wheel    512 Dec 15 20:02 obj-broken
    linveo# 
    

    I started a new CVS update and build.sh. We will see what happens. . . .


    To begin checking on what Co-pilot said, as the new build proceeds:

    @Crab's Co-pilot said: • During installsets, the build system uses pax together with the METALOG spec file to copy files into the DESTDIR.

     linveo# pwd
    /usr/obj-broken/destdir.amd64
    linveo# cat -n METALOG.sanitised | grep "elf.h " | head -n 1
      3927  ./usr/include/elf.h type=link mode=0755 link=sys/exec_elf.h
    linveo# 
    

    What is the "line 110" in the error that started all this? It's not line 3827 in METALOG.sanitized. . . .

    pax: line 110: ./usr/include/elf.h: type mismatch: specfile link, tree file


    @Crab's Co-pilot said: • In your actual DESTREE tree, elf.h is a regular file instead of a symlink.

    linveo# cd obj-broken/destdir.amd64/usr/include/
    linveo# ls -l elf.h
    -r--r--r--  1 tom  wheel  1723 Dec 14 00:27 elf.h
    linveo# file elf.h
    elf.h: C source, ASCII text
    linveo# 
    

    Let's see what happens when the new build is done. Thanks! :)

    Extra thanks to @Crab! <3

    I hope everyone gets the servers they want!

  • Not_OlesNot_Oles Hosting ProviderContent Writer

    @Crab

    Hey! The build and installs of NetBSD-current kernel and userland plus reboots completed without apparent issue. Thanks to Linveo for a fast VPS! <3 Thanks to @cmeerw for the NetBSD image that got me started! <3

    Looks like completely cleaning the /usr/obj directory worked okay! :star: Thanks to your Co-pilot for the hint about cleaning! <3

    As time goes on, maybe I can understand more about exactly what happened and how and why. Maybe I need to incorporate more cleaning?

    In other news, I have been doing a few OpenBSD builds from source. Maybe I am going to try FreeBSD builds too. . . .

    Thanks again for helping @Crab! <3

    Thanked by (1)Crab

    I hope everyone gets the servers they want!

  • @Not_Oles said:

    @Neat321 said:
    What's the point of using NetBSD instead of FreeBSD?

    Back in the 1990s I started using NetBSD because, with some help, I managed to run it on the x86, MIPS, and Power machines I had at that time.

    @Crab :star: recently helped me try FreeBSD, which is equally great.

    For me it's very fun to try different OSes. :) My suggestion is that you try NetBSD, OpenBSD, and FreeBSD in addition to Linux, and see which one you like best for your equipment and workflow. :)

    Thank you for your reply!

    Thanked by (1)Not_Oles
  • edited 3:03AM

    @Not_Oles said:
    Looks like completely cleaning the /usr/obj directory worked okay! :star: Thanks to your Co-pilot for the hint about cleaning! <3

    Excellent! I thanked my Co-pilot and got a response:

    That’s fantastic news! 🎉. I’m glad the cleanup and header rebuild sorted out the mismatch — those lingering DESTDIR artifacts can be sneaky. It’s always satisfying when a stubborn build error finally gives way to a clean run.

    Going back to your original problem, I think it is a good habit to clean your env before doing any recompilation. You never know what type of clutter is left behind and potentially throwing you off just like what happened here now.

    About compiling FreeBSD, years ago I used to manage multiple production FreeBSD systems using ports which meant that every single update had to be compiled from the sources including the kernel. Yes it took a while, but it was working great and depending on your software needs could provide much more compact and tighter installation than you'd get with pkg. Definitely give it a try!

    Thanked by (1)Not_Oles
Sign In or Register to comment.