troglobit / mdnsd

Jeremie Miller's original mdnsd
BSD 3-Clause "New" or "Revised" License
55 stars 35 forks source link

Can't "make" in termux android #51

Closed 3nd0y closed 1 year ago

3nd0y commented 2 years ago

Hello, i have problem while make in termux. Here step has been done:

./configure --prefix=$PWD/build CC=clang
make all

make  all-recursive
make[1]: Entering directory '/data/data/com.termux/files/home/github/mdnsd-0.11'
Making all in examples
make[2]: Entering directory '/data/data/com.termux/files/home/github/mdnsd-0.11/examples'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/data/data/com.termux/files/home/github/mdnsd-0.11/examples'
Making all in libmdnsd
make[2]: Entering directory '/data/data/com.termux/files/home/github/mdnsd-0.11/libmdnsd'
  CC       libmdnsd_la-log.lo
log.c:51:18: error: use of undeclared identifier 'prioritynames'
        for (int i = 0; prioritynames[i].c_name; i++) {
                        ^
log.c:52:27: error: use of undeclared identifier 'prioritynames'
                size_t len = MAX(strlen(prioritynames[i].c_name),
                                        ^
log.c:52:27: error: use of undeclared identifier 'prioritynames'
log.c:55:20: error: use of undeclared identifier 'prioritynames'
                if (!strncasecmp(prioritynames[i].c_name, level, len)) {
                                 ^
log.c:56:10: error: use of undeclared identifier 'prioritynames'
                        lvl = prioritynames[i].c_val;
                              ^
log.c:119:18: error: use of undeclared identifier 'INTERNAL_NOPRI'
        if (loglevel == INTERNAL_NOPRI)
                        ^
6 errors generated.
make[2]: *** [Makefile:458: libmdnsd_la-log.lo] Error 1
make[2]: Leaving directory '/data/data/com.termux/files/home/github/mdnsd-0.11/libmdnsd'
make[1]: *** [Makefile:516: all-recursive] Error 1
make[1]: Leaving directory '/data/data/com.termux/files/home/github/mdnsd-0.11'
make: *** [Makefile:380: all] Error 2

I tried clang in ubuntu images via termux it works, after sometimes then I asume that ubuntu has linux environment but clang termux isn't

Termux syslog:

$prefix/include/syslog.h 

Termux Ubuntu syslog:

/usr/include/aarch64-linux-gnu/sys/syslog.h
troglobit commented 1 year ago

From what I understand, termux is just a terminal emulator for Android. The root cause here is that Android use the Bionic C-library, which doesn't support all aspects of the traditional syslog API.

mdnsd supports GLIBC, uClibc/uClibc-ng, and musl libc.

Also, I don't really see the point of supporting Android, surely it already has native mDNS support?

Closing as wontfix.

troglobit commented 1 year ago

Ran into the same problem on Illumos/SmartOS. The same fix should work also for Bionic.