public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] Problems with cross-compiling
@ 2014-04-14 17:22 Mats Liljegren
  2014-04-14 17:41 ` chrubis
  0 siblings, 1 reply; 5+ messages in thread
From: Mats Liljegren @ 2014-04-14 17:22 UTC (permalink / raw)
  To: ltp-list

I've been using Yocto, which does cross-compiling. It has support for
compiling LTP, but I've noticed it has a couple of patches. I found
that one patch was needed for actually compile LTP, which applies to
the file utils/Makefile.

The patch is for an older version of LTP, but I re-implemented it for
the new version. Looking at the following rule:

$(FFSB): $(abs_srcdir)/$(FFSBDIR)
        mkdir -p $(FFSBDIR)
        cd $(FFSBDIR) && "$^/configure" && $(MAKE) top_srcdir="$^" all

This calls configure without parameters, which is most likely wrong for
a cross-compile environment. It is this configure that fails. By simple
removing it, everything works within Yocto.

Is there any reason for keeping this configure here? Or should I make
a patch for removing it?

Regards
Mats Liljegren

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] Problems with cross-compiling
  2014-04-14 17:22 [LTP] Problems with cross-compiling Mats Liljegren
@ 2014-04-14 17:41 ` chrubis
  2014-04-15  8:31   ` [LTP] [PATCH] utils/Makefile: Move ffsb configure to configure.ac Mats Liljegren
  0 siblings, 1 reply; 5+ messages in thread
From: chrubis @ 2014-04-14 17:41 UTC (permalink / raw)
  To: Mats Liljegren; +Cc: ltp-list

Hi!
> I've been using Yocto, which does cross-compiling. It has support for
> compiling LTP, but I've noticed it has a couple of patches. I found
> that one patch was needed for actually compile LTP, which applies to
> the file utils/Makefile.
> 
> The patch is for an older version of LTP, but I re-implemented it for
> the new version. Looking at the following rule:
> 
> $(FFSB): $(abs_srcdir)/$(FFSBDIR)
>         mkdir -p $(FFSBDIR)
>         cd $(FFSBDIR) && "$^/configure" && $(MAKE) top_srcdir="$^" all
> 
> This calls configure without parameters, which is most likely wrong for
> a cross-compile environment. It is this configure that fails. By simple
> removing it, everything works within Yocto.
> 
> Is there any reason for keeping this configure here? Or should I make
> a patch for removing it?

The ffsb configure should be called from the top-level configure the
same way it's done for the realtime directory.

Does following work for cross-compilation?

1. Remove the configure from the Makefile
2. Add AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2]) into the configure.ac
3. Regenerate top level configure by make autotools
4. ./configure && make

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH] utils/Makefile: Move ffsb configure to configure.ac
  2014-04-14 17:41 ` chrubis
@ 2014-04-15  8:31   ` Mats Liljegren
  2014-04-15  8:31     ` Mats Liljegren
  0 siblings, 1 reply; 5+ messages in thread
From: Mats Liljegren @ 2014-04-15  8:31 UTC (permalink / raw)
  To: ltp-list; +Cc: Fathi Boudra


I have now tried moving configure call from utils/Makefile to configure.ac, and
it compiles both natively as well as a cross-compile. I also managed to start
the fs_ext4 test case. Not sure whether this tells anything about ffsb since
I'm not sure what it is, but it looked like it was related to ext4.

/Mats

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* [LTP] [PATCH] utils/Makefile: Move ffsb configure to configure.ac
  2014-04-15  8:31   ` [LTP] [PATCH] utils/Makefile: Move ffsb configure to configure.ac Mats Liljegren
@ 2014-04-15  8:31     ` Mats Liljegren
  2014-04-15 11:10       ` chrubis
  0 siblings, 1 reply; 5+ messages in thread
From: Mats Liljegren @ 2014-04-15  8:31 UTC (permalink / raw)
  To: ltp-list; +Cc: Fathi Boudra

The configure call was done from make file without appropriate parameters,
which breaks cross-compiling. Include ffsb into configure.ac so that it is
included in the main configure call.

This fix is based on a patch by Fathi Boudra <fathi.boudra@linaro.org> for an
earlier version of LTP.

CC: Fathi Boudra <fathi.boudra@linaro.org>
Signed-off-by: Mats Liljegren <mats.liljegren@enea.com>
---
 configure.ac   |    2 ++
 utils/Makefile |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4ea5868..9f397e7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -142,6 +142,8 @@ else
     AC_SUBST([WITH_REALTIME_TESTSUITE],["no"])
 fi
 
+AC_CONFIG_SUBDIRS([utils/ffsb-6.0-rc2])
+
 # END testsuites knobs
 LTP_CHECK_FORTIFY_SOURCE
 LTP_CHECK_CC_WARN_OLDSTYLE
diff --git a/utils/Makefile b/utils/Makefile
index 923bb2d..1508b35 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -30,7 +30,7 @@ FFSB			:= $(FFSBDIR)/ffsb
 
 $(FFSB): $(abs_srcdir)/$(FFSBDIR)
 	mkdir -p $(FFSBDIR)
-	cd $(FFSBDIR) && "$^/configure" && $(MAKE) top_srcdir="$^" all
+	cd $(FFSBDIR) && $(MAKE) top_srcdir="$^" all
 
 ffsb: $(FFSB)
 	cp $(FFSB) ffsb
-- 
1.7.10.4


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] [PATCH] utils/Makefile: Move ffsb configure to configure.ac
  2014-04-15  8:31     ` Mats Liljegren
@ 2014-04-15 11:10       ` chrubis
  0 siblings, 0 replies; 5+ messages in thread
From: chrubis @ 2014-04-15 11:10 UTC (permalink / raw)
  To: Mats Liljegren; +Cc: ltp-list, Fathi Boudra

Hi!
> The configure call was done from make file without appropriate parameters,
> which breaks cross-compiling. Include ffsb into configure.ac so that it is
> included in the main configure call.
> 
> This fix is based on a patch by Fathi Boudra <fathi.boudra@linaro.org> for an
> earlier version of LTP.

Tested with out-of-tree build and pushed.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2014-04-15 11:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-14 17:22 [LTP] Problems with cross-compiling Mats Liljegren
2014-04-14 17:41 ` chrubis
2014-04-15  8:31   ` [LTP] [PATCH] utils/Makefile: Move ffsb configure to configure.ac Mats Liljegren
2014-04-15  8:31     ` Mats Liljegren
2014-04-15 11:10       ` chrubis

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