[Expat-bugs] [ expat-Bugs-219617 ] expat 1.95.1 configure'd Makefile incorrect

nobody nobody@sourceforge.net
Fri, 02 Mar 2001 00:26:39 -0800


Bugs #219617, was updated on 2000-10-28 03:49
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=219617&group_id=10127

Category: Build control
Group: None
Status: Open
Priority: 5
Submitted By: Larry W. Virden
Assigned to: Nobody/Anonymous
Summary: expat 1.95.1 configure'd Makefile incorrect

Initial Comment:
Platform: Ultra 5 SPARC/Solaris 8
Compiler: Sun C compiler v5.0

% /home/lwv26/i/src/Unix/expat/expat-1.95.1/configure  --prefix=/projects/intranet
creating cache ./config.cache
checking host system type... sparc-sun-solaris2.8
checking build system type... sparc-sun-solaris2.8
checking for ranlib... ranlib
checking for gcc... cc
checking whether the C compiler (cc  ) works... yes
checking whether the C compiler (cc  ) is a cross-compiler... no
checking whether we are using GNU C... no
checking whether cc accepts -g... yes
checking for non-GNU ld... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking whether ln -s works... yes
updating cache ./config.cache
loading cache ./config.cache within ltconfig
checking whether we are using GNU C... no
checking for object suffix... o
checking for executable suffix... no
checking for cc option to produce PIC... -KPIC
checking if cc PIC flag -KPIC works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.lo... no
checking if cc static flag -Bstatic works... -Bstatic
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking command to parse /usr/ccs/bin/nm -p output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/ccs/bin/ld option to reload object files... -r
checking dynamic linker characteristics... solaris2.8 ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
updating cache ./config.cache
loading cache ./config.cache
checking for gcc... (cached) cc
checking whether the C compiler (cc -g ) works... yes
checking whether the C compiler (cc -g ) is a cross-compiler... no
checking whether we are using GNU C... (cached) no
checking whether cc accepts -g... (cached) yes
checking for a BSD compatible install... /projects/gnu/sparc-sun-solaris2.6/bin/ginstall -c
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for fcntl.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... yes
checking for working const... yes
checking for off_t... yes
checking for size_t... yes
checking for 8-bit clean memcmp... yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking for memmove... yes
checking for bcopy... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating lib/Makefile
creating xmlwf/Makefile
creating examples/Makefile
creating config.h

$ make
cd lib; make
make[1]: Entering directory `/projects/intranet/src/Unix/expat/expat-1.95.1/lib'
/bin/sh ../libtool --mode=compile cc -DHAVE_CONFIG_H -DPACKAGE=expat -DVERSION=expat_1.95.1 -I/home/lwv26/i/src/Unix/expat/expat-1.95.1/lib -I..  -g -c xmlparse.c
rm -f .libs/xmlparse.lo
cc -DHAVE_CONFIG_H -DPACKAGE=\expat\ -DVERSION=\expat_1.95.1\ -I/home/lwv26/i/src/Unix/expat/expat-1.95.1/lib -I.. -g -Wp,-MD,.deps/xmlparse.pp -c xmlparse.c  -KPIC -DPIC -o xmlparse.o
command line: fatal: invalid arg for option M  D: No such file or directory
cc: acomp failed for xmlparse.c
make[1]: *** [xmlparse.lo] Error 1
make[1]: Leaving directory `/projects/intranet/src/Unix/expat/expat-1.95.1/lib'
make: *** [lib] Error 2


I don't know what the -Wp,-MD was expected to do, and so I am uncertain
how to go about fixing this.  Help would be appreciated.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous
Date: 2001-03-02 00:26

Message:
Logged In: NO 

This bug is now fixed.  See the recent commit relating to
GCC-specifc dependency info.  

----------------------------------------------------------------------

Comment By: Nobody/Anonymous
Date: 2000-12-05 11:50

Message:
Same thing for the UnixWare7 native C compiler.
-W and -M are GCC-specific.

I got around this by modifying the .c.o and .c.lo rules in lib/Makefile (actually, should do this in lib/Makefile.in):
.c.o:
        @echo '$(COMPILE) -c $<'; \
        $(COMPILE) -c $<
#       $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
#       @-cp .deps/$(*F).pp .deps/$(*F).P; \
#       tr ' ' '\012' < .deps/$(*F).pp \
#         | sed -e 's/^\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
#           >> .deps/$(*F).P; \
#       rm .deps/$(*F).pp

.c.lo:
        @echo '$(LTCOMPILE) -c $<'; \
        $(LTCOMPILE) -c $<
#       test -d .deps || mkdir .deps ; \
#       $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
#       @-sed -e 's/^\([^:]*\)\.o[      ]*:/\1.lo \1.o :/' \
#         < .deps/$(*F).pp > .deps/$(*F).P; \
#       tr ' ' '\012' < .deps/$(*F).pp \
#         | sed -e 's/^\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
#           >> .deps/$(*F).P; \
#       rm -f .deps/$(*F).pp

I have no idea what purpose all that tr'ing and sed'ing serves, but commenting it out didn't seem to hurt a thing.

Rob Roselius

----------------------------------------------------------------------

Comment By: Nobody/Anonymous
Date: 2000-11-13 06:57

Message:
What switches etc. do you need to make this patch correctly under Digital Unix (4g)?


----------------------------------------------------------------------

Comment By: David Maier
Date: 2000-11-08 08:59

Message:
The patch also fixes the problem on Digital UNIX. 

----------------------------------------------------------------------

Comment By: Changpeng Zhao
Date: 2000-11-07 22:46

Message:
Fixed my problem.  Thanks Albert Chin!

CZ@building2.co.jp

----------------------------------------------------------------------

Comment By: Nobody/Anonymous
Date: 2000-11-02 12:46

Message:
Albert Chin's patch fixed the problem on AIX

Thanks Albert

randy@munden.org

----------------------------------------------------------------------

Comment By: Nobody/Anonymous
Date: 2000-11-02 11:44

Message:
Got the same problem from:
/home/rmunden/expat-1.95.1 ->uname -a
AIX gearmail 3 4 000247004C00

with the AIX C compiler.

It doesn't like the -MD preprocessor switch(it uses -M to make dependencies like *.u instead of gcc's *.d)

----------------------------------------------------------------------

Comment By: Nobody/Anonymous
Date: 2000-11-02 07:20

Message:
The problem is the automatic dependency tracking in lib/Makefile.in. It should be removed. The patch at ftp://ftp.thewrittenword.com/outgoing/pub/expat-1.95.1.patch fixes it.

-- 
albert chin (china@thewrittenword.com)

----------------------------------------------------------------------

Comment By: Frank W. Douma
Date: 2000-11-02 07:17

Message:
Same problem with .0 and .1 versions, cannot get it to make on
Solaris 2.5.1, with SUNWspro cc compiler.

----------------------------------------------------------------------

Comment By: Nobody/Anonymous
Date: 2000-11-02 06:58

Message:
Same problem on SS20, Solaris 2.5.1, SUNWspro CC compiler.

----------------------------------------------------------------------

Comment By: jason rodriguez
Date: 2000-11-01 08:59

Message:
Same problem on Ultra 5 sunOS 5.6 using  the gcc compiler version  gcc version 2.5.8

----------------------------------------------------------------------

Comment By: Dave Warner
Date: 2000-10-31 15:14

Message:
Same problem on HP-UX 10.20:
except the error returned is cpp: error 3: Too many arguments to cpp (?!).


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110127&aid=219617&group_id=10127