toolchain icon indicating copy to clipboard operation
toolchain copied to clipboard

libpng 14 is used by default instead of 16

Open geniot opened this issue 2 years ago • 0 comments

Maybe not an issue but still worth looking at.

The latest toolchain has both libpng14 and libpng16. During compilation/linking version 14 is used by default instead of 16. I guess it's because 14 comes before 16 alphabetically.

My Go build now looks like this:

CC='/opt/gcw0-toolchain/usr/bin/mipsel-gcw0-linux-uclibc-gcc' \
 CGO_CFLAGS='-I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include
  -I/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/include/libpng16
  -D_REENTRANT' \
 CGO_ENABLED=1 \
 CGO_LDFLAGS='-L/opt/gcw0-toolchain/usr/mipsel-gcw0-linux-uclibc/sysroot/usr/lib -lSDL2 -lpng16' \
 GOARCH=mipsle \
 GOMIPS=softfloat \
 GOOS=linux \
 PKG_CONFIG='/opt/gcw0-toolchain/usr/bin/pkg-config' \
 go build -o ${TMP_FOLDER}/${TARGET} ${SOURCE}

See how I'm specifying libpng16 because otherwise 14 is used. SDL2 uses 16 I guess.

geniot avatar Nov 28 '22 12:11 geniot