Yay -S *-git breaks with gcc 14.2.1+r134+gab884fffe3fc-1 and mold

I did a system upgrade on manjaro using yay -Syu. It appears it upgraded gcc to some experimental version.

  • I tried reinstalling gcc13 but it didn’t fix the problem:

    • export LDFLAGS="${LDFLAGS/-fuse-ld=mold/-fuse-ld=ld}" before trying to install.
    • export CC=gcc-13 CXX=g++-13 before trying to install.
  • yay -S base-devel installs the experimental gcc 14.2.1+r134+gab884fffe3fc-1 again if i try to uninstall it.

  • I queried 3 different llms and got no useful answers.

Here are the logs:

yay -S --noconfirm bambustudio-git
AUR Explicit (1): bambustudio-git-01.06.00.65.15.g693af0c9-1
:: PKGBUILD up to date, skipping download: bambustudio-git
  1 bambustudio-git                          (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
  1 bambustudio-git                          (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
==> Making package: bambustudio-git 01.07.01.62.4.g5ef759ce-1 (Wed 06 Nov 2024 04:07:17 PM)
==> Retrieving sources...
  -> Updating BambuStudio git repo...
  -> Found BambuStudio.cpp.patch
  -> Found CMakeLists.txt.patch
  -> Found wxWidgets.cmake.patch
  -> Found bambu-studio.sh
==> WARNING: Skipping verification of source file PGP signatures.
==> Validating source files with sha512sums...
    BambuStudio ... Skipped
    BambuStudio.cpp.patch ... Passed
    CMakeLists.txt.patch ... Passed
    wxWidgets.cmake.patch ... Passed
    bambu-studio.sh ... Passed
:: (1/1) Parsing SRCINFO: bambustudio-git
==> Making package: bambustudio-git 01.07.01.62.4.g5ef759ce-1 (Wed 06 Nov 2024 04:07:19 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating BambuStudio git repo...
  -> Found BambuStudio.cpp.patch
  -> Found CMakeLists.txt.patch
  -> Found wxWidgets.cmake.patch
  -> Found bambu-studio.sh
==> Validating source files with sha512sums...
    BambuStudio ... Skipped
    BambuStudio.cpp.patch ... Passed
    CMakeLists.txt.patch ... Passed
    wxWidgets.cmake.patch ... Passed
    bambu-studio.sh ... Passed
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Creating working copy of BambuStudio git repo...
Cloning into 'BambuStudio'...
done.
Updating files: 100% (6964/6964), done.
==> Starting prepare()...
patching file BambuStudio/CMakeLists.txt
Hunk #1 succeeded at 745 (offset 54 lines).
==> Starting pkgver()...
==> Updated version: bambustudio-git 01.10.00.81.10.g733531b-1
==> Sources are ready.
==> Making package: bambustudio-git 01.10.00.81.10.g733531b-1 (Wed 06 Nov 2024 04:07:23 PM)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
CMake Warning (dev) at CMakeLists.txt:23 (project):
  cmake_minimum_required() should be called prior to this top-level project()
  call.  Please see the cmake-commands(7) manual for usage documentation of
  both commands.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 13.3.0
-- The CXX compiler identification is GNU 13.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /usr/bin/gcc-13
-- Check for working C compiler: /usr/bin/gcc-13 - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/usr/bin/gcc-13"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/tmp/makepkg/bambustudio-git/src/BambuStudio/deps/build/CMakeFiles/CMakeScratch/TryCompile-c94XFe'
    
    Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/make -f Makefile cmTC_b88fe/fast
    /usr/bin/make  -f CMakeFiles/cmTC_b88fe.dir/build.make CMakeFiles/cmTC_b88fe.dir/build
    make[1]: Entering directory '/tmp/makepkg/bambustudio-git/src/BambuStudio/deps/build/CMakeFiles/CMakeScratch/TryCompile-c94XFe'
    Building C object CMakeFiles/cmTC_b88fe.dir/testCCompiler.c.o
    /usr/bin/gcc-13   -march=native -O2 -pipe -flto=auto  -o CMakeFiles/cmTC_b88fe.dir/testCCompiler.c.o -c /tmp/makepkg/bambustudio-git/src/BambuStudio/deps/build/CMakeFiles/CMakeScratch/TryCompile-c94XFe/testCCompiler.c
    Linking C executable cmTC_b88fe
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b88fe.dir/link.txt --verbose=1
    /usr/bin/gcc-13 -march=native -O2 -pipe -flto=auto  ... -fuse-ld=mold -flto=auto  -rdynamic CMakeFiles/cmTC_b88fe.dir/testCCompiler.c.o -o cmTC_b88fe
    mold: fatal: cannot open ...: No such file or directory
    collect2: error: ld returned 1 exit status
    make[1]: *** [CMakeFiles/cmTC_b88fe.dir/build.make:99: cmTC_b88fe] Error 1
    make[1]: Leaving directory '/tmp/makepkg/bambustudio-git/src/BambuStudio/deps/build/CMakeFiles/CMakeScratch/TryCompile-c94XFe'
    make: *** [Makefile:127: cmTC_b88fe/fast] Error 2
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:23 (project)


-- Configuring incomplete, errors occurred!
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: bambustudio-git-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
bambustudio-git - exit status 4

I assume the issue is the mold command cannot understand “…” (Variadic directory listing?)

You should probably do it in steps:
first the base system, using pacman -Syu
(not yay, because it may prefer AUR over base system packages and you may not spot the difference and end up with problems)
and then the rest (AUR and such)

gcc13 is out of date since almost three months:

Arch Linux - gcc13 13.3.0-1 (x86_64)

2 Likes

An AUR package “broke”, not your system upgrade. Please edit your topic title accordingly.

2 Likes

I uninstalled gcc13 and deleted all make file cache

i installed base-devel which also installs gcc-14.2.1+r134+gab884fffe3fc-1

i then tried again

yay -S bambustudio-git

same error as before.

I tried setting:

export LD="/usr/bin/ld"
export LDFLAGS="-fuse-ld=/usr/bin/ld"
export CFLAGS="-fuse-ld=/usr/bin/ld"
export CXXFLAGS="-fuse-ld=/usr/bin/ld"

I got the same error.

Any ideas?

Gcc failed due to an error on line 67 of CMakeTestCCompiler.cmake

As bambustudio-git is from the AUR:

and not from Manjaro repositories:

pacman -Si bambustudio-git

…contacting the respective maintainer ajacocks might best lead to a resolution. I note that bambustudio-git hasn’t been updated for over a year, so it may simply be suffering from a lack of :heart:.


On the other hand, and from the perspective of `cmake, similar errors have raised their ugly heads in the past: The C Compiler is not able to compile a simple test program :man_shrugging:


I found a binary package (also in AUR) that might workaround the problem, if that suits you; as a plus, it seems more current:

pamac build bambustudio-bin

Cheers.

2 Likes

No.

I can only see:

AUR (en) - Packages

  • one is an orphan
  • the -bin version is in red - don’t know what that means
  • and there is an even older -git version - the one that you tried to use

There are comments under each one - perhaps they help?

You might be better off installing the appimage (AUR (en) - bambustudio-bin).

I found this pinned comment on the AUR (en) - bambustudio page:

envolution commented on 2024-11-07 21:04 (UTC)

The source tree compiles its own libraries, many of which are deprecated and include custom patches. I attempted to use shared libraries but discovered that the extensive custom patches and modifications made it impractical. I support apaxis’ recommendation to use the appimage (bambustudio-bin). The codebase isn’t suited for shared library compilation, and compiling all dependencies as the build scripts do isn’t justified when the appimage is available.

bambustudio-bin v 01.09.07.52-1 has only just been flagged out-of-date on the AUR because there is a new beta release (v1.10.0 Public Beta2). However, the current stable official release is v1.9.7.52, which is the version that bambustudio-bin will install.

2 Likes