[OpenWrt-Devel] mempool support question for building software
Florian Fainelli
florian at openwrt.org
Wed Jun 25 14:36:58 EDT 2014
2014-06-25 4:54 GMT-07:00 Derek Werthmuller <thewerthfam at gmail.com>:
> After some research I've determined the header files I'm looking for are
> kernel header files. They are part of the memory management /memory
> allocation section. The package I'm trying to build uses mempool.h for
> faster memory allocation.
> Any help or advice on how to get the kernel to export these header files?
This is a poor portability decision to rely on a Linux header that is
not even exported. If we had to export mempool.h, this would be yet
another patch that we had to maintain in OpenWrt because nobody would
be accepting that upstream.
Please find a way to work with the upstream authors of your package so that:
a) they use a custom memory allocator that does not rely on mempool.h
to be available if the standard C library malloc() implemenation is
not fast enough (there are standard ways to implement a custom memory
allocator)
b) they provide a configure script switch and compile time switch that
allows turning off the mempool.h dependency entirely
> Cheers
> Derek
>
>
> On Fri, Jun 6, 2014 at 6:53 PM, Florian Fainelli <florian at openwrt.org>
> wrote:
>>
>> 2014-06-06 15:35 GMT-07:00 Derek Werthmuller <thewerthfam at gmail.com>:
>> > I'm trying to build a new version of clamav for the brcm2708 platform
>> > and
>> > have some questions about the new build dependencies for the latest
>> > version
>> > of clamav 98.3. 98.1 built OK and didn't use openssl.
>> >
>> > The configure portion of the build is asking about mempool support.
>> > output snip
>> > ....
>> > checking for sysctlbyname... no
>> > configure: ****** mempool support disabled (mmap not available or not
>> > usable)
>> > ..
>> > mempool.h is found in the -I$(BUILD_DIR)/linux-3.10.36/mm directory.
>> > I've
>> > included the directory path in the Target_cpplfags, like below. Is this
>> > the
>> > right way to do this?
>>
>> This is not the right way to do this, you should not include Linux
>> kernel headers directly that have not been voluntarily exported.
>>
>> The kernel exports some header files for use by user-programs from its
>> include/uapi/ directory. Those kernel headers are staged by the
>> toolchain build process in staging_dir/toolchain-*/usr/include/linux.
>>
>> mempool.h does not appear to be in the headers exported for uapi, so I
>> am not sure this is referring to the same mempool.h header file, it
>> could be either some external library, or some internal header that
>> does not get properly included.
>>
>> > As the make file will obviously be out of date soon
>> > as a new kernel version is used.
>> >
>> > TARGET_CPPFLAGS += \
>> > -I$(STAGING_DIR)/usr/include \
>> > -I$(STAGING_DIR)/usr/include/openssl \
>> > -I$(STAGING_DIR)/usr/include/crypto \
>> > -I$(STAGING_DIR)/usr/include/libxml2 \
>> > -I$(STAGING_DIR)/usr/lib \
>> > -I$(TOOLCHAIN_DIR)/include \
>> > -I$(BUILD_DIR)/linux-3.10.36/mm \
>> >
>> > Thanks for the advice in advance.
>> >
>> > Cheers
>> > Derek
>> >
>> > _______________________________________________
>> > openwrt-devel mailing list
>> > openwrt-devel at lists.openwrt.org
>> > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>> >
>>
>> --
>> Florian
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>
--
Florian
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list