Skip to contentSkip to conversation

libsemanage: fix build error when linking with ustr

PATCH New Sergio Prado 3 participants 4 messages Dec 3, 2015 – Dec 9, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libsemanage: fix build error when linking with ustr

Disable ustr inline functions to avoid multiple definition of symbols error when linking with ustr.

Fixes:
http://autobuild.buildroot.net/results/e7012c7a734dbdd1c697cf63b6df6e834e8eafc7
http://autobuild.buildroot.net/results/0783a63e4694ffa8463ef5533b635c7e7c43dd42
http://autobuild.buildroot.net/results/40726abf3419a727c5762ef2791dbf53fa1736c0
http://autobuild.buildroot.net/results/a6a0c827c393a5fb41653d71d1ee50df283a32fb
...

---
 package/libsemanage/libsemanage.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/libsemanage/libsemanage.mk +6 -1
index 197c14e4229a..ea9f4c9f67de 100644
@@ -13,10 +13,15 @@ LIBSEMANAGE_INSTALL_STAGING = YES
 
 LIBSEMANAGE_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS)
 
+# disable ustr inline functions to avoid multiple definition of symbols
+# error when linking
+LIBSEMANAGE_CFLAGS = $(TARGET_CFLAGS) -DUSTR_CONF_COMPILE_USE_INLINE=0
+
 define LIBSEMANAGE_BUILD_CMDS
 	# DESTDIR is needed during the compile to compute library and
 	# header paths.
-	$(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all
+	$(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) CFLAGS="$(LIBSEMANAGE_CFLAGS)" \
+		DESTDIR=$(STAGING_DIR) all
 endef
 
 define LIBSEMANAGE_INSTALL_STAGING_CMDS
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 libsemanage: fix build error when linking with ustr

Sergio,

Quoted 11 lines · Sergio Prado

Disable ustr inline functions to avoid multiple definition of symbols error when linking with ustr.

Fixes:
http://autobuild.buildroot.net/results/e7012c7a734dbdd1c697cf63b6df6e834e8eafc7
http://autobuild.buildroot.net/results/0783a63e4694ffa8463ef5533b635c7e7c43dd42
http://autobuild.buildroot.net/results/40726abf3419a727c5762ef2791dbf53fa1736c0
http://autobuild.buildroot.net/results/a6a0c827c393a5fb41653d71d1ee50df283a32fb
...

There is another fix pending for this problem, which consists in bumping the ustr version. See http://patchwork.ozlabs.org/patch/547117/
and http://patchwork.ozlabs.org/patch/547118/.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 libsemanage: fix build error when linking with ustr

In reply to Sergio Prado

Sergio, All,

Thanks for your patch! :-)

On 2015-12-03 18:25 -0200, Sergio Prado spake thusly:

Quoted 11 lines

Disable ustr inline functions to avoid multiple definition of symbols error when linking with ustr.

Fixes:
http://autobuild.buildroot.net/results/e7012c7a734dbdd1c697cf63b6df6e834e8eafc7
http://autobuild.buildroot.net/results/0783a63e4694ffa8463ef5533b635c7e7c43dd42
http://autobuild.buildroot.net/results/40726abf3419a727c5762ef2791dbf53fa1736c0
http://autobuild.buildroot.net/results/a6a0c827c393a5fb41653d71d1ee50df283a32fb
...

As Thomas already pointed to, there is already a two-patch series to fix the issue by bumping and fixing ustr itself.

So I've marked your patch as rejected in our patchwork:

    https://patchwork.ozlabs.org/patch/552445/

Thanks! :-)

Regards,
Yann E. MORIN.

Quoted 32 lines
---
 package/libsemanage/libsemanage.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/libsemanage/libsemanage.mk +6 -1
index 197c14e4229a..ea9f4c9f67de 100644
@@ -13,10 +13,15 @@ LIBSEMANAGE_INSTALL_STAGING = YES
 
 LIBSEMANAGE_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS)
 
+# disable ustr inline functions to avoid multiple definition of symbols
+# error when linking
+LIBSEMANAGE_CFLAGS = $(TARGET_CFLAGS) -DUSTR_CONF_COMPILE_USE_INLINE=0
+
 define LIBSEMANAGE_BUILD_CMDS
 	# DESTDIR is needed during the compile to compute library and
 	# header paths.
-	$(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(STAGING_DIR) all
+	$(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) CFLAGS="$(LIBSEMANAGE_CFLAGS)" \
+		DESTDIR=$(STAGING_DIR) all
 endef
 
 define LIBSEMANAGE_INSTALL_STAGING_CMDS
Signature · 6 lines
1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 libsemanage: fix build error when linking with ustr

2015-12-08 18:59 GMT-02:00 Yann E. MORIN <[email protected]>:

Quoted 20 lines

Sergio, All,

Thanks for your patch! :-)

On 2015-12-03 18:25 -0200, Sergio Prado spake thusly:

Quoted 1 line

Disable ustr inline functions to avoid multiple definition of symbols

error

Quoted 4 lines

when linking with ustr.

Fixes:

http://autobuild.buildroot.net/results/e7012c7a734dbdd1c697cf63b6df6e834e8eafc7

Quoted 1 line

http://autobuild.buildroot.net/results/0783a63e4694ffa8463ef5533b635c7e7c43dd42

Quoted 1 line

http://autobuild.buildroot.net/results/40726abf3419a727c5762ef2791dbf53fa1736c0

Quoted 1 line

http://autobuild.buildroot.net/results/a6a0c827c393a5fb41653d71d1ee50df283a32fb

Quoted 2 lines

...

Quoted 8 lines
Quoted 1 line

As Thomas already pointed to, there is already a two-patch series to fix the issue by bumping and fixing ustr itself.

So I've marked your patch as rejected in our patchwork:

    https://patchwork.ozlabs.org/patch/552445/

OK.

Quoted 4 lines

Thanks! :-)

Thanks,

Quoted 52 lines

Regards,
Yann E. MORIN.

package/libsemanage/

Quoted 5 lines
---
 package/libsemanage/libsemanage.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/libsemanage/ renamed from package/libsemanage/libsemanage.mk +0 -0

libsemanage.mk

Quoted 5 lines

index 197c14e4229a..ea9f4c9f67de 100644

package/libsemanage/libsemanage.mk +0 -0
@@ -13,10 +13,15 @@ LIBSEMANAGE_INSTALL_STAGING = YES
 

package/libsemanage/libsemanage.mk LIBSEMANAGE_INSTALL_STAGING = YES · line 19

Quoted 10 lines
package/libsemanage/libsemanage.mk +4 -1
 LIBSEMANAGE_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS)
 
+# disable ustr inline functions to avoid multiple definition of symbols
+# error when linking
+LIBSEMANAGE_CFLAGS = $(TARGET_CFLAGS) -DUSTR_CONF_COMPILE_USE_INLINE=0
+
 define LIBSEMANAGE_BUILD_CMDS
      # DESTDIR is needed during the compile to compute library and
      # header paths.
-     $(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS) DESTDIR=$(STAGING_DIR)

all

package/libsemanage/libsemanage.mk LIBSEMANAGE_INSTALL_STAGING = YES · line 23

Quoted 1 line
package/libsemanage/libsemanage.mk +1 -0
+     $(MAKE) -C $(@D) $(LIBSEMANAGE_MAKE_OPTS)

CFLAGS="$(LIBSEMANAGE_CFLAGS)" \

Quoted 11 lines
package/libsemanage/libsemanage.mk +1 -1
+             DESTDIR=$(STAGING_DIR) all
 endef
 
 define LIBSEMANAGE_INSTALL_STAGING_CMDS
--

1.9.1

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--

.-----------------.--------------------.------------------.--------------------.

|  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.  |
Quoted 2 lines

'------------------------------^-------^------------------^--------------------'

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20151208/fccc12fd/attachment.html>