Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] [autobuild] package/nbd: fix static builds
@ 2015-08-13 19:55 Yann E. MORIN
  2015-08-18  9:18 ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2015-08-13 19:55 UTC (permalink / raw)
  To: buildroot

Fixes:
    http://autobuild.buildroot.org/results/aa8/aa8a1ac35a93e1c8b9fddbc2b5d66ecaa921f31e/ (arm)
    http://autobuild.buildroot.org/results/e5b/e5bd05623dd6c57bb0338592ecd21a5ba0cbe95a/ (arc)
    http://autobuild.buildroot.org/results/e0f/e0fd23eec2dd31bece122d84515b2b7cb14594b8/ (ppc)
    http://autobuild.buildroot.org/results/3a2/3a2d4124f78d4e504e8e961fabe038e570923408/ (mips)
    ...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
 package/nbd/0001-avoid-name-clashing.patch | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/nbd/0001-avoid-name-clashing.patch

diff --git a/package/nbd/0001-avoid-name-clashing.patch b/package/nbd/0001-avoid-name-clashing.patch
new file mode 100644
index 0000000..b3ea9c9
--- /dev/null
+++ b/package/nbd/0001-avoid-name-clashing.patch
@@ -0,0 +1,28 @@
+rename err() function to avoid clashing with err() form C library
+
+err() is a function available in the C library, so when static linking,
+there is a clash at link timebecause the function is provided both by
+nbd and the C library:
+    http://autobuild.buildroot.org/results/aa8/aa8a1ac35a93e1c8b9fddbc2b5d66ecaa921f31e/build-end.log
+
+Fix that by renaming err() to nbd_err() and providing a small maco
+wrapper to avoid touching the many call sites.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+
+---
+Upstream status: hack, not submitted.
+
+diff -durN nbd-3.11.orig/cliserv.h nbd-3.11/cliserv.h
+--- nbd-3.11.orig/cliserv.h	2015-05-25 12:27:56.000000000 +0200
++++ nbd-3.11/cliserv.h	2015-08-13 19:28:21.609467505 +0200
+@@ -75,7 +75,8 @@
+ void setmysockopt(int sock);
+ void err_nonfatal(const char *s);
+ 
+-void err(const char *s) G_GNUC_NORETURN;
++void nbd_err(const char *s) G_GNUC_NORETURN;
++#define err(S) nbd_err(S)
+ 
+ void logging(const char* name);
+ 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] [autobuild] package/nbd: fix static builds
  2015-08-13 19:55 [Buildroot] [PATCH] [autobuild] package/nbd: fix static builds Yann E. MORIN
@ 2015-08-18  9:18 ` Thomas Petazzoni
  2015-08-18  9:32   ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2015-08-18  9:18 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Thu, 13 Aug 2015 21:55:31 +0200, Yann E. MORIN wrote:
> Fixes:
>     http://autobuild.buildroot.org/results/aa8/aa8a1ac35a93e1c8b9fddbc2b5d66ecaa921f31e/ (arm)
>     http://autobuild.buildroot.org/results/e5b/e5bd05623dd6c57bb0338592ecd21a5ba0cbe95a/ (arc)
>     http://autobuild.buildroot.org/results/e0f/e0fd23eec2dd31bece122d84515b2b7cb14594b8/ (ppc)
>     http://autobuild.buildroot.org/results/3a2/3a2d4124f78d4e504e8e961fabe038e570923408/ (mips)
>     ...
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
>  package/nbd/0001-avoid-name-clashing.patch | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
>  create mode 100644 package/nbd/0001-avoid-name-clashing.patch
> 
> diff --git a/package/nbd/0001-avoid-name-clashing.patch b/package/nbd/0001-avoid-name-clashing.patch
> new file mode 100644
> index 0000000..b3ea9c9
> --- /dev/null
> +++ b/package/nbd/0001-avoid-name-clashing.patch
> @@ -0,0 +1,28 @@
> +rename err() function to avoid clashing with err() form C library
> +
> +err() is a function available in the C library, so when static linking,
> +there is a clash at link timebecause the function is provided both by
> +nbd and the C library:
> +    http://autobuild.buildroot.org/results/aa8/aa8a1ac35a93e1c8b9fddbc2b5d66ecaa921f31e/build-end.log
> +
> +Fix that by renaming err() to nbd_err() and providing a small maco
> +wrapper to avoid touching the many call sites.
> +
> +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> +
> +---
> +Upstream status: hack, not submitted.

Please submit the patch upstream anyway, so that upstream is aware of
the problem, and hopefully implements a proper solution.

I've applied your patch to master, thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] [autobuild] package/nbd: fix static builds
  2015-08-18  9:18 ` Thomas Petazzoni
@ 2015-08-18  9:32   ` Yann E. MORIN
  2015-08-18  9:46     ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2015-08-18  9:32 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2015-08-18 11:18 +0200, Thomas Petazzoni spake thusly:
> On Thu, 13 Aug 2015 21:55:31 +0200, Yann E. MORIN wrote:
> > +rename err() function to avoid clashing with err() form C library
> > +
> > +err() is a function available in the C library, so when static linking,
> > +there is a clash at link timebecause the function is provided both by
> > +nbd and the C library:
> > +    http://autobuild.buildroot.org/results/aa8/aa8a1ac35a93e1c8b9fddbc2b5d66ecaa921f31e/build-end.log
> > +
> > +Fix that by renaming err() to nbd_err() and providing a small maco
> > +wrapper to avoid touching the many call sites.
> > +
> > +Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > +
> > +---
> > +Upstream status: hack, not submitted.
> 
> Please submit the patch upstream anyway, so that upstream is aware of
> the problem, and hopefully implements a proper solution.

I'm doing a proper patch for upstream, that does the rename globally,
and that's what I'm gonna submit.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] [autobuild] package/nbd: fix static builds
  2015-08-18  9:32   ` Yann E. MORIN
@ 2015-08-18  9:46     ` Thomas Petazzoni
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2015-08-18  9:46 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Tue, 18 Aug 2015 11:32:30 +0200, Yann E. MORIN wrote:

> > > +Upstream status: hack, not submitted.
> > 
> > Please submit the patch upstream anyway, so that upstream is aware of
> > the problem, and hopefully implements a proper solution.
> 
> I'm doing a proper patch for upstream, that does the rename globally,
> and that's what I'm gonna submit.

Perfect, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-18  9:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-13 19:55 [Buildroot] [PATCH] [autobuild] package/nbd: fix static builds Yann E. MORIN
2015-08-18  9:18 ` Thomas Petazzoni
2015-08-18  9:32   ` Yann E. MORIN
2015-08-18  9:46     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox