[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Can not build gzip-1.4: bugs around match.S
From: |
Petr Pisar |
Subject: |
Can not build gzip-1.4: bugs around match.S |
Date: |
Wed, 17 Feb 2010 14:26:31 +0100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
Hello,
I'm not able to build gzip-1.4 on my i686 machine:
cp ./match.c _match.S
gcc -std=gnu99 -E -DNO_UNDERLINE _match.S > _match.i
sed '/^ * < _match.i > match_.s
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[3]: *** [match.o] Error 2
make[3]: Leaving directory `/tmp/gzip-1.4/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/gzip-1.4/lib'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/gzip-1.4/lib'
make: *** [all-recursive] Error 1
This is caused by shell (bash-4.0_p35) or make (make-3.81) that truncates sed
script after hash sign:
$ grep ASCPPPOST lib/Makefile
ASCPPPOST = sed '/^ *#/d; s,//.*,,; s/% /%/g; s/\. /./g'
$(ASCPPPOST) < _match.i > match_.s
Simple backslash-escaping could help.
I found other problem during investigating why compilation works on other i586
machine. The difference is the i686 is recognised by configure as ASMV:
configure:22627: checking for an assembler syntax supported by this package
configure:22657: result: yes, with -Wa,--noexecstack
$ grep ASMV lib/config.h
#define ASMV /**/
And the second problem is my i686 machine has its own /usr/include/config.h
that is included from lib/match.S instead of ./lib/config.h:
gcc -std=gnu99 -E -DNO_UNDERLINE _match.S > _match.i
[...]
[pid 25009] open("_match.S", O_RDONLY|O_NOCTTY) = 3
[pid 25009] open("/usr/local/include/config.h", O_RDONLY|O_NOCTTY) = -1 ENOENT
(No such file or directory)
[pid 25009] open("/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include/config.h",
O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 25009] open("/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/include-fixed/config.h",
O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
[pid 25009] open("/usr/include/config.h", O_RDONLY|O_NOCTTY) = 3
AM_CPPFLAGS in lib/Makfile is not populated apparently:
$ grep CPPFLAGS lib/Makefile
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
ASCPPFLAGS = -DNO_UNDERLINE
CPPFLAGS =
AM_CPPFLAGS =
# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
$(CPP) $(CPPFLAGS) $(ASCPPFLAGS) _match.S > _match.i
$(CC) $(CPPFLAGS) $(CFLAGS) $(ASFLAGS_config) -c match_.s
Maybe the second bug confuses configure to guess match.S should be compiled in.
-- Petr
pgpOyHfS9mtCn.pgp
Description: PGP signature
- Can not build gzip-1.4: bugs around match.S,
Petr Pisar <=