Skip to content

clang 22 libs-base configure step fails on Linux #589

@mcarans

Description

@mcarans

The GitHub Actions job for the Arch Linux Oolite build failed at the configure step when building GNUstep base:

 clang-22.1.1-1-x86_64 downloading...
 llvm-libs-22.1.1-1-x86_64 downloading...
 compiler-rt-22.1.1-1-x86_64 downloading...
 libedit-20251016_3.1-1-x86_64 downloading...
...
checking whether objc really works... yes
configure: error: Your compiler does not appear to implement the -fconstant-string-class option needed for support of strings.  Please check for a more recent version or consider using --enable-nxconstantstring
checking if the compiler supports -fconstant-string-class... no

The previous successful run shows that the only change is the clang version:

 clang-21.1.8-1-x86_64 downloading...
 llvm-libs-21.1.8-1-x86_64 downloading...
 compiler-rt-21.1.8-2-x86_64 downloading...
 libedit-20251016_3.1-1-x86_64 downloading...
...
checking whether objc really works... yes
checking if the compiler supports -fconstant-string-class... yes

Here is how I build libobjc2, tools-make and libs-base:

    cd libobjc2
    rm -rf build
    mkdir build
    cd build
    if ! cmake -DTESTS=on -DCMAKE_BUILD_TYPE=Release -DGNUSTEP_INSTALL_TYPE=NONE -DEMBEDDED_BLOCKS_RUNTIME=ON -DOLDABI_COMPAT=OFF ../; then
        echo "❌ libobjc2 cmake configure failed!" >&2
        return 1
    fi

    if ! cmake --build .; then
        echo "❌ libobjc2 cmake build failed!" >&2
        return 1
    fi
    cmake --install .
    cd ../..

    cd tools-make
    make clean

    if [[ ${CURRENT_DISTRO,,} == "redhat" ]]; then
        LIB_PARAM="--with-libdir=lib64"
    else
        LIB_PARAM=""
    fi

    if ! ./configure --with-library-combo=ng-gnu-gnu --with-runtime-abi=gnustep-2.2 ${LIB_PARAM:+"$LIB_PARAM"}; then
        echo "❌ tools-make configure failed!" >&2
        return 1
    fi
    make
    make install
    cd ..

    cd libs-base
    make clean
    source /usr/local/share/GNUstep/Makefiles/GNUstep.sh
    if ! ./configure; then
        echo "❌ libs-base configure failed!" >&2
        return 1
    fi
    if ! make -j$(nproc); then
        echo "❌ libs-base make failed!" >&2
        return 1
    fi
    make install

Is this failure a bug or do I need to change something in how I build GNUstep with clang 22?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions