libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] MHD_start_daemon returns NULL


From: Evgeny Grin
Subject: Re: [libmicrohttpd] MHD_start_daemon returns NULL
Date: Fri, 23 Dec 2022 11:05:35 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1

Hi Roel,

Looks like your Linux kernel was compiled without eventfd support. Can you check your '.config' for 'CONFIG_EVENTFD'?

The easiest way to build working MHD in such case is use '--enable-itc=pipe' configure parameter. It will prevent usage of eventfd functions even if eventfd support is detected in headers and libc.

Thanks for your nice report, I'll add more checks in configure to check for the real eventfd availability.

--
Evgeny


On 22.12.2022 20:38, Roel Janssen wrote:
Dear list,

I'm trying to create an HTTP server for an ARMv7 device.
But MHD_start_daemon returns NULL, and I don't know how to go from there.

The device uses kernel:
# uname -a
Linux buildroot 4.0.0-ADI-1.3.0 #1 PREEMPT Thu Sep 15 16:03:17 UTC 2022 armv7l 
GNU/Linux

And libc:
# /lib/libc-2.18.so
GNU C Library (GNU libc) stable release version 2.18, by Roland McGrath et al.
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.8.3.
Compiled on a Linux 4.0.0 system on 2018-04-28.
Available extensions:
         crypt add-on version 2.1 by Michael Glad and others
         GNU Libidn by Simon Josefsson
         Native POSIX Threads Library by Ulrich Drepper et al
         BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.


I cross-compiled libmicrohttpd-0.9.75 with --enable-messages, and call 
MHD_start_daemon as
following:
daemon = MHD_start_daemon (MHD_USE_INTERNAL_POLLING_THREAD | MHD_USE_ERROR_LOG,
                            PORT, NULL, NULL, &respond, NULL, MHD_OPTION_END);

Unfortunately, MHD_start_daemon returns NULL. Here's the output snippet of 
strace:

write(1, "Starting HTTP server.\n", 22) = 22
brk(NULL)                               = 0x5a000
brk(0x7b000)                            = 0x7b000
eventfd2(0, EFD_CLOEXEC|EFD_NONBLOCK)   = -1 ENOSYS (Function not implemented)
write(2, "Failed to create inter-thread co"..., 78) = 78

What's going on?  And what can I do?

Kind regards,
Roel Janssen


Attachment: OpenPGP_0x460A317C3326D2AE.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]