Skip to content

Build fails on llvm/musl distros: #508

@lrvick

Description

@lrvick

Clang build on llvm/musl toolchain system fails with:

0.217 ld: error: version script assignment of 'GLIBC_2.3.3' to symbol 'timer_settime' failed: symbol not defined
0.217 ld: error: version script assignment of 'GLIBC_2.2.5' to symbol 'pthread_cond_timedwait' failed: symbol not defined
0.217 ld: error: version script assignment of 'GLIBC_2.3.2' to symbol 'pthread_cond_timedwait' failed: symbol not defined
0.217 ld: error: version script assignment of 'GLIBC_2.3.2' to symbol 'pthread_cond_init' failed: symbol not defined
0.217 ld: error: version script assignment of 'GLIBC_2.3.2' to symbol 'pthread_cond_destroy' failed: symbol not defined

Building using following pattern and 9.1.11 as the source:

FROM scratch AS build                                                                                                                                 
ARG VERSION                                                                                                                                           
COPY --from=stagex/core-busybox . /                                                                                                                   
COPY --from=stagex/core-llvm . /                                                                                                                      
COPY --from=stagex/core-libzstd . /                                                                                                                   
COPY --from=stagex/core-make . /                                                                                                                      
COPY --from=stagex/core-musl . /                                                                                                                      
ADD fetch/libfaketime-${VERSION}.tar.gz .                                                                                                             
WORKDIR /libfaketime-${VERSION}                                                                                                                       
ENV CFLAGS="-DFAKE_RANDOM -DFAKE_PID -DFAKE_SETTIME -DFAKE_UTIME -DINTERCEPT_SYSCALL"                                                                 
ENV CC=clang                                                                                                                                          
RUN --network=none <<-EOF                                                                                                                             
  set -eux                                                                                                                                            
  make -j "$(nproc)" PREFIX=/usr                                                                                                                      
  make DESTDIR=/rootfs install                                                                                                                        
EOF                                                                                                                                                   
FROM stagex/core-filesystem AS package                                                                                                                
COPY --from=build /rootfs/ /                                                                                                                                    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions