public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] ltp-full-20160510 compile failed
@ 2016-05-18  8:27 Han Pingtian
  2016-05-18 12:34 ` Jan Stancek
  0 siblings, 1 reply; 7+ messages in thread
From: Han Pingtian @ 2016-05-18  8:27 UTC (permalink / raw)
  To: ltp

Hi,

When I try to compile the latest LTP, it failed:

    % ./configure --with-open-posix-testsuite --prefix=`pwd`
    % make -j 64 all
... ...
functional/mqueues/send_rev_1 compile PASSED
make[4]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/mqueues'
make[4]: Entering directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/semaphores'
make[4]: *** No rule to make target 'all'.  Stop.
make[4]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/semaphores'
make[4]: Entering directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads'
make[5]: Entering directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/condva
r'
make[5]: *** No rule to make target 'all'.  Stop.
make[5]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/condvar
' 
make[5]: Entering directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/pi_tes
t'
make[5]: *** No rule to make target 'all'.  Stop.
make[5]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/pi_test
' 
make[5]: Entering directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/schedule'
make[5]: *** No rule to make target 'all'.  Stop.
make[5]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/schedule'
Makefile:8: recipe for target 'all' failed
make[4]: *** [all] Error 2
make[4]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads'
Makefile:8: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional'
/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/Makefile:82: recipe for target 'functional-all' failed
make[2]: *** [functional-all] Error 2
make[2]: Leaving directory '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite'
../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/hpt/ltp-full-20160510/testcases'
Makefile:114: recipe for target 'testcases-all' failed
make: *** [testcases-all] Error 2

The Makefile in

    /home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/semaphores

is empty.  And if I compile the package like this:

    % ./configure --with-open-posix-testsuite --prefix=`pwd`
    % cd testcases/open_posix_testsuite
    % make -j 64
    % cd -
    % make -j 64 all

Then it will succeed. Not sure if it is usable when compiling like this?
Please advise. Thanks in advance!


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] ltp-full-20160510 compile failed
  2016-05-18  8:27 [LTP] ltp-full-20160510 compile failed Han Pingtian
@ 2016-05-18 12:34 ` Jan Stancek
  2016-05-18 14:53   ` Cyril Hrubis
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2016-05-18 12:34 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "Han Pingtian" <hanpt@linux.vnet.ibm.com>
> To: ltp@lists.linux.it
> Sent: Wednesday, 18 May, 2016 10:27:26 AM
> Subject: [LTP] ltp-full-20160510 compile failed
> 
> Hi,
> 
> When I try to compile the latest LTP, it failed:
> 
>     % ./configure --with-open-posix-testsuite --prefix=`pwd`
>     % make -j 64 all
> ... ...
> functional/mqueues/send_rev_1 compile PASSED
> make[4]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/mqueues'
> make[4]: Entering directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/semaphores'
> make[4]: *** No rule to make target 'all'.  Stop.
> make[4]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/semaphores'
> make[4]: Entering directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads'
> make[5]: Entering directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/condva
> r'
> make[5]: *** No rule to make target 'all'.  Stop.
> make[5]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/condvar
> '
> make[5]: Entering directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/pi_tes
> t'
> make[5]: *** No rule to make target 'all'.  Stop.
> make[5]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/pi_test
> '
> make[5]: Entering directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/schedule'
> make[5]: *** No rule to make target 'all'.  Stop.
> make[5]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads/schedule'
> Makefile:8: recipe for target 'all' failed
> make[4]: *** [all] Error 2
> make[4]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/threads'
> Makefile:8: recipe for target 'all' failed
> make[3]: *** [all] Error 2
> make[3]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional'
> /home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/Makefile:82:
> recipe for target 'functional-all' failed
> make[2]: *** [functional-all] Error 2
> make[2]: Leaving directory
> '/home/hpt/ltp-full-20160510/testcases/open_posix_testsuite'
> ../include/mk/generic_trunk_target.inc:93: recipe for target 'all' failed
> make[1]: *** [all] Error 2
> make[1]: Leaving directory '/home/hpt/ltp-full-20160510/testcases'
> Makefile:114: recipe for target 'testcases-all' failed
> make: *** [testcases-all] Error 2
> 
> The Makefile in
> 
>     /home/hpt/ltp-full-20160510/testcases/open_posix_testsuite/functional/semaphores
> 
> is empty.  And if I compile the package like this:

This looks like an issue that was brought up a while back:
  [LTP] [PATCH] Makefile: Disable parallel build for $(CRITICAL_MAKEFILES)
  https://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg15795.html

So I think you need to stick with non-parallel builds open_posix_testsuite
for now.

Regards,
Jan

> 
>     % ./configure --with-open-posix-testsuite --prefix=`pwd`
>     % cd testcases/open_posix_testsuite
>     % make -j 64
>     % cd -
>     % make -j 64 all
> 
> Then it will succeed. Not sure if it is usable when compiling like this?
> Please advise. Thanks in advance!
> 
> 
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] ltp-full-20160510 compile failed
  2016-05-18 12:34 ` Jan Stancek
@ 2016-05-18 14:53   ` Cyril Hrubis
  2016-05-19  7:23     ` Han Pingtian
  2016-06-07 16:12     ` Cyril Hrubis
  0 siblings, 2 replies; 7+ messages in thread
From: Cyril Hrubis @ 2016-05-18 14:53 UTC (permalink / raw)
  To: ltp

Hi!
> This looks like an issue that was brought up a while back:
>   [LTP] [PATCH] Makefile: Disable parallel build for $(CRITICAL_MAKEFILES)
>   https://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg15795.html
> 
> So I think you need to stick with non-parallel builds open_posix_testsuite
> for now.

Just non-parallel build for the Makefiles as far as I remember.

Sorry that this issue was left unsolved, I will try to look into it
again. Until then you can workaround it by forcing the nonparallel build
for CRITICAL_MAKEFILES as does the patch in the email thread.

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] ltp-full-20160510 compile failed
  2016-05-18 14:53   ` Cyril Hrubis
@ 2016-05-19  7:23     ` Han Pingtian
  2016-06-07 16:12     ` Cyril Hrubis
  1 sibling, 0 replies; 7+ messages in thread
From: Han Pingtian @ 2016-05-19  7:23 UTC (permalink / raw)
  To: ltp

On Wed, May 18, 2016 at 04:53:26PM +0200, Cyril Hrubis wrote:
> Hi!
> > This looks like an issue that was brought up a while back:
> >   [LTP] [PATCH] Makefile: Disable parallel build for $(CRITICAL_MAKEFILES)
> >   https://www.mail-archive.com/ltp-list@lists.sourceforge.net/msg15795.html
> > 
> > So I think you need to stick with non-parallel builds open_posix_testsuite
> > for now.
> 
> Just non-parallel build for the Makefiles as far as I remember.
> 
> Sorry that this issue was left unsolved, I will try to look into it
> again. Until then you can workaround it by forcing the nonparallel build
> for CRITICAL_MAKEFILES as does the patch in the email thread.
> 
Thanks. Noneparalled build works just fine.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] ltp-full-20160510 compile failed
  2016-05-18 14:53   ` Cyril Hrubis
  2016-05-19  7:23     ` Han Pingtian
@ 2016-06-07 16:12     ` Cyril Hrubis
  2016-06-08  7:42       ` Jan Stancek
  1 sibling, 1 reply; 7+ messages in thread
From: Cyril Hrubis @ 2016-06-07 16:12 UTC (permalink / raw)
  To: ltp

Hi!
> Just non-parallel build for the Makefiles as far as I remember.
> 
> Sorry that this issue was left unsolved, I will try to look into it
> again. Until then you can workaround it by forcing the nonparallel build
> for CRITICAL_MAKEFILES as does the patch in the email thread.

Looking at the problem again, the Makefile in question is wrong.

What it does (simplified) is:

CRITICAL_MAKEFILES=conformance functional stress

all: $(CRITICAL_MAKEFILES)

$(CRITICAL_MAKEFILES):
	$(MAKE) generate-makefiles


No wonder that it runs $(MAKE) generate-makefiles for each Makefile in
CRITICAL_MAKEFILES.

Well it runs only two instances of the generate-makefiles.sh script
because there is a typo, the CRITICAL_SECTION_MAKEFILE should probably
have been CRITICAL_STRESS_MAKEFILE.

And as it looks to me, the original intend was to pass the directory
(i.e. conformance, functional or stress) to the generate-makefiles.sh
script and subsequently to the locate-test script.

The obvious fix would be changing the makefile to depend only on single
critical Makefile in order to figure out if Makefiles were generated or
not.

For me following patch seems to fix the issue.

Jan: Can you have a look?
Han: Does this patch work for you?

diff --git a/testcases/open_posix_testsuite/Makefile b/testcases/open_posix_testsuite/Makefile
index 500ddc2..e1c7bcd 100644
--- a/testcases/open_posix_testsuite/Makefile
+++ b/testcases/open_posix_testsuite/Makefile
@@ -6,13 +6,7 @@
 
 # Makefiles that are considered critical to execution; if they don't exist
 # all of the Makefiles will be rebuilt by default.
-CRITICAL_CONFORMANCE_MAKEFILE=	conformance/interfaces/timer_settime/Makefile
-CRITICAL_FUNCTIONAL_MAKEFILE=	functional/threads/pi_test/Makefile
-CRITICAL_SECTION_MAKEFILE=	stress/threads/sem_open/Makefile
-
-CRITICAL_MAKEFILES=	$(CRITICAL_CONFORMANCE_MAKEFILE) \
-			$(CRITICAL_FUNCTIONAL_MAKEFILE) \
-			$(CRITICAL_SECTION_MAKEFILE)
+CRITICAL_MAKEFILE=	conformance/interfaces/timer_settime/Makefile
 
 # The default logfile for the tests.
 LOGFILE?=		logfile
@@ -44,7 +38,7 @@ ifeq ($(shell uname -s), Linux)
 include Makefile.linux
 endif
 
-clean: $(CRITICAL_MAKEFILES)
+clean: $(CRITICAL_MAKEFILE)
 	@rm -f $(LOGFILE)*
 	@for dir in $(SUBDIRS) tools; do \
 	    $(MAKE) -C $$dir clean >/dev/null; \
@@ -67,7 +61,7 @@ install: bin-install conformance-install functional-install stress-install
 test: conformance-test functional-test stress-test
 
 # Test build and execution targets.
-conformance-all: $(CRITICAL_CONFORMANCE_MAKEFILE)
+conformance-all: $(CRITICAL_MAKEFILE)
 	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@
 	@$(BUILD_MAKE) -C conformance -j1 all
 
@@ -78,7 +72,7 @@ conformance-test:
 	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@
 	@$(TEST_MAKE) -C conformance test
 
-functional-all: $(CRITICAL_FUNCTIONAL_MAKEFILE)
+functional-all: $(CRITICAL_MAKEFILE)
 	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@
 	@$(BUILD_MAKE) -C functional -j1 all
 
@@ -89,7 +83,7 @@ functional-test:
 	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@
 	@$(TEST_MAKE) -C functional test
 
-stress-all: $(CRITICAL_STRESS_MAKEFILE)
+stress-all: $(CRITICAL_MAKEFILE)
 	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else echo "\`pwd\`/$(LOGFILE)"; fi`.$@
 	@$(BUILD_MAKE) -C stress -j1 all
 
@@ -107,12 +101,9 @@ bin-install:
 tools-all:
 	@$(MAKE) -C tools all
 
-$(CRITICAL_MAKEFILES): \
+$(CRITICAL_MAKEFILE): \
     $(top_srcdir)/scripts/generate-makefiles.sh	\
     $(top_srcdir)/CFLAGS			\
     $(top_srcdir)/LDFLAGS			\
     $(top_srcdir)/LDLIBS
 	@$(MAKE) generate-makefiles
-
-#tests-pretty:
-#	$(MAKE) all | column -t -s:

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [LTP] ltp-full-20160510 compile failed
  2016-06-07 16:12     ` Cyril Hrubis
@ 2016-06-08  7:42       ` Jan Stancek
  2016-06-08 11:08         ` Cyril Hrubis
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2016-06-08  7:42 UTC (permalink / raw)
  To: ltp





----- Original Message -----
> From: "Cyril Hrubis" <chrubis@suse.cz>
> To: ltp@lists.linux.it
> Cc: "Han Pingtian" <hanpt@linux.vnet.ibm.com>, "Jan Stancek" <jstancek@redhat.com>
> Sent: Tuesday, 7 June, 2016 6:12:58 PM
> Subject: Re: [LTP] ltp-full-20160510 compile failed
> 
> Hi!
> > Just non-parallel build for the Makefiles as far as I remember.
> > 
> > Sorry that this issue was left unsolved, I will try to look into it
> > again. Until then you can workaround it by forcing the nonparallel build
> > for CRITICAL_MAKEFILES as does the patch in the email thread.
> 
> Looking at the problem again, the Makefile in question is wrong.
> 
> What it does (simplified) is:
> 
> CRITICAL_MAKEFILES=conformance functional stress
> 
> all: $(CRITICAL_MAKEFILES)
> 
> $(CRITICAL_MAKEFILES):
> 	$(MAKE) generate-makefiles
> 
> 
> No wonder that it runs $(MAKE) generate-makefiles for each Makefile in
> CRITICAL_MAKEFILES.
> 
> Well it runs only two instances of the generate-makefiles.sh script
> because there is a typo, the CRITICAL_SECTION_MAKEFILE should probably
> have been CRITICAL_STRESS_MAKEFILE.
> 
> And as it looks to me, the original intend was to pass the directory
> (i.e. conformance, functional or stress) to the generate-makefiles.sh
> script and subsequently to the locate-test script.
> 
> The obvious fix would be changing the makefile to depend only on single
> critical Makefile in order to figure out if Makefiles were generated or
> not.
> 
> For me following patch seems to fix the issue.
> 
> Jan: Can you have a look?

ACK. Worked for me.

I keep thinking if we can avoid all this makefile
generation.


> Han: Does this patch work for you?
> 
> diff --git a/testcases/open_posix_testsuite/Makefile
> b/testcases/open_posix_testsuite/Makefile
> index 500ddc2..e1c7bcd 100644
> --- a/testcases/open_posix_testsuite/Makefile
> +++ b/testcases/open_posix_testsuite/Makefile
> @@ -6,13 +6,7 @@
>  
>  # Makefiles that are considered critical to execution; if they don't exist
>  # all of the Makefiles will be rebuilt by default.
> -CRITICAL_CONFORMANCE_MAKEFILE=	conformance/interfaces/timer_settime/Makefile
> -CRITICAL_FUNCTIONAL_MAKEFILE=	functional/threads/pi_test/Makefile
> -CRITICAL_SECTION_MAKEFILE=	stress/threads/sem_open/Makefile
> -
> -CRITICAL_MAKEFILES=	$(CRITICAL_CONFORMANCE_MAKEFILE) \
> -			$(CRITICAL_FUNCTIONAL_MAKEFILE) \
> -			$(CRITICAL_SECTION_MAKEFILE)
> +CRITICAL_MAKEFILE=	conformance/interfaces/timer_settime/Makefile
>  
>  # The default logfile for the tests.
>  LOGFILE?=		logfile
> @@ -44,7 +38,7 @@ ifeq ($(shell uname -s), Linux)
>  include Makefile.linux
>  endif
>  
> -clean: $(CRITICAL_MAKEFILES)
> +clean: $(CRITICAL_MAKEFILE)
>  	@rm -f $(LOGFILE)*
>  	@for dir in $(SUBDIRS) tools; do \
>  	    $(MAKE) -C $$dir clean >/dev/null; \
> @@ -67,7 +61,7 @@ install: bin-install conformance-install functional-install
> stress-install
>  test: conformance-test functional-test stress-test
>  
>  # Test build and execution targets.
> -conformance-all: $(CRITICAL_CONFORMANCE_MAKEFILE)
> +conformance-all: $(CRITICAL_MAKEFILE)
>  	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else
>  	echo "\`pwd\`/$(LOGFILE)"; fi`.$@
>  	@$(BUILD_MAKE) -C conformance -j1 all
>  
> @@ -78,7 +72,7 @@ conformance-test:
>  	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else
>  	echo "\`pwd\`/$(LOGFILE)"; fi`.$@
>  	@$(TEST_MAKE) -C conformance test
>  
> -functional-all: $(CRITICAL_FUNCTIONAL_MAKEFILE)
> +functional-all: $(CRITICAL_MAKEFILE)
>  	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else
>  	echo "\`pwd\`/$(LOGFILE)"; fi`.$@
>  	@$(BUILD_MAKE) -C functional -j1 all
>  
> @@ -89,7 +83,7 @@ functional-test:
>  	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else
>  	echo "\`pwd\`/$(LOGFILE)"; fi`.$@
>  	@$(TEST_MAKE) -C functional test
>  
> -stress-all: $(CRITICAL_STRESS_MAKEFILE)
> +stress-all: $(CRITICAL_MAKEFILE)
>  	@rm -f `if echo "$(LOGFILE)" | grep -q '^/'; then echo "$(LOGFILE)"; else
>  	echo "\`pwd\`/$(LOGFILE)"; fi`.$@
>  	@$(BUILD_MAKE) -C stress -j1 all
>  
> @@ -107,12 +101,9 @@ bin-install:
>  tools-all:
>  	@$(MAKE) -C tools all
>  
> -$(CRITICAL_MAKEFILES): \
> +$(CRITICAL_MAKEFILE): \
>      $(top_srcdir)/scripts/generate-makefiles.sh	\
>      $(top_srcdir)/CFLAGS			\
>      $(top_srcdir)/LDFLAGS			\
>      $(top_srcdir)/LDLIBS
>  	@$(MAKE) generate-makefiles
> -
> -#tests-pretty:
> -#	$(MAKE) all | column -t -s:
> 
> --
> Cyril Hrubis
> chrubis@suse.cz
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] ltp-full-20160510 compile failed
  2016-06-08  7:42       ` Jan Stancek
@ 2016-06-08 11:08         ` Cyril Hrubis
  0 siblings, 0 replies; 7+ messages in thread
From: Cyril Hrubis @ 2016-06-08 11:08 UTC (permalink / raw)
  To: ltp

Hi!
> > Jan: Can you have a look?
> 
> ACK. Worked for me.

Pushed.

> I keep thinking if we can avoid all this makefile
> generation.

I do not like it that much either, but given that that we have to stick
to POSIX make (that does not need to implement include keyword) there
and that the generator kind of works I'm not tempted to rewrite it
anytime soon.

In practice the include and ifdef constructs are supported in GNU and
BSD make and in a few others, so we may as well start to require them.
But for instance solaris dmake for instance can include files but the
syntax is different...

-- 
Cyril Hrubis
chrubis@suse.cz

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-08 11:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18  8:27 [LTP] ltp-full-20160510 compile failed Han Pingtian
2016-05-18 12:34 ` Jan Stancek
2016-05-18 14:53   ` Cyril Hrubis
2016-05-19  7:23     ` Han Pingtian
2016-06-07 16:12     ` Cyril Hrubis
2016-06-08  7:42       ` Jan Stancek
2016-06-08 11:08         ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox