From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/4] INSTALL: Document 32bit and cross-compilation setup
Date: Fri, 15 May 2020 09:54:04 +0200 [thread overview]
Message-ID: <20200515075404.GA1751673@x230> (raw)
In-Reply-To: <CAEemH2etn2mSJbV=a=xpVMnUOjKdKrp0C5Cch2JYtbZ2pDkRyw@mail.gmail.com>
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
next prev parent reply other threads:[~2020-05-15 7:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200515075404.GA1751673@x230 \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.