Update installation docs
cover Update installation docs
Hi,
I updated installation docs. First motivation was to document pkgconf / pkg-config related changes. But I also added a cleanup, because instructions looked like 10+ years old.
I suppose there is nothing controversial with this patchset.
Kind regards,
Petr
Petr Vorel (4):
INSTALL: Update requirements
INSTALL: Document 32bit and cross-compilation setup
INSTALL: Remove uClinux docs
doc: Remove links to README.mk-devel
INSTALL | 75 +++++++++++++++++++++-------------------- README.md | 5 +-- include/mk/config.mk.in | 2 +- 3 files changed, 43 insertions(+), 39 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/4 INSTALL: Update requirements
* mention pkgconf in both INSTALL and README.md (many distros migrated from pkg-config to pkgconf)
* replace links to old versions to projects' homepage
* modernize text a bit
* remove CVS tag :)
--- INSTALL | 51 ++++++++++++++++++++++----------------------------- README.md | 5 +++-- 2 files changed, 25 insertions(+), 31 deletions(-)
INSTALL +22 -29
@@ -1,42 +1,35 @@ -$Id: INSTALL,v 1.36 2010/01/18 23:46:09 yaberauneya Exp $ - Requirements ------------------- -1. In order to compile ltp you must have make 3.80+ (make 3.81 preferred). -2. In order to compile and use ltp-scanner (a utility in the pan directory), - you must have bison/yacc, and flex installed. - -bison can be obtained here: -- http://ftp.gnu.org/gnu/bison/bison-2.4.1.tar.gz - -Berkeley yacc can be obtained here: -- ftp://invisible-island.net/byacc/byacc.tar.gz +These tools are needed for LTP compilation. They should be available as a +package in any Linux distribution (no specific version is required). -flex can be obtained here: -- http://downloads.sourceforge.net/project/flex/flex/flex-2.5.33/flex-2.5.33.tar.bz2 +For compilation from tarball +* make +https://www.gnu.org/software/make/ -make 3.81 can be obtained here: -- http://ftp.gnu.org/gnu/make/make-3.81.tar.bz2 +For auto configuration from git +* pkgconf / pkg-config +https://git.sr.ht/~kaniini/pkgconf +http://pkgconf.org/ +https://www.freedesktop.org/wiki/Software/pkg-config/ -If you want to use auto configuration you also need autoconf-2.61+, automake-1.10+ -and pkg-config. +* autoconf +https://www.gnu.org/software/autoconf/ -automake-1.10.2's sources can be downloaded from: -- ftp://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.bz2 -- ftp://ftp.gnu.org/gnu/automake/automake-1.10.2.tar.gz +* automake +https://www.gnu.org/software/automake/ -autoconf-2.61's sources can be downloaded from: -- ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.bz2 -- ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.61.tar.gz +* m4 (autoconf requirement) +https://www.gnu.org/software/m4/ -autoconf-2.61 also requires m4-1.4.7+ be installed. Its sources can be -downloaded from: -- http://ftp.gnu.org/gnu/m4/m4-1.4.7.tar.bz2 -- http://ftp.gnu.org/gnu/m4/m4-1.4.7.tar.gz +For ltp-scanner +* GNU Bison / Berkeley Yacc +https://www.gnu.org/software/bison/ +https://invisible-island.net/byacc/byacc.html -pkg-config can be downloaded from: -- https://pkg-config.freedesktop.org/releases/ +* Flex +https://github.com/westes/flex Configuration -------------------
README.md +3 -2
@@ -37,8 +37,9 @@ on properly functioning systems, they are intended to find (or cause) problems. Quick guide to running the tests ================================ -If you have git, autoconf, automake, m4 and pkg-config, the linux headers and -the common developer packages installed, the chances are the following will work: +If you have git, autoconf, automake, m4, pkgconf / pkg-config, linux kernel +headers and the common developer packages installed, the chances are the +following will work: ``` $ git clone https://github.com/linux-test-project/ltp.git
Signature · 1 line
2.26.2
PATCH 2/4 INSTALL: Document 32bit and cross-compilation setup
In reply to Petr Vorelwhich requires also to set pkg-config environment variables.
This setup is needed since c7d2a7458 ("rpc-tirpc: Detect libtirpc with pkg-config")
--- INSTALL | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
INSTALL +16 -2
@@ -219,14 +219,28 @@ contributions are welcome. Cross compiling --------------- - To cross compile, you must specify the correct variables when running configure. -e.g. CC, LDFLAGS, etc... +e.g. CC, LDFLAGS, etc. +For correct pkgconf / pkg-config detection you need to set +PKG_CONFIG_SYSROOT_DIR=$SYSROOT After configure has run, it will generate include/mk/config.mk. You can tweak settings in there if need be, but you should not specificy settings on the command-line when running make. +32 bit build on 64 bit machine +------------------------------ +You need to set CFLAGS=-m32 LDFLAGS=-m32 and PKG_CONFIG_LIBDIR + +* RPM based distributions (openSUSE, Fedora, etc.) +PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig CFLAGS=-m32 LDFLAGS=-m32 ./configure + +* Debian / Ubuntu and derivates +PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 LDFLAGS=-m32 ./configure + +* Arch Linux +PKG_CONFIG_LIBDIR=/usr/lib32/pkgconfig CFLAGS=-m32 LDFLAGS=-m32 ./configure + uClinux Users -------------- Specify UCLINUX=1 when calling make; -DUCLINUX=1 use is deprecated and highly
Signature · 1 line
2.26.2
PATCH 2/4 INSTALL: Document 32bit and cross-compilation setup
Hi,
INSTALL contributions are welcome. · line 229
Quoted 12 lines
Cross compiling
---------------INSTALL +3
-2- To cross compile, you must specify the correct variables when running configure. -e.g. CC, LDFLAGS, etc... +e.g. CC, LDFLAGS, etc. +For correct pkgconf / pkg-config detection you need to set +PKG_CONFIG_SYSROOT_DIR=$SYSROOT After configure has run, it will generate include/mk/config.mk. You can tweak settings in there if need be, but you should not specificy settings on the command-line when running make.
It'd be nice to have true cross-compilation test...
INSTALL contributions are welcome. · line 239
Quoted 9 lines
+32 bit build on 64 bit machine
+------------------------------INSTALL +7
-0+You need to set CFLAGS=-m32 LDFLAGS=-m32 and PKG_CONFIG_LIBDIR + +* RPM based distributions (openSUSE, Fedora, etc.) +PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig CFLAGS=-m32 LDFLAGS=-m32 ./configure + +* Debian / Ubuntu and derivates +PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 LDFLAGS=-m32 ./configure
I guess, we should set this variable in 32 bit build in travis CI (we have only 1 job, which uses Debian). It's not failing now, because it's not a minimal build. Therefore we should have minimal 32 bit build (easiest way is to use openSUSE or Fedora/CentOS as they don't install libtirpc 32bit).
Kind regards,
Petr
PATCH 2/4 INSTALL: Document 32bit and cross-compilation setup
Hi Petr,
Quoted 9 lines · Petr Vorel
...
INSTALL contributions are welcome.
Quoted 6 lines
+32 bit build on 64 bit machine
+------------------------------INSTALL +4
-0+You need to set CFLAGS=-m32 LDFLAGS=-m32 and PKG_CONFIG_LIBDIR + +* RPM based distributions (openSUSE, Fedora, etc.) +PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig CFLAGS=-m32 LDFLAGS=-m32./configure
Quoted 5 lines
INSTALL contributions are welcome.
Quoted 3 lines
INSTALL +3
-0+ +* Debian / Ubuntu and derivates +PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32LDFLAGS=-m32 ./configure
I occationally build 32bit LTP on my RHEL8(x86_64) platform
via: CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" ./configure, it works for me awalys.
May I ask why we need the PKG_CONFIG_LIBDIR?
Quoted 9 lines
I guess, we should set this variable in 32 bit build in travis CI (we have only 1
job, which uses Debian). It's not failing now, because it's not a minimal build.
Therefore we should have minimal 32 bit build (easiest way is to use openSUSE or
Fedora/CentOS as they don't install libtirpc 32bit).
Good suggestion! I think at least for CentOS/RHEL has no problem with this.
Signature · 5 lines
Regards, Li Wang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.linux.it/pipermail/ltp/attachments/20200515/ea1166d4/attachment-0001.htm>
PATCH 2/4 INSTALL: Document 32bit and cross-compilation setup
Hi Li,
Quoted 17 lines · Petr Vorel
Quoted 10 lines
...
INSTALL contributions are welcome.
Quoted 6 lines
+32 bit build on 64 bit machine
+------------------------------INSTALL +4
-0+You need to set CFLAGS=-m32 LDFLAGS=-m32 and PKG_CONFIG_LIBDIR + +* RPM based distributions (openSUSE, Fedora, etc.) +PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig CFLAGS=-m32 LDFLAGS=-m32./configure
Quoted 4 lines
INSTALL contributions are welcome.
Quoted 3 lines
INSTALL +3
-0+ +* Debian / Ubuntu and derivates +PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32LDFLAGS=-m32 ./configure
Quoted 5 lines
I occationally build 32bit LTP on my
RHEL8(x86_64)platform
via: CFLAGS="-m32" CXXFLAGS="-m32" LDFLAGS="-m32" ./configure, it works for me awalys.May I ask why we need the
PKG_CONFIG_LIBDIR?
To correctly correctly detect 32 bit version of libtirpc-devel and libmnl-devel
If you have libtirpc-devel (64bit version) and don't have 32bit version, without it it detect 64bit version and fail in link phase
https://linux.die.net/man/1/pkg-config
https://autotools.io/pkgconfig/cross-compiling.html
BTW there other fix for TI-RPC tests (detection of old glibc support)
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
Quoted 10 lines
Quoted 7 lines
I guess, we should set this variable in 32 bit build in travis CI (we have only 1
job, which uses Debian). It's not failing now, because it's not a minimal build.
Therefore we should have minimal 32 bit build (easiest way is to use openSUSE or
Fedora/CentOS as they don't install libtirpc 32bit).Good suggestion! I think at least for CentOS/RHEL has no problem with this.
After release I'd propose to add Arch Linux and move CentOS 6 to CentOS 7. One of them could be 32 bit build.
Kind regards,
Petr
PATCH 3/4 INSTALL: Remove uClinux docs
In reply to Petr VoreluClinux is not active project any more.
And we have started to remove the code anyway.
--- INSTALL | 5 ----- 1 file changed, 5 deletions(-)
INSTALL +0 -5
@@ -241,11 +241,6 @@ PKG_CONFIG_LIBDIR=/usr/lib/i386-linux-gnu/pkgconfig CFLAGS=-m32 LDFLAGS=-m32 ./c * Arch Linux PKG_CONFIG_LIBDIR=/usr/lib32/pkgconfig CFLAGS=-m32 LDFLAGS=-m32 ./configure -uClinux Users --------------- -Specify UCLINUX=1 when calling make; -DUCLINUX=1 use is deprecated and highly -discouraged. - Android Users ------------- Specify ANDROID=1 when calling make. Many tests which would otherwise work are
Signature · 1 line
2.26.2
PATCH 4/4 doc: Remove links to README.mk-devel
In reply to Petr VorelIt was removed in f7f66820c ("Update some docs."), mention doc/build-system-guide.txt instead.
--- INSTALL | 3 ++- include/mk/config.mk.in | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
INSTALL +2 -1
@@ -264,7 +264,8 @@ LDFLAGS - linker flags, e.g. "-L$SYSROOT/usr/lib" "-L$SYSROOT/lib". DO NOT LDLIBS - libraries listed after objects during link, e.g. -lc, -lpthread, -lltp. -See README.mk-devel for a more terse description of what's available. +For other variables and more info about the build systems see +doc/build-system-guide.txt. Common Issues ----------------------
include/mk/config.mk.in +1 -1
@@ -62,7 +62,7 @@ LDFLAGS := @LDFLAGS@ DEBUG_CFLAGS ?= -g -# Please see README.mk-devel about -fstrict-aliasing. +# for -fstrict-aliasing see doc/build-system-guide.txt OPT_CFLAGS ?= -O2 -fno-strict-aliasing -pipe WCFLAGS ?= -Wall -W @GCC_WARN_OLDSTYLE@
Signature · 1 line
2.26.2