Bug 10326

Summary: mesa3d package fails to build when BR2_SHARED_STATIC_LIBS=y
Product: buildroot Reporter: Frederic MATHIEU <frederic.mathieu>
Component: OtherAssignee: Bernd Kuhls <bernd>
Status: RESOLVED FIXED    
Severity: normal CC: buildroot
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:
Attachments: compilation log

Description Frederic MATHIEU 2017-09-25 12:49:26 UTC
Created attachment 7236 [details]
compilation log

Hi

with BR2_SHARED_STATIC_LIBS=y, mesa3d package compilation exits with error 2.
the compilation is successfully completed if I add the following lines to makefile (package/mesa3d/mesa3d.mk) : 

ifeq ($(BR2_SHARED_STATIC_LIBS),y)
MESA3D_CONF_OPTS += --disable-static
endif

bug found on versions 2017.08, 2017.05.x

regards
Fredric MATHIEU
Comment 1 Bernd Kuhls 2017-09-25 18:53:47 UTC
Fixed with http://patchwork.ozlabs.org/patch/818330/
Comment 2 Frederic MATHIEU 2017-09-26 07:06:34 UTC
This patch no longer allows you to compile the package if the configuration uses BR2_SHARED_STATIC_LIBS (static and shared). Some static libraries are wished for others packages.

this is not the solution to use.

Regards
Frederic MATHIEU
Comment 3 Bernd Kuhls 2017-09-26 16:19:02 UTC
(In reply to Frederic MATHIEU from comment #2)

Why?

BR2_SHARED_STATIC_LIBS=y means 
https://git.buildroot.net/buildroot/tree/Config.in#n655
"Build both shared and static libraries".

Mesa3d does not support this combination:
https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=17.2#n490
Comment 4 Frederic MATHIEU 2017-09-27 08:13:57 UTC
I do understand that the package mesa3d does not support static libraries, but others packages do. BR2_SHARED_STATIC_LIBS is global to all buildroot packages. So if the Mesa package does support this feature, it must be deactivated only for it. This is why the following code works very well:


ifeq ($(BR2_SHARED_STATIC_LIBS),y)
MESA3D_CONF_OPTS += --disable-static
endif
Comment 5 Arnout Vandecappelle 2017-09-27 19:07:20 UTC
I agree with Frederic, there is no reason to exclude mesa3d, since it builds fine under SHARED_STATIC with the additional --disable-static option. SHARED_STATIC is meant for building a shared-library based rootfs and still allowing some (custom?) packages to link statically. So if some package is shared-only (or static-only, for that matter), it should still be possible to build it.

Frederic, would you send your proposal as a properly formatted patch to the mailing list?
https://buildroot.org/downloads/manual/manual.html#submitting-patches