Skip to content

Can't install on Alpine image using gcc 14.3.0 #1862

@JonJagger

Description

@JonJagger

Hi.
To support my good friend James Grenning I have two versions of cpputest installed in https://cyber-dojo.org.
One for C (gcc) and one for C++ (g++).
I'm trying to update the gcc compiler for the first one to 14.3.0 running in an Alpine 3.22 image.

My Dockerfile is attempting to run this script:

#!/usr/bin/env bash
set -Eeu

apk add --no-cache autoconf automake git libtool

git clone https://github.com/cpputest/cpputest.git
cd cpputest
mkdir cpputest_build
cd cpputest_build
autoreconf .. -i
../configure
make install

apk del git

The error I get is:

34.02 CppUTest Version 4.0
34.02 
34.02 Current compiler options:
34.02    CC:                                  gcc
34.02    CXX:                                 g++
34.02    CC version:                          14.3.0
34.02    CXX version:                         
34.02    LD:                                  /usr/aarch64-alpine-linux-musl/bin/ld
34.02    Default CFLAGS:                      -g -O2
34.02    Default CXXFLAGS:                    -g -O2
34.02    CppUTest CFLAGS:                       -Wno-c++11-long-long -Wno-long-long -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum -Wconversion -pedantic -Wsign-conversion -Wstrict-prototypes -Wno-disabled-macro-expansion -Wno-padded 
34.02    CppUTest CXXFLAGS:                    -include ../include/CppUTest/MemoryLeakDetectorNewMacros.h  -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++14-compat -Wno-c++11-long-long -Wno-long-long -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum -Wconversion -pedantic -Wsign-conversion -Woverloaded-virtual -Wno-disabled-macro-expansion -Wno-padded -Wno-global-constructors -Wno-exit-time-destructors -Wno-weak-vtables -Wno-old-style-cast 
34.02    CppUTest CPPFLAGS:                    -include ../include/CppUTest/MemoryLeakDetectorMallocMacros.h -I ../include 
34.02    CppUTest LDFLAGS:                    
34.02    CppUTest LIB:                           -lpthread
34.02 
34.02 Features configured in CppUTest:
34.02    C++ standard used:                   default
34.02    Memory Leak Detection:               yes
34.02    Compiling extensions:                yes
34.02    Use Long Long (if available):        yes
34.02    Disable CppUTest compile/link flags: yes
34.02    Address sanitizer:                   no
34.02 
34.02    Using Standard C++ Library:          yes
34.02    Using Standard C Library:            yes
34.02 
34.02    Generating map file:                 no
34.02    Compiling w coverage info:           no
34.02 
34.02 ----------------------------------------------------------------
34.04 g++ -DHAVE_CONFIG_H -I. -I..   -include ../include/CppUTest/MemoryLeakDetectorMallocMacros.h -I ../include     -include ../include/CppUTest/MemoryLeakDetectorNewMacros.h  -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-c++14-compat -Wno-c++11-long-long -Wno-long-long -Wall -Wextra -Wshadow -Wswitch-default -Wswitch-enum -Wconversion -pedantic -Wsign-conversion -Woverloaded-virtual -Wno-disabled-macro-expansion -Wno-padded -Wno-global-constructors -Wno-exit-time-destructors -Wno-weak-vtables -Wno-old-style-cast   -g -O2 -MT src/CppUTest/lib_libCppUTest_a-CommandLineArguments.o -MD -MP -MF src/CppUTest/.deps/lib_libCppUTest_a-CommandLineArguments.Tpo -c -o src/CppUTest/lib_libCppUTest_a-CommandLineArguments.o `test -f 'src/CppUTest/CommandLineArguments.cpp' || echo '../'`src/CppUTest/CommandLineArguments.cpp
34.20 ./../include/CppUTest/MemoryLeakDetectorMallocMacros.h:37:53: error: expected identifier before string constant
34.20    37 | #define calloc(a, b) cpputest_calloc_location(a, b, __FILE__, __LINE__)
34.20       |                                                     ^~~~~~~~

The above output is from this github Action workflow:

Can you help?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions