grüß euch,

ende gelände ist mit dieser meldung:

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-Q859ie'
    
    Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_5bc7f/fast
    make[1]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-Q859ie“ wird betreten
    /usr/bin/make  -f CMakeFiles/cmTC_5bc7f.dir/build.make CMakeFiles/cmTC_5bc7f.dir/build
    make[2]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-Q859ie“ wird betreten
    Building C object CMakeFiles/cmTC_5bc7f.dir/testCCompiler.c.o
    /usr/bin/cc   -march=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/tmp/makepkg/upx/src=/usr/src/debug/upx -flto=auto  -o CMakeFiles/cmTC_5bc7f.dir/testCCompiler.c.o -c /tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-Q859ie/testCCompiler.c
    Linking C executable cmTC_5bc7f
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_5bc7f.dir/link.txt --verbose=1
    /usr/bin/ld: cannot find /usr/lib/libc_nonshared.a: Die Struktur muss bereinigt werden
    collect2: Fehler: ld gab 1 als Ende-Status zurück
    /usr/bin/cc -march=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/tmp/makepkg/upx/src=/usr/src/debug/upx -flto=auto  -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto  CMakeFiles/cmTC_5bc7f.dir/testCCompiler.c.o -o cmTC_5bc7f
    make[2]: *** [CMakeFiles/cmTC_5bc7f.dir/build.make:102: cmTC_5bc7f] Fehler 1
    make[2]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-Q859ie“ wird verlassen
    make[1]: *** [Makefile:133: cmTC_5bc7f/fast] Fehler 2
    make[1]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-Q859ie“ wird verlassen
    
  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:137 (project)

es scheint als würde eine orientierungslosigkeit herrschen, zb /usr/bin/ld: cannot find /usr/lib/libc_nonshared.a, diese datei ist aber vorhanden…

tom@frija ~/compile/upx # pacman -Qo /usr/lib/libc_nonshared.a
/usr/lib/libc_nonshared.a ist in glibc 2.40+r16+gaa533d58ff-2 enthalten

wie kanns zu so was kommen, und noch wie werd ichs problem wieder los?

    Welchen Sourcecode (woher) versuchst du da (wie? makepkg?) zu bauen?
    Eigenes (kaputtes?) PKGBUILD?

    Hier funktioniert ohne Fehler:
    a) Das Paket was auch über extra/upx installierbar ist (4.2.4-1)

    $ cd /tmp
    $ git clone https://gitlab.archlinux.org/archlinux/packaging/packages/upx.git
    $ cd upx
    $ makepkg -sr

    als auch
    b) Das Paket aus dem AUR upx-git

    $ aur sync --chroot upx-git
    ==> Finished making: upx-git 4.2.4.r63.g36addd7a-1 (Sun Dec  8 16:40:40 2024)

    //Edit:
    Ggf. kaputter Build-Stack bei dir? Falscher Compiler/Linker? Weil:

    brikler -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - failed
    -- Check for working C compiler: /usr/bin/cc
    -- Check for working C compiler: /usr/bin/cc - broken

    //Edit2:
    Was sagt:

    stat /usr/lib/libc_nonshared.a 
    file /usr/lib/libc_nonshared.a
    pacman -Qkk glibc

      Das kann ich nicht bestätigen. Gerade versucht

      -- UPX_VERSION_GITREV: disabled
      -- The C compiler identification is GNU 14.2.1
      -- The CXX compiler identification is GNU 14.2.1
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: /usr/bin/cc - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: /usr/bin/c++ - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done

      und kein Ende Gelände, das Paket wurde gebaut. Wozu muss ess überhaupt neu gebaut werden, das gibt es doch fertig im Repo.

        GerBra Welchen Sourcecode (woher) versuchst du da (wie? makepkg?) zu bauen?

        ich benutze das offizielle PKGBUILD

        GerBra Falscher Compiler

        möglich, aber /usr/bin/cc ist vorhanden, und teil von gcc

        mit clang mags auch nicht 🙁

        
        -- Check for working C compiler: /usr/bin/clang
        -- Check for working C compiler: /usr/bin/clang - broken
        CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
          The C compiler
        
            "/usr/bin/clang"
        
          is not able to compile a simple test program.
        
          It fails with the following output:
        
            Change Dir: '/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-ubfbkA'
            
            Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_0b0f2/fast
            make[1]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-ubfbkA“ wird betreten
            /usr/bin/make  -f CMakeFiles/cmTC_0b0f2.dir/build.make CMakeFiles/cmTC_0b0f2.dir/build
            make[2]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-ubfbkA“ wird betreten
            Building C object CMakeFiles/cmTC_0b0f2.dir/testCCompiler.c.o
            /usr/bin/clang   -march=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/tmp/makepkg/upx/src=/usr/src/debug/upx -flto=auto  -MD -MT CMakeFiles/cmTC_0b0f2.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_0b0f2.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_0b0f2.dir/testCCompiler.c.o -c /tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-ubfbkA/testCCompiler.c
            Linking C executable cmTC_0b0f2
            /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_0b0f2.dir/link.txt --verbose=1
            /usr/bin/ld: cannot find /usr/lib/libc_nonshared.a: Die Struktur muss bereinigt werden
            clang: error: linker command failed with exit code 1 (use -v to see invocation)
            /usr/bin/clang -march=native -O2 -pipe -fno-plt -fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security         -fstack-clash-protection -fcf-protection         -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/tmp/makepkg/upx/src=/usr/src/debug/upx -flto=auto  -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now          -Wl,-z,pack-relative-relocs -flto=auto  CMakeFiles/cmTC_0b0f2.dir/testCCompiler.c.o -o cmTC_0b0f2
            make[2]: *** [CMakeFiles/cmTC_0b0f2.dir/build.make:103: cmTC_0b0f2] Fehler 1
            make[2]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-ubfbkA“ wird verlassen
            make[1]: *** [Makefile:133: cmTC_0b0f2/fast] Fehler 2
            make[1]: Verzeichnis „/tmp/makepkg/upx/src/upx/build/release/CMakeFiles/CMakeScratch/TryCompile-ubfbkA“ wird verlassen
        
          CMake will not be able to correctly generate this project.
        Call Stack (most recent call first):
          CMakeLists.txt:137 (project)
        
        -- Configuring incomplete, errors occurred!

        Martin-MS Wozu muss ess überhaupt neu gebaut werden

        wenn was beim paket bauen was nicht funktioniert, dann test ich mit upx, ob der fehler im PKGBUILD, oder generell was nicht passt

        edit

        tom@frija ~/compile/upx # stat /usr/lib/libc_nonshared.a 
        stat: der Aufruf von statx für '/usr/lib/libc_nonshared.a' ist fehlgeschlagen: Die Struktur muss bereinigt werden
        tom@frija ~/compile/upx # file /usr/lib/libc_nonshared.a
        /usr/lib/libc_nonshared.a: cannot open `/usr/lib/libc_nonshared.a' (Structure needs cleaning)
        tom@frija ~/compile/upx # pacman -Qkk glibc
        Sicherungs-Datei: glibc: /etc/locale.gen (Änderungszeitpunkte stimmen nicht überein)
        Sicherungs-Datei: glibc: /etc/locale.gen (Größen stimmen nicht überein)
        Sicherungs-Datei: glibc: /etc/locale.gen (SHA256-Prüfsummen stimmen nicht überein)
        Warnung: glibc: /usr/include/fnmatch.h (Die Struktur muss bereinigt werden)
        Warnung: glibc: /usr/include/pthread.h (Die Struktur muss bereinigt werden)
        Warnung: glibc: /usr/include/termios.h (Die Struktur muss bereinigt werden)
        Warnung: glibc: /usr/include/bits/waitstatus.h (Die Struktur muss bereinigt werden)
        Warnung: glibc: /usr/include/bits/types/struct_sigstack.h (Die Struktur muss bereinigt werden)
        Warnung: glibc: /usr/include/sys/epoll.h (Die Struktur muss bereinigt werden)
        Warnung: glibc: /usr/include/sys/syscall.h (Die Struktur muss bereinigt werden)
        Warnung: glibc: /usr/lib/libc_nonshared.a (Die Struktur muss bereinigt werden)
        glibc: 1614 Dateien gesamt, 8 veränderte Dateien

          Ich habe oben noch was reineditiert, schau nochmal.

          Vorschlag: Teste den Bau mit einem neuen, frischen User. Ggf. ist bei deinem User ja was an den Pfaden oder sonstwie verhaspelt, du bastelst ja gerne...

          brikler aber /usr/bin/cc ist vorhanden, und teil von gcc

          Dein Problem beginnt doch schon viel früher

          brikler -- Detecting C compiler ABI info - failed

          Baue die Pakete so wie es empfohlen wird und nicht in einer produktiven Umgebung, dann funktioniert es auch: https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot

          Damit hat man eine einheitliche Systemungebung und kann Probleme auch nachvollziehen, andernfalls stochert man nur um Nebel.

            Martin-MS dann funktioniert es auch:

            in der tat, im chroot gings, bleibt die frage, warums so nicht mag, hat zufällig jemand eine idee, wie sichs raus finden lässt, warums sonst nicht geht?

            brikler tom@frija ~/compile/upx # stat /usr/lib/libc_nonshared.a
            stat: der Aufruf von statx für '/usr/lib/libc_nonshared.a' ist fehlgeschlagen: Die Struktur muss bereinigt werden

            Dein Dateisystem ist kaputt, würde ich vermuten. "Die Struktur muss bereinigt werden"
            Evtl. genügt auch ein Reinstall vom glibc-Paket, aber ich würde dem auf den Grund gehen.
            Auch die anderen veränderten Dateien im glibc-Paket deuten darauf hin.

            Du kannst sicherheitshalber mal mit:
            pacman -Qkk
            alle anderen Pakete auf diese Struktur-Fehler testen (grep).

              GerBra

              Packages (1) glibc-2.40+r16+gaa533d58ff-2
              
              Total Installed Size:  47.64 MiB
              Net Upgrade Size:       0.00 MiB
              
              :: Proceed with installation? [Y/n] 
              (1/1) checking keys in keyring                     [------] 100%
              (1/1) checking package integrity                   [------] 100%
              (1/1) loading package files                        [------] 100%
              (1/1) checking for file conflicts                  [------] 100%
              (1/1) checking available disk space                [------] 100%
              warning: could not get file information for usr/include/bits/types/struct_sigstack.h
              warning: could not get file information for usr/include/bits/waitstatus.h
              warning: could not get file information for usr/include/fnmatch.h
              warning: could not get file information for usr/include/pthread.h
              warning: could not get file information for usr/include/sys/epoll.h
              warning: could not get file information for usr/include/sys/syscall.h
              warning: could not get file information for usr/include/termios.h
              warning: could not get file information for usr/lib/libc_nonshared.a
              :: Processing package changes...
              (1/1) reinstalling glibc                           [------] 100%
              warning: warning given when extracting /usr/include/bits/types/struct_sigstack.h (Could not stat /usr/include/bits/types/struct_sigstack.h)
              warning: warning given when extracting /usr/include/bits/waitstatus.h (Could not stat /usr/include/bits/waitstatus.h)
              warning: warning given when extracting /usr/include/fnmatch.h (Could not stat /usr/include/fnmatch.h)
              warning: warning given when extracting /usr/include/pthread.h (Could not stat /usr/include/pthread.h)
              warning: warning given when extracting /usr/include/sys/epoll.h (Could not stat /usr/include/sys/epoll.h)
              warning: warning given when extracting /usr/include/sys/syscall.h (Could not stat /usr/include/sys/syscall.h)
              warning: warning given when extracting /usr/include/termios.h (Could not stat /usr/include/termios.h)
              warning: warning given when extracting /usr/lib/libc_nonshared.a (Could not stat /usr/lib/libc_nonshared.a)

              wie gehts weiter? das system neu aufsetzen?

              • GerBra hat auf diesen Beitrag geantwortet.

                brikler wie gehts weiter?

                Verschaffe dir einen Überblick, ob noch andere Pakete von Dateisystemfehlern betroffen sind:
                pacman -Qkk | grep Struktur
                Wenn ja, dann hast du zu einem Dateisystemproblem ggf. noch ein Hardware-Problem.

                Unabhängig vom Ausmaß muß das Dateisystem wieder konsistent werden, also offline (ungemountet) einen fsck plus ggf. Reparatur deines FS starten.

                Wenn nur das glibc Paket betroffen sein sollte kannst du danach obigen Reinstall noch mal versuchen, ggf. mit der Overwrite-Option. Oder du löschst die angemeckerten Datei per Hand und reinstallierst dann das Paket. Dafür wie gesagt wird aber das FS in Ordnung sein müssen.

                  GerBra glibc neu installieren hats problem gelöst, allerdings von einem live system aus.
                  vielen dank für deine hilfe 🙂