Open natevw opened 2 years ago
Here's my Dockerfile so far if it's helpful to repro:
# HT: https://github.com/suyashkumar/icestorm-docker/blob/master/Dockerfile
# HT: https://github.com/ddm/icetools/blob/master/Dockerfile
# cf. http://www.clifford.at/icestorm/ [still the official link? via https://github.com/YosysHQ/icestorm#readme]
FROM alpine:3.14
RUN apk add --no-cache --virtual runtime-dependencies \
libgcc libstdc++ libffi boost libftdi1 readline \
graphviz python3 perl tcl make bash
RUN apk add --no-cache --virtual build-dependencies \
git mercurial clang build-base autoconf cmake \
bison flex flex-dev gawk tcl-dev libffi-dev boost-dev \
python3-dev libftdi1-dev readline-dev eigen-dev gperf
RUN git clone --depth 1 https://github.com/YosysHQ/icestorm.git icestorm
RUN cd icestorm; make -j$(nproc) && make install
RUN rm -rf icestorm
# TODO: https://gitlab.alpinelinux.org/alpine/aports/-/issues/8626
RUN git clone --depth 1 https://github.com/YosysHQ/nextpnr nextpnr
RUN cd nextpnr; Eigen3_DIR=/usr/share/cmake/Modules cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . && make -j$(nproc) && make install
RUN rm -rf nextpnr
RUN git clone --depth 1 https://github.com/YosysHQ/yosys.git yosys
RUN cd yosys; make -j$(nproc) && make install
RUN rm -rf yosys
RUN apk del --purge build-dependencies
Looking at some other discussions around this issue, disabling IPO (passing -DUSE_IPO=off
to CMake) should probably be a reasonable workaround. It's unclear if there's anything actionable on the nextpnr side unfortunately.
disabling IPO (passing
-DUSE_IPO=off
to CMake) should probably be a reasonable workaround
This workaround works (Alpine Linux 3.18.0)!
Tested with:
After working around https://github.com/YosysHQ/nextpnr/issues/411#issuecomment-900525718 I am still unable to build nextpnr under Alpine Linux. It finishes compiling but hits an error as it goes to link things:
This seems to be related to https://gitlab.alpinelinux.org/alpine/aports/-/issues/8626 where the recommended solution appears to be:
There's some other potentially-related workarounds discussed at e.g. https://github.com/ClickHouse/clickhouse-odbc/issues/12#issuecomment-574791054 and other projects, but I'm not sure what the best path forward would be for this project specifically.
Is there something that can/should be changed in whatever generates
nextpnr-ice40.pbbCBc.ltrans39.ltrans.o
or is this a bug in Alpine'sc++/10.3.1/ext/string_conversions.h
itself?