* [LTP] [PATCH 0/4] Update installation docs
@ 2020-05-14 18:49 Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 1/4] INSTALL: Update requirements Petr Vorel
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Petr Vorel @ 2020-05-14 18:49 UTC (permalink / raw)
To: ltp
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(-)
--
2.26.2
^ permalink raw reply [flat|nested] 8+ messages in thread
* [LTP] [PATCH 1/4] INSTALL: Update requirements
2020-05-14 18:49 [LTP] [PATCH 0/4] Update installation docs Petr Vorel
@ 2020-05-14 18:49 ` Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup Petr Vorel
` (2 subsequent siblings)
3 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2020-05-14 18:49 UTC (permalink / raw)
To: ltp
* 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 :)
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
INSTALL | 51 ++++++++++++++++++++++-----------------------------
README.md | 5 +++--
2 files changed, 25 insertions(+), 31 deletions(-)
diff --git a/INSTALL b/INSTALL
index 8bf6fe005..e4fa1adf3 100644
--- a/INSTALL
+++ b/INSTALL
@@ -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
-------------------
diff --git a/README.md b/README.md
index a2a623f40..15f8814c3 100644
--- a/README.md
+++ b/README.md
@@ -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
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup
2020-05-14 18:49 [LTP] [PATCH 0/4] Update installation docs Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 1/4] INSTALL: Update requirements Petr Vorel
@ 2020-05-14 18:49 ` Petr Vorel
2020-05-14 19:34 ` Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 3/4] INSTALL: Remove uClinux docs Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 4/4] doc: Remove links to README.mk-devel Petr Vorel
3 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2020-05-14 18:49 UTC (permalink / raw)
To: ltp
which requires also to set pkg-config environment variables.
This setup is needed since c7d2a7458 ("rpc-tirpc: Detect libtirpc with
pkg-config")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
INSTALL | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/INSTALL b/INSTALL
index e4fa1adf3..f73bec54c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -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
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [LTP] [PATCH 3/4] INSTALL: Remove uClinux docs
2020-05-14 18:49 [LTP] [PATCH 0/4] Update installation docs Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 1/4] INSTALL: Update requirements Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup Petr Vorel
@ 2020-05-14 18:49 ` Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 4/4] doc: Remove links to README.mk-devel Petr Vorel
3 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2020-05-14 18:49 UTC (permalink / raw)
To: ltp
uClinux is not active project any more.
And we have started to remove the code anyway.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
INSTALL | 5 -----
1 file changed, 5 deletions(-)
diff --git a/INSTALL b/INSTALL
index f73bec54c..1eda570b5 100644
--- a/INSTALL
+++ b/INSTALL
@@ -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
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [LTP] [PATCH 4/4] doc: Remove links to README.mk-devel
2020-05-14 18:49 [LTP] [PATCH 0/4] Update installation docs Petr Vorel
` (2 preceding siblings ...)
2020-05-14 18:49 ` [LTP] [PATCH 3/4] INSTALL: Remove uClinux docs Petr Vorel
@ 2020-05-14 18:49 ` Petr Vorel
3 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2020-05-14 18:49 UTC (permalink / raw)
To: ltp
It was removed in f7f66820c ("Update some docs."),
mention doc/build-system-guide.txt instead.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
INSTALL | 3 ++-
include/mk/config.mk.in | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/INSTALL b/INSTALL
index 1eda570b5..bfed194c6 100644
--- a/INSTALL
+++ b/INSTALL
@@ -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
----------------------
diff --git a/include/mk/config.mk.in b/include/mk/config.mk.in
index 87b2c833d..427608a17 100644
--- a/include/mk/config.mk.in
+++ b/include/mk/config.mk.in
@@ -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@
--
2.26.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup
2020-05-14 18:49 ` [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup Petr Vorel
@ 2020-05-14 19:34 ` Petr Vorel
2020-05-15 7:45 ` Li Wang
0 siblings, 1 reply; 8+ messages in thread
From: Petr Vorel @ 2020-05-14 19:34 UTC (permalink / raw)
To: ltp
Hi,
> 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.
It'd be nice to have true cross-compilation test...
> +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
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup
2020-05-14 19:34 ` Petr Vorel
@ 2020-05-15 7:45 ` Li Wang
2020-05-15 7:54 ` Petr Vorel
0 siblings, 1 reply; 8+ messages in thread
From: Li Wang @ 2020-05-15 7:45 UTC (permalink / raw)
To: ltp
Hi Petr,
On Fri, May 15, 2020 at 3:34 AM Petr Vorel <pvorel@suse.cz> wrote:
> ...
>
> > +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
>
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?
>
> 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.
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20200515/ea1166d4/attachment-0001.htm>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup
2020-05-15 7:45 ` Li Wang
@ 2020-05-15 7:54 ` Petr Vorel
0 siblings, 0 replies; 8+ messages in thread
From: Petr Vorel @ 2020-05-15 7:54 UTC (permalink / raw)
To: ltp
Hi Li,
> On Fri, May 15, 2020 at 3:34 AM Petr Vorel <pvorel@suse.cz> wrote:
> > ...
> > > +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
> 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/20200515070022.16407-1-pvorel@suse.cz/
> > 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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-05-15 7:54 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-14 18:49 [LTP] [PATCH 0/4] Update installation docs Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 1/4] INSTALL: Update requirements Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup Petr Vorel
2020-05-14 19:34 ` Petr Vorel
2020-05-15 7:45 ` Li Wang
2020-05-15 7:54 ` Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 3/4] INSTALL: Remove uClinux docs Petr Vorel
2020-05-14 18:49 ` [LTP] [PATCH 4/4] doc: Remove links to README.mk-devel Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.