[Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib
Peter Korsgaard
peter at korsgaard.com
Thu Aug 1 10:41:52 UTC 2019
>>>>> "Peter" == Peter Korsgaard <peter at korsgaard.com> writes:
Hi,
>> +ifeq ($(BR2_STATIC_LIBS),y)
>> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes WITH_SHARED_LIBRARIES=no
>> +else
>> +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no WITH_SHARED_LIBRARIES=yes
>> +endif
> We actually have 3 variants:
> - static only (BR2_STATIC_LIBS)
> - shared only (BR2_SHARED_LIBS)
> - shared and static (BR2_SHARED_STATIC_LIBS)
> So I reworked it to take that into consideration and committed, thanks.
Sorry, I will have to take that back. I did a test compilation with a
completely static (BR2_STATIC_LIBS) setup, which failed:
In file included from security.c:25:
lib_load.h:23:11: fatal error: dlfcn.h: No such file or directory
# include <dlfcn.h>
^~~~~~~~~
compilation terminated.
The loadable plugin logic in security.c seems to be built
unconditionally, so that cannot work in a completely static setup.
Care to bring up this issue upstream?
In the mean time I have marked your patch as changes requested. For
reference, the changes I did in mosquitto.mk look like this:
feq ($(BR2_SHARED_LIBS),y)
MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no
else
MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes
endif
ifeq ($(BR2_STATIC_LIBS),y)
MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=no
else
MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=yes
endif
--
Bye, Peter Korsgaard
More information about the buildroot
mailing list