make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: make-3.81rc1 mingw not failing on 'g++ -M' error


From: Matt England
Subject: Re: make-3.81rc1 mingw not failing on 'g++ -M' error
Date: Tue, 07 Mar 2006 13:11:31 -0600

More strange make-not-stopping-on-rule-error stuff:

In a different part of my real makefile (which is much more complex the one in this thread), make will continue to run some of the make/compile jobs in the background, asynchronously after experience an error, even though I wasn't running 'make -j'.

If someone wants my big, hairy set of Makefiles, they are welcome to it...but they are sizable. As much as I'd like to boil this down to a "minimal" Makefile to give to this community, this could be a significant effort to reproduce this problem in another Makefile.

Until them, I suspect I am reduced to auditing the logs of make processes for my Windows builds. I'd like to eventually get this stuff fixed, though; please let me know specific parts of the code I can evaluate for problems so I can potentially help fix this problem? My project is a bit hurting right now on our Windows builds; without make, my developers use the uncontrolled IDE processes/project files (eg, DevC++, CodeBlocks, etc) for this, and there is no common make system, and it's hurting us.

Our makefile stuff runs like a charm on the Linux boxes.

Here's some excerpts, with annotated comments, of the output:


g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/ace/ACESemaphoreLock.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/ace/ACESemaphoreLock.o ../server/../../../dist/mingw/internal/server/obj.rej/libipc/ipc/IPCConnection.o:IPCConnection.cpp:(.text+0x135): undefined reference to `util::Message::getType()'

[...lots of link-time resolver errors deleted...these are understood errors...]

../server/../../../dist/mingw/internal/server/obj.rej/libipc/ipc/sharedmem/SharedMemoryBuffer.o:SharedMemoryBuffer.cpp:(.rdata$_ZTVN3ipc18SharedMemoryBufferE[vtable for ipc::SharedMemoryBuffer]+0x48): undefined reference to `util::ByteBuffer::getByteArray() const'
collect2: ld returned 1 exit status
make: *** [../server/../../../dist/mingw/internal/server/lib.rej/libipc.dll] Error 1

address@hidden /e/data.online/data.cleversafe/svnwork/swdev-grid/trunk/src/internal/server $ g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/ace/ACEThread.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/ace/ACEThread.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/boost/BoostMutex.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostMutex.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/boost/BoostMutexLock.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostMutexLock.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/boost/BoostSemaphoreLock.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostSemaphoreLock.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/boost/BoostThread.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostThread.o

---->
---->
[**** ... but the make jobs still continue in the background, and I can't delete them until they fail...or I delete the process by hand...! ****]
<----
<----


address@hidden /e/data.online/data.cleversafe/svnwork/swdev-grid/trunk/src/internal/server $ g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/GLockFactory.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GLockFactory.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/GMutexFactory.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GMutexFactory.o



address@hidden /e/data.online/data.cleversafe/svnwork/swdev-grid/trunk/src/internal/server $ g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/GThreadFactory.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GThreadFactory.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libthread/thread/GThreadPool.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GThreadPool.o ar rc ../server/../../../dist/mingw/internal/server/lib.rej/libthread.a ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/ace/ACEMutexLock.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/ace/ACESemaphoreLock.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/ace/ACEThread.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostMutex.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostMutexLock.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostSemaphoreLock.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/boost/BoostThread.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GLockFactory.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GMutexFactory.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GThreadFactory.o ../server/../../../dist/mingw/internal/server/obj.rej/libthread/thread/GThreadPool.o
ranlib ../server/../../../dist/mingw/internal/server/lib.rej/libthread.a
g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libdb/db/DBConnectionFactory.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/DBConnectionFactory.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libdb/db/DBConnectionPool.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/DBConnectionPool.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libdb/db/DBRecord.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/DBRecord.o g++ -c -mthreads -DDATA_SEGMENT_SIZE="(32*1024)" -I../../external/include -I../common/include -I../server/include -I../../external/include/ace.windows -Werror ../common/src/libdb/db/postgres/PostgresDBConnection.cpp -o ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/postgres/PostgresDBConnection.o ar rc ../server/../../../dist/mingw/internal/server/lib.rej/libdb.a ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/DBConnectionFactory.o ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/DBConnectionPool.o ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/DBRecord.o ../server/../../../dist/mingw/internal/server/obj.rej/libdb/db/postgres/PostgresDBConnection.o
ranlib ../server/../../../dist/mingw/internal/server/lib.rej/libdb.a
make: *** No rule to make target `-lpqxx-2.5.5', needed by `../server/../../../dist/mingw/internal/server/bin.rej/appserver.exe'. Stop.

address@hidden /e/data.online/data.cleversafe/svnwork/swdev-grid/trunk/src/internal/server
$


Finally the make job stopped on another error.  :)

-Matt



At 3/7/2006 12:22 PM, Matt England wrote:
(My original post for this from last night was not showing up in the help-make or make-32 archive lists nor in my emailbox, so I'm trying to repost; I apologize for any convenience. -Matt)


Original email header, fyi:
Date: Mon, 06 Mar 2006 23:56:59 -0600
To: Eli Zaretskii <address@hidden>
From: Matt England <address@hidden>
Subject: Re: make3.81-beta4 mingw not failing on error?
Cc: "Paul D. Smith" <address@hidden>,address@hidden,
 address@hidden,address@hidden


At 3/4/2006 03:41 PM, Eli Zaretskii wrote:
Yes, please try the latest code, and if that doesn't fix the problem,
please post the shortest Makefile that can be used to reproduce it.

Ok, so I built make-3.81rc1 and still experience make not stopping upon errors.

Details are below.  The main excerpt:

$ make main.exe
-- generating makefile: main.d
main.cpp:1:21: sys/msg.h: No such file or directory
g++ -c  main.cpp -o main.o
main.cpp:1:21: sys/msg.h: No such file or directory
make: *** [main.o] Error 1

Note that the first error should stop the make, but it doesn't.

Notice that it works as I prefer it to via cygwin (details below). Also note that cygwin has sys/msg.h, and mingw does not (and that's how I caught the problem in mingw, and noticed I was getting errors in the make output but the process was not stopping).

Do the make developers/assisters/moderators have enough info with this post to try and further analyze the problem?

-Matt


-----------------------------------------------------------------------
session exhibiting the problem
-----------------------------------------------------------------------

address@hidden ~/make-test
$ make --version
GNU Make 3.81rc1
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-mingw32

address@hidden ~/make-test
$ make clean
rm -f main.o alt1.o main.d alt1.d main.exe alt1.exe

address@hidden ~/make-test
$ date
Mon Mar  6 23:45:05 CST 2006

address@hidden ~/make-test
$ uname -a
MINGW32_NT-5.1 MATTS-LAPTOP 1.0.11(0.46/3/2) 2004-04-30 18:55 i686 unknown

address@hidden ~/make-test
$ make main.exe
-- generating makefile: main.d
main.cpp:1:21: sys/msg.h: No such file or directory
g++ -c  main.cpp -o main.o
main.cpp:1:21: sys/msg.h: No such file or directory
make: *** [main.o] Error 1

address@hidden ~/make-test
$ make alt1.exe
-- generating makefile: alt1.d
alt1.cpp:1:22: sys/msg1.h: No such file or directory
g++ -c  alt1.cpp -o alt1.o
alt1.cpp:1:22: sys/msg1.h: No such file or directory
make: *** [alt1.o] Error 1

address@hidden ~/make-test
$ echo $?
0

address@hidden ~/make-test
$ g++ -M  main.cpp
main.cpp:1:21: sys/msg.h: No such file or directory

address@hidden ~/make-test
$ echo $?
1

address@hidden ~/make-test
$ echo $?
0

address@hidden ~/make-test
$


-----------------------------------------------------------------------
corresponding session via cygwin
-----------------------------------------------------------------------


address@hidden 11:44pm [...mengland/make-test] 122> date
Mon Mar  6 23:44:05 CST 2006
address@hidden 11:44pm [...mengland/make-test] 123> uname -a
CYGWIN_NT-5.1 matts-laptop 1.5.16(0.128/4/2) 2005-04-25 20:26 i686 unknown unknown Cygwin
address@hidden 11:44pm [...mengland/make-test] 124> make main.exe
-- generating makefile: main.d
g++ -c  main.cpp -o main.o
g++  main.o -o main.exe
address@hidden 11:44pm [...mengland/make-test] 125> make alt1.exe
-- generating makefile: alt1.d
alt1.cpp:1:22: sys/msg1.h: No such file or directory
make: *** [alt1.d] Error 1
address@hidden 11:44pm [...mengland/make-test] 126>

address@hidden 11:51pm [...mengland/make-test] 131> make --version
GNU Make 3.80
Copyright (C) 2002  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
address@hidden 11:53pm [...mengland/make-test] 132>

-----------------------------------------------------------------------
the files used
-----------------------------------------------------------------------

-------------------------------------------------------------------------
-------------------------------Makefile----------------------------------
-------------------------------------------------------------------------

CXX      := g++
LDFLAGS  :=
CXXFLAGS :=
PID      := $(shell echo $$$$)

CPP_FILES := main.cpp alt1.cpp
OBJ_FILES := $(CPP_FILES:%.cpp=%.o)
DDD_FILES := $(CPP_FILES:%.cpp=%.d)
EXE_FILES := $(CPP_FILES:%.cpp=%.exe)

all:           main.exe alt1.exe
main.exe:      main.o
alt1.exe:      alt1.o
main.o main.d: main.cpp
alt1.o alt1.d: alt1.cpp

$(EXE_FILES):
        $(CXX) $(LDFLAGS) $^ -o $@

$(OBJ_FILES):
        $(CXX) -c $(CXXFLAGS) $< -o $@

DFILE_HDR := \
\# DO NOT CHANGE THIS FILE; it was auto-generated by a make process.

# Generate header prerequisites automatically.
# Taken and modified from:
# http://www.gnu.org/software/make/manual/html_chapter/make_4.html#SEC51
$(DDD_FILES):
        @echo -- generating makefile: $@
        @set -e; rm -f $@;                                          \
        echo "$(DFILE_HDR)" > $@;                                   \
        $(CXX) -M $(CXXFLAGS) $< > address@hidden(PID);                      \
        sed 's,^.*\.o[ :]*,$(@:%.d=%.o) $@: ,g' < address@hidden(PID) >> $@;  \
        rm -f address@hidden(PID)

ifeq ($(MAKECMDGOALS),all)
-include $(DDD_FILES)
endif
ifeq ($(MAKECMDGOALS),main.exe)
-include main.d
endif
ifeq ($(MAKECMDGOALS),alt1.exe)
-include alt1.d
endif

clean:
        rm -f $(OBJ_FILES) $(DDD_FILES) $(EXE_FILES)

-------------------------------------------------------------------------
-------------------------------main.cpp----------------------------------
-------------------------------------------------------------------------

#include <sys/msg.h>

int
main()
{
}

-------------------------------------------------------------------------
-------------------------------alt1.cpp----------------------------------
-------------------------------------------------------------------------

#include <sys/msg1.h>

int
main()
{
}







reply via email to

[Prev in Thread] Current Thread [Next in Thread]