public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: Steve Dickson <SteveD@redhat.com>
Cc: linux-nfs@vger.kernel.org, Mike Frysinger <vapier@gentoo.org>
Subject: Re: [nfs-utils RESENT PATCH 1/1] locktes/rpcgen: tweak how we override compiler settings
Date: Tue, 14 Jan 2020 19:36:03 +0100	[thread overview]
Message-ID: <20200114183603.GA24556@dell5510> (raw)
In-Reply-To: <bda9e61c-1a06-5ab3-339f-c38e9a68fb73@RedHat.com>

Hi Steve,

> Actually try this one... the one that works! ;-) 

> diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
> index 3156815..d5cf8da 100644
> --- a/tools/locktest/Makefile.am
> +++ b/tools/locktest/Makefile.am
> @@ -1,12 +1,11 @@
>  ## Process this file with automake to produce Makefile.in

>  CC=$(CC_FOR_BUILD)
> -LIBTOOL = @LIBTOOL@ --tag=CC
> +AM_CFLAGS=$(CFLAGS_FOR_BUILD)
> +AM_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
> +AM_LDFLAGS=$(LDFLAGS_FOR_BUILD)

>  noinst_PROGRAMS = testlk
>  testlk_SOURCES = testlk.c
> -testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
> -testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
> -testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)

>  MAINTAINERCLEANFILES = Makefile.in
> diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
> index 8a9ec89..84cafb2 100644
> --- a/tools/rpcgen/Makefile.am
> +++ b/tools/rpcgen/Makefile.am
> @@ -1,7 +1,9 @@
>  ## Process this file with automake to produce Makefile.in

>  CC=$(CC_FOR_BUILD)
> -LIBTOOL = @LIBTOOL@ --tag=CC
> +AM_CFLAGS=$(CFLAGS_FOR_BUILD) ${TIRPC_CFLAGS}
> +AM_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
> +AM_LDFLAGS=$(LDFLAGS_FOR_BUILD)

>  noinst_PROGRAMS = rpcgen
>  rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
> @@ -9,11 +11,6 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
>                  rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \
>                  rpc_scan.h rpc_util.h

> -rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
> -rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
> -rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
> -rpcgen_LDADD=$(LIBTIRPC)
> -
>  MAINTAINERCLEANFILES = Makefile.in

>  EXTRA_DIST = rpcgen.new.1

IMHO this one don't work for cross-compilation, tested on buildroot:

PATH="/br-test-pkg/br-arm-full-static/host/bin:/br-test-pkg/br-arm-full-static/host/sbin:/.common/bin/suse:/.local/bin:/.gem/ruby/2.2.0/bin:/bin/:~/.local/bin/:/.common/bin/:~/.vim/bin/:/usr/sbin/:/sbin/:/home/pevik/.common/bin/suse:/home/pevik/bin/:~/.local/bin/:/home/pevik/.common/bin/:~/.vim/bin/:/usr/sbin/:/sbin/:/bin:/usr/local/bin:/usr/bin:/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/X11R6/bin"  /usr/bin/make -j9  -C /br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4/
make[1]: Entering directory '/br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4'
Making all in tools
make[2]: Entering directory '/br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4/tools'
Making all in locktest
make[3]: Entering directory '/br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4/tools/locktest'
/usr/bin/gcc -DHAVE_CONFIG_H -I. -I../../support/include  -I/br-test-pkg/br-arm-full-static/host/include -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -O2 -I/br-test-pkg/br-arm-full-static/host/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -static -c -o testlk.o testlk.c
/bin/sh ../../libtool --tag=CC  --tag=CC   --mode=link /usr/bin/gcc -O2 -I/br-test-pkg/br-arm-full-static/host/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os   -static -L/br-test-pkg/br-arm-full-static/host/lib -Wl,-rpath,/br-test-pkg/br-arm-full-static/host/lib -static -o testlk testlk.o  
libtool: link: /usr/bin/gcc -O2 -I/br-test-pkg/br-arm-full-static/host/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -static -Wl,-rpath -Wl,/br-test-pkg/br-arm-full-static/host/lib -static -o testlk testlk.o  -L/br-test-pkg/br-arm-full-static/host/lib
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:417: testlk] Error 1
make[3]: Leaving directory '/br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4/tools/locktest'
make[2]: *** [Makefile:429: all-recursive] Error 1
make[2]: Leaving directory '/br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4/tools'
make[1]: *** [Makefile:469: all-recursive] Error 1
make[1]: Leaving directory '/br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4'
make: *** [package/pkg-generic.mk:260: /br-test-pkg/br-arm-full-static/build/nfs-utils-1.3.4/.stamp_built] Error 2

I can send you more debug info, but IMHO Mike's patch is really needed.

Kind regards,
Petr

  reply	other threads:[~2020-01-14 18:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-05 12:05 [nfs-utils RESENT PATCH 1/1] locktes/rpcgen: tweak how we override compiler settings Petr Vorel
2020-01-07 19:20 ` Steve Dickson
2020-01-07 19:38   ` Steve Dickson
2020-01-14 18:36     ` Petr Vorel [this message]
2020-01-16 21:22       ` Steve Dickson
2020-01-16 21:34         ` Giulio Benetti
2020-01-20  8:48           ` 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=20200114183603.GA24556@dell5510 \
    --to=petr.vorel@gmail.com \
    --cc=SteveD@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=vapier@gentoo.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox