maxdev1/ghost

Can't build zlib-1.2.8

JustVic opened this issue · 2 comments

Can't build zlib-1.2.8. Always getting this error:

/ghost/source/patches/ports$ ./port.sh zlib/1.2.8

ghost-port
==========
building package "zlib/1.2.8"
cleaning build directory 'build/zlib/1.2.8'
downloading source from 'https://ghostkernel.org/repository/zlib/zlib-1.2.8.tar.gz'...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2730k 100 2730k 0 0 1263k 0 0:00:02 0:00:02 --:--:-- 1262k
no patch in port
installing port
Using ar
Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
** ./configure aborting.
Please use ./configure first. Thank you.
make: *** No rule to make target 'install'. Stop.

That's weird, I'll have to look into this! As a quickfix you could temporarily modify the port.sh script so it executes ./configure inside the port working directory.

The error is misleading. This error can occur if you don't have the toolchain installed beforehand (or if it can't be found in your path). From zlib's configure script:

cat > $test.c << EOF
int foo() { return 0; }
EOF
echo "Checking for obsessive-compulsive compiler options..." >> configure.log
if try $CC -c $CFLAGS $test.c; then
  :
else
  echo "Compiler error reporting is too harsh for $0 (perhaps remove -Werror)." | tee -a configure.log
  leave 1
fi

As you can see, it's just trying to do a test compile.