Skip to contentSkip to conversation

Problems with cross-compiling

LTP New Mats Liljegren 2 participants 5 messages Apr 14, 2014 – Apr 15, 2014

lore
Share & tools
lore
#0 lore raw

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#1 lore raw

Hi!

Quoted 12 lines

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
Quoted 6 lines

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

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#2 lore raw

PATCH 1/1 utils/Makefile: Move ffsb configure to configure.ac

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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

#3 lore raw

PATCH 1/1 utils/Makefile: Move ffsb configure to configure.ac

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 <[email protected]> for an earlier version of LTP.

---
 configure.ac   |    2 ++
 utils/Makefile |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
configure.ac +2 -0
index 4ea5868..9f397e7 100644
@@ -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
utils/Makefile +1 -1
index 923bb2d..1508b35 100644
@@ -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
Signature · 13 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list
#4 lore raw

Re: [LTP] [PATCH] utils/Makefile: Move ffsb configure to configure.ac

Hi!

Quoted 6 lines

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 <[email protected]> for an earlier version of LTP.

Tested with out-of-tree build and pushed.

Signature · 13 lines
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list