./configure: line 10028: syntax error near unexpected token `newline'
Hi, just tried to build the current git master as per docs/INSTALL
, ./configure
produces the error in the title.
Starting from a clean LXC container with Ubuntu 20.04 or 20.10 (tried both):
apt update && apt upgrade
apt install build-essential git automake libtool
git clone https://gitlab.freedesktop.org/freetype/freetype.git
cd freetype/
Running git log -1
shows:
commit 7ae5609dbe6acce55f48f65380b734a7db03e9ce (HEAD -> master, origin/master, origin/HEAD)
Author: Alexei Podtelezhnikov (Алексей Подтележников) <apodtele@gmail.com>
Date: Wed Jan 27 16:08:08 2021 -0500
* src/base/ftstroke.c (FT_Stroker_EndSubPath): Ignore tiny gaps.
Fixes bug #1020.
Now, running ./configure
(whether sh autogen.sh
is run before makes no difference):
...
checking for working mmap... yes
./configure: line 10028: syntax error near unexpected token `newline'
./configure: line 10028: ` case'
make: *** [builds/unix/detect.mk:91: setup] Error 2
That’s the file builds/unix/configure
.
bash -n builds/unix/configure
:
builds/unix/configure: line 13302: syntax error near unexpected token `newline'
builds/unix/configure: line 13302: ` case'
These are the lines around that one:
13300: if test "x${enable_mmap}" = "xno" \
13301: -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
13302: case
13303: *-*-mingw*)
13304: FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
13305: ;;
13306: *)
13307: FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
13308: esac
13309: else
What’s missing there is the value for case
.
This comes from line 205
in builds/unix/configure.ac
:
203: if test "x${enable_mmap}" = "xno" \
204: -o "$ac_cv_func_mmap_fixed_mapped" != "yes"; then
205: case
206: *-*-mingw*)
207: FTSYS_SRC='$(PLATFORM_DIR)/ftsystem.c'
208: ;;
git log -1 builds/unix/configure.ac
commit 4df5b26fdfb659985fef6d482c1641b345243cbd
Author: Werner Lemberg <wl@gnu.org>
Date: Mon May 8 07:10:29 2006 +0000
...
* builds/unix/configure.ac: Renamed to...
* builds/unix/configure.raw: This which now serves (with appropriate
modifications) as a template for configure.ac.
git blame builds/unix/configure.raw | egrep --line-number '\bcase\s*$'
:
205:bb33f03a71 builds/unix/configure.raw (Vincent Torri 2021-01-27 06:43:41 -0500 205) case
This is the commit: bb33f03a
I’m trying to reproduce another issue and need to build FreeType for that. For now I’ll just remove that specific change since I’m on Linux so mingw should not matter here.