I try to build project by using musl
In Dockerfile i have
FROM golang:1.17
......Some instructions
RUN : \
&& wget -O /tmp/musl-1.1.19.tar.gz http://www.musl-libc.org/releases/musl-1.1.19.tar.gz \
&& tar -xvf /tmp/musl-1.1.19.tar.gz -C /tmp \
&& cd /tmp/musl-1.1.19 \
&& ./configure \
&& make \
&& make install \
&& cd - \
&& rm -rf /tmp/musl-1.1.19 /tmp/musl-1.1.19.tar.gz \
;
......Some instructions
RUN : \
&& CC=/usr/local/musl/bin/musl-gcc go build --ldflags '-s -w -linkmode external -extldflags "-static"' \
&& mv my-awesome-project /usr/local/bin/my-awesome-project
And i got Error : against hidden symbol `__TMC_END__' can not be used when making a PIE object collect2
It`s work as well in golang:1.9 image.
Also i tryed to install musl-tools by apt-get install, same result...
I not understand what i doing wrong and what exactly compiler want from me.